local speed = 50 local step = 10 local maxSpeed = 100000 local plrs = game:GetService("Players") local rs = game:GetService("RunService") local uis = game:GetService("UserInputService") local lp = plrs.LocalPlayer local parent = (gethui and gethui()) or game:GetService("CoreGui") if not pcall(function() return parent.Name end) then parent = lp:WaitForChild("PlayerGui") end for _, v in ipairs({"SARFlyGuiV1", "FlyGui"}) do if parent:FindFirstChild(v) then parent[v]:Destroy() end end local function new(class, props, par) local o = Instance.new(class) for k, v in pairs(props) do o[k] = v end o.Parent = par return o end local function round(o, r) new("UICorner", {CornerRadius = UDim.new(0, r or 6)}, o) end local gui = new("ScreenGui", {Name = "SARFlyGuiV1", ResetOnSpawn = false}, parent) local main = new("Frame", { Size = UDim2.fromOffset(200, 160), Position = UDim2.new(0, 40, 0.4, 0), BackgroundColor3 = Color3.fromRGB(20, 20, 24), BorderSizePixel = 0, Active = true, }, gui) round(main, 8) local bar = new("TextLabel", { Size = UDim2.new(1, 0, 0, 26), BackgroundColor3 = Color3.fromRGB(32, 32, 38), BorderSizePixel = 0, Text = " SAR Fly Gui V1", TextXAlignment = Enum.TextXAlignment.Left, TextColor3 = Color3.fromRGB(235, 235, 235), Font = Enum.Font.GothamBold, TextSize = 13, }, main) round(bar, 8) local function btn(text, x, y, w, h, col, par) local b = new("TextButton", { Text = text, Position = UDim2.new(0, x, 0, y), Size = UDim2.fromOffset(w, h), BackgroundColor3 = col or Color3.fromRGB(48, 48, 58), TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 13, BorderSizePixel = 0, }, par or main) round(b) return b end local flyBtn = btn("Fly: OFF", 10, 34, 180, 30, Color3.fromRGB(160, 55, 55)) local minus = btn("-", 10, 72, 36, 28) local plus = btn("+", 154, 72, 36, 28) local upBtn = btn("Up", 10, 112, 85, 32) local downBtn = btn("Down", 105, 112, 85, 32) local box = new("TextBox", { Position = UDim2.fromOffset(52, 72), Size = UDim2.fromOffset(96, 28), BackgroundColor3 = Color3.fromRGB(32, 32, 38), TextColor3 = Color3.new(1, 1, 1), Text = tostring(speed), Font = Enum.Font.Gotham, TextSize = 13, ClearTextOnFocus = false, BorderSizePixel = 0, }, main) round(box) local closeBtn = btn("X", 170, 3, 22, 20, Color3.fromRGB(180, 50, 50)) local minBtn = btn("-", 144, 3, 22, 20, Color3.fromRGB(60, 60, 75)) closeBtn.ZIndex = 5 minBtn.ZIndex = 5 local small = false minBtn.MouseButton1Click:Connect(function() small = not small for _, v in ipairs(main:GetChildren()) do if v:IsA("GuiObject") and v ~= bar and v ~= minBtn and v ~= closeBtn then v.Visible = not small end end main.Size = small and UDim2.fromOffset(200, 26) or UDim2.fromOffset(200, 160) minBtn.Text = small and "+" or "-" end) local dragging, dstart, dpos bar.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging, dstart, dpos = true, i.Position, main.Position i.Changed:Connect(function() if i.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) uis.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then local d = i.Position - dstart main.Position = UDim2.new(dpos.X.Scale, dpos.X.Offset + d.X, dpos.Y.Scale, dpos.Y.Offset + d.Y) end end) local function setSpeed(n) n = tonumber(n) if n then speed = math.clamp(math.floor(n), 1, maxSpeed) end box.Text = tostring(speed) end box.FocusLost:Connect(function() setSpeed(box.Text) end) plus.MouseButton1Click:Connect(function() setSpeed(speed + step) end) minus.MouseButton1Click:Connect(function() setSpeed(speed - step) end) local up, down = false, false local function hold(b, f) b.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then f(true) end end) b.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then f(false) end end) end hold(upBtn, function(v) up = v end) hold(downBtn, function(v) down = v end) local flying = false local bv, bg, loop local function stop() flying = false if loop then loop:Disconnect() loop = nil end if bv then bv:Destroy() bv = nil end if bg then bg:Destroy() bg = nil end local c = lp.Character local hum = c and c:FindFirstChildOfClass("Humanoid") if hum then hum.PlatformStand = false end flyBtn.Text = "Fly: OFF" flyBtn.BackgroundColor3 = Color3.fromRGB(160, 55, 55) end local function start() local c = lp.Character local hum = c and c:FindFirstChildOfClass("Humanoid") local root = c and c:FindFirstChild("HumanoidRootPart") if not hum or not root then return end flying = true bv = new("BodyVelocity", {MaxForce = Vector3.new(1e9, 1e9, 1e9), Velocity = Vector3.zero}, root) bg = new("BodyGyro", {MaxTorque = Vector3.new(1e9, 1e9, 1e9), P = 9e4, CFrame = root.CFrame}, root) hum.PlatformStand = true flyBtn.Text = "Fly: ON" flyBtn.BackgroundColor3 = Color3.fromRGB(55, 150, 75) loop = rs.RenderStepped:Connect(function() local ch = lp.Character local h = ch and ch:FindFirstChildOfClass("Humanoid") local r = ch and ch:FindFirstChild("HumanoidRootPart") if not h or not r or not bv or not bg then return stop() end local cf = workspace.CurrentCamera.CFrame local m = cf:VectorToObjectSpace(h.MoveDirection) local dir = cf.LookVector * -m.Z + cf.RightVector * m.X local y = 0 if up or uis:IsKeyDown(Enum.KeyCode.Space) then y = y + 1 end if down or uis:IsKeyDown(Enum.KeyCode.LeftShift) or uis:IsKeyDown(Enum.KeyCode.Q) then y = y - 1 end dir = dir + Vector3.new(0, y, 0) bv.Velocity = dir.Magnitude > 0.01 and dir.Unit * speed or Vector3.zero bg.CFrame = CFrame.new(r.Position, r.Position + cf.LookVector) end) end local function toggle() if flying then stop() else start() end end flyBtn.MouseButton1Click:Connect(toggle) closeBtn.MouseButton1Click:Connect(function() stop() gui:Destroy() end) uis.InputBegan:Connect(function(i, gp) if gp or not gui.Parent then return end if i.KeyCode == Enum.KeyCode.F then toggle() end end) lp.CharacterAdded:Connect(function() if gui.Parent then stop() end end)