-- Admin Panel: client-sided admin commands with smooth slide-in animation
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
-- ////////////////////////////////////////////////////////////////////////////
-- State
-- //////////////////////////////////////////////////////////////////////////==
local panelOpen = false
local state = {}
local connections = {}
local espFolder = Instance.new("Folder")
espFolder.Name = "AdminESP"
-- Saved lighting values
local savedLighting = {
Brightness = Lighting.Brightness,
ClockTime = Lighting.ClockTime,
FogEnd = Lighting.FogEnd,
FogStart = Lighting.FogStart,
GlobalShadows = Lighting.GlobalShadows,
Ambient = Lighting.Ambient,
OutdoorAmbient = Lighting.OutdoorAmbient,
}
-- ////////////////////////////////////////////////////////////////////////////
-- Helper: UI creation
-- //////////////////////////////////////////////////////////////////////////==
local function make(className, props)
local inst = Instance.new(className)
for k, v in pairs(props) do
inst[k] = v
end
return inst
end
local function corner(parent, radius)
make("UICorner", {CornerRadius = UDim.new(0, radius or 8), Parent = parent})
end
local function stroke(parent, color, thickness)
make("UIStroke", {Color = color or Color3.fromRGB(60,60,80), Thickness = thickness or 1.5, Parent = parent})
end
local function disconnect(name)
if connections[name] then
connections[name]:Disconnect()
connections[name] = nil
end
end
local function getChar()
local char = player.Character
if not char then return nil end
local hrp = char:FindFirstChild("HumanoidRootPart")
local hum = char:FindFirstChildOfClass("Humanoid")
if hrp and hum then return char, hrp, hum end
return nil
end
-- ////////////////////////////////////////////////////////////////////////////
-- ScreenGui
-- //////////////////////////////////////////////////////////////////////////==
local gui = make("ScreenGui", {
Name = "AdminPanelGui",
ResetOnSpawn = false,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
Parent = player:WaitForChild("PlayerGui"),
})
-- Floating toggle button
local toggleBtn = make("TextButton", {
Name = "AdminToggle",
Size = UDim2.new(0, 48, 0, 48),
Position = UDim2.new(0, 10, 0, 60),
BackgroundColor3 = Color3.fromRGB(35, 35, 50),
Text = "⚙",
TextColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamBold,
TextSize = 22,
AutoButtonColor = true,
Visible = true,
Parent = gui,
})
corner(toggleBtn, 100)
stroke(toggleBtn, Color3.fromRGB(120, 80, 200), 2)
-- Panel (starts off-screen to the left)
local panelPos = UDim2.new(0, 20, 0, 60)
local panelOffPos = UDim2.new(0, -310, 0, 60)
local panel = make("Frame", {
Name = "Panel",
Size = UDim2.new(0, 290, 0, 440),
Position = panelOffPos,
BackgroundColor3 = Color3.fromRGB(25, 25, 35),
BorderSizePixel = 0,
Visible = false,
Parent = gui,
})
corner(panel, 12)
stroke(panel, Color3.fromRGB(70, 50, 120), 2)
-- Header
local header = make("Frame", {
Name = "Header",
Size = UDim2.new(1, 0, 0, 40),
BackgroundColor3 = Color3.fromRGB(45, 35, 65),
BorderSizePixel = 0,
Parent = panel,
})
corner(header, 12)
local headerTitle = make("TextLabel", {
Size = UDim2.new(1, -40, 1, 0),
Position = UDim2.new(0, 14, 0, 0),
BackgroundTransparency = 1,
Text = "🛡 Admin Panel",
TextColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamBold,
TextSize = 16,
TextXAlignment = Enum.TextXAlignment.Left,
Parent = header,
})
local closeBtn = make("TextButton", {
Size = UDim2.new(0, 26, 0, 26),
Position = UDim2.new(1, -33, 0, 7),
BackgroundColor3 = Color3.fromRGB(200, 60, 60),
Text = "✕",
TextColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamBold,
TextSize = 14,
AutoButtonColor = true,
Parent = header,
})
corner(closeBtn, 100)
-- Scrolling content
local scroll = make("ScrollingFrame", {
Name = "Content",
Size = UDim2.new(1, -8, 1, -48),
Position = UDim2.new(0, 4, 0, 42),
BackgroundTransparency = 1,
BorderSizePixel = 0,
ScrollBarThickness = 4,
ScrollBarImageColor3 = Color3.fromRGB(120, 80, 200),
CanvasSize = UDim2.new(0, 0, 0, 0),
AutomaticCanvasSize = Enum.AutomaticSize.Y,
Parent = panel,
})
local layout = make("UIListLayout", {
Padding = UDim.new(0, 8),
HorizontalAlignment = Enum.HorizontalAlignment.Center,
Parent = scroll,
})
-- Draggable panel
local dragging = false
local dragStart, startPos
header.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = panel.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
header.InputChanged:Connect(function(input)
if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and dragging then
local delta = input.Position - dragStart
panelPos = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
panel.Position = panelPos
end
end)
-- Draggable toggle button
toggleBtn.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = toggleBtn.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
toggleBtn.InputChanged:Connect(function(input)
if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and dragging then
local delta = input.Position - dragStart
toggleBtn.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
-- Toggle animation
closeBtn.MouseButton1Click:Connect(function()
panelOpen = false
local tween = TweenService:Create(panel, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {Position = panelOffPos})
tween.Completed:Connect(function()
if not panelOpen then
panel.Visible = false
toggleBtn.Visible = true
end
end)
tween:Play()
end)
toggleBtn.MouseButton1Click:Connect(function()
panelOpen = true
toggleBtn.Visible = false
panel.Visible = true
panel.Position = panelOffPos
TweenService:Create(panel, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = panelPos}):Play()
end)
-- ////////////////////////////////////////////////////////////////////////////
-- UI Component factories
-- //////////////////////////////////////////////////////////////////////////==
local function createSection(titleText)
local sectionLabel = make("TextLabel", {
Size = UDim2.new(1, -16, 0, 24),
BackgroundTransparency = 1,
Text = titleText,
TextColor3 = Color3.fromRGB(160, 120, 220),
Font = Enum.Font.GothamBold,
TextSize = 13,
TextXAlignment = Enum.TextXAlignment.Left,
Parent = scroll,
})
local sep = make("Frame", {
Size = UDim2.new(1, -16, 0, 1),
BackgroundColor3 = Color3.fromRGB(60, 45, 90),
BorderSizePixel = 0,
Parent = scroll,
})
return sectionLabel
end
local function createButton(text, callback)
local btn = make("TextButton", {
Size = UDim2.new(1, -16, 0, 34),
BackgroundColor3 = Color3.fromRGB(50, 50, 70),
Text = text,
TextColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamBold,
TextSize = 13,
AutoButtonColor = true,
Parent = scroll,
})
corner(btn, 8)
btn.MouseButton1Click:Connect(callback)
return btn
end
local function createToggle(text, defaultOn, onEnable, onDisable)
state[text] = defaultOn or false
local btn = make("TextButton", {
Size = UDim2.new(1, -16, 0, 34),
BackgroundColor3 = defaultOn and Color3.fromRGB(60, 140, 60) or Color3.fromRGB(60, 50, 50),
Text = text .. ": " .. (defaultOn and "ON" or "OFF"),
TextColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamBold,
TextSize = 13,
AutoButtonColor = true,
Parent = scroll,
})
corner(btn, 8)
btn.MouseButton1Click:Connect(function()
state[text] = not state[text]
if state[text] then
btn.BackgroundColor3 = Color3.fromRGB(60, 140, 60)
btn.Text = text .. ": ON"
if onEnable then onEnable() end
else
btn.BackgroundColor3 = Color3.fromRGB(60, 50, 50)
btn.Text = text .. ": OFF"
if onDisable then onDisable() end
end
end)
return btn
end
local function createSlider(text, min, max, default, callback)
local container = make("Frame", {
Size = UDim2.new(1, -16, 0, 44),
BackgroundTransparency = 1,
Parent = scroll,
})
local label = make("TextLabel", {
Size = UDim2.new(1, 0, 0, 18),
BackgroundTransparency = 1,
Text = text .. ": " .. default,
TextColor3 = Color3.fromRGB(200, 200, 210),
Font = Enum.Font.Gotham,
TextSize = 12,
TextXAlignment = Enum.TextXAlignment.Left,
Parent = container,
})
local track = make("Frame", {
Size = UDim2.new(1, 0, 0, 14),
Position = UDim2.new(0, 0, 0, 22),
BackgroundColor3 = Color3.fromRGB(50, 45, 65),
BorderSizePixel = 0,
Parent = container,
})
corner(track, 100)
local fill = make("Frame", {
Size = UDim2.new((default - min) / (max - min), 0, 1, 0),
BackgroundColor3 = Color3.fromRGB(130, 90, 210),
BorderSizePixel = 0,
Parent = track,
})
corner(fill, 100)
local knob = make("Frame", {
Size = UDim2.new(0, 18, 0, 18),
Position = UDim2.new((default - min) / (max - min), -9, 0.5, -9),
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
BorderSizePixel = 0,
Parent = track,
})
corner(knob, 100)
local sliding = false
local function update(xPos)
local rel = math.clamp((xPos - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
fill.Size = UDim2.new(rel, 0, 1, 0)
knob.Position = UDim2.new(rel, -9, 0.5, -9)
local val = math.floor(min + (max - min) * rel)
label.Text = text .. ": " .. val
callback(val)
end
track.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
sliding = true
update(input.Position.X)
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then sliding = false end
end)
end
end)
UserInputService.InputChanged:Connect(function(input)
if sliding and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
update(input.Position.X)
end
end)
return container
end
-- ////////////////////////////////////////////////////////////////////////////
-- Admin Features
-- //////////////////////////////////////////////////////////////////////////==
-- CHARACTER SECTION
createSection("── Character ──")
createSlider("WalkSpeed", 16, 500, 16, function(val)
local _, _, hum = getChar()
if hum then hum.WalkSpeed = val end
state.walkSpeed = val
end)
createSlider("JumpPower", 50, 500, 50, function(val)
local _, _, hum = getChar()
if hum then hum.UseJumpPower = true; hum.JumpPower = val end
state.jumpPower = val
end)
createSlider("HipHeight", 0, 50, 0, function(val)
local _, _, hum = getChar()
if hum then hum.HipHeight = val end
state.hipHeight = val
end)
createToggle("God Mode", false, function()
connections.godMode = RunService.Heartbeat:Connect(function()
local _, _, hum = getChar()
if hum and hum.Health < hum.MaxHealth then
hum.Health = hum.MaxHealth
end
end)
end, function()
disconnect("godMode")
end)
createButton("Heal to Full", function()
local _, _, hum = getChar()
if hum then hum.Health = hum.MaxHealth end
end)
createButton("Reset Character", function()
local char = player.Character
if char then char:BreakJoints() end
end)
createToggle("Freeze", false, function()
local _, hrp = getChar()
if hrp then hrp.Anchored = true end
end, function()
local _, hrp = getChar()
if hrp then hrp.Anchored = false end
end)
createToggle("Invisible", false, function()
local char = getChar()
if char then
for _, p in char:GetDescendants() do
if p:IsA("BasePart") or p:IsA("Decal") then
p.LocalTransparencyModifier = 1
end
end
end
end, function()
local char = getChar()
if char then
for _, p in char:GetDescendants() do
if p:IsA("BasePart") or p:IsA("Decal") then
p.LocalTransparencyModifier = 0
end
end
end
end)
-- MOVEMENT SECTION
createSection("── Movement ──")
createToggle("NoClip", false, function()
connections.noClip = RunService.Stepped:Connect(function()
local char = getChar()
if char then
for _, p in char:GetDescendants() do
if p:IsA("BasePart") and p.CanCollide then
p.CanCollide = false
end
end
end
end)
end, function()
disconnect("noClip")
local char = getChar()
if char then
for _, p in char:GetDescendants() do
if p:IsA("BasePart") then
p.CanCollide = true
end
end
-- Re-anchor HRP if needed
local hrp = char:FindFirstChild("HumanoidRootPart")
if hrp then hrp.CanCollide = false end -- HRP shouldn't collide normally
end
end)
createToggle("Infinite Jump", false, function()
connections.infiniteJump = UserInputService.JumpRequest:Connect(function()
local _, _, hum = getChar()
if hum then
hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
hum:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
end, function()
disconnect("infiniteJump")
end)
createButton("Teleport Up 500", function()
local _, hrp = getChar()
if hrp then
hrp.CFrame = hrp.CFrame + Vector3.new(0, 500, 0)
end
end)
createButton("Teleport to Spawn", function()
local spawn = workspace:FindFirstChildOfClass("SpawnLocation")
if not spawn then
for _, d in workspace:GetDescendants() do
if d:IsA("SpawnLocation") then spawn = d break end
end
end
local _, hrp = getChar()
if hrp and spawn then
hrp.CFrame = spawn.CFrame + Vector3.new(0, 5, 0)
end
end)
createToggle("Anti-AFK", false, function()
local vu = game:GetService("VirtualUser")
connections.antiAfk = player.Idled:Connect(function()
vu:CaptureController()
vu:ClickButton2(Vector2.new())
end)
end, function()
disconnect("antiAfk")
end)
-- VISUAL SECTION
createSection("── Visual ──")
createToggle("ESP (Players)", false, function()
espFolder.Parent = workspace
connections.esp = RunService.Heartbeat:Connect(function()
for _, p in Players:GetPlayers() do
if p ~= player and p.Character then
local hl = espFolder:FindFirstChild(p.Name)
if not hl then
hl = make("Highlight", {Name = p.Name, FillColor = Color3.fromRGB(255, 0, 0), OutlineColor = Color3.fromRGB(255, 255, 255), FillTransparency = 0.5, Parent = espFolder})
end
hl.Adornee = p.Character
-- Billboard name tag
local head = p.Character:FindFirstChild("Head")
if head then
local bg = espFolder:FindFirstChild(p.Name .. "_tag")
if not bg then
bg = make("BillboardGui", {Name = p.Name .. "_tag", Size = UDim2.new(0, 200, 0, 50), AlwaysOnTop = true, Parent = espFolder})
make("TextLabel", {Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = p.Name, TextColor3 = Color3.fromRGB(255, 255, 255), TextStrokeTransparency = 0, Font = Enum.Font.GothamBold, TextSize = 18, Parent = bg})
end
bg.Adornee = head
end
else
local hl = espFolder:FindFirstChild(p.Name)
if hl then hl:Destroy() end
local tag = espFolder:FindFirstChild(p.Name .. "_tag")
if tag then tag:Destroy() end
end
end
end)
end, function()
disconnect("esp")
espFolder:ClearAllChildren()
espFolder.Parent = nil
end)
createToggle("Fullbright", false, function()
savedLighting.Brightness = Lighting.Brightness
savedLighting.ClockTime = Lighting.ClockTime
savedLighting.GlobalShadows = Lighting.GlobalShadows
savedLighting.Ambient = Lighting.Ambient
savedLighting.OutdoorAmbient = Lighting.OutdoorAmbient
Lighting.Brightness = 2
Lighting.ClockTime = 14
Lighting.GlobalShadows = false
Lighting.Ambient = Color3.fromRGB(178, 178, 178)
Lighting.OutdoorAmbient = Color3.fromRGB(178, 178, 178)
end, function()
Lighting.Brightness = savedLighting.Brightness
Lighting.ClockTime = savedLighting.ClockTime
Lighting.GlobalShadows = savedLighting.GlobalShadows
Lighting.Ambient = savedLighting.Ambient
Lighting.OutdoorAmbient = savedLighting.OutdoorAmbient
end)
createSlider("FOV", 20, 120, 70, function(val)
camera.FieldOfView = val
end)
createSlider("Time of Day", 0, 24, Lighting.ClockTime, function(val)
Lighting.ClockTime = val
end)
createToggle("Remove Fog", false, function()
savedLighting.FogEnd = Lighting.FogEnd
savedLighting.FogStart = Lighting.FogStart
Lighting.FogEnd = 1000000
Lighting.FogStart = 1000000
end, function()
Lighting.FogEnd = savedLighting.FogEnd
Lighting.FogStart = savedLighting.FogStart
end)
createToggle("Zoom Unlock", false, function()
player.CameraMaxZoomDistance = 1000000
player.CameraMinZoomDistance = 0.5
end, function()
player.CameraMaxZoomDistance = 128
player.CameraMinZoomDistance = 0.5
end)
-- GAME SECTION
createSection("── Game ──")
createButton("Sit", function()
local _, _, hum = getChar()
if hum then hum.Sit = true end
end)
createButton("Remove Tools", function()
local backpack = player:FindFirstChild("Backpack")
if backpack then
for _, item in backpack:GetChildren() do
item.Parent = nil
end
end
local char = player.Character
if char then
for _, item in char:GetChildren() do
if item:IsA("Tool") then item.Parent = nil end
end
end
end)
createButton("Copy Position", function()
local _, hrp = getChar()
if hrp then
local pos = hrp.Position
if setclipboard then
setclipboard(string.format("%.1f, %.1f, %.1f", pos.X, pos.Y, pos.Z))
end
end
end)
createButton("Destroy All Effects", function()
for _, d in workspace:GetDescendants() do
if d:IsA("ParticleEmitter") or d:IsA("Trail") or d:IsA("Beam") or d:IsA("Smoke") or d:IsA("Fire") or d:IsA("Sparkles") then
d.Enabled = false
end
end
end)
-- ////////////////////////////////////////////////////////////////////////////
-- Re-apply state on respawn
-- //////////////////////////////////////////////////////////////////////////==
player.CharacterAdded:Connect(function()
task.wait(0.5)
local _, _, hum = getChar()
if hum then
if state.walkSpeed then hum.WalkSpeed = state.walkSpeed end
if state.jumpPower then hum.UseJumpPower = true; hum.JumpPower = state.jumpPower end
if state.hipHeight then hum.HipHeight = state.hipHeight end
end
end)