local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") local flying = false local speed = 75 local bodyVelocity local bodyGyro local function startFlying() if flying then return end flying = true bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Parent = rootPart bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) bodyGyro.P = 10000 bodyGyro.Parent = rootPart humanoid.PlatformStand = true RunService:BindToRenderStep("Fly", Enum.RenderPriority.Character.Value, function() if not flying then return end local camera = workspace.CurrentCamera local moveDirection = humanoid.MoveDirection bodyVelocity.Velocity = moveDirection * speed bodyGyro.CFrame = camera.CFrame end) end local function stopFlying() if not flying then return end flying = false RunService:UnbindFromRenderStep("Fly") if bodyVelocity then bodyVelocity:Destroy() end if bodyGyro then bodyGyro:Destroy() end humanoid.PlatformStand = false end UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F then if flying then stopFlying() else startFlying() end end end)