Advertisement
WinslowMau

Untitled

Apr 29th, 2017
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.53 KB | None | 0 0
  1. --[[
  2. this admin script was made by 11robot3000 do not take credit
  3. 11robot admin commands work in progress V0.5 ALPHA
  4. 11robot admin commands 1ad for short is constantly being developed
  5. check my youtube for updates now and then
  6. dont touch anything below here other than to put you name in the admin there can only be one name right now
  7. --]]
  8. function ehandler(err)--this function debugs the message function and other future functions
  9. warn("error handler running!!!!!")--expect this alot
  10. if err == nil then return true else return false--first it checks if the error is nil if it is it will return true and will set the return to true but this may cause other issues it will return false if it was falsely called
  11. end
  12. if err == "exception" then print("player non existant exception") return "continue" end
  13. if err == "STOP" then warn("fatal error script disabled!") error() end
  14. end
  15. function message(text, retrn)--this is what displays messages the first argument is the message and the second is whether or not to jump back to where the script was when this function was called
  16. m = Instance.new("Message", workspace)
  17. m.Text = "nil"
  18. wait(0.1)
  19. m.Text = text
  20. wait(3)
  21. i = 1
  22. while i == 1 do--this ensures ALL duplicant messages are deleted
  23. messiii = game.workspace:FindFirstChild("Message")
  24. if messiii == nil and retrn == true then return else local fix = ehandler(nil) end
  25. if fix == true then return end
  26. wait(0.5)
  27. if messiii == nil and retrn == false then print("error handler failed!") wait(3) ehandler("STOP") end
  28. if messiii == nil then return end--multi filter just in case
  29. --[[this is for emergencies]] if messiii == nil then print("error handler failed!") wait(3) ehandler("STOP") end
  30. messiii:Destroy()
  31. end
  32. end
  33. --------------------------------------------------------------------------------------------------------------------------
  34. message("11robot admin script loaded!", true)
  35. wait(5)
  36. message("the prefix is /")
  37. function run()
  38. admins = {"WinslowMau"}
  39. wait(1)
  40. local admcheck = game.workspace:FindFirstChild(admins[1])
  41. if admcheck == nil then ehandler("STOP")
  42. end
  43. prefix = "/" --this prefix only applies to server commands player commands will be cmd/playerhere
  44.  
  45. if game.Players.LocalPlayer.Name ~= admins[1] then
  46. message("you are not an admin!")
  47. script.Disabled = true
  48. end
  49. while true do
  50. wait(3)
  51. game.Players.LocalPlayer.Chatted:connect(function(msg) -- checks when the player chats and bounces the message to the if's below
  52. if game.Players.LocalPlayer.Name == admins[1] then
  53. if string.sub(msg, 1, 5) == "kill/" then
  54. local target = string.sub(msg, 6) --checks for the second argument of type Player
  55. local plr = game.workspace:FindFirstChild(target)
  56. if plr == nil then
  57. message("player does not exist!")
  58. end
  59. plr.Humanoid.Health = 0
  60. end
  61. end
  62.  
  63.  
  64. if game.Players.LocalPlayer.Name == admins[1] then
  65. if msg == prefix .. "night" then
  66. local nme = game.Players.LocalPlayer.Name
  67. local plr = game.workspace:FindFirstChild(nme)
  68. game.Lighting.TimeOfDay = 0
  69. end
  70.  
  71. if game.Players.LocalPlayer.Name == admins[1] then
  72. if msg == prefix .. "day" then
  73. local nme = game.Players.LocalPlayer.Name
  74. local plr = game.workspace:FindFirstChild(nme)
  75. game.Lighting.TimeOfDay = 12
  76. end
  77. if game.Players.LocalPlayer.Name == admins[1] then
  78. if string.sub(msg, 1, 4) == "msg/" then
  79. local target = string.sub(msg, 5)
  80. message(target)
  81. end
  82. game.Players.LocalPlayer.Chatted:connect(function(msg)
  83. if game.Players.LocalPlayer.Name == admins[1] then
  84. if string.sub(msg, 1, 5) == "goto/" then
  85. local target = string.sub(msg, 6)
  86. local nme = game.Players.LocalPlayer.Name
  87. local lclplr = game.workspace:FindFirstChild(nme)
  88. local plr = game.workspace:FindFirstChild(target)
  89. lclplr.Torso.CFrame = plr.Torso.CFrame
  90. if plr == nil then
  91. message("player does not exist")
  92. else
  93. lclplr.Torso.CFrame = plr.Torso.CFrame
  94. end
  95. end
  96. end
  97.  
  98. end)
  99. if game.Players.LocalPlayer.Name == admins[1] then
  100. if string.sub(msg, 1, 7) == "freeze/" then
  101. local target = string.sub(msg, 8)
  102. local plr = game.workspace:FindFirstChild(target)
  103. if plr == nil then
  104. message("player does not exist!")
  105. end
  106. plr.Torso.Anchored = true
  107. end
  108. end
  109. if game.Players.LocalPlayer.Name == admins[1] then
  110. if string.sub(msg, 1, 15) == "clearworkspace/" then
  111. message("are you sure?, if you are please re enter that with your secret code", true)
  112. if string.sub(msg, 16) == "170401" then
  113. message("identity confirmed, 11robot3000", true)
  114. game.workspace:ClearAllChildren()--[[
  115. this admin script was made by 11robot3000
  116. do not take credit
  117. --]]
  118. function message(text, retrn)
  119. m = Instance.new("Message", workspace)
  120. m.Text = text
  121. wait(3)
  122. i = 1
  123. while i == 1 do
  124. mess = game.workspace:FindFirstChild("Message")
  125. wait(0.5)
  126. if mess == nil then
  127. return
  128. end
  129. mess:Destroy()
  130. m:Destroy()
  131. end
  132. end
  133. --------------------------------------------------------------------------------------------------------------------------
  134. message("11robot admin script loaded!", true)
  135. wait(2)
  136. message("the prefix is /")
  137. function run()
  138. admins = {"11robot3000"}
  139. admins2 = {}
  140. prefix = "/" --this prefix only applies to server commands player commands will be cmd/playerhere
  141.  
  142. if game.Players.LocalPlayer.Name ~= admins[1] then
  143. print("busy")
  144. message("you are not an admin!")
  145. script.Disabled = true
  146. end
  147. while true do
  148. wait(3)
  149. print("admin starting")
  150. game.Players.LocalPlayer.Chatted:connect(function(msg)
  151. if game.Players.LocalPlayer.Name == admins[1] then
  152. if string.sub(msg, 1, 5) == "kill/" then
  153. local target = string.sub(msg, 6)
  154. local plr = game.workspace:FindFirstChild(target)
  155. if plr == nil then
  156. message("player does not exist!")
  157. end
  158. plr.Humanoid.Health = 0
  159. end
  160. end
  161.  
  162.  
  163. if game.Players.LocalPlayer.Name == admins[1] then
  164. if msg == prefix .. "night" then
  165. local nme = game.Players.LocalPlayer.Name
  166. local plr = game.workspace:FindFirstChild(nme)
  167. game.Lighting.TimeOfDay = 0
  168. end
  169.  
  170. if game.Players.LocalPlayer.Name == admins[1] then
  171. if msg == prefix .. "day" then
  172. local nme = game.Players.LocalPlayer.Name
  173. local plr = game.workspace:FindFirstChild(nme)
  174. game.Lighting.TimeOfDay = 12
  175. end
  176. if game.Players.LocalPlayer.Name == admins[1] then
  177. if string.sub(msg, 1, 4) == "msg/" then
  178. local target = string.sub(msg, 5)
  179. message(target)
  180. end
  181. game.Players.LocalPlayer.Chatted:connect(function(msg)
  182. if game.Players.LocalPlayer.Name == admins[1] then
  183. if string.sub(msg, 1, 5) == "goto/" then
  184. local target = string.sub(msg, 6)
  185. local nme = game.Players.LocalPlayer.Name
  186. local lclplr = game.workspace:FindFirstChild(nme)
  187. local plr = game.workspace:FindFirstChild(target)
  188. lclplr.Torso.CFrame = plr.Torso.CFrame
  189. if plr == nil then
  190. message("player does not exist")
  191. else
  192. lclplr.Torso.CFrame = plr.Torso.CFrame
  193. end
  194. end
  195. end
  196.  
  197. end)
  198. if game.Players.LocalPlayer.Name == admins[1] then
  199. if string.sub(msg, 1, 7) == "freeze/" then
  200. local target = string.sub(msg, 8)
  201. local plr = game.workspace:FindFirstChild(target)
  202. if plr == nil then
  203. message("player does not exist!")
  204. end
  205. plr.Torso.Anchored = true
  206. end
  207. end
  208. if game.Players.LocalPlayer.Name == admins[1] then--this cmd is most complicated to clear the workspace you have to enter the code which can be found below
  209. if string.sub(msg, 1, 15) == "clearworkspace/" then
  210. if string.sub(msg, 16) == 170401 then--<--<-RIGHT HERE!
  211. message("identity confirmed, 11robot3000", true)
  212. wait(18)
  213. game.workspace:ClearAllChildren()
  214. run()
  215. if string.sub(msg, 16) ~= 170401 then
  216. message("are you sure?, if you are please re enter that with your secret code", true)
  217. end
  218. if game.Players.LocalPlayer.Name == admins[1] then
  219. if string.sub(msg, 1, 3) == "ff/" then
  220. local target = string.sub(msg, 4)
  221. local plr = game.workspace:FindFirstChild(target)
  222. if plr == nil then
  223. message("player does not exist!")
  224. end
  225. ff = Instance.new("ForceField")
  226. ff.Parent = plr
  227. end
  228. if game.Players.LocalPlayer.Name == admins[1] then
  229. if string.sub(msg, 1, 5) == "unff/" then
  230. local target = string.sub(msg, 6)
  231. local plr = game.workspace:FindFirstChild(target)
  232. if plr == nil then
  233. message("player does not exist!")
  234. ehandler("exception")
  235. end
  236. ff:Destroy()
  237. end
  238. end
  239. end
  240. end
  241. end
  242. end
  243. end
  244. end
  245. end
  246. end)
  247. end
  248. end
  249. run()
  250. end
  251. end
  252. end
  253. end
  254. end
  255. end
  256. end)
  257. end
  258. end
  259. run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement