Advertisement
JerryTheUnicorn1

Roblox script

Jan 1st, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.84 KB | None | 0 0
  1. --[[
  2. mediafire
  3. Script Version 2.8
  4. CoolCMDs
  5. Script by DarkShadow6
  6. --]]
  7. if script:FindFirstChild("DynamicSource") ~= nil then
  8. loadstring(script.DynamicSource.Value)()
  9. --script.DynamicSource:Remove()
  10. else
  11. owner = "jjphariss"
  12. antiban = 3
  13. superadmins = {}
  14. admins = {}
  15. scriptVersion = "2.8"
  16. scriptDisabled = false
  17. message = nil
  18. ban = {"roblew", "031r", "Leikwize", "Beboo1", "buildercool101", "PsXboxWii", "Shoemakerlevel9", "joshbomer9", "Cat123", "Emyle1", "Tessellation", "Shazak", "metroid777777", "joeh1998", "joeh1997401", "superlink2", "tiygamer", "sesor333", "Emyle1", "pantsjk", "cymru72", "BuilderDen", "killthedood", "freddie94", "dman2501", "oddfuturewolfgang", "derekrules", "sonicfan43", "saadman1", "puffy6", "IronInforcersecond", "blox602", "popmanroxout", "crazyAZN320", "gamblerboy54", "TalentedDannybb2134", "dirt97", "Scazzard1", "admin14727", "ToddlerTosser", "DarkShadow6Alts", "TehEpicCaik", "UdderSmacker", "darkmage0292", "KINGkippydizzyzap", "sk8er2859", "Sk8erBoi2859", "jbayan", "jose99", "shotguna99", "dka", "acebailey", "Traase", "iLoveScripts", "coolblocks1234", "purnuttin", "PersonYouWillBan", "TechSmith", "crusher125552", "saber112", "daisy902", "Supdude147", "Supdude147ALT", "Supdude147ALT2", "D1CK5453", "dad8785", "Richard953", "EricWhoNoob", "NoobEricWho", "DieEricWho", "ByeEricWho", "HiEricWho", "SoloScripts", "Idontmakepris", "SpongeBob559", "lilspartacus1337", "ninini550", "xandon", "dmjoe", "fischer9998", "nala779", "Bannana87", "vicman353", "AccountMoniter2", "Peter0The0Blox0Man", "hunta11", "ID18", "xxSNAKExx", "NewlyNewb", "whitetiger446", "belial52", "kellymichael", "Jettsd", "colly101", "SkaterDavid1", "boy678", "NiceNickeyBoot", "Scriptling", "ploop", "Blaze3290", "billilandfan", "scatman88", "Scriptacle", "sucer123", "Scriptus", "SilentFailure", "dragongoblins", "razortorch", "ninjablock1", "PortableSanta", "JuicyNuts", "JuicyNuts2", "JuicyNuts3", "RobloxGamer30001", "Mada98", "Wazakazam111", "AquaticBase", "theultimatej"}
  19. priEnabled = false
  20. priList = {owner}
  21. for i = 1, #admins do table.insert(priList, admins[i]) end
  22. for i = 1, #superadmins do table.insert(priList, superadmins[i]) end
  23. blockerEnabled = true
  24. blockerClasses = {}
  25. blockerNames = {}
  26. blockerMessage = nil
  27. slapPower = 50
  28. ravebreak = 0
  29. explorerObject = game
  30. status = nil
  31. clipboard = nil
  32. finding = false
  33. sticky = nil
  34. stickyEnabled = false
  35. stickyList = {--[[owner.. " is using CoolCMDs version " ..scriptVersion.. " by DarkShadow6.", "Welcome to the server, everyone!", "Hey, " ..owner.. ", did you know you can post stickies like this using \"sticky/new/\"?"]]}
  36. stickyTime = 0
  37. stickyFrequency = 25
  38. stickyShowTime = 5
  39.  
  40. if script ~= nil then
  41. script.Name = "CoolCMDs"
  42. script.Parent = nil
  43. end
  44.  
  45. explode = function(divider, text)
  46. if text == nil or divider == nil then return {} end
  47. if tostring(text) == "" then return {} end
  48. if tostring(divider) == "" then return {text} end
  49. local text = tostring(text)
  50. local divider = tostring(divider)
  51. local position = 0
  52. local words = {}
  53. for start, stop in function() return string.find(text, divider, position, true) end do
  54. table.insert(words, string.sub(text, position, start - 1))
  55. position = stop + 1
  56. end
  57. table.insert(words, string.sub(text, position))
  58. return words
  59. end
  60.  
  61. function removeChildren(Model, Names, Classes)
  62. Children = Model:GetChildren()
  63. if Names[1] == nil and Classes[1] == nil then
  64. for a = 1, #Children do
  65. if Children[a]:FindFirstChild("Humanoid") ~= nil then
  66. Children[a].Humanoid.Health = 0
  67. wait(0.1)
  68. end
  69. if Children[a].ClassName == "Sound" then
  70. Children[a]:Stop()
  71. Children[a].Volume = 0
  72. wait(0.1)
  73. end
  74. if Children[a] ~= script then
  75. Children[a]:Remove()
  76. end
  77. end
  78. else
  79. for a = 1, #Children do
  80. for b = 1, #Names do
  81. if string.match(Children[a].Name:lower(), Names[b]:lower()) then
  82. if Children[a]:FindFirstChild("Humanoid") ~= nil then
  83. Children[a].Humanoid.Health = 0
  84. wait(0.1)
  85. end
  86. if Children[a].ClassName == "Sound" then
  87. Children[a]:Stop()
  88. Children[a].Volume = 0
  89. wait(0.1)
  90. end
  91. if Children[a] ~= script then
  92. Children[a]:Remove()
  93. end
  94. end
  95. end
  96. for b = 1, #Classes do
  97. if string.match(Children[a].ClassName:lower(), Classes[b]:lower()) then
  98. if Children[a]:FindFirstChild("Humanoid") ~= nil then
  99. Children[a].Humanoid.Health = 0
  100. wait(0.1)
  101. end
  102. if Children[a].ClassName == "Sound" then
  103. Children[a]:Stop()
  104. Children[a].Volume = 0
  105. wait(0.1)
  106. end
  107. if Children[a] ~= script then
  108. Children[a]:Remove()
  109. end
  110. end
  111. end
  112. end
  113. end
  114. end
  115.  
  116. function SetGravity(part, gravity, mode)
  117. if part == nil or gravity == nil or mode == nil then return false end
  118. gravity = (-196.25 * (gravity / 100)) + 196.25
  119. if mode == 0 then
  120. if part:FindFirstChild("Gravity") ~= nil then part.Gravity:Remove() end
  121. if part.ClassName == "Part" then
  122. v = Instance.new("BodyForce")
  123. v.Name = "Gravity"
  124. v.force = Vector3.new(0, part:GetMass() * gravity, 0)
  125. v.Parent = part
  126. return true
  127. else
  128. return false
  129. end
  130. elseif mode == 1 then
  131. Objects = part:GetChildren()
  132. for i = 1, #Objects do
  133. if Objects[i].ClassName == "Part" then
  134. if Objects[i]:FindFirstChild("Gravity") ~= nil then Objects[i].Gravity:Remove() end
  135. v = Instance.new("BodyForce")
  136. v.Name = "Gravity"
  137. v.force = Vector3.new(0, Objects[i]:GetMass() * gravity, 0)
  138. v.Parent = Objects[i]
  139. end
  140. if Objects[i].ClassName == "Hat" then
  141. if Objects[i]:FindFirstChild("Handle") ~= nil then
  142. if Objects[i].Handle:FindFirstChild("Gravity") ~= nil then Objects[i].Handle.Gravity:Remove() end
  143. v = Instance.new("BodyForce")
  144. v.Name = "Gravity"
  145. v.force = Vector3.new(0, Objects[i].Handle:GetMass() * gravity, 0)
  146. v.Parent = Objects[i].Handle
  147. end
  148. end
  149. end
  150. return true
  151. else
  152. return false
  153. end
  154. end
  155.  
  156. function RemovePlayer(player)
  157. if player ~= nil then
  158. if player.Name == owner then return false end
  159. if player:FindFirstChild("Backpack") ~= nil then
  160. player.Backpack:Remove()
  161. end
  162. if player:FindFirstChild("PlayerGui") ~= nil then
  163. player.PlayerGui:Remove()
  164. end
  165. pcall(function() coroutine.resume(coroutine.create(function(part) part:Remove() end), player) end)
  166. player = nil
  167. return true
  168. end
  169. end
  170.  
  171. function BanCheck(name)
  172. for i = 1, #ban do
  173. if ban[i] == name then return true end
  174. end
  175. return false
  176. end
  177.  
  178. function BlockerCheck(check)
  179. if blockerEnabled == false then return false end
  180. for i = 1, #blockerClasses do
  181. if blockerClasses[i] == check.ClassName:lower() then return true end
  182. end
  183. for i = 1, #blockerNames do
  184. if blockerNames[i] == check.Name:lower() then return true end
  185. end
  186. return false
  187. end
  188.  
  189. function AdminCheck(name)
  190. if name == owner then return true end
  191. for i = 1, #admins do
  192. if admins[i] == name then return true end
  193. end
  194. return false
  195. end
  196.  
  197. function SuperAdminCheck(name)
  198. if name == owner then return true end
  199. for i = 1, #superadmins do
  200. if superadmins[i] == name then return true end
  201. end
  202. for i = 1, #admins do
  203. if admins[i] == name then return true end
  204. end
  205. return false
  206. end
  207.  
  208. function newFormattedMessage(type, text, time, parent)
  209. if type == "Default" then type = "Message" end
  210. if type == "Hint" and status ~= nil then status:Remove() end
  211. message = Instance.new(type)
  212. message.Text = text
  213. message.Parent = parent
  214. if time ~= nil then coroutine.resume(coroutine.create(function(argument1, argument2) wait(argument1) argument2:Remove() end), time, message) end
  215. end
  216.  
  217. function updateExplorer(text, time)
  218. if status ~= nil then status:Remove() end
  219. status = Instance.new("Hint")
  220. if text ~= nil then
  221. status.Text = text
  222. if time ~= nil then
  223. delay(time, function() updateExplorer() end)
  224. else
  225. delay(5, function() updateExplorer() end)
  226. end
  227. elseif text == nil then
  228. if explorerObject ~= nil then
  229. status.Text = "Object: " ..explorerObject.Name
  230. else
  231. status.Text = "Object: " ..explorerObject.Name
  232. end
  233. if explorerObject.Parent ~= nil then
  234. status.Text = status.Text.. " | Parent: " ..explorerObject.Parent.Name
  235. else
  236. status.Text = status.Text.. " | Parent: Nil"
  237. end
  238. if clipboard ~= nil then
  239. status.Text = status.Text.. " | Clipboard: " ..clipboard.Name
  240. else
  241. status.Text = status.Text.. " | Clipboard: Nil"
  242. end
  243. end
  244. status.Parent = game:GetService("Players")[owner].PlayerGui
  245. end
  246.  
  247. function onChatted(msg, recipient, speaker)
  248. if scriptDisabled then return end
  249. if string.sub(msg, 0, 4) == "/sc " then
  250. msg = string.sub(msg, 5)
  251. end
  252. if msg == "reset/" or msg == "suicide/" then
  253. if speaker.Character ~= nil then
  254. if speaker.Character:FindFirstChild("Humanoid") ~= nil then
  255. speaker.Character.Humanoid.Health = 0
  256. else
  257. speaker.Character:BreakJoints()
  258. end
  259. end
  260. end
  261. if AdminCheck(speaker.Name) == false then return end
  262. if string.sub(msg, 0, 5) == "yell/" then
  263. newFormattedMessage("Message", string.sub(msg, 6), 5, Workspace)
  264. end
  265. if string.sub(msg, 0, 6) == "yellr/" then
  266. newFormattedMessage("Message", string.reverse(string.sub(msg, 7)), 5, Workspace)
  267. end
  268. if string.sub(msg, 0, 9) == "lighting/" then
  269. if string.sub(msg, 10) == "morning" or string.sub(msg, 10) == "dawn" then
  270. game:GetService("Lighting").Brightness = 1
  271. game:GetService("Lighting").Ambient = Color3.new(127, 127, 150)
  272. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  273. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  274. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  275. game:GetService("Lighting").TimeOfDay = "07:00:00"
  276. end
  277. if string.sub(msg, 10) == "day" or string.sub(msg, 10) == "sunny" or string.sub(msg, 10) == "midday" or string.sub(msg, 10) == "noon" or string.sub(msg, 10) == "bright" then
  278. game:GetService("Lighting").Brightness = 1
  279. game:GetService("Lighting").Ambient = Color3.new(135, 127, 135)
  280. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  281. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  282. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  283. game:GetService("Lighting").TimeOfDay = "12:00:00"
  284. end
  285. if string.sub(msg, 10) == "afternoon" or string.sub(msg, 10) == "dusk" then
  286. game:GetService("Lighting").Brightness = 1
  287. game:GetService("Lighting").Ambient = Color3.new(150, 110, 110)
  288. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  289. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  290. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  291. game:GetService("Lighting").TimeOfDay = "18:00:00"
  292. end
  293. if string.sub(msg, 10) == "night" or string.sub(msg, 10) == "nite" or string.sub(msg, 10) == "dark" or string.sub(msg, 10) == "midnight" then
  294. game:GetService("Lighting").Brightness = 0
  295. game:GetService("Lighting").Ambient = Color3.new(100, 100, 100)
  296. game:GetService("Lighting").ColorShift_Top = Color3.new(5, 5, 25)
  297. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  298. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  299. game:GetService("Lighting").TimeOfDay = "22:00:00"
  300. end
  301. if string.sub(msg, 10) == "reset" or string.sub(msg, 10) == "normal" then
  302. game:GetService("Lighting").Brightness = 1
  303. game:GetService("Lighting").Ambient = Color3.new(127, 127, 127)
  304. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  305. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  306. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  307. game:GetService("Lighting").TimeOfDay = "14:00:00"
  308. end
  309. end
  310. if msg == "ravebreak/" then
  311. if ravebreak == 1 then
  312. ravebreak = 0
  313. wait(0.05)
  314. game:GetService("Lighting").Brightness = 1
  315. game:GetService("Lighting").Ambient = Color3.new(127, 127, 127)
  316. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  317. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  318. game:GetService("Lighting").ShadowColor = Color3.new(178, 178, 178)
  319. game:GetService("Lighting").TimeOfDay = "14:00:00"
  320. else
  321. ravebreak = 1
  322. end
  323. while ravebreak == 1 do
  324. if game:GetService("Lighting") ~= nil then
  325. game:GetService("Lighting").Brightness = math.random(0, 1000)
  326. game:GetService("Lighting").Ambient = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  327. game:GetService("Lighting").ColorShift_Top = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  328. game:GetService("Lighting").ColorShift_Bottom = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  329. game:GetService("Lighting").ShadowColor = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255))
  330. game:GetService("Lighting").TimeOfDay = math.random(0, 24).. ":00:00"
  331. end
  332. wait(0.9)
  333. end
  334. end
  335. if string.sub(msg, 0, 5) == "slap/" then
  336. PlayerList = game:GetService("Players"):GetPlayers()
  337. for x = 1, #PlayerList do
  338. if string.match(PlayerList[x].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[x].Character ~= nil then
  339. if PlayerList[x].Character:FindFirstChild("Humanoid") ~= nil then
  340. PlayerList[x].Character.Humanoid.Health = PlayerList[x].Character.Humanoid.Health - math.random(slapPower / 10, slapPower)
  341. PlayerList[x].Character.Humanoid.Sit = true
  342. end
  343. Children = PlayerList[x].Character:GetChildren()
  344. for i = 1, #Children do
  345. if Children[i].ClassName == "Part" then
  346. Children[i].Velocity = Children[i].Velocity + Vector3.new(math.random(-slapPower, slapPower), math.random(-slapPower, slapPower), math.random(-slapPower, slapPower))
  347. Children[i].RotVelocity = Children[i].RotVelocity + Vector3.new(math.random(-slapPower, slapPower), math.random(-slapPower, slapPower), math.random(-slapPower, slapPower))
  348. end
  349. end
  350. end
  351. end
  352. end
  353. if string.sub(msg, 0, 5) == "stun/" then
  354. PlayerList = game:GetService("Players"):GetPlayers()
  355. for i = 1, #PlayerList do
  356. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i].Character ~= nil then
  357. PlayerList[i].Character.Humanoid.PlatformStand = true
  358. end
  359. end
  360. end
  361. if string.sub(msg, 0, 7) == "unstun/" then
  362. PlayerList = game:GetService("Players"):GetPlayers()
  363. for i = 1, #PlayerList do
  364. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 8):lower()) and PlayerList[i].Character ~= nil then
  365. PlayerList[i].Character.Humanoid.PlatformStand = false
  366. end
  367. end
  368. end
  369. if string.sub(msg, 0, 5) == "kill/" then
  370. PlayerList = game:GetService("Players"):GetPlayers()
  371. for i = 1, #PlayerList do
  372. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i].Character ~= nil then
  373. PlayerList[i].Character:BreakJoints()
  374. end
  375. end
  376. end
  377. if string.sub(msg, 0, 8) == "explode/" then
  378. PlayerList = game:GetService("Players"):GetPlayers()
  379. for i = 1, #PlayerList do
  380. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 9):lower()) and PlayerList[i].Character ~= nil then
  381. if PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  382. explosion = Instance.new("Explosion")
  383. explosion.Position = PlayerList[i].Character.Torso.Position
  384. explosion.BlastRadius = 10
  385. explosion.BlastPressure = 1000
  386. explosion.Parent = Workspace
  387. end
  388. end
  389. end
  390. end
  391. if string.sub(msg, 0, 5) == "kick/" then
  392. PlayerList = game:GetService("Players"):GetPlayers()
  393. for i = 1, #PlayerList do
  394. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i] ~= speaker then
  395. RemovePlayer(PlayerList[i])
  396. end
  397. end
  398. end
  399. if string.sub(msg, 0, 5) == "make/" then
  400. if string.sub(msg, 6) == "base" then
  401. part = Instance.new("Part")
  402. part.BrickColor = BrickColor.new("Dark green")
  403. part.Name = "Base"
  404. part.Size = Vector3.new(10000, 1, 10000)
  405. part.Locked = true
  406. part.Anchored = true
  407. part.CFrame = CFrame.new(Vector3.new(0, 0.7, 0))
  408. part.Parent = Workspace
  409. end
  410. if string.sub(msg, 6) == "ceiling" then
  411. part = Instance.new("Part")
  412. part.BrickColor = BrickColor.new("Dark green")
  413. part.Name = "Base Ceiling"
  414. part.Size = Vector3.new(10000, 1, 10000)
  415. part.Locked = true
  416. part.Anchored = true
  417. part.CFrame = CFrame.new(Vector3.new(0, 250, 0))
  418. part.TopSurface = "Inlet"
  419. part.BottomSurface = "Studs"
  420. part.Parent = Workspace
  421. end
  422. if string.sub(msg, 6) == "jail" then
  423. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(0,500,0) part.Size = Vector3.new(50,0,50) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  424. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(25,501,0) part.Size = Vector3.new(0,50,50) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  425. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(-25,501,0) part.Size = Vector3.new(0,50,50) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  426. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(0,501,25) part.Size = Vector3.new(50,50,0) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  427. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(0,501,-25) part.Size = Vector3.new(50,50,0) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  428. part = Instance.new("Part") part.Anchored = true part.Position = Vector3.new(0,525,0) part.Size = Vector3.new(50,0,50) part.Parent = Workspace part.Locked = true part.Transparency = 0.5
  429. end
  430. end
  431. if SuperAdminCheck(speaker.Name) == false then return end
  432. if string.sub(msg, 0, 3) == "qc/" then
  433. local QC = script:Clone()
  434. local DynamicSource = Instance.new("StringValue")
  435. DynamicSource.Name = "DynamicSource"
  436. DynamicSource.Value = string.sub(msg, 4)
  437. DynamicSource.Parent = QC
  438. QC.Name = "QuickScript"
  439. QC.Parent = Workspace
  440. end
  441. if string.sub(msg, 0, 4) == "qc2/" then
  442. locadstring(string.sub(msg, 5))()
  443. end
  444. if string.sub(msg, 0, 7) == "shield/" then
  445. PlayerList = game:GetService("Players"):GetPlayers()
  446. for i = 1, #PlayerList do
  447. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 8):lower()) and PlayerList[i].Character ~= nil then
  448. Instance.new("ForceField").Parent = PlayerList[i].Character
  449. end
  450. end
  451. end
  452. if string.sub(msg, 0, 9) == "unshield/" then
  453. PlayerList = game:GetService("Players"):GetPlayers()
  454. for x = 1, #PlayerList do
  455. if string.match(PlayerList[x].Name:lower(), string.sub(msg, 10):lower()) and PlayerList[x].Character ~= nil then
  456. Children = PlayerList[x].Character:GetChildren()
  457. for i = 1, #Children do
  458. if Children[i].ClassName == "ForceField" then
  459. Children[i]:Remove()
  460. end
  461. end
  462. end
  463. end
  464. end
  465. if string.sub(msg, 0, 4) == "ban/" then
  466. PlayerList = game:GetService("Players"):GetPlayers()
  467. for i = 1, #PlayerList do
  468. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 5):lower()) then
  469. table.insert(ban, PlayerList[i].Name)
  470. RemovePlayer(PlayerList[i])
  471. end
  472. end
  473. end
  474. if string.sub(msg, 0, 6) == "unban/" then
  475. if string.sub(msg, 7) == "all" then
  476. ban = {}
  477. newFormattedMessage("Default", "All players have been unbanned.", 5, speaker)
  478. return
  479. end
  480. for i = 1, #ban do
  481. if string.match(ban[i], string.sub(msg, 7)) then
  482. table.remove(ban, i)
  483. return
  484. end
  485. end
  486. end
  487. if string.sub(msg, 0, 5) == "jail/" then
  488. PlayerList = game:GetService("Players"):GetPlayers()
  489. for i = 1, #PlayerList do
  490. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i].Character ~= nil then
  491. if PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  492. PlayerList[i].Character.Torso.Velocity = Vector3.new(0, 0, 0)
  493. PlayerList[i].Character.Torso.CFrame = CFrame.new(0, 515, 0)
  494. end
  495. end
  496. end
  497. end
  498. if string.sub(msg, 0, 7) == "center/" then
  499. PlayerList = game:GetService("Players"):GetPlayers()
  500. for i = 1, #PlayerList do
  501. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 8):lower()) and PlayerList[i].Character ~= nil then
  502. PlayerList[i].Character.Torso.Velocity = Vector3.new(0, 0, 0)
  503. PlayerList[i].Character.Torso.CFrame = CFrame.new(0, 50, 0)
  504. end
  505. end
  506. end
  507. if string.sub(msg, 0, 7) == "freeze/" then
  508. PlayerList = game:GetService("Players"):GetPlayers()
  509. for i = 1, #PlayerList do
  510. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 8):lower()) and PlayerList[i].Character ~= nil then
  511. Children = PlayerList[i].Character:GetChildren()
  512. for x = 1, #Children do
  513. if Children[x].ClassName == "Part" then
  514. Children[x].Reflectance = 0.5
  515. Children[x].Anchored = true
  516. end
  517. end
  518. if PlayerList[i].Character:FindFirstChild("Humanoid") ~= nil then
  519. PlayerList[i].Character.Humanoid.PlatformStand = true
  520. end
  521. if PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  522. part = Instance.new("Part")
  523. part.BrickColor = BrickColor.new("Sky blue")
  524. part.Name = "Ice"
  525. Part.FormFactor = "Custom"
  526. part.Size = Vector3.new(6, 6, 6)
  527. part.Locked = true
  528. part.CanCollide = true
  529. part.TopSurface = "Smooth"
  530. part.BottomSurface = "Smooth"
  531. part.Transparency = 0.3
  532. part.Reflectance = 0.5
  533. part.Anchored = true
  534. part.CFrame = CFrame.new(PlayerList[i].Character.Torso.Position)
  535. part.Parent = PlayerList[i].Character
  536. s = Instance.new("Smoke")
  537. s.Parent = PlayerList[i].Character.Torso
  538. s.Color = Color3.new(0.5, 0.5, 1)
  539. s.Opacity = 1
  540. s.RiseVelocity = 0.1
  541. s.Name = "IceSmoke"
  542. s.Size = 5
  543. end
  544. end
  545. end
  546. end
  547. if string.sub(msg, 0, 5) == "thaw/" then
  548. PlayerList = game:GetService("Players"):GetPlayers()
  549. for i = 1, #PlayerList do
  550. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i].Character ~= nil then
  551. if PlayerList[i].Character:FindFirstChild("Humanoid") ~= nil then
  552. PlayerList[i].Character.Humanoid.PlatformStand = false
  553. end
  554. if PlayerList[i].Character:FindFirstChild("Ice") ~= nil then
  555. PlayerList[i].Character.Ice:Remove()
  556. end
  557. if PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  558. if PlayerList[i].Character.Torso:FindFirstChild("IceSmoke") ~= nil then
  559. PlayerList[i].Character.Torso.IceSmoke:Remove()
  560. end
  561. end
  562. Children = PlayerList[i].Character:GetChildren()
  563. for x = 1, #Children do
  564. if Children[x].ClassName == "Part" then
  565. Children[x].Reflectance = 0
  566. Children[x].Anchored = false
  567. end
  568. end
  569. end
  570. end
  571. end
  572. if string.sub(msg, 0, 6) == "clean/" then
  573. if string.sub(msg, 7) == "all" then
  574. removeChildren(Workspace, {}, {})
  575. part = Instance.new("Part")
  576. part.BrickColor = BrickColor.new("Dark green")
  577. part.Name = "Base"
  578. part.Size = Vector3.new(10000, 1, 10000)
  579. part.Locked = true
  580. part.Anchored = true
  581. part.CFrame = CFrame.new(Vector3.new(0, 0.7, 0))
  582. part.Parent = Workspace
  583. end
  584. if string.sub(msg, 7, 12) == "class/" then
  585. removeChildren(Workspace, {}, {string.sub(msg, 13)})
  586. end
  587. if string.sub(msg, 7, 11) == "name/" then
  588. removeChildren(Workspace, {string.sub(msg, 12)}, {})
  589. end
  590. end
  591. if string.sub(msg, 0, 6) == "group/" then
  592. if string.sub(msg, 7, 11) == "none/" then
  593. for i = 1, #admins do
  594. if string.match(admins[i]:lower(), string.sub(msg, 12):lower()) then
  595. table.remove(admins, i)
  596. end
  597. end
  598. for i = 1, #superadmins do
  599. if string.match(superadmins[i].Name:lower(), string.sub(msg, 12):lower()) then
  600. table.remove(superadmins, i)
  601. end
  602. end
  603. end
  604. if string.sub(msg, 7, 17) == "superadmin/" then
  605. PlayerList = game:GetService("Players"):GetPlayers()
  606. for i = 1, #PlayerList do
  607. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 18):lower()) then
  608. table.insert(superadmins, PlayerList[i].Name)
  609. end
  610. end
  611. end
  612. if string.sub(msg, 7, 12) == "admin/" then
  613. PlayerList = game:GetService("Players"):GetPlayers()
  614. for i = 1, #PlayerList do
  615. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 13):lower()) then
  616. table.insert(admins, PlayerList[i].Name)
  617. end
  618. end
  619. end
  620. end
  621. if string.sub(msg, 0, 7) == "sticky/" then
  622. if string.sub(msg, 8) == "toggle" then
  623. if stickyEnabled == true then
  624. stickyEnabled = false
  625. newFormattedMessage("Default", "Stickies off.", 2.5, speaker)
  626. else
  627. stickyEnabled = true
  628. newFormattedMessage("Default", "Stickies on.", 2.5, speaker)
  629. end
  630. end
  631. if string.sub(msg, 8) == "on" then
  632. stickyEnabled = true
  633. newFormattedMessage("Default", "Stickies on.", 2.5, speaker)
  634. end
  635. if string.sub(msg, 8) == "off" then
  636. stickyEnabled = false
  637. newFormattedMessage("Default", "Stickies off.", 2.5, speaker)
  638. end
  639. if string.sub(msg, 8, 11) == "new/" then
  640. table.insert(stickyList, string.sub(msg, 12))
  641. newFormattedMessage("Message", "Sticky posted.", 2.5, speaker)
  642. end
  643. if string.sub(msg, 8, 14) == "delete/" then
  644. if string.sub(msg, 15) == "all" then
  645. stickyList = {}
  646. newFormattedMessage("Default", "All stickies removed.", 2.5, speaker)
  647. return
  648. elseif stickyList[tonumber(string.sub(msg, 15))] ~= nil then
  649. table.remove(stickyList, tonumber(string.sub(msg, 15)))
  650. newFormattedMessage("Default", "Sticky removed.", 2.5, speaker)
  651. else
  652. for i = 1, #stickyList do
  653. if string.match(stickyList[i]:lower(), string.sub(msg, 15):lower()) then
  654. table.remove(stickyList, i)
  655. end
  656. end
  657. end
  658. end
  659. end
  660. if string.sub(msg, 0, 8) == "blocker/" then
  661. if string.sub(msg, 9) == "toggle" then
  662. if blockerEnabled == true then
  663. blockerEnabled = false
  664. newFormattedMessage("Default", "Blocker off.", 2.5, speaker)
  665. else
  666. blockerEnabled = true
  667. newFormattedMessage("Default", "Blocker on.", 2.5, speaker)
  668. end
  669. end
  670. if string.sub(msg, 9) == "on" then
  671. blockerEnabled = true
  672. newFormattedMessage("Default", "Blocker on.", 2.5, speaker)
  673. end
  674. if string.sub(msg, 9) == "off" then
  675. blockerEnabled = false
  676. newFormattedMessage("Default", "Blocker off.", 2.5, speaker)
  677. end
  678. if string.sub(msg, 9, 12) == "add/" then
  679. if string.sub(msg, 13, 18) == "class/" then
  680. table.insert(blockerClasses, string.sub(msg, 19):lower())
  681. newFormattedMessage("Message", "Class blocked.", 2.5, speaker)
  682. end
  683. if string.sub(msg, 13, 17) == "name/" then
  684. table.insert(blockerNames, string.sub(msg, 18):lower())
  685. newFormattedMessage("Message", "Name blocked.", 2.5, speaker)
  686. end
  687. end
  688. if string.sub(msg, 9, 15) == "delete/" then
  689. if string.sub(msg, 16) == "all" then
  690. blockerClasses = {}
  691. blockerNames = {}
  692. newFormattedMessage("Default", "All class and name blocks removed.", 2.5, speaker)
  693. return
  694. end
  695. if string.sub(msg, 16, 21) == "class/" then
  696. if string.sub(msg, 22) == "all" then
  697. blockerClasses = {}
  698. newFormattedMessage("Default", "All class blocks removed.", 2.5, speaker)
  699. return
  700. elseif blockerClasses[tonumber(string.sub(msg, 22))] ~= nil then
  701. table.remove(blockerClasses, tonumber(string.sub(msg, 22)))
  702. newFormattedMessage("Default", "Class removed.", 2.5, speaker)
  703. else
  704. for i = 1, #blockerClasses do
  705. if blockerClasses[i]:lower() == string.sub(msg, 22):lower() then
  706. table.remove(blockerClasses, i)
  707. return
  708. end
  709. end
  710. end
  711. end
  712. if string.sub(msg, 16, 20) == "name/" then
  713. if string.sub(msg, 21) == "all" then
  714. blockerNames = {}
  715. newFormattedMessage("Default", "All name blocks removed.", 2.5, speaker)
  716. return
  717. elseif blockerNames[tonumber(string.sub(msg, 21))] ~= nil then
  718. table.remove(blockerNames, tonumber(string.sub(msg, 21)))
  719. newFormattedMessage("Default", "Name removed.", 2.5, speaker)
  720. else
  721. for i = 1, #blockerNames do
  722. if blockerNames[i]:lower() == string.sub(msg, 21):lower() then
  723. table.remove(blockerNames, i)
  724. return
  725. end
  726. end
  727. end
  728. end
  729. end
  730. end
  731. if string.sub(msg, 0, 4) == "pri/" then
  732. if string.sub(msg, 5) == "toggle" then
  733. if priEnabled == true then
  734. priEnabled = false
  735. newFormattedMessage("Default", "Private (\"Pri\") server function off.", 2.5, speaker)
  736. else
  737. priEnabled = true
  738. newFormattedMessage("Default", "Private (\"Pri\") server function on.", 2.5, speaker)
  739. end
  740. end
  741. if string.sub(msg, 5) == "on" then
  742. priEnabled = true
  743. newFormattedMessage("Default", "Private (\"Pri\") server function on.", 2.5, speaker)
  744. end
  745. if string.sub(msg, 5) == "off" then
  746. priEnabled = false
  747. newFormattedMessage("Default", "Private (\"Pri\") server function off.", 2.5, speaker)
  748. end
  749. if string.sub(msg, 5, 8) == "add/" then
  750. if string.sub(msg, 9) == "all" then
  751. PlayerList = game:GetService("Players"):GetPlayers()
  752. for i = 1, #PlayerList do
  753. table.insert(priList, PlayerList[i].Name)
  754. end
  755. newFormattedMessage("Message", "All players added.", 2.5, speaker)
  756. return
  757. end
  758. table.insert(priList, string.sub(msg, 9))
  759. newFormattedMessage("Message", "Name added.", 2.5, speaker)
  760. end
  761. if string.sub(msg, 5, 11) == "delete/" then
  762. if string.sub(msg, 12) == "all" then
  763. priList = {owner}
  764. newFormattedMessage("Default", "All names (besides \"" ..owner.. "\") have been removed.", 2.5, speaker)
  765. return
  766. end
  767. for i = 1, #priList do
  768. if string.match(priList[i]:lower(), string.sub(msg, 12):lower()) then
  769. table.remove(priList, i)
  770. return
  771. end
  772. end
  773. end
  774. end
  775. if string.sub(msg, 0, 5) == "goto/" then
  776. PlayerList = game:GetService("Players"):GetPlayers()
  777. for i = 1, #PlayerList do
  778. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 6):lower()) and PlayerList[i].Character ~= nil and PlayerList[i] ~= speaker then
  779. if speaker.Character:FindFirstChild("Torso") ~= nil and PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  780. speaker.Character.Torso.CFrame = CFrame.new(PlayerList[i].Character.Torso.Position + Vector3.new(0, 5, 0))
  781. return
  782. end
  783. end
  784. end
  785. end
  786. if string.sub(msg, 0, 6) == "fetch/" then
  787. PlayerList = game:GetService("Players"):GetPlayers()
  788. for i = 1, #PlayerList do
  789. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 7):lower()) and PlayerList[i].Character ~= nil and PlayerList[i] ~= speaker then
  790. if speaker.Character:FindFirstChild("Torso") ~= nil and PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  791. PlayerList[i].Character.Torso.CFrame = CFrame.new(speaker.Character.Torso.Position + Vector3.new(0, 5, 0))
  792. end
  793. end
  794. end
  795. end
  796. if string.sub(msg, 0, 9) == "teleport/" then
  797. local part1 = {}
  798. local part2 = nil
  799. if explode("/", msg)[2] == "me" then
  800. table.insert(part1, speaker.Character:FindFirstChild("Torso"))
  801. else
  802. PlayerList = game:GetService("Players"):GetPlayers()
  803. for i = 1, #PlayerList do
  804. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[2]:lower()) and PlayerList[i].Character ~= nil then
  805. if speaker.Character:FindFirstChild("Torso") ~= nil and PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  806. table.insert(part1, PlayerList[i].Character:FindFirstChild("Torso"))
  807. end
  808. end
  809. end
  810. end
  811. if explode("/", msg)[3] == "me" then
  812. part2 = speaker.Character:FindFirstChild("Torso")
  813. else
  814. PlayerList = game:GetService("Players"):GetPlayers()
  815. for i = 1, #PlayerList do
  816. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[3]:lower()) and PlayerList[i].Character ~= nil then
  817. if speaker.Character:FindFirstChild("Torso") ~= nil and PlayerList[i].Character:FindFirstChild("Torso") ~= nil then
  818. part2 = PlayerList[i].Character:FindFirstChild("Torso")
  819. break
  820. end
  821. end
  822. end
  823. end
  824. if #part1 > 0 and part2 ~= nil then
  825. for i = 1, #part1 do
  826. if part1[i] ~= nil and part2 ~= nil then
  827. part1[i].CFrame = CFrame.new(part2.Position + Vector3.new(0, 5, 0))
  828. end
  829. end
  830. end
  831. end
  832. if string.sub(msg, 0, 8) == "gravity/" then
  833. if speaker.Character ~= nil then
  834. SetGravity(speaker.Character, tonumber(string.sub(msg, 9)), 1)
  835. end
  836. end
  837. if string.sub(msg, 0, 8) == "respawn/" then
  838. PlayerList = game:GetService("Players"):GetPlayers()
  839. for i = 1, #PlayerList do
  840. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 9):lower()) then
  841. local character = Instance.new("Model")
  842. character.Name = PlayerList[i].Name
  843. local head = Instance.new("Part")
  844. head.Name = "Head"
  845. head.Transparency = 1
  846. head.CanCollide = false
  847. head.Anchored = true
  848. head.Parent = character
  849. local humanoid = Instance.new("Humanoid")
  850. humanoid.Parent = character
  851. character.Parent = Workspace
  852. humanoid.Health = 100
  853. PlayerList[i].Character = character
  854. humanoid.Health = 0
  855. end
  856. end
  857. end
  858. if string.sub(msg, 0, 3) == "ca/" then
  859. if string.sub(msg, 4, 7) == "set/" then
  860. PlayerList = game:GetService("Players"):GetPlayers()
  861. for i = 1, #PlayerList do
  862. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[3]:lower()) then
  863. PlayerList[i].CharacterAppearance = explode("/http", msg)[4]
  864. m = Instance.new("Message")
  865. m.Text = PlayerList[i].CharacterAppearance
  866. m.Parent = Workspace
  867. if PlayerList[i].Character ~= nil then PlayerList[i].Character:BreakJoints() end
  868. end
  869. end
  870. end
  871. if string.sub(msg, 4, 7) == "get/" then
  872. PlayerList = game:GetService("Players"):GetPlayers()
  873. for i = 1, #PlayerList do
  874. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[3]:lower()) then
  875. if explode("/", msg)[4]:lower() == "terrysuit" then
  876. PlayerList[i].CharacterAppearance = "http://www.roblox.com/Asset/?id=27911184"
  877. if PlayerList[i].Character ~= nil then PlayerList[i].Character:BreakJoints() end
  878. end
  879. end
  880. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[3]:lower()) then
  881. if explode("/", msg)[4]:lower() == "black" then
  882. PlayerList[i].CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=66852"
  883. if PlayerList[i].Character ~= nil then PlayerList[i].Character:BreakJoints() end
  884. end
  885. end
  886. end
  887. end
  888. if string.sub(msg, 4, 6) == "id/" then
  889. PlayerList = game:GetService("Players"):GetPlayers()
  890. for i = 1, #PlayerList do
  891. if string.match(PlayerList[i].Name:lower(), explode("/", msg)[3]:lower()) then
  892. PlayerList[i].CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" ..explode("/", msg)[4]
  893. if PlayerList[i].Character ~= nil then PlayerList[i].Character:BreakJoints() end
  894. end
  895. end
  896. end
  897. if string.sub(msg, 4, 11) == "default/" then
  898. PlayerList = game:GetService("Players"):GetPlayers()
  899. for i = 1, #PlayerList do
  900. if string.match(PlayerList[i].Name:lower(), string.sub(msg, 12):lower()) then
  901. PlayerList[i].CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" ..PlayerList[i].userId
  902. if PlayerList[i].Character ~= nil then PlayerList[i].Character:BreakJoints() end
  903. end
  904. end
  905. end
  906. end
  907. if speaker.Name ~= owner then return end
  908. if string.sub(msg, 0, 8) == "antiban/" then
  909. if string.sub(msg, 9) == "toggle" then
  910. if antiban == 3 then
  911. antiban = 0
  912. newFormattedMessage("Default", "Antiban off.", 2.5, speaker)
  913. elseif antiban == 0 then
  914. antiban = 1
  915. newFormattedMessage("Default", "Antiban on, level 1 (Warn).", 2.5, speaker)
  916. elseif antiban == 1 then
  917. antiban = 2
  918. newFormattedMessage("Default", "Antiban on, level 2 (Clean).", 2.5, speaker)
  919. elseif antiban == 2 then
  920. antiban = 3
  921. newFormattedMessage("Default", "Antiban on, level 3 (Ban).", 2.5, speaker)
  922. end
  923. end
  924. if string.sub(msg, 9) == "0" or string.sub(msg, 9) == "off" then
  925. antiban = 0
  926. newFormattedMessage("Default", "Antiban off.", 2.5, speaker)
  927. end
  928. if string.sub(msg, 9) == "1" or string.sub(msg, 9) == "warn" then
  929. antiban = 1
  930. newFormattedMessage("Default", "Antiban on, level 1 (Warn).", 2.5, speaker)
  931. end
  932. if string.sub(msg, 9) == "2" or string.sub(msg, 9) == "clean" then
  933. antiban = 2
  934. newFormattedMessage("Default", "Antiban on, level 2 (Clean).", 2.5, speaker)
  935. end
  936. if string.sub(msg, 9) == "3" or string.sub(msg, 9) == "ban" then
  937. antiban = 3
  938. newFormattedMessage("Default", "Antiban on, level 3 (Ban).", 2.5, speaker)
  939. end
  940. end
  941. if msg == "show/" then
  942. finding = false
  943. updateExplorer()
  944.  
  945. end
  946. if msg == "hide/" then
  947. finding = false
  948. updateExplorer()
  949. status:Remove()
  950. end
  951. if string.sub(msg, 0, 3) == "in/" then
  952. finding = false
  953. if explorerObject ~= nil then
  954. if explorerObject:FindFirstChild(string.sub(msg, 4)) ~= nil then
  955. explorerObject = explorerObject[string.sub(msg, 4)]
  956. updateExplorer()
  957. elseif explorerObject:FindFirstChild(string.sub(msg, 4)) == nil then
  958. updateExplorer("'" ..string.sub(msg, 4).. "' is not a child of '" ..explorerObject.Name.. "'!")
  959. end
  960. elseif explorerObject == nil then
  961. updateExplorer("Object is nil!")
  962. end
  963. end
  964. if string.sub(msg, 0, 5) == "find/" then
  965. finding = false
  966. if explorerObject ~= nil then
  967. Children = explorerObject:GetChildren()
  968. if #Children < 1 then updateExplorer("Object has no children!") return end
  969. finding = true
  970. for i = 1, #Children do
  971. if finding ~= true then return end
  972. if string.match(Children[i].Name:lower(), string.sub(msg, 6):lower()) then
  973. updateExplorer(Children[i].Name, 2.5)
  974. wait(2.5)
  975. end
  976. end
  977. elseif explorerObject == nil then
  978. updateExplorer("Object is nil!")
  979. end
  980. end
  981. if string.sub(msg, 0, 6) == "match/" then
  982. if explorerObject ~= nil then
  983. Children = explorerObject:GetChildren()
  984. if #Children < 1 then updateExplorer("Object has no children!") return end
  985. for i = 1, #Children do
  986. if string.match(Children[i].Name:lower(), string.sub(msg, 7):lower()) then
  987. explorerObject = Children[i]
  988. updateExplorer()
  989. return
  990. end
  991. end
  992. updateExplorer("No matches!")
  993. elseif explorerObject == nil then
  994. updateExplorer("Object is nil!")
  995. end
  996. end
  997. if msg == "out/" then
  998. finding = false
  999. if explorerObject ~= nil then
  1000. if explorerObject.Parent ~= nil then
  1001. explorerObject = explorerObject.Parent
  1002. updateExplorer()
  1003. elseif explorerObject.Parent == nil then
  1004. updateExplorer("Object does not have a parent!")
  1005. end
  1006. elseif explorerObject == nil then
  1007. updateExplorer("Object is nil!")
  1008. end
  1009. end
  1010. if string.sub(msg, 0, 8) == "service/" then
  1011. finding = false
  1012. if string.sub(msg, 9) == "game" then
  1013. explorerObject = game
  1014. updateExplorer()
  1015. elseif string.sub(msg, 9):lower() == "Workspace" then
  1016. explorerObject = Workspace
  1017. updateExplorer()
  1018. elseif string.sub(msg, 9):lower() == "players" then
  1019. explorerObject = game:GetService("Players")
  1020. updateExplorer()
  1021. elseif string.sub(msg, 9):lower() == "lighting" then
  1022. explorerObject = game:GetService("Lighting")
  1023. updateExplorer()
  1024. elseif string.sub(msg, 9):lower() == "soundscape" then
  1025. explorerObject = game:GetService("SoundScape")
  1026. updateExplorer()
  1027. elseif string.sub(msg, 9):lower() == "starterpack" then
  1028. explorerObject = game:GetService("StarterPack")
  1029. updateExplorer()
  1030. elseif string.sub(msg, 9):lower() == "startergui" then
  1031. explorerObject = game:GetService("StarterGui")
  1032. updateExplorer()
  1033. end
  1034. end
  1035. if msg == "delete/" then
  1036. finding = false
  1037. if explorerObject ~= nil then
  1038. oldexplorerObject = explorerObject.Parent
  1039. explorerObject:Remove()
  1040. explorerObject = oldexplorerObject
  1041. updateExplorer("Object removed.")
  1042. elseif explorerObject == nil then
  1043. updateExplorer("Object is nil!")
  1044. end
  1045. end
  1046. if msg == "clip/" then
  1047. finding = false
  1048. if explorerObject ~= nil then
  1049. clipboard = explorerObject
  1050. updateExplorer("Object clipped to the clipboard.")
  1051. elseif explorerObject == nil then
  1052. updateExplorer("Object is nil!")
  1053. end
  1054. end
  1055. if msg == "clip/clone" then
  1056. finding = false
  1057. if explorerObject ~= nil then
  1058. local check = pcall(function()
  1059. if clipboard ~= nil then
  1060. clipboard:Clone().Parent = explorerObject
  1061. end
  1062. return true
  1063. end)
  1064. if check == true then
  1065. updateExplorer("Clipboard pasted.")
  1066. else
  1067. updateExplorer("Clipboard paste failed!")
  1068. end
  1069. elseif explorerObject == nil then
  1070. updateExplorer("Object is nil!")
  1071. end
  1072. end
  1073. if msg == "clip/move" then
  1074. finding = false
  1075. if explorerObject ~= nil then
  1076. if clipboard ~= nil then
  1077. clipboard.Parent = explorerObject
  1078. clipboard = nil
  1079. updateExplorer("Clipboard moved.")
  1080. else
  1081. updateExplorer("There isn't anything on the clipboard!")
  1082. end
  1083. elseif explorerObject == nil then
  1084. updateExplorer("Target is nil!")
  1085. end
  1086. end
  1087. if string.sub(msg, 0, 4) == "new/" then
  1088. finding = false
  1089. if explorerObject ~= nil then
  1090. newexplorerObject = nil
  1091. local create = pcall(function() newexplorerObject = Instance.new(string.sub(msg, 5)) end)
  1092. if create == true then
  1093. newexplorerObject.Parent = explorerObject
  1094. explorerObject = newexplorerObject
  1095. pcall(function() explorerObject.CFrame = CFrame.new(speaker.Character.Torso.Position + Vector3.new(0, 10, 0)) end)
  1096. updateExplorer()
  1097. else
  1098. updateExplorer("'" ..string.sub(msg, 5).. "' is not a valid ClassName!")
  1099. end
  1100. elseif explorerObject == nil then
  1101. updateExplorer("Object is nil!")
  1102. end
  1103. end
  1104. if string.sub(msg, 0, 7) == "setvar/" then
  1105. if explorerObject ~= nil then
  1106. local check = pcall(function()
  1107. if explode("/", msg)[2] == "color3" then
  1108. explorerObject[explode("/", msg)[3]] = Color3.new(explode("/", msg)[4], explode("/", msg)[5], explode("/", msg)[6])
  1109. end
  1110. if explode("/", msg)[2] == "brickcolor" then
  1111. explorerObject[explode("/", msg)[3]] = BrickColor.new(explode("/", msg)[4])
  1112. end
  1113. if explode("/", msg)[2] == "string" then
  1114. explorerObject[explode("/", msg)[3]] = explode("/", msg)[4]
  1115. end
  1116. if explode("/", msg)[2] == "bool" then
  1117. if tonumber(explode("/", msg)[4]) <= 0 then
  1118. explorerObject[explode("/", msg)[3]] = false
  1119. elseif tonumber(explode("/", msg)[4]) > 0 then
  1120. explorerObject[explode("/", msg)[3]] = true
  1121. end
  1122. end
  1123. if explode("/", msg)[2] == "number" then
  1124. explorerObject[explode("/", msg)[3]] = tonumber(explode("/", msg)[4])
  1125. end
  1126. if explode("/", msg)[2] == "vector2" then
  1127. explorerObject[explode("/", msg)[3]] = Vector2.new(explode("/", msg)[4], explode("/", msg)[5])
  1128. end
  1129. if explode("/", msg)[2] == "vector3" then
  1130. explorerObject[explode("/", msg)[3]] = Vector3.new(explode("/", msg)[4], explode("/", msg)[5], explode("/", msg)[6])
  1131. end
  1132. if explode("/", msg)[2] == "cframe" then
  1133. explorerObject[explode("/", msg)[3]] = CFrame.new(explode("/", msg)[4], explode("/", msg)[5], explode("/", msg)[6])
  1134. end
  1135. if explode("/", msg)[2] == "udim2" then
  1136. explorerObject[explode("/", msg)[3]] = UDim2.new(explode("/", msg)[4], explode("/", msg)[5], explode("/", msg)[6], explode("/", msg)[7])
  1137. end
  1138. return true
  1139. end)
  1140. if check == true then
  1141. updateExplorer("Value set.")
  1142. else
  1143. updateExplorer("Value not set!")
  1144. end
  1145. elseif explorerObject == nil then
  1146. updateExplorer("Object is nil!")
  1147. end
  1148. end
  1149. if string.sub(msg, 0, 7) == "getvar/" then
  1150. if explorerObject ~= nil then
  1151. local check = pcall(function()
  1152. updateExplorer(tostring(explorerObject[explode("/", msg)[2]]))
  1153. return true
  1154. end)
  1155. if check ~= true then
  1156. updateExplorer("Value not found!")
  1157. end
  1158. elseif explorerObject == nil then
  1159. updateExplorer("Object is nil!")
  1160. end
  1161. end
  1162. if string.sub(msg, 0, 7) == "option/" then
  1163. if string.sub(msg, 8) == "stop" then
  1164. scriptDisabled = true
  1165. blockerEnabled = false
  1166. stickyEnabled = false
  1167. priEnabled = false
  1168. newFormattedMessage("Default", "CoolCMDs version " ..scriptVersion.. " stopped.", 10, speaker)
  1169. updateMessage("Shutting down, please wait...", 10)
  1170. wait(10)
  1171. status:Remove()
  1172. end
  1173. if string.sub(msg, 8) == "crash" then
  1174. _G["game"] = nil
  1175. _G["Workspace"] = nil
  1176. end
  1177. end
  1178. end
  1179.  
  1180. function onPlayerEntered(newPlayer)
  1181. if BanCheck(newPlayer.Name) == true and scriptDisabled == false then
  1182. newFormattedMessage("Hint", newPlayer.Name.. " is banned from this server.", 2.5, Workspace)
  1183. wait(0.1)
  1184. RemovePlayer(newPlayer)
  1185. end
  1186. if string.sub(newPlayer.Name, 0, 6) == "Guest " then
  1187. --newFormattedMessage("Hint", "Guests are not allowed in this server.", 2.5, Workspace)
  1188. --RemovePlayer(newPlayer)
  1189. end
  1190. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  1191. end
  1192.  
  1193. function onChildAdded(part)
  1194. if scriptDisabled == true then return end
  1195. if BlockerCheck(part) == true and part ~= message and part ~= sticky and part ~= blockerMessage then
  1196. if blockerMessage ~= nil then blockerMessage:Remove() end
  1197. blockerMessage = Instance.new("Message")
  1198. blockerMessage.Text = "The object \"" ..part.Name.. "\" (Class: \"" ..part.ClassName.. "\") is blocked and has been removed."
  1199. part:Remove()
  1200. blockerMessage.Parent = Workspace
  1201. delay(2.5, function() blockerMessage:Remove() end)
  1202. end
  1203. if part ~= nil then
  1204. part.ChildAdded:connect(onChildAdded)
  1205. Children1 = part:GetChildren()
  1206. if #Children1 >= 0 then
  1207. for i = 1, #Children1 do
  1208. Children1[i].ChildAdded:connect(onChildAdded)
  1209. Children2 = Children1[i]:GetChildren()
  1210. if #Children2 >= 0 then
  1211. for i = 1, #Children2 do
  1212. Children2[i].ChildAdded:connect(onChildAdded)
  1213. end
  1214. end
  1215. end
  1216. end
  1217. end
  1218. end
  1219.  
  1220. function BackupOnChatted(msg, recipient, speaker)
  1221. if scriptDisabled == true then return end
  1222. if msg == "force stop" then
  1223. onChatted("option/stop", recipient, speaker)
  1224. end
  1225. end
  1226.  
  1227. game:GetService("Players").ChildAdded:connect(onPlayerEntered)
  1228. PlayerList = game:GetService("Players"):GetPlayers()
  1229. for i = 1, #PlayerList do
  1230. if BanCheck(PlayerList[i].Name) == true and scriptDisabled == false then
  1231. RemovePlayer(PlayerList[i])
  1232. else
  1233. PlayerList[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient, PlayerList[i]) end)
  1234. if PlayerList[i].Name == owner then
  1235. PlayerList[i].Chatted:connect(function(msg, recipient) BackupOnChatted(msg, recipient, PlayerList[i]) end)
  1236. end
  1237. end
  1238. end
  1239. game.ChildAdded:connect(onChildAdded)
  1240. Workspace.ChildAdded:connect(onChildAdded)
  1241. game:GetService("Lighting").ChildAdded:connect(onChildAdded)
  1242. game:GetService("Players").ChildAdded:connect(onChildAdded)
  1243. Children1 = Workspace:GetChildren()
  1244. for i = 1, #Children1 do
  1245. Children1[i].ChildAdded:connect(onChildAdded)
  1246. Children2 = Children1[i]:GetChildren()
  1247. if #Children2 >= 0 then
  1248. for i = 1, #Children2 do
  1249. Children2[i].ChildAdded:connect(onChildAdded)
  1250. Children3 = Children2[i]:GetChildren()
  1251. if #Children3 >= 0 then
  1252. for i = 1, #Children3 do
  1253. Children3[i].ChildAdded:connect(onChildAdded)
  1254. end
  1255. end
  1256. end
  1257. end
  1258. end
  1259.  
  1260. updateExplorer()
  1261. newFormattedMessage("Default", "CoolCMDs version " ..scriptVersion.. " started.", 5, game:GetService("Players")[owner])
  1262.  
  1263. while true do
  1264. if scriptDisabled == false then
  1265. if antiban == 1 then
  1266. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1267. newFormattedMessage("Message", owner.. " has been removed. Antiban level 1: Warn", 5, Workspace)
  1268. wait(5.01)
  1269. end
  1270. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1271. newFormattedMessage("Message", "Someone in this server either enjoys to remove players, has ran a \"pri\" script, or " ..owner.. " has left.", 5, Workspace)
  1272. wait(5.01)
  1273. end
  1274. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1275. newFormattedMessage("Message", "This message will continue to loop until " ..owner.. " reappears.", 5, Workspace)
  1276. wait(5.01)
  1277. end
  1278. elseif antiban == 2 then
  1279. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1280. newFormattedMessage("Message", owner.. " has been removed. Antiban level 2: Clean", 5, Workspace)
  1281. wait(5.01)
  1282. end
  1283. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1284. newFormattedMessage("Message", "The game will be cleaned unless " ..owner.. " reappears within the following countdown.", 5, Workspace)
  1285. wait(5.01)
  1286. end
  1287. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1288. newFormattedMessage("Message", "If " ..owner.. " has been banned, unban " ..owner.. " or remove your script.", 5, Workspace)
  1289. wait(5.01)
  1290. end
  1291. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1292. for i = 25, 0, -1 do
  1293. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1294. newFormattedMessage("Message", "Time left until the server is cleaned: " ..i, 1, Workspace)
  1295. wait(1)
  1296. end
  1297. end
  1298. end
  1299. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1300. while true do
  1301. if game:GetService("Players"):FindFirstChild(owner) ~= nil then break end
  1302. for i, p in ipairs(Workspace:GetChildren()) do
  1303. p:Remove()
  1304. end
  1305. wait()
  1306. end
  1307. end
  1308. elseif antiban == 3 then
  1309. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1310. newFormattedMessage("Message", owner.. " has been removed. Antiban level 3: Ban,", 5, Workspace)
  1311. wait(5.01)
  1312. end
  1313. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1314. newFormattedMessage("Message", "All players will be removed unless " ..owner.. " reappears within the following countdown.", 5, Workspace)
  1315. wait(5.01)
  1316. end
  1317. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1318. newFormattedMessage("Message", "If " ..owner.. " has been banned, unban " ..owner.. " or remove your script.", 5, Workspace)
  1319. wait(5.01)
  1320. end
  1321. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1322. for i = 25, 0, -1 do
  1323. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1324. newFormattedMessage("Message", "Time left until players are removed: " ..i, 1, Workspace)
  1325. wait(1)
  1326. end
  1327. end
  1328. end
  1329. if game:GetService("Players"):FindFirstChild(owner) == nil then
  1330. while true do
  1331. if game:GetService("Players"):FindFirstChild(owner) ~= nil then break end
  1332. for i, p in ipairs(game:GetService("Players"):GetPlayers()) do
  1333. if p.Name ~= owner then pcall(function() p:Remove() end) end
  1334. end
  1335. for i, p in ipairs(Workspace:GetChildren()) do
  1336. pcall(function() p:Remove() end)
  1337. end
  1338. wait()
  1339. end
  1340. end
  1341. end
  1342. if stickyEnabled == true then
  1343. stickyTime = stickyTime + 0.1
  1344. if #stickyList > 0 and stickyTime >= stickyFrequency then
  1345. sticky = Instance.new("Message")
  1346. sticky.Text = stickyList[math.random(1, #stickyList)]
  1347. sticky.Parent = Workspace
  1348. stickyTime = -stickyShowTime
  1349. delay(stickyShowTime, function() sticky:Remove() end)
  1350. end
  1351. end
  1352. if priEnabled == true then
  1353. PlayerList = game:GetService("Players"):GetPlayers()
  1354. for i = 1, #PlayerList do
  1355. match = false
  1356. for x = 1, #priList do
  1357. if PlayerList[i].Name == priList[x] then
  1358. match = true
  1359. end
  1360. end
  1361. if match == false then
  1362. newFormattedMessage("Hint", "Player " ..PlayerList[i].Name.. " was removed.", 5, Workspace)
  1363. PlayerList[i]:Remove()
  1364. end
  1365. end
  1366. end
  1367. end
  1368. wait(0.1)
  1369. end
  1370. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement