Fly v7
Key RequiredUniversal

Fly v7

Universal ScriptLucq123Lucq123 9.5K views 4.7K executesUpdated Sep 20, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•105 lines (3226 chars)
-- Mobile Fly GUI Script (LocalScript)

local player = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")

-- Create GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MobileFlyGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")

local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 120, 0, 50)
button.Position = UDim2.new(1, -140, 1, -70) -- Bottom right
button.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.TextScaled = true
button.Font = Enum.Font.SourceSansBold
button.Text = "Fly: OFF"
button.Parent = screenGui
button.AnchorPoint = Vector2.new(0, 0)

-- Fly logic
local flying = false
local speed = 50
local direction = Vector3.zero
local keys = {
	W = false,
	A = false,
	S = false,
	D = false,
	Space = false,
	Shift = false,
}

-- Touch-based fallback direction (always forward)
local function getTouchDirection()
	local cam = workspace.CurrentCamera
	return cam and cam.CFrame.LookVector or Vector3.new(0, 0, -1)
end

-- Keyboard input for PC support
UIS.InputBegan:Connect(function(input, gp)
	if gp then return end
	if input.KeyCode == Enum.KeyCode.W then keys.W = true end
	if input.KeyCode == Enum.KeyCode.A then keys.A = true end
	if input.KeyCode == Enum.KeyCode.S then keys.S = true end
	if input.KeyCode == Enum.KeyCode.D then keys.D = true end
	if input.KeyCode == Enum.KeyCode.Space then keys.Space = true end
	if input.KeyCode == Enum.KeyCode.LeftShift then keys.Shift = true end
end)

UIS.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.W then keys.W = false end
	if input.KeyCode == Enum.KeyCode.A then keys.A = false end
	if input.KeyCode == Enum.KeyCode.S then keys.S = false end
	if input.KeyCode == Enum.KeyCode.D then keys.D = false end
	if input.KeyCode == Enum.KeyCode.Space then keys.Space = false end
	if input.KeyCode == Enum.KeyCode.LeftShift then keys.Shift = false end
end)

-- Update movement direction
local function updateDirection()
	local cam = workspace.CurrentCamera
	local moveDir = Vector3.zero

	if UIS.TouchEnabled then
		moveDir = getTouchDirection()
	else
		if keys.W then moveDir += cam.CFrame.LookVector end
		if keys.S then moveDir -= cam.CFrame.LookVector end
		if keys.A then moveDir -= cam.CFrame.RightVector end
		if keys.D then moveDir += cam.CFrame.RightVector end
		if keys.Space then moveDir += Vector3.new(0, 1, 0) end
		if keys.Shift then moveDir -= Vector3.new(0, 1, 0) end
	end

	direction = moveDir
end

-- Flying movement
RunService.RenderStepped:Connect(function()
	if flying then
		updateDirection()
		local char = player.Character
		if char and char:FindFirstChild("HumanoidRootPart") then
			char.HumanoidRootPart.Velocity = direction.Unit * speed
		end
	end
end)

-- Toggle flying on button press
button.MouseButton1Click:Connect(function()
	flying = not flying
	button.Text = flying and "Fly: ON" or "Fly: OFF"

	if not flying then
		local char = player.Character
		if char and char:FindFirstChild("HumanoidRootPart") then
			char.HumanoidRootPart.Velocity = Vector3.zero
		end
	end
end)

Features & Information

This is a universal script that I made to be used to have fun and reach unexplored areas of games have fun :)

Community Comments (3)

Lucq123Lucq123Sep 20, 2025

Tell me if I could add anything elce and I’m working on a trolling gui that will be coming soon

arruma o mod ai pra nois tentei executar ele e não funciona mais

Fix the mod for us, I tried to run it and it doesn't work anymore.

More Scripts for Universal Scripts