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)
StartClone = game.Workspace.World:clone() --World is the name of the model Prefix = ";" local Admins = {"MarceIla","PreyStar"} -- all you did wrong is write her name. It's il not li 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)