Advertisement
Nadds

Untitled

Feb 3rd, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. admins = {"Username"}
  2.  
  3. game.Players.PlayerAdded:connect(function(p)
  4. for _,a in pairs (admins) do
  5. if (p.Name == a) or (p:GetRankInGroup(GROUPID) >= (RANKID)) then
  6. p.Chatted:connect(function(msg)
  7. if (msg:sub(1,4):lower() == "load") then
  8. local ins = msg:sub(6):lower()
  9. local map = game:GetService("ServerStorage"):GetChildren()
  10. for i = 1, #map do
  11. if map[i].Name:lower() == ins then
  12. map[i]:Clone().Parent = workspace
  13. workspace.Beep:Play()
  14. local h = Instance.new("Hint", workspace)
  15. h.Text = "Loaded "..map[i].Name
  16. wait(3)
  17. h:remove()
  18. end
  19. end
  20. elseif (msg:sub(1,3):lower() == "end") then
  21. local ins = msg:sub(5):lower()
  22. local map = game:GetService("ServerStorage"):GetChildren()
  23. for i = 1, #map do
  24. if (workspace:FindFirstChild(map[i].Name)) then
  25. workspace:FindFirstChild(map[i].Name):remove()
  26. workspace.Beep:Play()
  27. local h = Instance.new("Hint", workspace)
  28. h.Text = "Ended "..map[i].Name
  29. wait(3)
  30. h:remove()
  31. end
  32. end
  33. end
  34. end)
  35. end
  36. end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement