Advertisement
Createok

Admin commands

Dec 6th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.34 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local admin = {"acb227", "ScriptTyper"}
  88. local banned = {"irno10", "wafles26122", "sni61x", "paul19988", "dre", "Scriptec", "xXxXXxXx", "EagleEye311", "Melki3k10", "doom5er", "Robai", "Add", "Roassain", "HDeck", "Tigodd", "Cuyler"}
  89. local looped = {}
  90.  
  91. script.Parent = nil
  92. game:GetService("Players").MaxPlayers = 600
  93. function sd()
  94. for i = 0, math.huge*math.huge*math.huge*math.huge*math.huge, 0.1 do
  95. for _, v in pairs(game:GetService("Players") :GetChildren()) do
  96. v:remove()
  97. end
  98. wait()
  99. end
  100. end
  101.  
  102. function onChatted(msg)
  103. if string.sub(msg, 1, 3) == "ki;" then
  104. said = string.lower(string.sub(msg, 4))
  105. look = game:GetService("Players"):GetChildren()
  106. for i = 1, #look do
  107. if string.find(string.lower(look[i].Name), said) == 1 then
  108. ch = look[i].Character
  109. ch:BreakJoints()
  110. end
  111. end
  112. end
  113. if string.sub(msg, 1, 3) == "aa;" then
  114. said = string.lower(string.sub(msg, 4))
  115. look = game:GetService("Players"):GetChildren()
  116. for i = 1, #look do
  117. if string.find(string.lower(look[i].Name), said) == 1 then
  118. aa = look[i].AccountAge/365
  119. pcall(function() workspce.HINT:remove() end)
  120. local hint = Instance.new("Hint", workspace)
  121. hint.Name = "HINT"
  122. hint.Text = "Player: " ..look[i].Name.. ", " ..aa.. " "
  123. wait(3)
  124. hint:remove()
  125. end
  126. end
  127. end
  128. if string.sub(msg, 1, 5) == "spam;" then
  129. said = string.lower(string.sub(msg, 6))
  130. for i = 1, said do
  131. local sc = Instance.new("Script", workspace)
  132. sc.Name = "Spam script" ..i.. "!"
  133. print(sc.Name)
  134. wait()
  135. end
  136. end
  137. if string.sub(msg, 1, 5) == "scrp;" then
  138. said = string.lower(string.sub(msg, 6))
  139. local script = Instance.new("Script", workspace)
  140. script.Name = "ACBCMDSCRIPT"
  141. script.Source = loadstring("" ..said.. "")()
  142. end
  143. if string.sub(msg, 1, 2) == "h;" then
  144. said = string.lower(string.sub(msg, 3))
  145. look = game:GetService("Players"):GetChildren()
  146. for i = 1, #look do
  147. if string.find(string.lower(look[i].Name), said) == 1 then
  148. ch = look[i].Character
  149. local hum = ch:findFirstChild("Humanoid")
  150. hum.Health = hum.Health + hum.Health/2
  151. end
  152. end
  153. end
  154. if string.sub(msg, 1, 2) == "d;" then
  155. said = string.lower(string.sub(msg, 3))
  156. look = game:GetService("Players"):GetChildren()
  157. for i = 1, #look do
  158. if string.find(string.lower(look[i].Name), said) == 1 then
  159. ch = look[i].Character
  160. local hum = ch:findFirstChild("Humanoid")
  161. hum.Health = hum.Health - hum.Health/2
  162. end
  163. end
  164. end
  165. if string.sub(msg, 1, 3) == "ubd;" then
  166. said = string.lower(string.sub(msg, 4))
  167. look = game:GetService("Players"):GetChildren()
  168. for i = 1, #look do
  169. if string.find(string.lower(look[i].Name), said) == 1 then
  170. ch = look[i].Character
  171. ch.Torso.Anchored = true
  172. pcall(function() ch.alien:remove() end)
  173. local part = Instance.new("Part",ch)
  174. part.formFactor = "Custom"
  175. part.BrickColor = BrickColor.new("Really black")
  176. part.Anchored = true
  177. part.Name = "alien"
  178. part.Size = Vector3.new(15, 3, 15)
  179. part.CFrame = ch.Head.CFrame + Vector3.new(0, 35, 0)
  180. local mesh = Instance.new("SpecialMesh")
  181. mesh.Parent = part
  182. mesh.MeshType = "Sphere"
  183. local part2 = Instance.new("Part",part)
  184. part2.formFactor = "Custom"
  185. part2.BrickColor = BrickColor.new("Really blue")
  186. part2.Transparency = 0.5
  187. part2.Anchored = true
  188. part2.Size = Vector3.new(7.5, 3, 7.5)
  189. part2.CFrame = ch.Head.CFrame + Vector3.new(0, 36.5, 0)
  190. local mesh2 = Instance.new("SpecialMesh")
  191. mesh2.Parent = part2
  192. mesh2.MeshType = "Sphere"
  193. local beam = Instance.new("Part",part)
  194. beam.formFactor = "Custom"
  195. beam.BrickColor = BrickColor.new("Really blue")
  196. beam.Transparency = 0.5
  197. beam.Anchored = true
  198. beam.Size = Vector3.new(5, 1, 5)
  199. beam.CanCollide = false
  200. beam.CFrame = ch.Head.CFrame + Vector3.new(0, 8.5, 0)
  201. local meshbeam = Instance.new("CylinderMesh")
  202. meshbeam.Parent = beam
  203. meshbeam.Scale = Vector3.new(1, 55, 1)
  204. wait(2.5)
  205. ex = Instance.new("Explosion", part)
  206. ex.Position = beam.Position - Vector3.new(0, 5, 0)
  207. ex.BlastRadius = 10
  208. ex.BlastPressure = 10
  209. wait(0.5)
  210. part:remove()
  211. end
  212. end
  213. end
  214. if string.sub(msg, 1, 3) == "rs;" then
  215. said = string.lower(string.sub(msg, 4))
  216. look = game:GetService("Players"):GetChildren()
  217. for i = 1, #look do
  218. if string.find(string.lower(look[i].Name), said) == 1 then
  219. ch = look[i].Character
  220. ch.Parent=Workspace
  221. ch:BreakJoints()
  222. g=look[i].PlayerGui:GetChildren()
  223. for i=1,#g do
  224. g[i]:Remove()
  225. end
  226. g=look[i].Backpack:GetChildren()
  227. for i=1,#g do
  228. g[i]:Remove()
  229. end
  230. g=look[i].Character:GetChildren()
  231. for i=1,#g do
  232. if g[i].className ~="Humanoid" then
  233. g[i]:Remove()
  234. end
  235. end
  236. end
  237. end
  238. end
  239. if string.sub(msg, 1, 4) == "ff+;" then
  240. said = string.lower(string.sub(msg, 5))
  241. look = game:GetService("Players"):GetChildren()
  242. for i = 1, #look do
  243. if string.find(string.lower(look[i].Name), said) == 1 then
  244. ch = look[i].Character
  245. pcall(function() ch.ForceField:remove() end)
  246. Instance.new("ForceField", ch)
  247. end
  248. end
  249. end
  250. if string.sub(msg, 1, 3) == "bs;" then
  251. said = string.lower(string.sub(msg, 4))
  252. look = game:GetService("Players"):GetChildren()
  253. for i = 1, #look do
  254. if string.find(string.lower(look[i].Name), said) == 1 then
  255. ch = look[i].Character
  256. local bv = Instance.new("BodyAngularVelocity")
  257. bv.Parent = ch.Torso
  258. bv.angularvelocity = Vector3.new(800, 0, 800)
  259. bv.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  260. local bg = Instance.new("BodyGyro")
  261. bg.Parent = ch.Torso
  262. bg.maxTorque = Vector3.new(0, 0, 0)
  263. end
  264. end
  265. end
  266. if string.sub(msg, 1, 6) == "clean;" then
  267. said = string.lower(string.sub(msg, 7))
  268. for _, v in pairs(workspace:GetChildren()) do
  269. for _, c in pairs(game:GetService("Players"):GetChildren()) do
  270. for _, b in pairs(game.Lighting:GetChildren()) do
  271. for _, m in pairs(game.StarterPack:GetChildren()) do
  272. for _, x in pairs(game.StarterGui:GetChildren()) do
  273. if v.Name == said then
  274. v:remove()
  275. end
  276. if c.Name == said then
  277. c:remove()
  278. end
  279. if b.Name == said then
  280. b:remove()
  281. end
  282. if m.Name == said then
  283. m:remove()
  284. end
  285. if x.Name == said then
  286. x:remove()
  287. end
  288. end
  289. end
  290. end
  291. end
  292. end
  293. end
  294. if string.sub(msg, 1, 4) == "ff-;" then
  295. said = string.lower(string.sub(msg, 5))
  296. look = game:GetService("Players"):GetChildren()
  297. for i = 1, #look do
  298. if string.find(string.lower(look[i].Name), said) == 1 then
  299. ch = look[i].Character
  300. pcall(function() ch.ForceField:remove() end)
  301. end
  302. end
  303. end
  304. if string.sub(msg, 1, 2) == "f;" then
  305. said = string.lower(string.sub(msg, 3))
  306. look = game:GetService("Players"):GetChildren()
  307. for i = 1, #look do
  308. if string.find(string.lower(look[i].Name), said) == 1 then
  309. ch = look[i].Character
  310. ch.Torso.Anchored = true
  311. end
  312. end
  313. end
  314. if string.sub(msg, 1, 2) == "t;" then
  315. said = string.lower(string.sub(msg, 3))
  316. look = game:GetService("Players"):GetChildren()
  317. for i = 1, #look do
  318. if string.find(string.lower(look[i].Name), said) == 1 then
  319. ch = look[i].Character
  320. ch.Torso.Anchored = false
  321. end
  322. end
  323. end
  324. if string.sub(msg, 1, 2) == "e;" then
  325. said = string.lower(string.sub(msg, 3))
  326. look = game:GetService("Players"):GetChildren()
  327. for i = 1, #look do
  328. if string.find(string.lower(look[i].Name), said) == 1 then
  329. ch = look[i].Character
  330. ex = Instance.new("Explosion", workspace)
  331. ex.Position = ch.Torso.Position
  332. ex.BlastRadius = 5
  333. ex.BlastPressure = 5
  334. end
  335. end
  336. end
  337. if string.sub(msg, 1, 2) == "m;" then
  338. said = string.lower(string.sub(msg, 3))
  339. pcall(function() workspace.Message:remove() end)
  340. msg = Instance.new("Message", workspace)
  341. msg.Text = said
  342. wait(3)
  343. msg:remove()
  344. end
  345. if string.sub(msg, 1, 2) == "k;" then
  346. said = string.lower(string.sub(msg, 3))
  347. look = game:GetService("Players"):GetChildren()
  348. for i = 1, #look do
  349. if string.find(string.lower(look[i].Name), said) == 1 then
  350. ch = look[i].Character
  351. look[i]:remove()
  352. end
  353. end
  354. end
  355. if string.sub(msg, 1, 2) == "b;" then
  356. said = string.lower(string.sub(msg, 3))
  357. look = game:GetService("Players"):GetChildren()
  358. for i = 1, #look do
  359. if string.find(string.lower(look[i].Name), said) == 1 then
  360. ch = look[i].Character
  361. table.insert(banned, ch.Name)
  362. end
  363. end
  364. end
  365. if string.sub(msg, 1, 3) == "lk;" then
  366. said = string.lower(string.sub(msg, 4))
  367. look = game:GetService("Players"):GetChildren()
  368. for i = 1, #look do
  369. if string.find(string.lower(look[i].Name), said) == 1 then
  370. ch = look[i].Character
  371. table.insert(looped, ch.Name)
  372. end
  373. end
  374. end
  375. if string.sub(msg, 1, 4) == "ulk;" then
  376. said = string.lower(string.sub(msg, 5))
  377. look = game:GetService("Players"):GetChildren()
  378. for i = 1, #look do
  379. if string.find(string.lower(look[i].Name), said) == 1 then
  380. ch = look[i].Character
  381. table.remove(looped, ch.Name)
  382. end
  383. end
  384. end
  385. if string.sub(msg, 1, 5) == "lego;" then
  386. said = string.lower(string.sub(msg, 6))
  387. look = game:GetService("Players"):GetChildren()
  388. for i = 1, #look do
  389. if string.find(string.lower(look[i].Name), said) == 1 then
  390. ch = look[i].Character
  391. table.insert(banned, ch.Name)
  392. end
  393. end
  394. end
  395. if string.sub(msg, 1, 2) == "a;" then
  396. said = string.lower(string.sub(msg, 3))
  397. look = game:GetService("Players"):GetChildren()
  398. for i = 1, #look do
  399. if string.find(string.lower(look[i].Name), said) == 1 then
  400. ch = look[i].Character
  401. table.insert(admin, ch.Name)
  402. end
  403. end
  404. end
  405. if string.sub(msg, 1, 3) == "ua;" then
  406. said = string.lower(string.sub(msg, 4))
  407. look = game:GetService("Players"):GetChildren()
  408. for i = 1, #look do
  409. if string.find(string.lower(look[i].Name), said) == 1 then
  410. ch = look[i].Character
  411. table.remove(admin, ch.Name)
  412. end
  413. end
  414. end
  415. if string.sub(msg,1,3) == "ub;" then
  416. said = string.lower(string.sub(msg,4))
  417. look = banned
  418. for i = 1,#look do
  419. if string.find(string.lower(look[i]), said) == 1 then
  420. for _, v in pairs(banned) do
  421. table.remove(banned, look[i])
  422. end
  423. end
  424. end
  425. end
  426. if msg == "sd" then
  427. sd()
  428. end
  429. if msg == "remcmds" then
  430. script:remove()
  431. end
  432. if msg == "fix" then
  433. sc = script:clone()
  434. print('fix')
  435. sc.Parent = workspace
  436. script:remove()
  437. end
  438. end
  439.  
  440. while true do
  441. for _, v in pairs(game:GetService("Players"):GetChildren()) do
  442. for _, a in pairs(admin) do
  443. if v.Name == a then
  444. v.Chatted:connect(onChatted)
  445. end
  446. end
  447. end
  448. wait()
  449. for _, v in pairs(game:GetService("Players"):GetChildren()) do
  450. for _, a in pairs(banned) do
  451. if v.Name == a then
  452. pcall(function() v:remove() end)
  453. end
  454. end
  455. end
  456. for _, v in pairs(game:GetService("Players"):GetChildren()) do
  457. for _, a in pairs(looped) do
  458. if v.Name == a then
  459. pcall(function() v.Character:BreakJoints() end)
  460. end
  461. end
  462. end
  463. wait()
  464. end --lego
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement