--!strict -- Basic Admin Tool Script -- Place this script inside a Tool named 'AdminTool' local Tool = script.Parent :: Tool local Players = game:GetService("Players") -- Function to create a command GUI for the target player local function createAdminGui(targetPlayer: Player, admin: Player) -- Check if the admin's character exists local adminCharacter = admin.Character if not adminCharacter then return end -- Create the main GUI frame local ScreenGui = Instance.new("ScreenGui") local Frame = Instance.new("Frame") local KickButton = Instance.new("TextButton") local BringButton = Instance.new("TextButton") local MessageButton = Instance.new("TextButton") local CloseButton = Instance.new("TextButton") ScreenGui.Parent = admin:WaitForChild("PlayerGui") ScreenGui.Name = "AdminGui_" .. targetPlayer.Name ScreenGui.ResetOnSpawn = false -- GUI persists after player respawns Frame.Size = UDim2.new(0, 200, 0, 150) Frame.Position = UDim2.new(0.5, -100, 0.5, -75) -- Center of the screen Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) Frame.Parent = ScreenGui Frame.Active = true Frame.Draggable = true -- Allows the admin to move the window KickButton.Size = UDim2.new(0.8, 0, 0.2, 0) KickButton.Position = UDim2.new(0.1, 0, 0.1, 0) KickButton.Text = "Kick " .. targetPlayer.Name KickButton.Parent = Frame BringButton.Size = UDim2.new(0.8, 0, 0.2, 0) BringButton.Position = UDim2.new(0.1, 0, 0.3, 0) BringButton.Text = "Bring " .. targetPlayer.Name BringButton.Parent = Frame MessageButton.Size = UDim2.new(0.8, 0, 0.2, 0) MessageButton.Position = UDim2.new(0.1, 0, 0.5, 0) MessageButton.Text = "Message " .. targetPlayer.Name MessageButton.Parent = Frame CloseButton.Size = UDim2.new(0.8, 0, 0.2, 0) CloseButton.Position = UDim2.new(0.1, 0, 0.7, 0) CloseButton.Text = "Close" CloseButton.Parent = Frame -- Button click functions KickButton.MouseButton1Click:Connect(function() targetPlayer:Kick("Kicked by admin " .. admin.Name) ScreenGui:Destroy() -- Close the GUI after action end) BringButton.MouseButton1Click:Connect(function() local targetCharacter = targetPlayer.Character local humanoidRootPart = adminCharacter:FindFirstChild("HumanoidRootPart") local targetRootPart = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") if humanoidRootPart and targetRootPart then -- Teleport the target player to the admin targetRootPart.CFrame = humanoidRootPart.CFrame + Vector3.new(0, 0, -5) -- Spawns them 5 studs in front end end) MessageButton.MouseButton1Click:Connect(function() -- Display a message on the target player's screen local TargetGui = Instance.new("ScreenGui") local MsgFrame = Instance.new("Frame") local TextLabel = Instance.new("TextLabel") TargetGui.Parent = targetPlayer:WaitForChild("PlayerGui") TargetGui.Name = "AdminMessage" MsgFrame.Size = UDim2.new(0, 300, 0, 100) MsgFrame.Position = UDim2.new(0.5, -150, 0.3, -50) MsgFrame.BackgroundColor3 = Color3.fromRGB(80, 80, 80) MsgFrame.Parent = TargetGui TextLabel.Size = UDim2.new(1, 0, 1, 0) TextLabel.Text = "Message from admin " .. admin.Name .. ":\nPlease follow the rules!" TextLabel.BackgroundTransparency = 1 TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TextLabel.Parent = MsgFrame -- Remove the message after 5 seconds task.wait(5) TargetGui:Destroy() end) CloseButto