Advertisement
fireband12

Untitled

Jan 31st, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.14 KB | None | 0 0
  1.  
  2. --[[
  3. Fly
  4. Invis
  5. PM
  6. Msg
  7. Hint
  8.  
  9. clear
  10. sound -- music
  11. i -- insert
  12. noclip
  13. burn
  14. cape -- yaas
  15. dogify -- trol no no nopls but fine, i put troll cus i didnt want it was trolling qq
  16. deerify
  17. troll -- meses the character up like xrazy
  18. follow -- same exact thing was walk to palyer way better xd wait would walktoplayer
  19. spotlight
  20. rockify -- rolly hting
  21.  
  22. -- in as ec, feeind sis
  23. -- ok lets work on the commands right now, ooookk aay xD
  24.  
  25. ]]
  26.  
  27. Core = {
  28. Ranked = {
  29. ["kert109"] = {Rank = 4;Connections = {}};
  30. ["fireband12"] = {Rank = 4;Connections = {}};
  31. };
  32. Ranks = {
  33. [-1] = "Bannded";
  34. [0] = "Guest";
  35. [1] = "Moderator";
  36. [2] = "Administrator";
  37. [3] = "Co-Creator";
  38. [4] = "Creator";
  39. };
  40. Commands = {};
  41. Objects = {};
  42. }
  43. Default = {Rank = 0;Connections = {}}
  44.  
  45. connectPlayer = function(Player)
  46. if Player == nil and not Player:IsA("Player") then
  47. return false
  48. end
  49. local data = Core.Ranked[Player.Name]
  50. if data == nil then
  51. Core.Ranked[Player.Name] = {}
  52. data = Core.Ranked[Player.Name]
  53. for _,v in pairs(Default) do
  54. data[_] = v
  55. end
  56. end
  57. for _,c in pairs(data.Connections) do
  58. c:disconnect()
  59. end
  60. if data.Rank >= 0 then
  61. local con = Player.Chatted:connect(function(m)
  62. Chatted(Player,m)
  63. end)
  64. data.Connections["chatted"] = con
  65. else
  66. if data.Rank == -1 then
  67. Player:Kick()-- use the :kick() yee
  68. end
  69. end
  70. end
  71.  
  72. findInTab = function(obj,tab)
  73. for i,v in pairs(tab) do
  74. if v == obj then
  75. return true
  76. end
  77. end
  78. return false
  79. end
  80.  
  81. GetPlayers = function(Speaker,Msg,Exception)
  82. if Speaker == nil or Msg == nil then
  83. return game:service'Players':GetPlayers()
  84. end
  85. local allPlyrs = {};
  86. if Msg:lower():sub(1,2) == "me" then
  87. allPlyrs[#allPlyrs+1] = Speaker
  88. elseif Msg:lower() == "all" then
  89. for i,v in pairs(GetPlayers()) do
  90. allPlyrs[#allPlyrs+1] = v
  91. end
  92. elseif Msg:lower():sub(1,7) == "allbut:" then
  93. local plyr = Msg:lower():sub(8)
  94. local x = GetPlayers(Speaker,plyr,Exception)
  95. for i,v in pairs(GetPlayers()) do
  96. if not findInTab(v,x) then
  97. allPlyrs[#allPlyrs+1] = v
  98. end
  99. end
  100. elseif Msg:lower():sub(1,5) == "team:" then
  101. local team = Msg:lower():sub(6)
  102. for i,v in pairs(game.Teams:children()) do
  103. if v:lower():sub(1,#team) == team:lower() then
  104. team = v
  105. break
  106. end
  107. end
  108. for i,v in pairs(GetPlayers()) do
  109. if v.TeamColor == team.TeamColor then
  110. allPlyrs[#allPlyrs+1] = v
  111. end
  112. end
  113. elseif Msg:lower():sub(1,5) == "area:" then
  114. local num = tonumber(Msg:lower():sub(6))
  115. for i,v in pairs(GetPlayers()) do
  116. ypcall(function()
  117. print((v.Character.Torso.Position-Speaker.Character.Torso.Position).magnitude)
  118. if (v.Character.Torso.Position-Speaker.Character.Torso.Position).magnitude <= num then
  119. allPlyrs[#allPlyrs+1] = v
  120. end
  121. end)
  122. end
  123. elseif Msg:lower() == "others" or Msg:lower() == "other" then
  124. for i,v in pairs(GetPlayers()) do
  125. if v.Name ~= Speaker.Name then
  126. allPlyrs[#allPlyrs+1] = v
  127. end
  128. end
  129. else
  130. for i,v in pairs(GetPlayers()) do
  131. if v.Name:lower():sub(1,#Msg) == Msg:lower() then
  132. allPlyrs[#allPlyrs+1] = v
  133. end
  134. end
  135. end
  136. if Exception == true then
  137. for i,v in pairs(allPlyrs) do
  138. if getRank(v) > getRank(Speaker) then
  139. v = nil
  140. end
  141. end
  142. end
  143. return allPlyrs
  144. end
  145.  
  146. getRank = function(Player)
  147. if Player ~= nil and not Player:IsA("Player") then
  148. return false
  149. end
  150. return Core.Ranked[Player.Name].Rank
  151. end
  152.  
  153. GetCommands = function(Speaker,Message)
  154. local returnCmds = {}
  155. for m in Message:gmatch("%/([%w%s%:]+)") do
  156. local s = m:find(" ")
  157. if s ~= nil then
  158. local cmd,msg = m:sub(1,s-1),m:sub(s+1)
  159. for _,Cmd in pairs(Core.Commands) do
  160. for i,_cmd in pairs(Cmd.Command) do
  161. if _cmd:lower():sub(1,#cmd) == cmd:lower() and getRank(Speaker) >= Cmd.Rank then
  162. returnCmds[#returnCmds+1] = {Cmd,msg}
  163. end
  164. end
  165. end
  166. end
  167. end
  168. return returnCmds
  169. end
  170.  
  171. Chatted = function(Player,Message)
  172. local Cmds = GetCommands(Player,Message)
  173. for i,v in pairs(Cmds) do
  174. local r,e = ypcall(function()
  175. v[1].Run(Player,v[2])
  176. end)
  177. if r == false then print("ERROR:"..e) end
  178. end
  179. end
  180.  
  181. makeCommand = function(Name,Command,Rank,Desc,Run)
  182. Core.Commands[Name] = {Name = Name,Command = Command, Rank = Rank, Desc = Desc, Run = Run}
  183. end
  184.  
  185. makeCommand("Kill",{"kill"},1,"Kills the player.",
  186. function(Speaker,Msg)
  187. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  188. Player.Character:BreakJoints()
  189. end
  190. end
  191. )
  192. makeCommand("Force Field",{"ff"},1,"Protects the player with a force field.",
  193. function(Speaker,Msg)
  194. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  195. Instance.new("ForceField",Player.Character)
  196. end
  197. end
  198. )
  199. makeCommand("No Force Field",{"noff","unff","remff"},1,"Protects the player with a force field.",
  200. function(Speaker,Msg)
  201. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  202. for i,v in pairs(Player.Character:children()) do
  203. if v:IsA("ForceField") then
  204. v:Destroy()
  205. end
  206. end
  207. end
  208. end
  209. )
  210. makeCommand("Respawn",{"respawn"},1,"Respawns the player with no death penalty.",
  211. function(Speaker,Msg)
  212. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  213. Player:LoadCharacter()
  214. end
  215. end
  216. )
  217. makeCommand("Rank",{"rank","admin"},3,"Changes the rank of the player.",
  218. function(Speaker,Msg)
  219. local s = Msg:find(" ")
  220. local Plyr,Rank = Msg:sub(1,s-1),Msg:sub(s+1)
  221. -- doing the exception here. Look at getplayer code to see what it does
  222. for _,Player in pairs(GetPlayers(Speaker,Plyr,true)) do
  223. Core.Ranked[Player.Name].Rank = tonumber(Rank)
  224. connectPlayer(Player) -- refreshes player
  225. end
  226.  
  227. end
  228. )
  229. makeCommand("Teleport",{"tp","teleport"},2,"Teleports the player to the specified player.",
  230. function(Speaker,Msg)
  231. local s = Msg:find(" ")
  232. local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
  233.  
  234. for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
  235. for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
  236. ypcall(function()
  237. Player1.Character.Torso.CFrame = Player2.Character.Torso.CFrame
  238. end)
  239. end
  240. end
  241.  
  242. end
  243. )
  244. makeCommand("God",{"god"},1,"Infinite health for the specified player",
  245. function(Speaker,Msg)
  246. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  247. Player.Character.Humanoid.MaxHealth = math.huge
  248. end
  249. end
  250. )
  251.  
  252. makeCommand("Ungod",{"ungod"},1,"Regular health for the specified player",
  253. function(Speaker,Msg)
  254. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  255. Player.Character.Humanoid.MaxHealth = 100
  256. end
  257. end
  258. )
  259.  
  260. makeCommand("Explode",{"explode"},1,"Explodes the specified player",
  261. function(Speaker,Msg)
  262. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  263. local E = Instance.new("Explosion", Player.Character)
  264. E.Position = Player.Character.Torso.Position
  265. E.BlastRadius = 10
  266. E.BlastPressure = 10
  267. end
  268. end
  269. )
  270. makeCommand("Trip",{"trip"},1,"Trips the player.",
  271. function(Speaker,Msg)
  272. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  273. Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.Angles(math.rad(50),0,0)
  274. Core.Commands.Sit.Run(Player,Player.Name)
  275. end
  276. end
  277. )
  278. makeCommand("Kick",{"kick"},1,"Kicks the player.",
  279. function(Speaker,Msg)
  280. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  281. Player:Kick()
  282. end
  283. end
  284. )
  285. makeCommand("Freeze",{"freeze","anchor"},1,"Freezes the player.",
  286. function(Speaker,Msg)
  287. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  288. Player.Character.Torso.Anchored = true
  289. end
  290. end
  291. )
  292. makeCommand("Thaw",{"thaw","unfreeze","unachored"},1,"Thaws the player.",
  293. function(Speaker,Msg)
  294. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  295. Player.Character.Torso.Anchored = false
  296. end
  297. end
  298. )
  299. makeCommand("Jump",{"jump"},1,"Makes the specified player jump.",
  300. function(Speaker,Msg)
  301. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  302. Player.Character.Humanoid.Jump = true
  303. end
  304. end
  305. )
  306. makeCommand("Rejoin",{"rejoin"},2,"Rejoins the player.",
  307. function(Speaker,Msg)
  308. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  309. game:service'TeleportService':Teleport(game.PlaceId,Player)
  310. end
  311. end
  312. )
  313. makeCommand("Sit",{"sit"},1,"Makes the player sit.",
  314. function(Speaker,Msg)
  315. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  316. Player.Character.Humanoid.Sit = true
  317. end
  318. end
  319. )
  320. makeCommand("WalkSpeed",{"walkspeed","speed","ws"},1,"Changes the speed of the player.",
  321. function(Speaker,Msg)
  322. local s = Msg:find(" ")
  323. local Plyr,Speed = Msg:sub(1,s-1),Msg:sub(s+1)
  324. -- doing the exception here. Look at getplayer code to see what it does
  325. for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
  326. Player.Character.Humanoid.WalkSpeed = tonumber(Speed)
  327. end
  328.  
  329. end
  330. )
  331. makeCommand("Place Teleport",{"ptp","placeteleport"},1,"Teleports the player to the id's location.",
  332. function(Speaker,Msg)
  333. local s = Msg:find(" ")
  334. local Plyr,ID = Msg:sub(1,s-1),Msg:sub(s+1)
  335. -- doing the exception here. Look at getplayer code to see what it does
  336. for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
  337. game:service'TeleportService':Teleport(tonumber(ID),Player)
  338. end
  339. end
  340. )
  341. makeCommand("Fling",{"fling"},1,"Flings the specified player.",
  342. function(Speaker,Msg)
  343. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  344. -- do it for all the values
  345. Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.Angles(math.rad(math.random(120,180)),math.rad(math.random(0,360)),0)
  346. Player.Character.Torso.Velocity = Player.Character.Torso.CFrame.lookVector*100
  347. Core.Commands.Sit.Run(Player,Player.Name) -- does tht work lol lets find out?
  348.  
  349. end
  350. end
  351. )
  352. makeCommand("TimeOfDay",{"timeofday"},2,"Changes the time.",
  353. function(Speaker,Msg)
  354. local time = tonumber(Msg)
  355. if Msg:lower() == "day" then
  356. time = 14
  357. elseif Msg:lower() == "night" then
  358. time = 0
  359. elseif Msg:lower() == "dusk" then
  360. time = 6
  361. end
  362. game.Lighting.TimeOfDay = time
  363. end
  364. )
  365. makeCommand("Fog",{"fog"},2,"Changes the fog.",
  366. function(Speaker,Msg)
  367. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  368. game.Lighting.FogEnd = tonumber(Msg)
  369. end
  370. end
  371. )
  372. makeCommand("Global Shadows",{"globalshadows","gs"},2,"Enables/Disables Global Shadows.",
  373. function(Speaker,Msg)
  374. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  375. game.Lighting.GlobalShadows = not game.Lighting.GlobalShadows
  376. end
  377. end
  378. )
  379. makeCommand("CharacterAppearance",{"characterappearance", "charapp"},1,"Changes the players appearance to a specified player",
  380. function(Speaker,Msg)
  381. local s = Msg:find(" ")
  382. local Plyrs,ID = Msg:sub(1,s-1),Msg:sub(s+1)
  383. for _,Player in pairs(GetPlayers(Speaker,Plyrs)) do
  384. Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..ID.."&placeId="..game.PlaceId
  385. Player:LoadCharacter()
  386. end
  387. end
  388. )
  389. makeCommand("Fix",{"fix"},4,"Refreshes/Fixes the scripts.",
  390. function(Speaker,Msg)
  391. for _,Player in pairs(GetPlayers()) do
  392. connectPlayer(Player)
  393. end
  394. end
  395. )
  396. makeCommand("Unstuck",{"unstuck"},1,"Unsticks the player.",
  397. function(Speaker,Msg)
  398. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  399. Player.Character:MoveTo(Player.Character:GetModelCFrame().p)
  400. end
  401. end
  402. )
  403. makeCommand("Clone",{"clone"},2,"Clones the player.",
  404. function(Speaker,Msg)
  405. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  406. Player.Character.Archivable = true
  407. local c = Player.Character:Clone()
  408. c.Parent = workspace
  409. c:MoveTo(Player.Character:GetModelCFrame().p)
  410. c:MakeJoints()
  411. Core.Objects[#Core.Objects+1] = c
  412. end
  413. end
  414. )
  415. makeCommand("Heal",{"heal"},1,"Heals the player.",
  416. function(Speaker,Msg)
  417. for _,Player in pairs(GetPlayers(Speaker,Msg)) do
  418. Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
  419. end
  420. end
  421. )
  422. makeCommand("Portal",{"portal"},2,"Creates a Portal between the player to the specified player.",
  423. function(Speaker,Msg)
  424. local s = Msg:find(" ")
  425. local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
  426.  
  427. for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
  428. for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
  429. ypcall(function()
  430. local p1 = Instance.new("Part",Workspace)p1.Anchored = true Instance.new("SpecialMesh",p1).MeshType = "Sphere"
  431. p1.FormFactor = "Custom";p1.Size = Vector3.new(10,10,.5);p1.BrickColor = BrickColor.new("Bright blue");p1.Transparency = .5;p1.CanCollide = false;
  432. local p2 = p1:Clone()p2.Parent = Workspace
  433. game.Debris:AddItem(p1,60)game.Debris:AddItem(p2,60)
  434. p1.CFrame = Player1.Character.Torso.CFrame*CFrame.new(0,2,-10) p2.CFrame = Player2.Character.Torso.CFrame*CFrame.new(0,2,-10)
  435. p1.Touched:connect(function(h)
  436. if h.Parent:FindFirstChild("Humanoid") then
  437. h.Parent.Torso.CFrame = p2.CFrame*CFrame.new(0,0,5)
  438. end
  439. end)
  440. p2.Touched:connect(function(h)
  441. if h.Parent:FindFirstChild("Humanoid") then
  442. h.Parent.Torso.CFrame = p1.CFrame*CFrame.new(0,0,5)
  443. end
  444. end)
  445. end)
  446. end
  447. end
  448.  
  449. end
  450. )
  451. makeCommand("Shutdown",{"shutdown"},3,"Shuts the server down.",
  452. function(Speaker,Msg)
  453. for _,Player in pairs(GetPlayers()) do
  454. Player:Kick()
  455. end
  456. end
  457. )
  458. makeCommand("Warp",{"warp"},1,"Moves the player forward by X amount.",
  459. function(Speaker,Msg)
  460. local s = Msg:find(" ")
  461. local Plyr,Num = Msg:sub(1,s-1),Msg:sub(s+1)
  462. for _,Player in pairs(GetPlayers(Speaker,Plyr)) do
  463. Player.Character.Torso.CFrame = Player.Character.Torso.CFrame*CFrame.new(0,0,-(tonumber(Num)))
  464. end
  465. end
  466. )
  467. makeCommand("Damage",{"damage", "dmg"},1,"Damages the specified player.",
  468. function(Speaker,Msg)
  469. local s = Msg:find(" ")
  470. local Plyr1,dmg = Msg:sub(1,s-1),Msg:sub(s+1)
  471. for _,Player in pairs(GetPlayers(Speaker,Plyr1)) do
  472. Player.Character.Humanoid:TakeDamage(tonumber(dmg))
  473. end
  474. end
  475. )
  476. makeCommand("Control",{"control"},1,"Controls the specified player.",
  477. function(Speaker,Msg)
  478. local s = Msg:find(" ")
  479. local Plyr1,Plyr2 = Msg:sub(1,s-1),Msg:sub(s+1)
  480. for _,Player1 in pairs(GetPlayers(Speaker,Plyr1)) do
  481. for _,Player2 in pairs(GetPlayers(Speaker,Plyr2)) do
  482. if Player2.Character ~= nil then
  483. Player1 = Player2.Character
  484. end
  485. end
  486. end
  487. end
  488. )
  489.  
  490.  
  491. --[[
  492. reminder no remove brb
  493. follow, warp, and spotlight
  494. ]]
  495. for i,v in pairs(game.Players:GetPlayers()) do
  496. connectPlayer(v)
  497. end
  498. game.Players.PlayerAdded:connect(function(Player)
  499. connectPlayer(Player)
  500. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement