Back to Scripts
Fly
ScriptBlox
Universal
Free
Game: Universal Script 📌
7,268
Views
2
Likes
2
Dislikes
Amberthememegod2
offline
Features
It lets u fly that's it
Tags
Script Code
-- ✈️ Simple Mobile Fly Script (uses normal Roblox joystick for movement)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local root = character:WaitForChild("HumanoidRootPart")
local flying = false
local flySpeed = 50
local up = false
local down = false
local lastVelocity = Vector3.zero
-- 🧱 GUI
local gui = Instance.new("ScreenGui")
gui.Name = "FlightGUI"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
-- Helper: Make round buttons
local function makeRoundButton(text, pos)
local b = Instance.new("TextButton")
b.Size = UDim2.new(0.14, 0, 0.14, 0)
b.Position = pos
b.Text = text
b.Font = Enum.Font.SourceSansBold
b.TextScaled = true
b.TextColor3 = Color3.new(1, 1, 1)
b.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
b.BackgroundTransparency = 0.35
b.AutoButtonColor = true
b.BorderSizePixel = 0
b.Parent = gui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(1, 0)
corner.Parent = b
return b
end
-- ⬆️⬇️ Buttons on right
local upButton = makeRoundButton("↑", UDim2.new(0.84, 0, 0.40, 0))
local downButton = makeRoundButton("↓", UDim2.new(0.84, 0, 0.52, 0))
-- ✈️ Toggle Fly (center-top)
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0.28, 0, 0.08, 0)
toggleButton.Position = UDim2.new(0.36, 0, 0.55, 0)
toggleButton.Text = "✈️ Toggle Fly"
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.TextScaled = true
toggleButton.TextColor3 = Color3.new(1, 1, 1)
toggleButton.BackgroundColor3 = Color3.fromRGB(255, 170, 0)
toggleButton.BackgroundTransparency = 0.2
toggleButton.BorderSizePixel = 0
toggleButton.Parent = gui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0.3, 0)
corner.Parent = toggleButton
-- 🎮 Controls
upButton.MouseButton1Down:Connect(function() up = true end)
upButton.MouseButton1Up:Connect(function() up = false end)
downButton.MouseButton1Down:Connect(function() down = true end)
downButton.MouseButton1Up:Connect(function() down = false end)
toggleButton.MouseButton1Click:Connect(function()
flying = not flying
humanoid.PlatformStand = flying
if not flying then
-- Smooth landing
task.spawn(function()
for i = 1, 40 do
if humanoid and root then
root.Velocity = Vector3.new(0, math.max(-2, lastVelocity.Y - 1), 0)
end
task.wait(0.02)
end
end)
end
end)
-- 🌀 Fly Movement Loop
game:GetService("RunService").RenderStepped:Connect(function()
if flying and root then
local move = humanoid.MoveDirection
local vel = move * flySpeed
if up then vel += Vector3.new(0, flySpeed, 0) end
if down then vel += Vector3.new(0, -flySpeed, 0) end
root.Velocity = vel
lastVelocity = vel
end
end)
Comments (0)
Please login to comment
Login with Discord
Loading comments...