-- Скрипт полёта с красивым синим огнём -- Создаёт эффект синего пламени при полёте local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") -- Настройки local Settings = { FlySpeed = 50, ToggleKey = Enum.KeyCode.F, -- Клавиша для включения/выключения FireSize = 5, FireColor = Color3.fromRGB(0, 150, 255), FireTransparency = 0.3, TrailEnabled = true } -- Переменные local isFlying = false local flyConnection = nil local fireEffects = {} local trailEffect = nil -- Функция создания огня local function createFire(parent, position) local fire = Instance.new("Fire") fire.Size = Settings.FireSize fire.Color = Settings.FireColor fire.SecondaryColor = Color3.fromRGB(0, 100, 200) fire.Heat = 15 fire.Parent = parent return fire end -- Функция создания эффекта следа local function createTrail() local trail = Instance.new("Trail") trail.Color = Color3.new(0, 0.6, 1) trail.Lifetime = 1 trail.MinLength = 1 trail.MaxLength = 10 trail.Transparency = NumberSequence.new(0, 1) trail.Parent = rootPart return trail end -- Функция создания эффектов полёта local function createFlyEffects() -- Огонь на ногах local leftFoot = character:FindFirstChild("LeftFoot") local rightFoot = character:FindFirstChild("RightFoot") if leftFoot then local fire = createFire(leftFoot, Vector3.new(0, -1, 0)) table.insert(fireEffects, fire) end if rightFoot then local fire = createFire(rightFoot, Vector3.new(0, -1, 0)) table.insert(fireEffects, fire) end -- Огонь под персонажем local groundFire = Instance.new("Part") groundFire.Name = "FlyFirePart" groundFire.Size = Vector3.new(3, 0.5, 3) groundFire.Transparency = 0 groundFire.CanCollide = false groundFire.Anchored = true groundFire.Parent = character local fire = createFire(groundFire, Vector3.new(0, 0, 0)) table.insert(fireEffects, fire) -- След if Settings.TrailEnabled then trailEffect = createTrail() end end -- Функция удаления эффектов local function removeFlyEffects() for _, fire in ipairs(fireEffects) do if fire and fire.Parent then fire:Destroy() end end fireEffects = {} if trailEffect then trailEffect:Destroy() trailEffect = nil end local groundFire = character:FindFirstChild("FlyFirePart") if groundFire then groundFire:Destroy() end end -- Функция включения полёта local function startFly() if isFlying then return end isFlying = true createFlyEffects() -- Включаем невесомость humanoid:ChangeState(Enum.HumanoidStateType.Flying) humanoid:SetStateEnabled(Enum.HumanoidStateType.Falling, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) -- Управление полётом flyConnection = game:GetService("RunService").Heartbeat:Connect(function(deltaTime) if not isFlying then return end local camera = workspace.CurrentCamera local moveDirection = Vector3.new() -- Получаем ввод local keyboard = game:GetService("UserInputService") if keyboard:IsKeyDown(Enum.KeyCode.W) then moveDirection = moveDirection + camera.CFrame.LookVector end if keyboard:IsKeyDown(Enum.KeyCode.S) then moveDirection = moveDirection - camera.CFrame.LookVector end if keyboard:IsKeyDown(Enum.KeyCode.A) then moveDirection = moveDirection - camera.CFrame.RightVector end if keyboard:IsKeyDown(Enum.KeyCode.D) then moveDirection = moveDirection + camera.CFrame.RightVector end if keyboard:IsKeyDown(Enum.KeyCode.Space) then moveDirection = moveDirection + Vector3.new(0, 1, 0) end if keyboard:IsKeyDown(Enum.KeyCode.LeftShift) then moveDirection = moveDirection - Vector3.new(0, 1, 0) end -- Нормализуем направление if moveDirection.Magnitude > 0 then moveDirection = moveDirection.Unit * Settings.FlySpeed * deltaTime rootPart.CFrame = rootPart.CFrame + moveDirection end -- Обновляем позицию огня local groundFire = character:FindFirstChild("FlyFirePart") if groundFire then groundFire.CFrame = CFrame.new(rootPart.Position + Vector3.new(0, -2, 0)) end -- Анимация огня for _, fire in ipairs(fireEffects) do if fire and fire.Parent then fire.Size = Settings.FireSize + math.sin(tick() * 5) * 0.5 end end end) -- Визуальный эффект запуска local particles = Instance.new("ParticleEmitter") particles.Name = "FlyParticles" particles.Color = ColorSequence.new(Settings.FireColor) particles.Size = NumberSequence.new(1, 3) particles.Lifetime = NumberRange.new(0.5, 1) particles.Rate = 50 particles.Speed = NumberRange.new(5, 10) particles.Parent = rootPart -- Эффект свечения local pointLight = Instance.new("PointLight") pointLight.Color = Settings.FireColor pointLight.Brightness = 5 pointLight.Range = 15 pointLight.Parent = rootPart pointLight.Name = "FlyLight" print("Полёт включён! Используйте WASD для движения, Space - вверх, Shift - вниз") end -- Функция выключения полёта local function stopFly() if not isFlying then return end isFlying = false -- Отключаем невесомость humanoid:ChangeState(Enum.HumanoidStateType.Landed) humanoid:SetStateEnabled(Enum.HumanoidStateType.Falling, true) humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true) -- Удаляем эффекты if flyConnection then flyConnection:Disconnect() flyConnection = nil end removeFlyEffects() -- Удаляем частицы и свет local particles = rootPart:FindFirstChild("FlyParticles") if particles then particles:Destroy() end local light = rootPart:FindFirstChild("FlyLight") if light then light:Destroy() end print("Полёт выключен") end -- Переключение полёта local function toggleFly() if isFlying then stopFly() else startFly() end end -- Обработка нажатия клавиши game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.KeyCode == Settings.ToggleKey then toggleFly() end end) -- GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "FlyGUI" screenGui.ResetOnSpawn = false screenGui.Parent = player.PlayerGui local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 200, 0, 100) mainFrame.Position = UDim2.new(0.5, -100, 0.9, -50) mainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 40) mainFrame.BackgroundTransparency = 0.3 mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.BackgroundTransparency = 1 title.Text = "✨ Полёт с Огнём ✨" title.TextColor3 = Settings.FireColor title.Font = Enum.Font.GothamBold title.TextSize = 16 title.Parent = mainFrame local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, 0, 0, 20) statusLabel.Position = UDim2.new(0, 0, 0.3, 0) statusLabel.BackgroundTransparency = 1 statusLabel.Text = "Статус: Выключен" statusLabel.TextColor3 = Color3.fromRGB(255, 100, 100) statusLabel.Font = Enum.Font.Gotham statusLabel.TextSize = 14 statusLabel.Parent = mainFrame local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0.8, 0, 0, 30) toggleButton.Position = UDim2.new(0.1, 0, 0.6, 0) toggleButton.BackgroundColor3 = Color3.fromRGB(0, 100, 200) toggleButton.Text = "Включить (F)" toggleButton.TextColor3 = Color3.new(1, 1, 1) toggleButton.Font = Enum.Font.GothamBold toggleButton.Parent = mainFrame toggleButton.MouseButton1Click:Connect(function() toggleFly() end) -- Обновление статуса spawn(function() while true do if isFlying then statusLabel.Text = "Статус: Включен" statusLabel.TextColor3 = Color3.fromRGB(100, 255, 100) toggleButton.Text = "Выключить (F)" toggleButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0) else statusLabel.Text = "Статус: Выключен" statusLabel.TextColor3 = Color3.fromRGB(255, 100, 100) toggleButton.Text = "Включить (F)" toggleButton.BackgroundColor3 = Color3.fromRGB(0, 100, 200) end wait(0.1) end end) print("Скрипт полёта с синим огнём загружен! Нажмите F для включения")