0% found this document useful (0 votes)
8 views3 pages

Just C and P

The document outlines a Lua script for a Roblox game that implements various admin commands for players with a specific game pass. Commands include functionalities like flying, noclip, god mode, changing speed and jump power, and more, with checks for admin permissions. The script also handles player chat input to execute these commands dynamically.

Uploaded by

zulfiqorvaditov
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)
8 views3 pages

Just C and P

The document outlines a Lua script for a Roblox game that implements various admin commands for players with a specific game pass. Commands include functionalities like flying, noclip, god mode, changing speed and jump power, and more, with checks for admin permissions. The script also handles player chat input to execute these commands dynamically.

Uploaded by

zulfiqorvaditov
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/ 3

local AdminCommands = {}

local Players = game:GetService("Players")


local MarketplaceService = game:GetService("MarketplaceService")

-- Gamepass ID for Real Admin


local REAL_ADMIN_GAMEPASS_ID = GAMEPASS_ID_HERE

-- Admin command permissions


local function HasRealAdmin(player)
return MarketplaceService:UserOwnsGamePassAsync(player.UserId,
REAL_ADMIN_GAMEPASS_ID)
end

-- Command list
AdminCommands["fly"] = function(player)
print(player.Name .. " used fly command!")
end

AdminCommands["noclip"] = function(player)
print(player.Name .. " used noclip command!")
end

AdminCommands["god"] = function(player)
player.Character.Humanoid.MaxHealth = math.huge
player.Character.Humanoid.Health = math.huge
print(player.Name .. " used god mode!")
end

AdminCommands["speed"] = function(player, speed)


speed = tonumber(speed) or 50
player.Character.Humanoid.WalkSpeed = speed
print(player.Name .. " changed speed to " .. speed)
end

AdminCommands["jump"] = function(player, jump)


jump = tonumber(jump) or 100
player.Character.Humanoid.JumpPower = jump
print(player.Name .. " changed jump power to " .. jump)
end

AdminCommands["size"] = function(player, size)


size = tonumber(size) or 1
if player.Character then
for _, part in pairs(player.Character:GetChildren()) do
if part:IsA("BasePart") then
part.Size = part.Size * size
end
end
end
print(player.Name .. " changed size to " .. size)
end

AdminCommands["invisible"] = function(player)
if player.Character then
for _, part in pairs(player.Character:GetChildren()) do
if part:IsA("BasePart") then
part.Transparency = 1
end
end
end
print(player.Name .. " is now invisible!")
end

AdminCommands["reset"] = function(player)
player.Character:BreakJoints()
print(player.Name .. " reset their character!")
end

AdminCommands["fire"] = function(player)
local fire = Instance.new("Fire")
fire.Parent = player.Character.HumanoidRootPart
print(player.Name .. " is on fire!")
end

AdminCommands["sparkles"] = function(player)
local sparkles = Instance.new("Sparkles")
sparkles.Parent = player.Character.HumanoidRootPart
print(player.Name .. " added sparkles!")
end

AdminCommands["explode"] = function(player)
local explosion = Instance.new("Explosion")
explosion.Position = player.Character.HumanoidRootPart.Position
explosion.Parent = game.Workspace
print(player.Name .. " exploded!")
end

AdminCommands["freeze"] = function(player)
for _, part in pairs(player.Character:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = true
end
end
print(player.Name .. " is frozen!")
end

AdminCommands["unfreeze"] = function(player)
for _, part in pairs(player.Character:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = false
end
end
print(player.Name .. " is unfrozen!")
end

AdminCommands["teleport"] = function(player, targetName)


local target = Players:FindFirstChild(targetName)
if target and target.Character and player.Character then

player.Character:SetPrimaryPartCFrame(target.Character:GetPrimaryPartCFrame())
print(player.Name .. " teleported to " .. targetName)
end
end

AdminCommands["kick"] = function(player, targetName)


if HasRealAdmin(player) then
local target = Players:FindFirstChild(targetName)
if target then
target:Kick("You have been kicked by " .. player.Name)
print(player.Name .. " kicked " .. targetName)
end
else
print(player.Name .. " attempted to use kick without permission!")
end
end

AdminCommands["ban"] = function(player, targetName)


if HasRealAdmin(player) then
local target = Players:FindFirstChild(targetName)
if target then
target:Kick("You have been banned by " .. player.Name)
print(player.Name .. " banned " .. targetName)
end
else
print(player.Name .. " attempted to use ban without permission!")
end
end

-- Command handler
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
local args = string.split(message, " ")
local command = args[1]:sub(2):lower()
if AdminCommands[command] then
table.remove(args, 1)
AdminCommands[command](player, unpack(args))
end
end)
end)

You might also like