Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admins = {"Username"}
- game.Players.PlayerAdded:connect(function(p)
- for _,a in pairs (admins) do
- if (p.Name == a) or (p:GetRankInGroup(GROUPID) >= (RANKID)) then
- p.Chatted:connect(function(msg)
- if (msg:sub(1,4):lower() == "load") then
- local ins = msg:sub(6):lower()
- local map = game:GetService("ServerStorage"):GetChildren()
- for i = 1, #map do
- if map[i].Name:lower() == ins then
- map[i]:Clone().Parent = workspace
- workspace.Beep:Play()
- local h = Instance.new("Hint", workspace)
- h.Text = "Loaded "..map[i].Name
- wait(3)
- h:remove()
- end
- end
- elseif (msg:sub(1,3):lower() == "end") then
- local ins = msg:sub(5):lower()
- local map = game:GetService("ServerStorage"):GetChildren()
- for i = 1, #map do
- if (workspace:FindFirstChild(map[i].Name)) then
- workspace:FindFirstChild(map[i].Name):remove()
- workspace.Beep:Play()
- local h = Instance.new("Hint", workspace)
- h.Text = "Ended "..map[i].Name
- wait(3)
- h:remove()
- end
- end
- end
- end)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement