local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local MAX_SPEED = 170 local DEFAULT_SPEED = 85 local SHOW_GREEN_BACKGROUND = false local DRAG_STIFFNESS = 180 local DRAG_DAMPING = 22 local SLIDER_STIFFNESS = 260 local SLIDER_DAMPING = 28 local FONT = Font.new("rbxasset://fonts/families/Roboto.json", Enum.FontWeight.Regular) local FONT_BOLD = Font.new("rbxasset://fonts/families/Roboto.json", Enum.FontWeight.Bold) local COLORS = { panel = Color3.fromRGB(18, 18, 18), button = Color3.fromRGB(26, 26, 26), buttonOn = Color3.fromRGB(74, 114, 232), drag = Color3.fromRGB(22, 22, 22), accent = Color3.fromRGB(91, 134, 255), track = Color3.fromRGB(12, 12, 12), text = Color3.fromRGB(242, 242, 242), dim = Color3.fromRGB(200, 200, 200), } local WHITE = Color3.new(1, 1, 1) local BLACK = Color3.new(0, 0, 0) local PANEL_W, PANEL_H, PANEL_COLLAPSED_H = 312, 252, 56 local BEZEL_LIGHT_ALPHA = 0.7 local BEZEL_DARK_ALPHA = 0.5 local function new(className, props, parent) local obj = Instance.new(className) for k, v in pairs(props or {}) do obj[k] = v end if parent then obj.Parent = parent end return obj end local function addCorner(radius, parent) new("UICorner", { CornerRadius = UDim.new(0, radius) }, parent) end local function isPointer(input) return input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch end local function isMove(input) return input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch end local function newSpring(initial, stiffness, damping) local spring = { value = initial, velocity = 0, target = initial } function spring.step(dt) dt = math.min(dt, 1 / 30) local force = (spring.target - spring.value) * stiffness - spring.velocity * damping spring.velocity += force * dt spring.value += spring.velocity * dt end function spring.isSettled() return math.abs(spring.target - spring.value) < 0.01 and math.abs(spring.velocity) < 0.01 end return spring end local H_X = { 12, 6, 0, 18 } local V_Y = { 0, -6, -12, -18 } local function buildCarbon(surface, w, h, radius) local base = new("Frame", { Name = "CarbonBase", Size = UDim2.fromScale(1, 1), BackgroundColor3 = BLACK, BackgroundTransparency = 0.65, BorderSizePixel = 0, ZIndex = 1, }, surface) addCorner(radius, base) local layer = new("Frame", { Name = "Carbon", Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, ClipsDescendants = true, ZIndex = 2, }, surface) local vSeq = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.66), NumberSequenceKeypoint.new(0.55, 0.9), NumberSequenceKeypoint.new(1, 0.98), }) for ty = 0, math.floor((h + 18) / 24) do for tx = -1, math.floor(w / 24) do local ox, oy = tx * 24, ty * 24 for i = 0, 3 do new("Frame", { Position = UDim2.fromOffset(ox + H_X[i + 1], oy + i * 6), Size = UDim2.fromOffset(12, 5), BackgroundColor3 = WHITE, BackgroundTransparency = 0.95, BorderSizePixel = 0, ZIndex = 1, }, layer) local v = new("Frame", { Position = UDim2.fromOffset(ox + i * 6, oy + V_Y[i + 1] + 1), Size = UDim2.fromOffset(5, 10), BackgroundColor3 = WHITE, BorderSizePixel = 0, ZIndex = 2, }, layer) new("UIGradient", { Rotation = 90, Transparency = vSeq }, v) end end end local sheen = new("Frame", { Name = "Sheen", Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, BorderSizePixel = 0, ZIndex = 4, }, surface) addCorner(radius, sheen) new("UIGradient", { Rotation = 45, Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.93), NumberSequenceKeypoint.new(0.5, 1), NumberSequenceKeypoint.new(1, 0.98), }), }, sheen) end local function addBezel(surface) local stroke = new("UIStroke", { Thickness = 1, Color = WHITE, ApplyStrokeMode = Enum.ApplyStrokeMode.Border, ZIndex = 6, }, surface) local gradient = new("UIGradient", { Rotation = 90, Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, WHITE), ColorSequenceKeypoint.new(1, BLACK), }), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, BEZEL_LIGHT_ALPHA), NumberSequenceKeypoint.new(1, BEZEL_DARK_ALPHA), }), }, stroke) return gradient end local function makeElement(parent, o) local el = { on = false } el.root = new("Frame", { Name = o.name, LayoutOrder = o.order or 0, Size = o.size, Position = o.position or UDim2.new(), BackgroundTransparency = 1, BorderSizePixel = 0, }, parent) el.surface = new("Frame", { Name = "Surface", Size = UDim2.fromScale(1, 1), BackgroundColor3 = o.color, BorderSizePixel = 0, ClipsDescendants = true, ZIndex = 2, }, el.root) addCorner(o.radius, el.surface) buildCarbon(el.surface, o.w, o.h, o.radius) el.bezel = addBezel(el.surface) function el.set(sunk, shift) el.bezel.Rotation = sunk and 270 or 90 el.surface.Position = UDim2.fromOffset(0, shift and 1 or 0) end el.set(false, false) return el end local function addLabel(el, text, size, font, color) return new("TextLabel", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = text, TextSize = size, TextColor3 = color, FontFace = font, ZIndex = 8, }, el.surface) end local function addHit(el) el.hit = new("TextButton", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", AutoButtonColor = false, ZIndex = 20, }, el.root) return el.hit end local function wirePress(el) local hit = addHit(el) local function release() el.set(el.on, false) end hit.MouseButton1Down:Connect(function() el.set(true, true) end) hit.MouseButton1Up:Connect(release) hit.MouseLeave:Connect(release) return hit end local gui = new("ScreenGui", { Name = "FlyPanel", ResetOnSpawn = false, IgnoreGuiInset = true, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, }, player:WaitForChild("PlayerGui")) if SHOW_GREEN_BACKGROUND then new("Frame", { Name = "Backdrop", Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(0, 255, 0), BorderSizePixel = 0, }, gui) end local panel = makeElement(gui, { name = "Panel", size = UDim2.fromOffset(PANEL_W, PANEL_H), w = PANEL_W, h = PANEL_H, radius = 10, color = COLORS.panel, }) panel.root.AnchorPoint = Vector2.new(0.5, 0.5) panel.root.Position = UDim2.fromScale(0.5, 0.5) panel.root.Active = true local content = new("Frame", { Name = "Content", Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, ZIndex = 3, }, panel.root) new("UIPadding", { PaddingTop = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10), }, content) new("UIListLayout", { FillDirection = Enum.FillDirection.Vertical, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 8), }, content) local topRow = new("Frame", { Name = "TopRow", LayoutOrder = 1, Size = UDim2.new(1, 0, 0, 36), BackgroundTransparency = 1, }, content) local dragBar = makeElement(topRow, { name = "Drag", size = UDim2.new(1, -44, 0, 28), w = 248, h = 28, radius = 6, color = COLORS.drag, }) addLabel(dragBar, "Drag", 11, FONT, COLORS.dim) local dragHit = addHit(dragBar) local minimize = makeElement(topRow, { name = "Minimize", size = UDim2.fromOffset(36, 36), position = UDim2.new(1, -36, 0, 0), w = 36, h = 36, radius = 6, color = COLORS.button, }) local minLabel = addLabel(minimize, "-", 20, FONT_BOLD, COLORS.text) local minHit = wirePress(minimize) local function makeToggle(name, title, order) local ui = makeElement(content, { name = name, order = order, size = UDim2.new(1, 0, 0, 58), w = 292, h = 58, radius = 6, color = COLORS.button, }) ui.title = title ui.label = addLabel(ui, title .. ": OFF", 28, FONT, COLORS.text) wirePress(ui) return ui end local function setToggle(ui, on) ui.on = on ui.label.Text = ui.title .. ": " .. (on and "ON" or "OFF") ui.surface.BackgroundColor3 = on and COLORS.buttonOn or COLORS.button ui.set(on, false) end local flyToggle = makeToggle("Fly", "Fly", 2) local noclipToggle = makeToggle("NoClip", "No-Clip", 3) local speedHolder = new("Frame", { Name = "Speed", LayoutOrder = 4, Size = UDim2.new(1, 0, 0, 34), BackgroundTransparency = 1, }, content) local speedShadow = new("TextLabel", { Position = UDim2.fromOffset(0, 4), Size = UDim2.new(1, 0, 0, 32), BackgroundTransparency = 1, Text = "Speed: " .. DEFAULT_SPEED, TextSize = 24, TextColor3 = BLACK, TextTransparency = 0.65, FontFace = FONT, ZIndex = 1, }, speedHolder) local speedLabel = new("TextLabel", { Position = UDim2.fromOffset(0, 2), Size = UDim2.new(1, 0, 0, 32), BackgroundTransparency = 1, Text = "Speed: " .. DEFAULT_SPEED, TextSize = 24, TextColor3 = COLORS.text, FontFace = FONT, ZIndex = 2, }, speedHolder) local track = makeElement(content, { name = "Track", order = 5, size = UDim2.new(1, 0, 0, 14), w = 292, h = 14, radius = 6, color = COLORS.track, }) track.set(true, false) local fill = makeElement(track.surface, { name = "Fill", size = UDim2.fromScale(DEFAULT_SPEED / MAX_SPEED, 1), w = 292, h = 14, radius = 6, color = COLORS.accent, }) fill.root.ZIndex = 7 local trackHit = addHit(track) local panelX = newSpring(0, DRAG_STIFFNESS, DRAG_DAMPING) local panelY = newSpring(0, DRAG_STIFFNESS, DRAG_DAMPING) local fillPct = newSpring(DEFAULT_SPEED / MAX_SPEED, SLIDER_STIFFNESS, SLIDER_DAMPING) local dragging = false local dragStart, startPos dragHit.InputBegan:Connect(function(input) if isPointer(input) then dragging = true dragStart = input.Position startPos = Vector2.new(panelX.target, panelY.target) end end) local collapsed = false local collapsibles = { flyToggle.root, noclipToggle.root, speedHolder, track.root } minHit.Activated:Connect(function() collapsed = not collapsed for _, obj in ipairs(collapsibles) do obj.Visible = not collapsed end panel.root.Size = UDim2.fromOffset(PANEL_W, collapsed and PANEL_COLLAPSED_H or PANEL_H) minLabel.Text = collapsed and "+" or "-" end) local speed = DEFAULT_SPEED local sliding = false local function setSpeedFromX(x) local pct = math.clamp((x - track.root.AbsolutePosition.X) / track.root.AbsoluteSize.X, 0, 1) fillPct.target = pct speed = math.round(pct * MAX_SPEED) speedLabel.Text = "Speed: " .. speed speedShadow.Text = speedLabel.Text end trackHit.InputBegan:Connect(function(input) if isPointer(input) then sliding = true setSpeedFromX(input.Position.X) end end) UserInputService.InputChanged:Connect(function(input) if dragging and isMove(input) then local delta = input.Position - dragStart panelX.target = startPos.X + delta.X panelY.target = startPos.Y + delta.Y end if sliding and isMove(input) then setSpeedFromX(input.Position.X) end end) UserInputService.InputEnded:Connect(function(input) if isPointer(input) then dragging = false sliding = false end end) RunService.RenderStepped:Connect(function(dt) panelX.step(dt) panelY.step(dt) panel.root.Position = UDim2.new(0.5, panelX.value, 0.5, panelY.value) fillPct.step(dt) fill.root.Size = UDim2.fromScale(math.clamp(fillPct.value, 0, 1), 1) end) local character, humanoid, root local originalCollide = {} local flyOn = false local noclipOn = false local function onCharacterAdded(char) character = char humanoid = char:WaitForChild("Humanoid") root = char:WaitForChild("HumanoidRootPart") originalCollide = {} if flyOn then humanoid.PlatformStand = true end end player.CharacterAdded:Connect(onCharacterAdded) if player.Character then onCharacterAdded(player.Character) end local function setFly(on) flyOn = on setToggle(flyToggle, on) if humanoid then humanoid.PlatformStand = on end if not on and root then root.AssemblyLinearVelocity = Vector3.zero end end flyToggle.hit.Activated:Connect(function() setFly(not flyOn) end) local function setNoclip(on) noclipOn = on setToggle(noclipToggle, on) if not on then for part, value in pairs(originalCollide) do if part.Parent then part.CanCollide = value end end originalCollide = {} end end noclipToggle.hit.Activated:Connect(function() setNoclip(not noclipOn) end) RunService.Heartbeat:Connect(function() if not character or not root or not humanoid or humanoid.Health <= 0 then return end if noclipOn then for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then if originalCollide[part] == nil then originalCollide[part] = part.CanCollide end part.CanCollide = false end end end if flyOn then local cf = camera.CFrame local dir = Vector3.zero if UserInputService:IsKeyDown(Enum.KeyCode.W) then dir += cf.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then dir -= cf.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then dir += cf.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then dir -= cf.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then dir += Vector3.yAxis end if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then dir -= Vector3.yAxis end if dir.Magnitude > 0 then dir = dir.Unit end root.AssemblyLinearVelocity = dir * speed end end) UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.F then setFly(not flyOn) elseif input.KeyCode == Enum.KeyCode.N then setNoclip(not noclipOn) end end)