KEMBAR78
Admin Command Script | PDF
0% found this document useful (0 votes)
119 views2 pages

Admin Command Script

Uploaded by

junior111kucing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views2 pages

Admin Command Script

Uploaded by

junior111kucing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

-- Admin Command Script (ServerScriptService)

local Players = game:GetService("Players")

-- List of admins (add your Roblox username here)


local Admins = {
"YourUsernameHere", -- replace with your username
}

-- Helper: check if player is admin


local function isAdmin(player)
for _, name in ipairs(Admins) do
if player.Name == name then
return true
end
end
return false
end

-- Commands
local function runCommand(player, msg)
if not isAdmin(player) then return end

local args = string.split(msg, " ")


local cmd = string.lower(args[1])

if cmd == "!speed" and args[2] then


local speed = tonumber(args[2])
if player.Character and player.Character:FindFirstChild("Humanoid") then
player.Character.Humanoid.WalkSpeed = speed
end

elseif cmd == "!jump" and args[2] then


local power = tonumber(args[2])
if player.Character and player.Character:FindFirstChild("Humanoid") then
player.Character.Humanoid.JumpPower = power
end

elseif cmd == "!kill" and args[2] then


local targetName = args[2]
local target = Players:FindFirstChild(targetName)
if target and target.Character and
target.Character:FindFirstChild("Humanoid") then
target.Character.Humanoid.Health = 0
end

elseif cmd == "!tp" and args[2] then


local targetName = args[2]
local target = Players:FindFirstChild(targetName)
if target and target.Character and
target.Character:FindFirstChild("HumanoidRootPart") then
if player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
player.Character.HumanoidRootPart.CFrame =
target.Character.HumanoidRootPart.CFrame + Vector3.new(2,0,0)
end
end
end
end
-- Hook chat
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
runCommand(player, msg)
end)
end)

You might also like