
Key RequiredUniversal

local lp = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local run = game:GetService("RunService")
-- UI Construction
local sg = Instance.new("ScreenGui", lp.PlayerGui)
sg.ResetOnSpawn = false
local main = Instance.new("Frame", sg)
main.Size = UDim2.new(0, 180, 0, 160)
main.Position = UDim2.new(0.05, 0, 0.4, 0)
main.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
main.BorderSizePixel = 0
main.Active = true
main.Draggable = true
Instance.new("UICorner", main).CornerRadius = UDim.new(0, 8)
local grad = Instance.new("UIGradient", main)
grad.Color = ColorSequence.new(Color3.fromRGB(255,255,255), Color3.fromRGB(150,150,150))
grad.Rotation = 45
local title = Instance.new("TextLabel", main)
title.Size = UDim2.new(1, 0, 0, 30)
title.Text = "FLY v2"
title.TextColor3 = Color3.new(1, 1, 1)
title.Font = Enum.Font.GothamBold
title.BackgroundTransparency = 1
local speedBox = Instance.new("TextBox", main)
speedBox.Size = UDim2.new(0.85, 0, 0, 30)
speedBox.Position = UDim2.new(0.075, 0, 0.25, 0)
speedBox.Text = "50"
speedBox.PlaceholderText = "Speed"
speedBox.BackgroundColor3 = Color3.fromRGB(40, 40, 45)
speedBox.TextColor3 = Color3.new(1, 1, 1)
Instance.new("UICorner", speedBox)
local toggle = Instance.new("TextButton", main)
toggle.Size = UDim2.new(0.85, 0, 0, 35)
toggle.Position = UDim2.new(0.075, 0, 0.5, 0)
toggle.Text = "START"
toggle.BackgroundColor3 = Color3.fromRGB(0, 170, 127)
toggle.TextColor3 = Color3.new(1, 1, 1)
toggle.Font = Enum.Font.GothamBold
Instance.new("UICorner", toggle)
local removeBtn = Instance.new("TextButton", main)
removeBtn.Size = UDim2.new(0.85, 0, 0, 30)
removeBtn.Position = UDim2.new(0.075, 0, 0.77, 0)
removeBtn.Text = "REMOVE"
removeBtn.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
removeBtn.TextColor3 = Color3.new(1, 1, 1)
removeBtn.Font = Enum.Font.Gotham
Instance.new("UICorner", removeBtn)
-- Logic
local flying = false
local bv, bg
local function stopFlying()
flying = false
if bv then bv:Destroy() end
if bg then bg:Destroy() end
if lp.Character and lp.Character:FindFirstChildOfClass("Humanoid") then
lp.Character:FindFirstChildOfClass("Humanoid").PlatformStand = false
end
toggle.Text = "START"
toggle.BackgroundColor3 = Color3.fromRGB(0, 170, 127)
end
toggle.MouseButton1Click:Connect(function()
if flying then stopFlying() return end
flying = true
toggle.Text = "STOP"
toggle.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
local char = lp.Character
local root = char:FindFirstChild("HumanoidRootPart")
local hum = char:FindFirstChildOfClass("Humanoid")
local cam = workspace.CurrentCamera
hum.PlatformStand = true
bv = Instance.new("BodyVelocity", root)
bv.MaxForce = Vector3.new(1, 1, 1) * 9e6
bg = Instance.new("BodyGyro", root)
bg.MaxTorque = Vector3.new(1, 1, 1) * 9e6
task.spawn(function()
while flying and root and sg.Parent do
local s = tonumber(speedBox.Text) or 50
local md = Vector3.new(0, 0, 0)
if UIS:IsKeyDown(Enum.KeyCode.W) then md += cam.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.S) then md -= cam.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.D) then md += cam.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.A) then md -= cam.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.Space) then md += Vector3.new(0, 1, 0) end
if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then md -= Vector3.new(0, 1, 0) end
bv.Velocity = md.Magnitude > 0 and md.Unit * s or Vector3.new(0, 0, 0)
bg.CFrame = cam.CFrame
run.RenderStepped:Wait()
end
stopFlying()
end)
end)
removeBtn.MouseButton1Click:Connect(function()
stopFlying()
sg:Destroy()
end)No comments yet for this script.



