-- Admin Commands test made by alexanderok for script builder!
local Admins = {'alexanderok'}
local Prefix = "a/"
function admin(plr)
for i,v in pairs(Admins) do
if v==tostring(plr) then return true end
return false end
for i,p in pairs()do
if not admin(p) then return end
p.Chatted:connect(function(msg)
if msg:lower() == Prefix .."shutdown" then
game.Players:ClearAllChildren()
game.Workspace:ClearAllChildren()
elseif msg:lower() == Prefix .."addpart" then
Instance.new("Part", game.Workspace)
elseif msg:lower() == Prefix .."removepart" then
game.Workspace.Part:Destroy()
elseif msg:lower() == Prefix .."testcommands" then
Instance.new("Part", game.Workspace)
wait(5)
game.Workspace.Part:Destroy()
end
end)
end
end)
COMMUNITY QUESTION
Why isn't these admin commands working?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Pls put your code in a code block e.g. ~~~~~~~~~~~~~~~~~ -- code here ~~~~~~~~~~~~~~~~~