local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer -- ============ OPTIONAL CLIENT-SIDE GATE ============ -- Fill this in to match AdminServer.server.lua so non-admins never even get the panel. local ADMIN_USER_IDS = { -- 123456789, } local ADMIN_NAMES = { -- "YourUsernameHere", } local function isAdminLocal() if #ADMIN_USER_IDS == 0 and #ADMIN_NAMES == 0 then return true end if table.find(ADMIN_USER_IDS, player.UserId) then return true end for _, n in ipairs(ADMIN_NAMES) do if player.Name:lower() == n:lower() then return true end end return false end if not isAdminLocal() then return end -- ===================================================== local remotesFolder = ReplicatedStorage:WaitForChild("PhonkSlapAdminRemotes", 10) local SlapAllRemote = remotesFolder and remotesFolder:WaitForChild("SlapAll") local SetInvisibleRemote = remotesFolder and remotesFolder:WaitForChild("SetInvisible") -- ============ STATE ============ local state = { Fly = false, Speed = false, Noclip = false, InfiniteJump = false, Invisible = false } local FLY_SPEED = 80 local WALK_SPEED_NORMAL = 16 local WALK_SPEED_BOOSTED = 55 local JUMP_POWER = 50 local flyConnection, noclipConnection, jumpConnection local flyBodyVelocity, flyBodyGyro local function getCharacterParts() local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local hrp = character:WaitForChild("HumanoidRootPart") return character, humanoid, hrp end -- ============ FLY ============ local function startFly() local _, humanoid, hrp = getCharacterParts() flyBodyVelocity = Instance.new("BodyVelocity") flyBodyVelocity.MaxForce = Vector3.new(1, 1, 1) * math.huge flyBodyVelocity.Velocity = Vector3.new() flyBodyVelocity.Parent = hrp flyBodyGyro = Instance.new("BodyGyro") flyBodyGyro.MaxTorque = Vector3.new(1, 1, 1) * math.huge flyBodyGyro.P = 3000 flyBodyGyro.Parent = hrp humanoid.PlatformStand = true flyConnection = RunService.RenderStepped:Connect(function() local camera = workspace.CurrentCamera local moveDir = Vector3.new() if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir += camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir -= camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDir -= camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDir += camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDir += Vector3.new(0, 1, 0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then moveDir -= Vector3.new(0, 1, 0) end if moveDir.Magnitude > 0 then moveDir = moveDir.Unit end flyBodyVelocity.Velocity = moveDir * FLY_SPEED flyBodyGyro.CFrame = camera.CFrame end) end local function stopFly() if flyConnection then flyConnection:Disconnect() end if flyBodyVelocity then flyBodyVelocity:Destroy() end if flyBodyGyro then flyBodyGyro:Destroy() end local character = player.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.PlatformStand = false end end end local function setSpeed(enabled) local _, humanoid = getCharacterParts() humanoid.WalkSpeed = enabled and WALK_SPEED_BOOSTED or WALK_SPEED_NORMAL end local function applyJumpPower() local _, humanoid = getCharacterParts() humanoid.UseJumpPower = true humanoid.JumpPower = JUMP_POWER end local function setPartsCanCollide(character, canCollide) for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = canCollide end end end local function startNoclip() getCharacterParts() noclipConnection = RunService.Stepped:Connect(function() if player.Character then setPartsCanCollide(player.Character, false) end end) end local function stopNoclip() if noclipConnection then noclipConnection:Disconnect() end local character = player.Character if character then setPartsCanCollide(character, true) end end local function startInfiniteJump() jumpConnection = UserInputService.JumpRequest:Connect(function() local _, humanoid = getCharacterParts() humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end) end local function stopInfiniteJump() if jumpConnection then jumpConnection:Disconnect() end end player.CharacterAdded:Connect(function() task.wait(1) if state.Speed then setSpeed(true) end if state.Fly then startFly() end if state.Noclip then startNoclip() end applyJumpPower() if state.Invisible and SetInvisibleRemote then SetInvisibleRemote:FireServer(true) end end) -- ===================================================================== -- ================================ UI ================================== -- ===================================================================== local function create(className, props) local inst = Instance.new(className) for k, v in pairs(props) do inst[k] = v end return inst end local ACCENT = Color3.fromRGB(255, 0, 122) local ACCENT2 = Color3.fromRGB(150, 60, 255) local BG_DARK = Color3.fromRGB(15, 15, 19) local BG_PANEL = Color3.fromRGB(22, 22, 27) local BG_ROW = Color3.fromRGB(30, 30, 37) local TEXT_MAIN = Color3.fromRGB(235, 235, 240) local TEXT_DIM = Color3.fromRGB(140, 140, 150) local screenGui = create("ScreenGui", { Name = "PhonkSlapAdminPanel", ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = player:WaitForChild("PlayerGui"), }) -- ============ Root window ============ local root = create("Frame", { Name = "Root", Size = UDim2.new(0, 560, 0, 440), Position = UDim2.new(0.5, -280, 0.5, -220), BackgroundColor3 = BG_DARK, BorderSizePixel = 0, ClipsDescendants = true, Parent = screenGui, }) create("UICorner", { CornerRadius = UDim.new(0, 16), Parent = root }) create("UIStroke", { Color = Color3.fromRGB(50, 50, 60), Thickness = 1, Transparency = 0.3, Parent = root }) -- top titlebar strip (spans whole width, used for dragging + window controls) local topBar = create("Frame", { Size = UDim2.new(1, 0, 0, 36), BackgroundTransparency = 1, Parent = root, ZIndex = 5, }) local closeBtn = create("TextButton", { Text = "\226\156\149", Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, Size = UDim2.new(0, 28, 0, 28), Position = UDim2.new(1, -34, 0, 4), Parent = topBar, ZIndex = 6, }) local minimizeBtn = create("TextButton", { Text = "\226\128\148", Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, Size = UDim2.new(0, 28, 0, 28), Position = UDim2.new(1, -64, 0, 4), Parent = topBar, ZIndex = 6, }) -- Reopen tab (small pill, shown when panel is closed) local reopenBtn = create("TextButton", { Name = "ReopenTab", Text = "PHONK SLAP", Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = Color3.new(1, 1, 1), BackgroundColor3 = BG_DARK, Size = UDim2.new(0, 110, 0, 34), Position = UDim2.new(0, 20, 0, 20), Visible = false, Parent = screenGui, }) create("UICorner", { CornerRadius = UDim.new(0, 10), Parent = reopenBtn }) create("UIStroke", { Color = ACCENT, Thickness = 1.5, Transparency = 0.2, Parent = reopenBtn }) closeBtn.MouseButton1Click:Connect(function() root.Visible = false reopenBtn.Visible = true end) reopenBtn.MouseButton1Click:Connect(function() root.Visible = true reopenBtn.Visible = false end) -- Dragging (drag from the top bar area, excluding the buttons themselves) do local dragging, dragStart, startPos topBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = root.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) topBar.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart root.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) end -- ============ Sidebar ============ local sidebar = create("Frame", { Size = UDim2.new(0, 168, 1, 0), BackgroundColor3 = BG_PANEL, BorderSizePixel = 0, Parent = root, }) create("UICorner", { CornerRadius = UDim.new(0, 16), Parent = sidebar }) -- square off the right edge of the sidebar's rounded corners create("Frame", { Size = UDim2.new(0, 16, 1, 0), Position = UDim2.new(1, -16, 0, 0), BackgroundColor3 = BG_PANEL, BorderSizePixel = 0, Parent = sidebar, }) -- logo local logoLabel = create("TextLabel", { Text = "PHONK SLAP", Font = Enum.Font.GothamBlack, TextSize = 18, BackgroundTransparency = 1, Size = UDim2.new(1, -24, 0, 24), Position = UDim2.new(0, 18, 0, 16), TextXAlignment = Enum.TextXAlignment.Left, TextColor3 = Color3.new(1, 1, 1), Parent = sidebar, }) create("UIGradient", { Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, ACCENT), ColorSequenceKeypoint.new(1, ACCENT2), }), Parent = logoLabel, }) create("TextLabel", { Text = "ADMIN PANEL", Font = Enum.Font.GothamMedium, TextSize = 10, BackgroundTransparency = 1, Size = UDim2.new(1, -24, 0, 14), Position = UDim2.new(0, 18, 0, 38), TextXAlignment = Enum.TextXAlignment.Left, TextColor3 = TEXT_DIM, Parent = sidebar, }) -- nav container local navHolder = create("Frame", { Size = UDim2.new(1, -20, 1, -140), Position = UDim2.new(0, 10, 0, 64), BackgroundTransparency = 1, Parent = sidebar, }) create("UIListLayout", { Padding = UDim.new(0, 4), SortOrder = Enum.SortOrder.LayoutOrder, Parent = navHolder }) -- profile chip (bottom of sidebar) local profileChip = create("Frame", { Size = UDim2.new(1, -20, 0, 56), Position = UDim2.new(0, 10, 1, -66), BackgroundColor3 = BG_ROW, Parent = sidebar, }) create("UICorner", { CornerRadius = UDim.new(0, 12), Parent = profileChip }) local avatarImg = create("ImageLabel", { Size = UDim2.new(0, 38, 0, 38), Position = UDim2.new(0, 9, 0.5, -19), BackgroundColor3 = Color3.fromRGB(45, 45, 52), Image = "", Parent = profileChip, }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = avatarImg }) task.spawn(function() local ok, content = pcall(function() return Players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100) end) if ok and content then avatarImg.Image = content end end) create("TextLabel", { Text = player.DisplayName, Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = TEXT_MAIN, BackgroundTransparency = 1, Size = UDim2.new(1, -58, 0, 16), Position = UDim2.new(0, 54, 0, 8), TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Parent = profileChip, }) create("TextLabel", { Text = "@" .. player.Name, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, Size = UDim2.new(1, -58, 0, 14), Position = UDim2.new(0, 54, 0, 26), TextXAlignment = Enum.TextXAlignment.Left, Parent = profileChip, }) local statusDot = create("Frame", { Size = UDim2.new(0, 8, 0, 8), Position = UDim2.new(1, -16, 0, 8), BackgroundColor3 = Color3.fromRGB(80, 230, 130), Parent = profileChip, }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = statusDot }) -- ============ Content area ============ local content = create("Frame", { Size = UDim2.new(1, -168, 1, 0), Position = UDim2.new(0, 168, 0, 0), BackgroundTransparency = 1, Parent = root, }) local pageHolder = create("Frame", { Size = UDim2.new(1, -32, 1, -60), Position = UDim2.new(0, 16, 0, 52), BackgroundTransparency = 1, Parent = content, }) local pageTitle = create("TextLabel", { Text = "Home", Font = Enum.Font.GothamBlack, TextSize = 20, TextColor3 = TEXT_MAIN, BackgroundTransparency = 1, Size = UDim2.new(1, -32, 0, 28), Position = UDim2.new(0, 16, 0, 12), TextXAlignment = Enum.TextXAlignment.Left, Parent = content, }) -- ============ Row builders ============ local function makeToggleRow(parent, order, label, sublabel, callback) local row = create("Frame", { Size = UDim2.new(1, 0, 0, sublabel and 52 or 44), BackgroundColor3 = BG_ROW, LayoutOrder = order, Parent = parent }) create("UICorner", { CornerRadius = UDim.new(0, 10), Parent = row }) create("TextLabel", { Text = label, Font = Enum.Font.GothamMedium, TextSize = 14, TextColor3 = TEXT_MAIN, BackgroundTransparency = 1, Size = UDim2.new(1, -80, 0, 20), Position = UDim2.new(0, 14, 0, sublabel and 6 or 12), TextXAlignment = Enum.TextXAlignment.Left, Parent = row, }) if sublabel then create("TextLabel", { Text = sublabel, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, Size = UDim2.new(1, -80, 0, 16), Position = UDim2.new(0, 14, 0, 26), TextXAlignment = Enum.TextXAlignment.Left, Parent = row, }) end local switchBg = create("Frame", { Size = UDim2.new(0, 44, 0, 22), Position = UDim2.new(1, -56, 0.5, -11), BackgroundColor3 = Color3.fromRGB(50, 50, 58), Parent = row }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = switchBg }) local knob = create("Frame", { Size = UDim2.new(0, 18, 0, 18), Position = UDim2.new(0, 2, 0.5, -9), BackgroundColor3 = Color3.new(1, 1, 1), Parent = switchBg }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = knob }) local toggleBtn = create("TextButton", { Text = "", BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Parent = row }) local on = false toggleBtn.MouseButton1Click:Connect(function() on = not on TweenService:Create(knob, TweenInfo.new(0.18), { Position = on and UDim2.new(0, 24, 0.5, -9) or UDim2.new(0, 2, 0.5, -9) }):Play() TweenService:Create(switchBg, TweenInfo.new(0.18), { BackgroundColor3 = on and ACCENT or Color3.fromRGB(50, 50, 58) }):Play() callback(on) end) return row end local function makeSliderRow(parent, order, label, min, max, default, callback) local container = create("Frame", { Size = UDim2.new(1, 0, 0, 54), BackgroundColor3 = BG_ROW, LayoutOrder = order, Parent = parent }) create("UICorner", { CornerRadius = UDim.new(0, 10), Parent = container }) create("TextLabel", { Text = label, Font = Enum.Font.GothamMedium, TextSize = 13, TextColor3 = TEXT_MAIN, BackgroundTransparency = 1, Size = UDim2.new(1, -70, 0, 20), Position = UDim2.new(0, 14, 0, 4), TextXAlignment = Enum.TextXAlignment.Left, Parent = container }) local valueLabel = create("TextLabel", { Text = tostring(default), Font = Enum.Font.GothamBold, TextSize = 13, TextColor3 = ACCENT, BackgroundTransparency = 1, Size = UDim2.new(0, 50, 0, 20), Position = UDim2.new(1, -64, 0, 4), TextXAlignment = Enum.TextXAlignment.Right, Parent = container }) local track = create("Frame", { Size = UDim2.new(1, -28, 0, 8), Position = UDim2.new(0, 14, 0, 34), BackgroundColor3 = Color3.fromRGB(50, 50, 58), Parent = container }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = track }) local startAlpha = (default - min) / (max - min) local fill = create("Frame", { Size = UDim2.new(startAlpha, 0, 1, 0), BackgroundColor3 = ACCENT, Parent = track }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = fill }) create("UIGradient", { Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, ACCENT), ColorSequenceKeypoint.new(1, ACCENT2) }), Parent = fill }) local thumb = create("Frame", { Size = UDim2.new(0, 16, 0, 16), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(startAlpha, 0, 0.5, 0), BackgroundColor3 = Color3.new(1, 1, 1), ZIndex = 2, Parent = track }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = thumb }) create("UIStroke", { Color = ACCENT, Thickness = 1.5, Parent = thumb }) local dragging = false local function setFromAlpha(alpha) alpha = math.clamp(alpha, 0, 1) fill.Size = UDim2.new(alpha, 0, 1, 0) thumb.Position = UDim2.new(alpha, 0, 0.5, 0) local value = math.floor(min + (max - min) * alpha + 0.5) valueLabel.Text = tostring(value) callback(value) end local inputCatcher = create("TextButton", { Text = "", BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Parent = track }) inputCatcher.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true setFromAlpha((input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then setFromAlpha((input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) return container end local function makeActionButton(parent, order, label, subtext) local btn = create("TextButton", { Text = "", BackgroundColor3 = ACCENT, Size = UDim2.new(1, 0, 0, 56), LayoutOrder = order, AutoButtonColor = false, Parent = parent }) create("UICorner", { CornerRadius = UDim.new(0, 12), Parent = btn }) create("UIGradient", { Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, ACCENT), ColorSequenceKeypoint.new(1, ACCENT2) }), Rotation = 20, Parent = btn }) create("TextLabel", { Text = label, Font = Enum.Font.GothamBlack, TextSize = 16, TextColor3 = Color3.new(1, 1, 1), BackgroundTransparency = 1, Size = UDim2.new(1, -20, 0, 20), Position = UDim2.new(0, 10, 0, 10), TextXAlignment = Enum.TextXAlignment.Left, Parent = btn }) if subtext then create("TextLabel", { Text = subtext, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = Color3.fromRGB(255, 220, 235), BackgroundTransparency = 1, Size = UDim2.new(1, -20, 0, 16), Position = UDim2.new(0, 10, 0, 30), TextXAlignment = Enum.TextXAlignment.Left, Parent = btn }) end return btn end -- ============ Pages ============ local pages = {} local function makePage(name) local page = create("ScrollingFrame", { Name = name, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false, CanvasSize = UDim2.new(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 4, ScrollBarImageColor3 = ACCENT, ScrollBarImageTransparency = 0.3, Parent = pageHolder, }) create("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder, Parent = page }) create("UIPadding", { PaddingRight = UDim.new(0, 8), Parent = page }) pages[name] = page return page end -- HOME local homePage = makePage("Home") create("TextLabel", { Text = "Welcome back, " .. player.DisplayName .. ".", Font = Enum.Font.GothamBold, TextSize = 15, TextColor3 = TEXT_MAIN, BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 44), TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, LayoutOrder = 1, Parent = homePage, }) local statusCard = create("Frame", { Size = UDim2.new(1, 0, 0, 120), BackgroundColor3 = BG_ROW, LayoutOrder = 2, Parent = homePage }) create("UICorner", { CornerRadius = UDim.new(0, 10), Parent = statusCard }) create("TextLabel", { Text = "Use the tabs on the left to control movement mods, run server actions, and toggle stealth. Everything here only affects you unless you tap Slap All.", Font = Enum.Font.Gotham, TextSize = 13, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, TextWrapped = true, Size = UDim2.new(1, -28, 1, -20), Position = UDim2.new(0, 14, 0, 10), TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, Parent = statusCard }) -- MOVEMENT local movePage = makePage("Movement") makeToggleRow(movePage, 1, "Fly", "Free-fly using camera direction", function(on) state.Fly = on; if on then startFly() else stopFly() end end) makeSliderRow(movePage, 2, "Fly Speed", 10, 300, FLY_SPEED, function(v) FLY_SPEED = v end) makeToggleRow(movePage, 3, "Speed Boost", "Boosted WalkSpeed", function(on) state.Speed = on; setSpeed(on) end) makeSliderRow(movePage, 4, "Speed Value", 16, 300, WALK_SPEED_BOOSTED, function(v) WALK_SPEED_BOOSTED = v; if state.Speed then setSpeed(true) end end) makeToggleRow(movePage, 5, "Noclip", "Walk through walls/props", function(on) state.Noclip = on; if on then startNoclip() else stopNoclip() end end) makeToggleRow(movePage, 6, "Infinite Jump", "Jump again mid-air", function(on) state.InfiniteJump = on; if on then startInfiniteJump() else stopInfiniteJump() end end) makeSliderRow(movePage, 7, "Jump Power", 50, 400, JUMP_POWER, function(v) JUMP_POWER = v; applyJumpPower() end) -- ACTIONS local actionsPage = makePage("Actions") local slapBtn = makeActionButton(actionsPage, 1, "SLAP ALL PLAYERS", "Launches every player in the server into the air") slapBtn.MouseButton1Click:Connect(function() if SlapAllRemote then SlapAllRemote:FireServer() end TweenService:Create(slapBtn, TweenInfo.new(0.08), { BackgroundColor3 = Color3.new(1, 1, 1) }):Play() task.delay(0.12, function() TweenService:Create(slapBtn, TweenInfo.new(0.2), { BackgroundColor3 = ACCENT }):Play() end) end) -- STEALTH local stealthPage = makePage("Stealth") makeToggleRow(stealthPage, 1, "Invisible (Server)", "Hides your model, nametag & health bar for everyone", function(on) state.Invisible = on if SetInvisibleRemote then SetInvisibleRemote:FireServer(on) end end) -- ============ Nav buttons ============ local navOrder = { "Home", "Movement", "Actions", "Stealth" } local navButtons = {} local function setActivePage(name) for pageName, page in pairs(pages) do page.Visible = (pageName == name) end pageTitle.Text = name for navName, entry in pairs(navButtons) do local active = navName == name TweenService:Create(entry.button, TweenInfo.new(0.15), { BackgroundColor3 = active and BG_ROW or BG_PANEL, }):Play() entry.indicator.BackgroundTransparency = active and 0 or 1 entry.label.TextColor3 = active and TEXT_MAIN or TEXT_DIM end end for i, name in ipairs(navOrder) do local btn = create("TextButton", { Text = "", BackgroundColor3 = BG_PANEL, Size = UDim2.new(1, 0, 0, 38), LayoutOrder = i, AutoButtonColor = false, Parent = navHolder }) create("UICorner", { CornerRadius = UDim.new(0, 8), Parent = btn }) local indicator = create("Frame", { Size = UDim2.new(0, 3, 0, 18), Position = UDim2.new(0, 0, 0.5, -9), BackgroundColor3 = ACCENT, BackgroundTransparency = 1, Parent = btn }) create("UICorner", { CornerRadius = UDim.new(1, 0), Parent = indicator }) local label = create("TextLabel", { Text = name, Font = Enum.Font.GothamMedium, TextSize = 14, TextColor3 = TEXT_DIM, BackgroundTransparency = 1, Size = UDim2.new(1, -20, 1, 0), Position = UDim2.new(0, 14, 0, 0), TextXAlignment = Enum.TextXAlignment.Left, Parent = btn }) btn.MouseButton1Click:Connect(function() setActivePage(name) end) navButtons[name] = { button = btn, indicator = indicator, label = label } end setActivePage("Home") minimizeBtn.MouseButton1Click:Connect(function() content.Visible = not content.Visible sidebar.Visible = sidebar.Visible -- sidebar always stays; only content collapses TweenService:Create(root, TweenInfo.new(0.2), { Size = content.Visible and UDim2.new(0, 560, 0, 440) or UDim2.new(0, 168, 0, 36), }):Play() end) applyJumpPower()