So this is a commands script. What this does is when I say ";resetplace" or ";reset place" it does not reset the model named "World"
StartClone = game.Workspace.World:clone() --World is the name of the model
Prefix = ";"
local Admins = {"MarcelIa","PreyStar"}
function checkAuthority(name)
for a,v in pairs(Admins) do --For every Admin in the table
if v == name then --If the name matches a name in the table
return true
end
end
return false --It will only get to this point if it hasn't returned true already.
end
game.Players.PlayerAdded:connect(function(Plr)
Plr.Chatted:connect(function(Msg)
print(Plr.Name.." Said: ".. Msg)
if Msg:sub(1, 1) == Prefix then
Msg = Msg:lower()
local MsgS = Msg:sub(2)
print(MsgS)
if (MsgS == "resetplace" or MsgS == "reset place") and checkAuthority(Plr.Name) then
game.Workspace.World:remove()
StartClone.Parent = game.Workspace
StartClone = game.Workspace.World:clone()
elseif MsgS == "settings" then
Plr.PlayerGui.Tools.Settings.Visible = true
elseif MsgS == "cmds" or MsgS == "commands" then
Plr.PlayerGui["CommandGui's"].Gui.KeyCharacter.Text = "Prefix - "..Prefix
Plr.PlayerGui["CommandGui's"].Gui.Visible = true
end
end
end)
end)

2 comments
This looks right. Any output? I do have an efficiency tip though. Check if they're an admin as soon as they join. That way if they're not an admin, the chatted even won't even fire.
I'm not sure if there was any output. This is an script my friend gave me for my game, it wasn't working so he said to come here. I don't script myself, and I'm not sure what to do.