Advertisement
Chaseplayzrbx_YT

Roblox dignity's admin script rare leaked

Apr 14th, 2018
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.03 KB | None | 0 0
  1. -- Pay no attention to this. Its quite simple to use however.
  2.  
  3. -- Type 'bye [playername]' to ban someone from the server
  4. -- Type 'kick/[playername]' to kick someone from the server
  5. -- Type 'kill/[playername]' to kill someone
  6.  
  7. -- More commands below. PM me if you have any concerns.
  8.  
  9. owner = "chaseplayzrbx_YT"
  10. banned = { }
  11. admins = {"chaseplayzrbx_YT"} -- Your user
  12. mods = { "Bspurrell", "rogue658", "Dill5000100", "SlimShady", "Shaylya" } -- Add more if you'd like.
  13. superusers = {}
  14. powerusers = { }
  15.  
  16. function checkIfAdmin(name)
  17. for i =1,#admins do
  18. if name==admins[i] then
  19. return true
  20. else
  21. return false
  22. end
  23. end
  24. end
  25. function filler(name)
  26. return true
  27. end
  28. function checkIfMod(name)
  29. for i =1,#mods do
  30. if name==mods[i] then
  31. return true
  32. else
  33. return false
  34. end
  35. end
  36. end
  37. function checkIfSuperUser(name)
  38. for i =1,#superusers do
  39. if name==superusers[i] then
  40. return true
  41. else
  42. return false
  43. end
  44. end
  45. end
  46. function checkIfPowerUser(name)
  47. for i =1,#powerusers do
  48. if name==powerusers[i] then
  49. return true
  50. else
  51. return false
  52. end
  53. end
  54. end
  55. function showMsgAll(text)
  56. local m = Instance.new("Hint")
  57. m.Parent = game.Workspace
  58. m.Text = text
  59. wait(3)
  60. m.Parent = nil
  61. end
  62. function checkIfBanned(player)
  63. for i = 1,#banned do
  64. if player.Name == banned[i] then
  65. player:Remove()
  66. end
  67. end
  68. end
  69. function ban(player)
  70. if player~=nil then
  71. table.insert(banned, player.Name)
  72. player:Remove()
  73. end
  74. end
  75. function kick(player)
  76. if player~=nil then
  77. player:Remove()
  78. end
  79. end
  80. function showMsg(parent, text)
  81. local m = Instance.new("Hint")
  82. m.Parent = parent
  83. m.Text = text
  84. wait(3)
  85. m.Parent = nil
  86. end
  87. function getCall(call, parent)
  88. if call == "" then
  89. showMsg(parent, "Dignity's Admin Commands Script Loaded (V1.7); General Info Accessed.")
  90. showMsg(parent, "Type help/ [item name]/ for help in that topic.")
  91. showMsg(parent, "Commands:")
  92. showMsg(parent, "Type help/give/ [Info on Giving Hopperbins/Tools.")
  93. showMsg(parent, "Type help/sb/ [Info on Script Builder; Select Few Only.")
  94. showMsg(parent, "Type help/setlvl/ [Info on Setting Levels. Owner Only.]")
  95. showMsg(parent, "Type help/s/ [Info on Shoutouts; Select Few Only.")
  96. showMsg(parent, "Type help/kill/ [Info on KillScript; Select Few Only.]")
  97. showMsg(parent, "Type help/ban/ [Info on Banning Users; Select Few Only.]")
  98. showMsg(parent, "Type help/kick/ [Info on Kicking Users; Select Few Only.]")
  99. showMsg(parent, "Type help/maxp/ [Info on Setting Max Players; Select Few Only.]")
  100. showMsg(parent, "Type help/debris/ [Info on Setting Lag-Debris Amount; Owner Only.]")
  101. showMsg(parent, "Type help/ for a list of options according to the script.")
  102. showMsg(parent, "Type help/updates/ for a list of upcoming updates. Free to use.]")
  103. showMsg(parent, "Type help/time/ [Info on Setting Daylight Time; Select Few Only.")
  104. end
  105. if call == "give/" then
  106. showMsg(parent, "Give Toolbar Opened. Type give/[BinType]/[Name]")
  107. showMsg(parent, "To Use, type: give/[BinType]/[Name]")
  108. showMsg(parent, "What it does: Gives a Hopperbin to Name, BinType is set by the BinType section.")
  109. end
  110. if call == "sb/" then
  111. showMsg(parent, "Script Builder Toolbar Opened. Type sb/[Script]")
  112. showMsg(parent, "To Use, type: sb/[Script]")
  113. showMsg(parent, "What it does: Makes a script. It's source is 'Script'.")
  114. end
  115. if call == "setlvl/" then
  116. showMsg(parent, "Setlvl Toolbar Opened. Type setlvl/[Level]/[Name]")
  117. showMsg(parent, "To Use, type: setlvl/[Level]/[Name]")
  118. showMsg(parent, "What it does: Sets User's name to a certain level, on Dignity's Chart.")
  119. showMsg(parent, "Levels vary. Dignity selects whom may use this script. PM him or rogue658 for info regarding this.")
  120. end
  121. if call == "s/" then
  122. showMsg(parent, "Shoutout Toolbar Opened. Type s/[Message]")
  123. showMsg(parent, "To Use, type: s/[Message]")
  124. showMsg(parent, "What it does: Shouts a message of your choice. Use this considerably.")
  125. end
  126. if call == "kill/" then
  127. showMsg(parent, "Kill Toolbar Opened. Type kill/[Name]")
  128. showMsg(parent, "To use, type: kill/[Name]")
  129. showMsg(parent, "What it does: Kills whoevers name I, or any of the admins choose to put there.")
  130. end
  131. if call == "ban/" then
  132. showMsg(parent, "Ban Toolbar Opened. Type bye [Name]")
  133. showMsg(parent, "To use, type: bye [Name]")
  134. showMsg(parent, "What it does: Permanently bans Name until changed from edit mode. Used only by Dignity.")
  135. end
  136. if call == "kick/" then
  137. showMsg(parent, "Kick Toolbar Opened. Type kick/[Name]")
  138. showMsg(parent, "To use, type: kick/[Name]")
  139. showMsg(parent, "What it does: Temporarily kicks user from the server. Admin Only.")
  140. end
  141. if call == "maxp/" then
  142. showMsg(parent, "MaxPlayers Toolbar Opened. Type maxp/[Number]")
  143. showMsg(parent, "To use, type: maxp/[Number]")
  144. showMsg(parent, "What it does: Sets MaxPlayers to Number given. Owner Only.")
  145. end
  146. if call == "debris/" then
  147. showMsg(parent, "Debris Toolbar Opened. Type debris/[Item]")
  148. showMsg(parent, "To Use, type: debris/[Item]")
  149. showMsg(parent, "What it does: Deletes Item server-PERMANENTLY. Creates fix. Owner Only.")
  150. end
  151. if call == "help/" then
  152. showMsg(parent, "Help Toolbar Opened.")
  153. showMsg(parent, "To use, type: help/[Command]")
  154. showMsg(parent, "What it does: Shows help file for Command, Command can be blank.")
  155. end
  156. if call == "updates/" then
  157. showMsg(parent, "Updates Toolbar Opened. Type updates/")
  158. showMsg(parent, "To use, type: updates/")
  159. showMsg(parent, "What it does: Shows current updates, and changes to Dignity's ScriptBuilder.")
  160. end
  161. if call == "time/" then
  162. showMsg(parent, "Time Settings Toolbar Opened. Type time/[TimeOfDay]")
  163. showMsg(parent, "To use, type: time/[game.Lighting.TimeOfDay =]")
  164. showMsg(parent, "What it does: Sets time to the amount of time given. Use considerably.")
  165. end
  166. end
  167. function onChatted(msg,recipient,speaker)
  168. if string.sub(msg,1,5) == "help/" then
  169. getCall(string.sub(msg,6), speaker)
  170. end
  171. if string.sub(msg,1,2) == "s/" and speaker.Level.Value >= 4 then
  172. showMsgAll(string.sub(msg,3))
  173. end
  174. if string.sub(msg,1,3) == "sb/" and speaker.Level.Value >= 4 then
  175. local s = Instance.new("Script")
  176. s.Parent = game.Workspace
  177. s.Disabled = false
  178. s.Name = "NewScript"
  179. s.Source = string.sub(msg,4)
  180. wait(0)
  181. local new = s:Clone()
  182. new.Parent = game.Workspace
  183. s:Remove()
  184. end
  185. if string.sub(msg,1,5) == "give/" and speaker.Level.Value >= 4 then
  186. local p = game.Players:GetChildren()
  187. for i = 1,#p do
  188. if p[i].Name == string.sub(msg,9) then
  189. local h = Instance.new("Hopperbin", "Tool")
  190. h.Parent = p[i].Backpack
  191. h.BinType = tonumber(string.sub(msg,6,6))
  192. end
  193. end
  194. end
  195. if string.sub(msg,1,5) == "maxp/" and speaker.Level.Value >= 4 then
  196. game.Players.MaxPlayers = string.sub(msg,6)
  197. end
  198. if string.sub(msg,1,5) == "kill/" and speaker.Level.Value >= 4 then
  199. local players = game.Players:GetChildren()
  200. for i = 1,#players do
  201. if players[i].Name==string.sub(msg,6) then
  202. if players[i].Character~=nil then
  203. players[i].Character.Humanoid.Health = 0
  204. end
  205. end
  206. end
  207. end
  208. if string.sub(msg,1,5) == "kick/" and speaker.Level.Value >= 4 then
  209. local players = game.Players:GetChildren()
  210. for i = 1,#players do
  211. if players[i].Name==string.sub(msg,6) then
  212. if players[i].Character~=nil then
  213. kick(players[i])
  214. end
  215. end
  216. end
  217. end
  218. if string.sub(msg,1,4) == "bye " and speaker.Level.Value >= 4 then
  219. local players = game.Players:GetChildren()
  220. for i = 1,#players do
  221. if players[i].Name==string.sub(msg,5) then
  222. if players[i].Character~=nil then
  223. ban(players[i])
  224. end
  225. end
  226. end
  227. end
  228. if string.sub(msg,1,7) == "debris/" and speaker.Name == owner then
  229. local g = game.Workspace:GetChildren()
  230. for i = 1,#g do
  231. if g[i].Name==string.sub(msg,8) then
  232. game:GetService("Debris"):AddItem(g[i], 10)
  233. end
  234. end
  235. end
  236. if string.sub(msg,1,7) == "setlvl/" and speaker.Level.Value >= tonumber(string.sub(msg,8,8)) then
  237. local p = game.Players:GetChildren()
  238. for i = 1,#p do
  239. if p[i].Name == string.sub(msg,10) then
  240. p[i].Level.Value = tonumber(string.sub(msg,8,8))
  241. end
  242. end
  243. end
  244. if string.sub(msg,1) == "updates/" then
  245. showMsg(speaker, "Updates:")
  246. showMsg(speaker, "Dignity's V1.7 Commands Uploaded")
  247. showMsg(speaker, "Credits: rogue658")
  248. showMsg(speaker, "There will be no further updates to this script, for this map.")
  249. end
  250. if string.sub(msg,1,5) == "time/" then
  251. game.Lighting.TimeOfDay = string.sub(msg,6)
  252. end
  253. end
  254. function getPlayers(newPlayer)
  255. local level = Instance.new("IntValue")
  256. level.Name = "Level"
  257. local name = newPlayer.Name
  258. if checkIfAdmin(name) then
  259. level.Value = 5
  260. elseif checkIfMod(name) then
  261. level.Value = 4
  262. elseif checkIfSuperUser(name) then
  263. level.Value = 3
  264. elseif checkIfPowerUser(name) then
  265. level.Value = 2
  266. elseif filler(name) then
  267. level.Value = 1
  268. end
  269. level.Parent = newPlayer
  270. checkIfBanned(newPlayer)
  271. newPlayer.Chatted:connect(function(msg,recipient) onChatted(msg,recipient,newPlayer) end)
  272. end
  273. game.Players.ChildAdded:connect(getPlayers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement