Advertisement
Seadoke

Roblox admen

Apr 4th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. print("Admin Script")
  2.  
  3. local adminList = {"seadoke20", "Telamon", "Builderman", "tarabyte", "Jeditkacheff", "HotThoth", "stickmasterluke", "ROBLOX", "Player", "QuantumSama"}
  4. adminList["Seadoke20"] = true
  5. adminList["Telamon"] = true
  6. adminList["stickmasterluke"] = true
  7. adminList["tarabyte"] = true
  8. adminList["ROBLOX"] = true
  9.  
  10. local banList = {}
  11. local commands = {"ban", "kick", "noobs"}
  12.  
  13. function rockOn(msg, player)
  14. if msg and player then
  15. print(msg)
  16. local delimiter = string.find(msg, "/")
  17. if delimiter then
  18. local command = string.sub(msg, 1, delimiter - 1)
  19. if game.Workspace:FindFirstChild("Debug") then
  20. game.Workspace.Debug.Value = command
  21. end
  22. local stringLength = string.len(msg)
  23. if command == "kick" then
  24. local playerName = string.sub(msg, delimiter + 1, stringLength)
  25. if game.Workspace:FindFirstChild("Debug") then
  26. game.Workspace.Debug.Value = playerName
  27. end
  28. local playerNameLength = string.len(playerName)
  29. local players = game.Players:GetChildren()
  30. for i = 1, #players do
  31. if string.lower(string.sub(players[i].Name, 1, playerNameLength)) == playerName and players[i] ~= player then
  32. players[i]:Remove()
  33. end
  34. end
  35. elseif command == "ban" then
  36. local playerName = string.sub(msg, delimiter + 1, stringLength)
  37. local playerNameLength = string.len(playerName)
  38. local players = game.Players:GetChildren()
  39. for i = 1, #players do
  40. if string.lower(string.sub(players[i].Name, 1, playerNameLength)) == playerName then
  41. table.insert(banList, player.Name)
  42. players[i]:Remove()
  43. end
  44. end
  45. elseif command == "noobs" then
  46. local players = game.Players:GetChildren()
  47. for i = 1, #players do
  48. -- This is tricky
  49. if players[i] and players[i]:FindFirstChild("leaderstats") then
  50. local stats = players[i].leaderstats
  51. if stats:FindFirstChild("Score") then
  52. if stats.Score.Value == 0 and not adminList[players[i].Name] then
  53. players[i]:Remove()
  54. end
  55. end
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62.  
  63.  
  64. game.Players.PlayerAdded:connect(function(player)
  65. print(player)
  66. for i = 1, #banList do
  67. if string.lower(banList[i]) == string.lower(player.Name) then
  68. player:Remove()
  69. end
  70. end
  71.  
  72. for i = 1, #adminList do
  73. if string.lower(adminList[i]) == string.lower(player.Name) then
  74. print("Found Admin")
  75. player.Chatted:connect(function(msg) rockOn(msg, player) end)
  76. end
  77. end
  78. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement