RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"fly script"
-- local script local player = game.Players.LocalPlayer local mouse = player:GetMouse() local flying = false mouse.KeyDown:Connect(function(key) if key == "e" then flying = not flying end end) game:GetService("RunService").RenderStepped:Connect(function() if flying then local player = game.Players.LocalPlayer local mouse = player:GetMouse() local camera = workspace.CurrentCamera local direction = Vector3.new(0, 0, 0) if mouse.KeyDown[Enum.KeyCode.W] then direction = direction + camera.CFrame.lookVector end if mouse.KeyDown[Enum.KeyCode.S] then direction = direction - camera.CFrame.lookVector end if mouse.KeyDown[Enum.KeyCode.A] then direction = direction - camera.CFrame.rightVector end if mouse.KeyDown[Enum.KeyCode.D] then direction = direction + camera.CFrame.rightVector end player.Character.HumanoidRootPart.CFrame = player.Character.HumanoidRootPart.CFrame + direction end end)