fly
Key RequiredUniversal

fly

Universal Scriptproohioproohio 33.8K views 113 executesUpdated Mar 8, 2025
0.0/ 5(1 votes)
010% Positive
Lua Script•94 lines (2409 chars)
_G.flyEnabled = true -- toggle fly true = fly false = unfly

-- fly by proohio
-- this is a bit skidded but shh

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local root = char:WaitForChild("HumanoidRootPart")
local humanoid = char:FindFirstChildOfClass("Humanoid")

local flying = false
local speed = 0
local maxSpeed = 50
local acceleration = 2
local controls = { f = 0, b = 0, l = 0, r = 0, u = 0, d = 0 }
local bodyGyro, bodyVelocity

function StartFlying()
	if not _G.flyEnabled or not root then return end
	flying = true

	bodyGyro = Instance.new("BodyGyro")
	bodyGyro.P = 9e4
	bodyGyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
	bodyGyro.CFrame = root.CFrame
	bodyGyro.Parent = root

	bodyVelocity = Instance.new("BodyVelocity")
	bodyVelocity.velocity = Vector3.zero
	bodyVelocity.maxForce = Vector3.new(9e9, 9e9, 9e9)
	bodyVelocity.Parent = root

	humanoid.PlatformStand = true
	while flying and _G.flyEnabled do
		task.wait()
		local moveDirection = Vector3.zero

		if controls.f + controls.b ~= 0 or controls.l + controls.r ~= 0 or controls.u + controls.d ~= 0 then
			speed = math.min(speed + acceleration, maxSpeed)
		else
			speed = math.max(speed - acceleration, 0)
		end

		moveDirection = (workspace.CurrentCamera.CFrame.LookVector * (controls.f + controls.b))
		moveDirection = moveDirection + (workspace.CurrentCamera.CFrame.RightVector * (controls.l + controls.r))
		moveDirection = moveDirection + (Vector3.new(0, 1, 0) * (controls.u + controls.d))

		if moveDirection.Magnitude > 0 then
			moveDirection = moveDirection.Unit * speed
		end

		bodyVelocity.Velocity = moveDirection
		bodyGyro.CFrame = workspace.CurrentCamera.CFrame
	end
	bodyGyro:Destroy()
	bodyVelocity:Destroy()
	humanoid.PlatformStand = false
	flying = false
end
local mouse = plr:GetMouse()

mouse.KeyDown:Connect(function(key)
	if not _G.flyEnabled then return end

	key = key:lower()
	if key == "e" then
		if not flying then
			StartFlying()
		else
			flying = false
		end
	elseif key == "w" then
		controls.f = 1
	elseif key == "s" then
		controls.b = -1
	elseif key == "a" then
		controls.l = -1
	elseif key == "d" then
		controls.r = 1
	end
end)

mouse.KeyUp:Connect(function(key)
	key = key:lower()
	if key == "w" then
		controls.f = 0
	elseif key == "s" then
		controls.b = 0
	elseif key == "a" then
		controls.l = 0
	elseif key == "d" then
		controls.r = 0
	end
end)

Features & Information

open source fly :) how to use read script
#script#best#pro#proohio#fly

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts