--// ONE SCRIPT ADMIN PANEL --// Put this LocalScript in StarterPlayer > StarterPlayerScripts --// CODE: chatgpt local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer --================================================== --// GUI --================================================== local gui = Instance.new("ScreenGui") gui.Name = "AdminPanelGui" gui.ResetOnSpawn = false gui.DisplayOrder = 999 gui.Parent = player:WaitForChild("PlayerGui") --================================================== --// CODE LOGIN --================================================== local correctCode = "chatgpt" local codeFrame = Instance.new("Frame") codeFrame.Size = UDim2.new(0, 300, 0, 190) codeFrame.Position = UDim2.new(0.5, -150, 0.5, -95) codeFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) codeFrame.Active = true codeFrame.Parent = gui Instance.new("UICorner", codeFrame).CornerRadius = UDim.new(0, 12) local codeTitle = Instance.new("TextLabel") codeTitle.Size = UDim2.new(1, -20, 0, 40) codeTitle.Position = UDim2.new(0, 10, 0, 10) codeTitle.BackgroundTransparency = 1 codeTitle.Text = "🔒 ENTER ADMIN CODE" codeTitle.TextColor3 = Color3.new(1, 1, 1) codeTitle.TextSize = 18 codeTitle.Font = Enum.Font.GothamBold codeTitle.Parent = codeFrame local codeBox = Instance.new("TextBox") codeBox.Size = UDim2.new(1, -30, 0, 45) codeBox.Position = UDim2.new(0, 15, 0, 60) codeBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45) codeBox.TextColor3 = Color3.new(1, 1, 1) codeBox.PlaceholderText = "Enter code..." codeBox.PlaceholderColor3 = Color3.fromRGB(150, 150, 150) codeBox.Text = "" codeBox.TextSize = 16 codeBox.Font = Enum.Font.Gotham codeBox.ClearTextOnFocus = false codeBox.Parent = codeFrame Instance.new("UICorner", codeBox).CornerRadius = UDim.new(0, 8) local codeStatus = Instance.new("TextLabel") codeStatus.Size = UDim2.new(1, -20, 0, 40) codeStatus.Position = UDim2.new(0, 10, 0, 120) codeStatus.BackgroundTransparency = 1 codeStatus.Text = "Enter the code to continue." codeStatus.TextColor3 = Color3.fromRGB(180, 180, 180) codeStatus.TextSize = 13 codeStatus.Font = Enum.Font.Gotham codeStatus.Parent = codeFrame --================================================== --// DRAG CODE FRAME --================================================== local draggingCode = false local dragStartCode local startPosCode codeFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingCode = true dragStartCode = input.Position startPosCode = codeFrame.Position end end) UserInputService.InputChanged:Connect(function(input) if not draggingCode then return end if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragStartCode codeFrame.Position = UDim2.new( startPosCode.X.Scale, startPosCode.X.Offset + delta.X, startPosCode.Y.Scale, startPosCode.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingCode = false end end) --================================================== --// ADMIN BUTTON --================================================== local openButton = Instance.new("TextButton") openButton.Size = UDim2.new(0, 110, 0, 35) openButton.Position = UDim2.new(0, 10, 0, 55) openButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35) openButton.TextColor3 = Color3.new(1, 1, 1) openButton.Text = "⚙ ADMIN" openButton.TextSize = 16 openButton.Font = Enum.Font.GothamBold openButton.Visible = false openButton.Parent = gui Instance.new("UICorner", openButton).CornerRadius = UDim.new(0, 8) --================================================== --// PANEL --================================================== local panel = Instance.new("Frame") panel.Size = UDim2.new(0, 280, 0, 680) panel.Position = UDim2.new(0, 10, 0, 100) panel.BackgroundColor3 = Color3.fromRGB(25, 25, 25) panel.Visible = false panel.Parent = gui Instance.new("UICorner", panel).CornerRadius = UDim.new(0, 12) --================================================== --// TITLE --================================================== local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -60, 0, 45) title.Position = UDim2.new(0, 15, 0, 5) title.BackgroundTransparency = 1 title.Text = "ADMIN PANEL" title.TextColor3 = Color3.new(1, 1, 1) title.TextSize = 20 title.Font = Enum.Font.GothamBold title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = panel --================================================== --// EXIT --================================================== local exit = Instance.new("TextButton") exit.Size = UDim2.new(0, 35, 0, 35) exit.Position = UDim2.new(1, -45, 0, 10) exit.BackgroundColor3 = Color3.fromRGB(200, 45, 45) exit.Text = "X" exit.TextColor3 = Color3.new(1, 1, 1) exit.TextSize = 18 exit.Font = Enum.Font.GothamBold exit.Parent = panel Instance.new("UICorner", exit).CornerRadius = UDim.new(0, 8) --================================================== --// SPEED --================================================== local speedBox = Instance.new("TextBox") speedBox.Size = UDim2.new(1, -30, 0, 45) speedBox.Position = UDim2.new(0, 15, 0, 60) speedBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45) speedBox.TextColor3 = Color3.new(1, 1, 1) speedBox.PlaceholderText = "Enter speed..." speedBox.PlaceholderColor3 = Color3.fromRGB(160, 160, 160) speedBox.Text = "" speedBox.TextSize = 16 speedBox.Font = Enum.Font.Gotham speedBox.ClearTextOnFocus = false speedBox.Parent = panel Instance.new("UICorner", speedBox).CornerRadius = UDim.new(0, 8) --================================================== --// JUMP POWER --================================================== local jumpBox = Instance.new("TextBox") jumpBox.Size = UDim2.new(1, -30, 0, 45) jumpBox.Position = UDim2.new(0, 15, 0, 115) jumpBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45) jumpBox.TextColor3 = Color3.new(1, 1, 1) jumpBox.PlaceholderText = "Enter jump power..." jumpBox.PlaceholderColor3 = Color3.fromRGB(160, 160, 160) jumpBox.Text = "" jumpBox.TextSize = 16 jumpBox.Font = Enum.Font.Gotham jumpBox.ClearTextOnFocus = false jumpBox.Parent = panel Instance.new("UICorner", jumpBox).CornerRadius = UDim.new(0, 8) --================================================== --// NOCLIP --================================================== local noclipButton = Instance.new("TextButton") noclipButton.Size = UDim2.new(1, -30, 0, 45) noclipButton.Position = UDim2.new(0, 15, 0, 170) noclipButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) noclipButton.TextColor3 = Color3.new(1, 1, 1) noclipButton.Text = "Noclip: OFF" noclipButton.TextSize = 16 noclipButton.Font = Enum.Font.GothamBold noclipButton.Parent = panel Instance.new("UICorner", noclipButton).CornerRadius = UDim.new(0, 8) --================================================== --// FLY --================================================== local flyButton = Instance.new("TextButton") flyButton.Size = UDim2.new(1, -30, 0, 45) flyButton.Position = UDim2.new(0, 15, 0, 225) flyButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) flyButton.TextColor3 = Color3.new(1, 1, 1) flyButton.Text = "Fly: OFF" flyButton.TextSize = 16 flyButton.Font = Enum.Font.GothamBold flyButton.Parent = panel Instance.new("UICorner", flyButton).CornerRadius = UDim.new(0, 8) --================================================== --// ESP --================================================== local espButton = Instance.new("TextButton") espButton.Size = UDim2.new(1, -30, 0, 45) espButton.Position = UDim2.new(0, 15, 0, 280) espButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) espButton.TextColor3 = Color3.new(1, 1, 1) espButton.Text = "ESP: OFF" espButton.TextSize = 16 espButton.Font = Enum.Font.GothamBold espButton.Parent = panel Instance.new("UICorner", espButton).CornerRadius = UDim.new(0, 8) --================================================== --// INFINITE JUMP --================================================== local infiniteJumpButton = Instance.new("TextButton") infiniteJumpButton.Size = UDim2.new(1, -30, 0, 45) infiniteJumpButton.Position = UDim2.new(0, 15, 0, 335) infiniteJumpButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) infiniteJumpButton.TextColor3 = Color3.new(1, 1, 1) infiniteJumpButton.Text = "Infinite Jump: OFF" infiniteJumpButton.TextSize = 16 infiniteJumpButton.Font = Enum.Font.GothamBold infiniteJumpButton.Parent = panel Instance.new("UICorner", infiniteJumpButton).CornerRadius = UDim.new(0, 8) --================================================== --// DISPLAY NAME ESP --================================================== local nameESPButton = Instance.new("TextButton") nameESPButton.Size = UDim2.new(1, -30, 0, 45) nameESPButton.Position = UDim2.new(0, 15, 0, 390) nameESPButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) nameESPButton.TextColor3 = Color3.new(1, 1, 1) nameESPButton.Text = "Display Names: OFF" nameESPButton.TextSize = 16 nameESPButton.Font = Enum.Font.GothamBold nameESPButton.Parent = panel Instance.new("UICorner", nameESPButton).CornerRadius = UDim.new(0, 8) --================================================== --// SPECTATE INPUT --================================================== local spectateBox = Instance.new("TextBox") spectateBox.Size = UDim2.new(1, -30, 0, 45) spectateBox.Position = UDim2.new(0, 15, 0, 445) spectateBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45) spectateBox.TextColor3 = Color3.new(1, 1, 1) spectateBox.PlaceholderText = "Username or random..." spectateBox.PlaceholderColor3 = Color3.fromRGB(160, 160, 160) spectateBox.Text = "" spectateBox.TextSize = 15 spectateBox.Font = Enum.Font.Gotham spectateBox.ClearTextOnFocus = false spectateBox.Parent = panel Instance.new("UICorner", spectateBox).CornerRadius = UDim.new(0, 8) --================================================== --// SPECTATE BUTTON --================================================== local spectateButton = Instance.new("TextButton") spectateButton.Size = UDim2.new(0.48, -10, 0, 45) spectateButton.Position = UDim2.new(0, 15, 0, 500) spectateButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) spectateButton.TextColor3 = Color3.new(1, 1, 1) spectateButton.Text = "Spectate" spectateButton.TextSize = 15 spectateButton.Font = Enum.Font.GothamBold spectateButton.Parent = panel Instance.new("UICorner", spectateButton).CornerRadius = UDim.new(0, 8) --================================================== --// STOP SPECTATE --================================================== local stopSpectateButton = Instance.new("TextButton") stopSpectateButton.Size = UDim2.new(0.48, -10, 0, 45) stopSpectateButton.Position = UDim2.new(0.52, 0, 0, 500) stopSpectateButton.BackgroundColor3 = Color3.fromRGB(180, 45, 45) stopSpectateButton.TextColor3 = Color3.new(1, 1, 1) stopSpectateButton.Text = "Stop" stopSpectateButton.TextSize = 15 stopSpectateButton.Font = Enum.Font.GothamBold stopSpectateButton.Parent = panel Instance.new("UICorner", stopSpectateButton).CornerRadius = UDim.new(0, 8) --================================================== --// STATUS --================================================== local status = Instance.new("TextLabel") status.Size = UDim2.new(1, -30, 0, 80) status.Position = UDim2.new(0, 15, 0, 555) status.BackgroundTransparency = 1 status.Text = "Controls ready." status.TextColor3 = Color3.fromRGB(180, 180, 180) status.TextSize = 14 status.Font = Enum.Font.Gotham status.TextWrapped = true status.Parent = panel --================================================== --// VARIABLES --================================================== local currentSpeed = nil local currentJumpPower = nil local noclip = false local flying = false local espEnabled = false local infiniteJump = false local nameESP = false local spectating = false local flySpeed = 70 local flyConnection local bodyVelocity local bodyGyro local highlights = {} local nameTags = {} --================================================== --// DRAG ADMIN BUTTON --================================================== local dragStart local startPosition openButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragStart = input.Position startPosition = openButton.Position local moved = false local connection input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then if not moved then panel.Visible = not panel.Visible end end end) connection = UserInputService.InputChanged:Connect(function(moveInput) if moveInput.UserInputType == Enum.UserInputType.MouseMovement or moveInput.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragStart if delta.Magnitude > 8 then moved = true end if moved then local newPosition = UDim2.new( startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y ) openButton.Position = newPosition panel.Position = UDim2.new( newPosition.X.Scale, newPosition.X.Offset, newPosition.Y.Scale, newPosition.Y.Offset + 45 ) end end end) task.delay(1, function() if connection then connection:Disconnect() end end) end end) --================================================== --// EXIT --================================================== exit.MouseButton1Click:Connect(function() panel.Visible = false end) --================================================== --// SPEED --================================================== speedBox.FocusLost:Connect(function() local number = tonumber(speedBox.Text) if number then currentSpeed = number status.Text = "Speed looping at " .. number else status.Text = "Enter a valid speed number!" end end) --================================================== --// JUMP POWER --================================================== jumpBox.FocusLost:Connect(function() local number = tonumber(jumpBox.Text) if number then currentJumpPower = number status.Text = "JumpPower looping at " .. number else status.Text = "Enter a valid JumpPower number!" end end) --================================================== --// SPEED + JUMP LOOP --================================================== RunService.Heartbeat:Connect(function() local character = player.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") if humanoid then if currentSpeed then humanoid.WalkSpeed = currentSpeed end if currentJumpPower then humanoid.UseJumpPower = true humanoid.JumpPower = currentJumpPower end end end) --================================================== --// NOCLIP --================================================== noclipButton.MouseButton1Click:Connect(function() noclip = not noclip if noclip then noclipButton.Text = "Noclip: ON" noclipButton.BackgroundColor3 = Color3.fromRGB(45, 150, 70) status.Text = "Noclip enabled!" else noclipButton.Text = "Noclip: OFF" noclipButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) status.Text = "Noclip disabled!" end end) RunService.Stepped:Connect(function() if noclip then local character = player.Character if character then for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end end end) --================================================== --// FLY --================================================== local function stopFly() flying = false if flyConnection then flyConnection:Disconnect() flyConnection = nil end if bodyVelocity then bodyVelocity:Destroy() bodyVelocity = nil end if bodyGyro then bodyGyro:Destroy() bodyGyro = nil end local character = player.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.PlatformStand = false end end end local function startFly() local character = player.Character if not character then return end local root = character:FindFirstChild("HumanoidRootPart") local humanoid = character:FindFirstChildOfClass("Humanoid") if not root or not humanoid then return end flying = true humanoid.PlatformStand = true bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Velocity = Vector3.zero bodyVelocity.Parent = root bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge) bodyGyro.P = 10000 bodyGyro.Parent = root flyConnection = RunService.RenderStepped:Connect(function() if not flying or not root.Parent then stopFly() return end local direction = humanoid.MoveDirection if direction.Magnitude > 0 then direction = direction.Unit * flySpeed else direction = Vector3.zero end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then direction += Vector3.new(0, flySpeed, 0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then direction -= Vector3.new(0, flySpeed, 0) end if humanoid.Jump then direction += Vector3.new(0, flySpeed, 0) end bodyVelocity.Velocity = direction local camera = workspace.CurrentCamera if camera then bodyGyro.CFrame = CFrame.new( root.Position, root.Position + camera.CFrame.LookVector ) end end) end flyButton.MouseButton1Click:Connect(function() if flying then stopFly() flyButton.Text = "Fly: OFF" flyButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) status.Text = "Fly disabled!" else startFly() flyButton.Text = "Fly: ON" flyButton.BackgroundColor3 = Color3.fromRGB(45, 150, 70) if UserInputService.TouchEnabled then status.Text = "Fly ON! Joystick + Jump." else status.Text = "Fly ON! WASD + Space/Ctrl." end end end) --================================================== --// ESP --================================================== local function addESP(targetPlayer) if targetPlayer == player then return end local character = targetPlayer.Character if not character then return end if highlights[targetPlayer] then highlights[targetPlayer]:Destroy() end local highlight = Instance.new("Highlight") highlight.Name = "AdminESP" highlight.Adornee = character highlight.FillColor = Color3.fromRGB(255, 0, 0) highlight.OutlineColor = Color3.fromRGB(255, 0, 0) highlight.FillTransparency = 0.65 highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = character highlights[targetPlayer] = highlight end local function removeESP(targetPlayer) if highlights[targetPlayer] then highlights[targetPlayer]:Destroy() highlights[targetPlayer] = nil end end local function updateESP() for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player then if espEnabled then addESP(targetPlayer) else removeESP(targetPlayer) end end end end espButton.MouseButton1Click:Connect(function() espEnabled = not espEnabled if espEnabled then espButton.Text = "ESP: ON" espButton.BackgroundColor3 = Color3.fromRGB(200, 45, 45) status.Text = "ESP enabled! Players highlighted red." else espButton.Text = "ESP: OFF" espButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) status.Text = "ESP disabled." end updateESP() end) --================================================== --// INFINITE JUMP --================================================== infiniteJumpButton.MouseButton1Click:Connect(function() infiniteJump = not infiniteJump if infiniteJump then infiniteJumpButton.Text = "Infinite Jump: ON" infiniteJumpButton.BackgroundColor3 = Color3.fromRGB(45, 150, 70) status.Text = "Infinite Jump enabled!" else infiniteJumpButton.Text = "Infinite Jump: OFF" infiniteJumpButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) status.Text = "Infinite Jump disabled." end end) UserInputService.JumpRequest:Connect(function() if infiniteJump then local character = player.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end end) --================================================== --// DISPLAY NAME ESP --================================================== local function addNameESP(targetPlayer) if targetPlayer == player then return end local character = targetPlayer.Character if not character then return end local head = character:FindFirstChild("Head") if not head then return end if nameTags[targetPlayer] then nameTags[targetPlayer]:Destroy() end local billboard = Instance.new("BillboardGui") billboard.Name = "DisplayNameESP" billboard.Adornee = head billboard.Size = UDim2.new(0, 200, 0, 40) billboard.StudsOffset = Vector3.new(0, 2.8, 0) billboard.AlwaysOnTop = true billboard.Parent = head local nameLabel = Instance.new("TextLabel") nameLabel.Size = UDim2.new(1, 0, 1, 0) nameLabel.BackgroundTransparency = 1 nameLabel.Text = targetPlayer.DisplayName nameLabel.TextColor3 = Color3.fromRGB(255, 0, 0) nameLabel.TextStrokeTransparency = 0 nameLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) nameLabel.TextSize = 18 nameLabel.Font = Enum.Font.GothamBold nameLabel.Parent = billboard nameTags[targetPlayer] = billboard end local function removeNameESP(targetPlayer) if nameTags[targetPlayer] then nameTags[targetPlayer]:Destroy() nameTags[targetPlayer] = nil end end nameESPButton.MouseButton1Click:Connect(function() nameESP = not nameESP if nameESP then nameESPButton.Text = "Display Names: ON" nameESPButton.BackgroundColor3 = Color3.fromRGB(200, 45, 45) status.Text = "Display names enabled!" for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player then addNameESP(targetPlayer) end end else nameESPButton.Text = "Display Names: OFF" nameESPButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) status.Text = "Display names disabled!" for _, targetPlayer in ipairs(Players:GetPlayers()) do removeNameESP(targetPlayer) end end end) --================================================== --// SPECTATE --================================================== local function findPlayer(username) username = string.lower(username) for _, target in ipairs(Players:GetPlayers()) do if string.lower(target.Name) == username then return target end end return nil end local function stopSpectating() spectating = false local character = player.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") if humanoid then workspace.CurrentCamera.CameraSubject = humanoid end status.Text = "Stopped spectating." end local function startSpectating() local username = string.lower(spectateBox.Text) if username == "" then status.Text = "Enter a username or 'random'!" return end local targetPlayer if username == "random" then local possiblePlayers = {} for _, target in ipairs(Players:GetPlayers()) do if target ~= player and target.Character then local humanoid = target.Character:FindFirstChildOfClass("Humanoid") if humanoid then table.insert(possiblePlayers, target) end end end if #possiblePlayers == 0 then status.Text = "No other players available!" return end targetPlayer = possiblePlayers[ math.random(1, #possiblePlayers) ] else targetPlayer = findPlayer(username) end if not targetPlayer then status.Text = "Player is not in this game!" return end if targetPlayer == player then status.Text = "You can't spectate yourself!" return end local character = targetPlayer.Character if not character then status.Text = "That player has no character!" return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then status.Text = "Couldn't find their Humanoid!" return end workspace.CurrentCamera.CameraSubject = humanoid spectating = true status.Text = "Spectating " .. targetPlayer.DisplayName end spectateButton.MouseButton1Click:Connect(function() startSpectating() end) stopSpectateButton.MouseButton1Click:Connect(function() stopSpectating() end) --================================================== --// PLAYER JOIN --================================================== Players.PlayerAdded:Connect(function(targetPlayer) targetPlayer.CharacterAdded:Connect(function() task.wait(0.5) if espEnabled then addESP(targetPlayer) end if nameESP then addNameESP(targetPlayer) end end) end) --================================================== --// EXISTING PLAYERS --================================================== for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player then targetPlayer.CharacterAdded:Connect(function() task.wait(0.5) if espEnabled then addESP(targetPlayer) end if nameESP then addNameESP(targetPlayer) end end) end end --================================================== --// PLAYER LEAVES --================================================== Players.PlayerRemoving:Connect(function(targetPlayer) removeESP(targetPlayer) removeNameESP(targetPlayer) if spectating then local character = player.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") if humanoid then workspace.CurrentCamera.CameraSubject = humanoid end spectating = false status.Text = "Spectated player left." end end) --================================================== --// RESPAWN --================================================== player.CharacterAdded:Connect(function() task.wait(0.5) if flying then stopFly() flyButton.Text = "Fly: OFF" flyButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55) end if spectating then stopSpectating() end end) --================================================== --// CODE CHECK --================================================== codeBox.FocusLost:Connect(function(enterPressed) if not enterPressed then return end if string.lower(codeBox.Text) == correctCode then codeStatus.Text = "Access granted!" codeStatus.TextColor3 = Color3.fromRGB(80, 200, 100) task.wait(0.4) codeFrame:Destroy() openButton.Visible = true else codeStatus.Text = "Wrong code!" codeStatus.TextColor3 = Color3.fromRGB(220, 60, 60) codeBox.Text = "" end end) --// AUTO FOCUS task.wait(0.2) codeBox:CaptureFocus()