Gods122222

Untitled

Jan 9th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. --[ Edit the following line to the players you want to be able to use the GUI. --]
  2. shared.adminlist = {"ZtripleZ","","","","",""}
  3. --[ Change the following line to the admin t-shirt asset ID --]
  4. shared.guishirt = ""
  5. --[ Edit the following line to specify the entry message that users will see when they enter the place. --]
  6. entermsg = "Welcome to my place!"
  7. --[ If the following line is set to true, the entry message will be displated, if false it wont. --]
  8. entermsgon = false
  9. --[ Put how long you want the entry message to stay up on the following line. --]
  10. entermsgtime = 5
  11. --[ Put people that you dotn want to be able to play your place here --]
  12. bannedlist = {"exploiter", "hackerperson"}
  13. --[Edit the follow lines to specify if you want them in the game (true or false)--]
  14. reset = true --The reset GUI (All users can use it)
  15. ffgui = true --The forcefield GUI (Only admins can use this)
  16. --[ If you dont want t-shirt admins to be able to ban/kick/reset/explode anyone, set the following line to false, true if you do. --]
  17. shared.tshirtabuseable = false
  18. --[ If you have added things to the modding API, change this to true and they will be added to the root of the GUI --]
  19. moddingapi = false
  20.  
  21.  
  22. --[~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~~+~+~+~+~+~+~+~+~+~+]
  23. --[~+~+~+~+~+~+~+~+~ Dont edit anything below this line! ~+~+~+~+~+~+~+~+~]
  24.  
  25.  
  26. --***********Note, this GUI will ONLY work in online mode!*****************
  27.  
  28. g = game:GetService("InsertService"):LoadAsset(26931665)
  29.  
  30. if g == "No assetUrl set" then
  31. error ("Admin GUI error! Admin GUI only works in a real game server.", 0)
  32. end
  33.  
  34. gu = game.StarterGui:findFirstChild("Kick")
  35. if gu ~= nil then
  36. gu:remove()
  37. end
  38. gu = game.StarterGui:findFirstChild("Reset")
  39. if gu ~= nil then
  40. gu:remove()
  41. end
  42. gu = game.StarterGui:findFirstChild("ForceFieldGUI")
  43. if gu ~= nil then
  44. gu:remove()
  45. end
  46.  
  47. kickgu = g.Kick
  48. kickgu.Parent = game.StarterGui
  49.  
  50. if moddingapi then
  51. o = script.ModdingAPI:GetChildren()
  52. for i = 1, #o do
  53. o[i]:clone().Parent = kickgu
  54. end
  55. end
  56.  
  57. if ffgui == true then
  58. g.ForceFieldGUI.Parent = game.StarterGui
  59. end
  60. if reset == true then
  61. g.Reset.Parent = game.StarterGui
  62. end
  63.  
  64. function checkOkToLetIn(name)
  65. for i = 1,#shared.adminlist do
  66. -- convert strings to all upper case, otherwise we will let in
  67. -- "Username" but not "username" or "uSERNAME"
  68. if (string.upper(name) == string.upper(shared.adminlist[i])) then return true end
  69. end
  70. return false
  71. end
  72.  
  73. function banPlayer(p)
  74. print("childadded")
  75. if checkOkToLetIn(p.Value) ~= true then
  76. table.insert(bannedlist, p.Value)
  77. if game.Players:findFirstChild(p.Value) ~= nil then
  78. game.Players:findFirstChild(p.Value):remove()
  79. end
  80. print("banned a player")
  81. end
  82. end
  83.  
  84. function addAdmin(p)
  85. if p.Value ~= "" then
  86. table.insert(shared.adminlist, p.Value)
  87. end
  88. end
  89. --Made by bubby4j
  90. function onPlayerAdded(p)
  91. for i =1,#bannedlist do
  92. if string.lower(bannedlist[i]) == string.lower(p.Name) and (checkOkToLetIn(p.Name) ~= true) then
  93. p:remove()
  94. end
  95. end
  96. if entermsgon == true then
  97. m = Instance.new("Hint")
  98. m.Text = entermsg
  99. m.Parent = p
  100. wait(entermsgtime)
  101. m:remove()
  102. end
  103. end
  104. game.Players.PlayerAdded:connect(onPlayerAdded)
  105. script.AddAdmin.ChildAdded:connect(addAdmin)
  106. script.BanPlayer.ChildAdded:connect(banPlayer)
Advertisement
Add Comment
Please, Sign In to add comment