Advertisement
Jefferz

Untitled

Mar 27th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.39 KB | None | 0 0
  1. _G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16=_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16
  2. math.randomseed(tick())
  3.  
  4. local Workspace = Game:GetService('Workspace')
  5. local Players = Game:GetService('Players')
  6. local ReplicatedStorage = game:GetService('ReplicatedStorage')
  7. local HttpService = game:GetService('HttpService')
  8. local ServerScriptService = game:GetService('ServerScriptService')
  9. local ServerStorage = game:GetService('ServerStorage')
  10. local StarterPack = Game:GetService('StarterPack')
  11. local StarterGui = Game:GetService('StarterGui')
  12. local Lighting = Game:GetService('Lighting')
  13. local Debris = Game:GetService('Debris')
  14. local Teams = Game:GetService('Teams')
  15. local BadgeService = Game:GetService('BadgeService')
  16. local InsertService = Game:GetService('InsertService')
  17. local Terrain = Workspace.Terrain
  18. local RunService = Game:GetService('RunService')
  19. local Soundscape = Game:GetService('SoundService')
  20. local TeleportService = Game:GetService('TeleportService')
  21. local ChatService = Game:GetService('Chat')
  22.  
  23.  
  24.  
  25. --Add your name below
  26. --say 'cmds','cmd', or 'ducks' to see the commands
  27. --Note: The args for fallingducks are [1] = number [2] = interval (sec,hour,day) [3] = specified player(s)
  28. --example: fallingducks 1 hour all > makes ducks rain for an hour...
  29. local custom = {
  30. {'Howamisupposedtoknow',2}, -- [name, rank] (2 is highest rank, 1 is temp admin, and 0 is normal player, and <= -1 is banned
  31. {'PlayerName',2},
  32. }
  33.  
  34. local LIST = setmetatable({},{
  35. __index = function(self,index)
  36. for _,v in pairs(self) do
  37. if string.lower(v.Name) == string.lower(tostring(index)) then
  38. return v
  39. end
  40. end
  41. end,
  42.  
  43. __newindex = function(self,index,value)
  44. if value.Rank > 2 then
  45. value.Rank = 2
  46. rawset(self,index,value)
  47. else
  48. rawset(self,index,value)
  49. end
  50. end,
  51. }
  52. )
  53.  
  54. function addPlayer(name,rank)
  55. local new = {Name = name, Rank = rank}
  56. rawset(LIST,name,new) --if needed there's a return :P
  57. end
  58.  
  59. function getRank(name)
  60. if LIST[name] then
  61. return LIST[name].Rank
  62. else
  63. return 0
  64. end
  65. end
  66.  
  67. for index,derp in pairs(custom) do pcall(function() addPlayer(derp[1],derp[2]) end) end --close enough
  68.  
  69. local VerifyArg
  70.  
  71. local TABS = {}
  72.  
  73. local nilCMD = {Name = 'nil'; Description = 'nil' ; Aliases = {}}
  74. local COMMANDS = setmetatable({},
  75. {__index = function(self,index)
  76. for _,v in pairs(self) do
  77. for __,vv in pairs(v.Aliases) do
  78. if string.lower(vv) == string.lower(tostring(index)) then
  79. return v
  80. end
  81. end
  82. if v.Name:lower() == index:lower() or rawget(self,index) then
  83. return v
  84. end
  85. end
  86. return nilCMDS
  87. end
  88.  
  89. }
  90. )
  91. --local alive,character,head,torso,neck,humanoid = checkAlive(plr)
  92.  
  93. function checkAlive(plr)
  94. local character,head,torso,neck,humanoid = nil,nil,nil,nil,nil
  95. local character = plr.Character
  96. if character then
  97. head = character:FindFirstChild('Head')
  98. torso = character:FindFirstChild('Torso')
  99. humanoid = character:FindFirstChild('Humanoid')
  100. if (head and torso and humanoid) then
  101. neck = torso:FindFirstChild('Neck')
  102. end
  103. end
  104. if neck then
  105. return true,character,head,torso,neck,humanoid
  106. else
  107. return false
  108. end
  109. end
  110.  
  111. local clickremove = function(tab,model)
  112. for _,v in pairs(model:GetChildren()) do
  113. if v == tab then
  114. tab:remove()
  115. break
  116. end
  117. end
  118. end
  119.  
  120.  
  121. function dismiss(_,__,player)--idk :P
  122. for _,v in pairs(Workspace:GetChildren()) do
  123. if v.ClassName == 'Model' then
  124. if v.Name == '__Tab' then
  125. if v.Player ~= nil then
  126.  
  127. local name = v.Player.Value
  128. local plr = Players:FindFirstChild(name)
  129. if plr ~= nil then
  130.  
  131. if plr == player then
  132. for __,v2 in pairs(TABS) do
  133. if v2 == v then
  134. table.remove(TABS,__)
  135. v:remove()
  136. break
  137. end
  138. end
  139. end
  140. end
  141. end
  142. end
  143. end
  144. end
  145. end
  146.  
  147.  
  148. function Tabby(str,funct,plr,d,bool)
  149.  
  150. local function Create(ty)
  151. return function(data)
  152. local obj = Instance.new(ty)
  153. for k, v in pairs(data) do
  154. if type(k) == 'number' then
  155. v.Parent = obj
  156. else
  157. obj[k] = v
  158. end
  159. end
  160. return obj
  161. end
  162. end
  163. local model
  164.  
  165. for _,v in pairs(Workspace:GetChildren()) do
  166. if v.Name == '__Tab' then
  167. if v:FindFirstChild('Player') ~= nil then
  168. local p = v.Player.Value
  169. local test = Players:FindFirstChild(p)
  170. if test then
  171. if test == plr then
  172. model = v
  173. break
  174. end
  175. end
  176. end
  177. end
  178. end
  179.  
  180.  
  181. if not model then
  182. model = Instance.new('Model',Workspace); model.Name = '__Tab'
  183. local sv = Instance.new('StringValue',model) sv.Value = tostring(plr.Name)
  184. sv.Name = 'Player'
  185. end
  186.  
  187. coroutine.wrap(function(plr,model)
  188. plr.Character.Humanoid.Died:connect(function()
  189. model:remove()
  190. end)
  191. end)(plr,model)
  192.  
  193.  
  194. local tab = Create'Part'{
  195. Parent = model;
  196. Anchored = true;
  197. FormFactor = 'Custom';
  198. Size = Vector3.new(4, 4.80000019, 2);
  199. Name = ".__.";--idk
  200. CanCollide = false;
  201. Locked = true;
  202. Create'SpecialMesh'{ --duck mesh :333
  203. Name = 'MESH';
  204. Scale = Vector3.new(2, 2, 2);
  205. MeshId = "http://www.roblox.com/asset/?id=9419831";
  206. TextureId = "http://www.roblox.com/asset/?id=9419827";
  207. MeshType = Enum.MeshType.FileMesh;
  208. };
  209. };
  210.  
  211. if bool then
  212. local sl = Instance.new('SelectionBox',tab)
  213. sl.Color = BrickColor.new(bool);sl.Adornee = tab
  214. end
  215. local bbg = Instance.new('BillboardGui',tab)
  216. bbg.AlwaysOnTop = true
  217. --local bv = Instance.new('BoolValue',tab); bv.Name = 'Ready'; bv.Value = true
  218. local sound = Instance.new('Sound',tab); sound.SoundId='' sound.Name = 'Quack'
  219. local sound2 = Instance.new('Sound',tab); sound2.SoundId=''; sound2.Name = 'Quack2'
  220. bbg.Size = UDim2.new(0, 300, 0, 1);bbg.StudsOffset = Vector3.new(0,5,0);bbg.Adornee = tab
  221. local tl = Instance.new('TextLabel',bbg)
  222. tl.BackgroundTransparency = 1;tl.Size = UDim2.new(0, 300, 0, 100);tl.Font = Enum.Font.SourceSansBold;tl.FontSize = Enum.FontSize.Size24;tl.TextColor3 = Color3.new(0,0,0)
  223. if type(str) == 'string' then
  224. tl.Text = str
  225. elseif type(str) == 'table' then
  226. tl.Text = str.Name
  227. end
  228. local h = Instance.new('Handles',tab)
  229. h.Faces = Faces.new(Enum.NormalId.Top);h.Adornee = tab
  230. local cd = Instance.new('ClickDetector',tab)
  231. cd.MaxActivationDistance = 9999
  232. table.insert(TABS,model)
  233. local index = 0
  234. for _,v in pairs(model:GetChildren()) do if v == tab then index = _ break end end
  235. coroutine.wrap(function(plr,cd,funct,tab,model,index,str)
  236. cd.MouseClick:connect(function(clicker)
  237. if type(str) == 'string' then
  238. if clicker == plr then
  239. funct(tab,model,plr,index)
  240. else
  241. if plr and clicker then
  242. if plr.Character and clicker.Character then
  243. local ff = Debris:AddItem(Instance.new('ForceField',plr.Character),math.random(2,4))
  244. local ex = Instance.new('Explosion',Workspace)
  245. ex.Position = clicker.Character:FindFirstChild('Torso').CFrame.p or click.Character:FindFirstChild('Head').CFrame.p or Vector3.new(0,0,0)
  246. end
  247. end
  248. end
  249. elseif type(str) == 'table' then
  250. if clicker == plr then
  251. dismiss(nil,nil,plr)
  252. Tabby(str.Description,clickremove,plr,20,'Bright green')
  253. Tabby('Back',displayRecurse,plr,20,'Bright blue')
  254. Tabby('Exit',dismiss,plr,20,'Bright red')
  255. end
  256. end
  257. end)
  258. end)(plr,cd,funct,tab,model,index,str)
  259. Delay(d,function()for _,v in pairs(TABS) do if v == tab then table.remove(TABS,_) end end tab:remove()end)
  260. end
  261.  
  262. local starter = [[
  263. _G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16=_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16
  264. math.randomseed(tick())
  265.  
  266. local Workspace = Game:GetService('Workspace')
  267. local Players = Game:GetService('Players')
  268. repeat wait() until Players.LocalPlayer
  269. local ReplicatedStorage = game:GetService('ReplicatedStorage')
  270. local HttpService = game:GetService('HttpService')
  271. local ServerScriptService = game:GetService('ServerScriptService')
  272. local ServerStorage = game:GetService('ServerStorage')
  273. local StarterPack = Game:GetService('StarterPack')
  274. local StarterGui = Game:GetService('StarterGui')
  275. local Lighting = Game:GetService('Lighting')
  276. local Debris = Game:GetService('Debris')
  277. local Teams = Game:GetService('Teams')
  278. local BadgeService = Game:GetService('BadgeService')
  279. local InsertService = Game:GetService('InsertService')
  280. local Terrain = Workspace.Terrain
  281. local RunService = Game:GetService('RunService')
  282. local Soundscape = Game:GetService('SoundService')
  283. local TeleportService = Game:GetService('TeleportService')
  284.  
  285. ]]
  286.  
  287. local utils = {}
  288.  
  289. function utils.split(str,div)--took dis from someone :3
  290. local results = {}
  291. local currentresult = ""
  292. for i=1,string.len(str) do
  293. local current = string.sub(str,i,i)
  294. if current:match(div) then
  295. table.insert(results,currentresult)
  296. currentresult = ""
  297. else
  298. currentresult = currentresult..current
  299. end
  300. end
  301. table.insert(results,currentresult)
  302. return results
  303. end
  304. function utils.catcha(f,plr)
  305. --local s,e = ypcall(f)
  306. --if not s then
  307. -- Tabby("ERROR: "..(tostring(e)),clickremove,plr,20,'Bright red')
  308. --end
  309. end
  310.  
  311. function utils.MidPoint(p1,p2)
  312. return Vector3.new((p1.x+p2.x)/2,(p1.y+p2.y)/2,(p1.z+p2.z)/2)
  313. end
  314.  
  315. function utils.PON(n)
  316. return ((n>0 and 'Pos') or (n<0 and 'Neg') or (n == 0 and 'Zero'))
  317. end
  318. function utils.RandomNumber(m,maximum)
  319. local possible = {}
  320. for i = -maximum,maximum,m do
  321. table.insert(possible,m * i)
  322. end
  323. return possible[math.random(#possible)]
  324. end
  325. function utils.RandomVector(m,maximum) --multiples, max amount
  326. local possible = {}
  327. for i = -maximum,maximum,m do
  328. table.insert(possible,m * i)
  329. end
  330. return Vector3.new(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)])
  331. end
  332.  
  333. function utils.RandomCFrame(m,maximum) --multiples, max amount
  334. local possible = {}
  335. for i = -maximum,maximum,m do
  336. table.insert(possible,m * i)
  337. end
  338. return CFrame.new(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)])
  339. end
  340.  
  341. function utils.RandomCFrameAngles(m,maximum,bool) --multiples, max amount, if bool, then convert to radians
  342. local possible = {}
  343.  
  344. for i = -maximum,maximum,m do
  345. if bool then
  346. table.insert(possible,math.rad(m * i))
  347. else
  348. table.insert(possible,m * i)
  349. end
  350. end
  351. return CFrame.Angles(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)])
  352. end
  353.  
  354. function utils.DrawRay(ray, parent, color)
  355. if not parent then parent = workspace end
  356. local part = Instance.new("Part", parent)
  357. part.FormFactor = "Custom"
  358. part.Size = Vector3.new(.2, ray.Direction.magnitude, .2)
  359. part.CFrame = CFrame.new(ray.Origin + ray.Direction/2, ray.Origin + ray.Direction) * CFrame.Angles(math.pi/2,0,0)
  360. part.Anchored = true
  361. part.CanCollide = false
  362. Instance.new("SpecialMesh", part)
  363.  
  364. if not color then
  365. part.BrickColor = BrickColor.new("Bright red")
  366. else
  367. part.BrickColor = BrickColor.new(color)
  368. end
  369. return part
  370. end
  371.  
  372. function utils.VectorToString(Vector)
  373. return ("Vector3.new("..Vector.x..", "..Vector.y..", "..Vector.z..")")
  374. end
  375.  
  376.  
  377. local utils = {}
  378.  
  379. debug = false
  380. --THANKS ALOT TO jacob2233 FOR THIS ALGORITHM! :D
  381. function utils.encode(phrase)
  382. r = #phrase --Number of letters in the phrase
  383. isOdd = false --Default; if true then at the end add a letter ot notify the decompiler
  384. if r%2 ~= 0 then --If the amount of letters is odd then...
  385. phrase = phrase.." " --Add a space to the end if the phrase has an odd amount of letters
  386. isOdd = true --Remember to add a letter at the end for the decompiler to see
  387. end
  388.  
  389. i = 1 --Keeps track of current iteration
  390. code = 0 --Code can't be null, so start with 0; The 0 will be removed later
  391.  
  392. while i <= #phrase do --Repeat until 'i' is greater than the amount of letters
  393. a = string.byte(string.sub(phrase,i,i+1)) --Translate first letter into ASCII value
  394. b = string.byte(string.sub(phrase,i+1,i+2)) --Translate second letter into ASCII value
  395.  
  396. temp = utils.encodeAB(a,b) --Encode the temporary group for quick access and efficiency
  397. if temp<10 then --There is no way for the decoder to know if a value is < 10
  398. l1 = string.char(math.random(97,102)) --Pick a random letter from 'a' to 'f'
  399.  
  400. code = code..l1..temp --Add the quick hint for the decompiler
  401. if debug then print(a.." "..b.." "..l1..temp) end --Debug
  402. elseif temp<1000 then --There is no way for the decoder to know if a value is < 1000
  403. l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  404.  
  405. code = code..l1..temp --Add the quick hint for the decompiler
  406. if debug then print(a.." "..b.." "..l1..temp) end --Debug
  407. elseif temp<10000 then --There is no way for the decoder to know if a value is < 10000
  408. l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  409. l2 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  410.  
  411. code = code..l1..l2..temp --Add the quick hint for the decompiler
  412. if debug then print(a.." "..b.." "..l1..l2..temp) end --Debug
  413. elseif temp>100000 then --There is no way for the decoder to know if a value is > 100000; encode(255,255) is 130560
  414. l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  415. l2 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  416. l3 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F'
  417.  
  418. code = code..l1..l2..l3..temp --Add the quick hint for the decompiler
  419. if debug then print(a.." "..b.." "..l1..l2..l3..temp) end --Debug
  420. else --Most numbers will fall between 10000 and 100000
  421. code = code..temp --Encode the two individual numbers into one and add it to the result
  422. if debug then print(a.." "..b.." "..temp) end --Debug
  423. end
  424. i = i + 2 --Increment 'i' by two for the next group
  425. end
  426.  
  427. if isOdd then --If the sequence is odd
  428. code = code..string.char(math.random(65,70)) --Pick a random letter to notify the decompiler of odd lettered phrase
  429. end
  430.  
  431. return string.sub(code,2,#code) --Return the code except for the 0 at the beginning.
  432. end
  433.  
  434.  
  435. function utils.encodeAB(a,b)
  436. return 0.5*(math.pow(a+b,2)+3*a+b) --The algorithm itself is simple...
  437. end
  438.  
  439.  
  440. function utils.decode(input)
  441. i = 1 --Keeps count of the current iteration
  442. result = ""
  443. trimSpace = false --Default; is true if input has odd amount of letters
  444.  
  445. if isLetter(string.sub(input, #input-1, #input)) then --If the last element is a letter
  446. input = string.sub(input,1,#input-1) --Remove the letter
  447. trimSpace = true --Remember to trim the extra space at the end
  448. end
  449.  
  450. while i<=#input do
  451. length = 4 --Length of regular number is 5-1 or 4
  452. if isLetter(string.sub(input,i,i+1)) then --If there is one letter
  453. if isLetter(string.sub(input,i+1,i+2)) then --If there are two letters
  454. if isLetter(string.sub(input,i+2,i+3)) then --If there are three letters (max amount of letters)
  455. length = 5 --Length of long number is 6-1 or 5
  456. letters = 3 --Amount of letters before the number
  457. j = i+letters --Account for the letters
  458. if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug
  459. group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers
  460. i = i+letters+length+1 --Increment 'i' accordingly
  461. if debug then print(i) end --Debug
  462. else --Two letters
  463. length = 3 --Length of short number is 4-1 or 3
  464. letters = 2 --Amount of letters before the number
  465. j = i+letters --Account for the letters
  466. if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug
  467. group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers
  468. i = i+letters+length+1 --Increment 'i' accordingly
  469. if debug then print(i) end --Debug
  470. end
  471. else --One letter
  472. if isLowerCase(string.sub(input,i,i+1)) then --Lowercase letters mean something different than uppercase letters
  473. length = 0 --Length of super-short number is 1-1 or 0
  474. letters = 1 --Amount of letters before the number
  475. j = i+letters --Account for the letters
  476. if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug
  477. group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers
  478. i = i+letters+length+1 --Increment 'i' accordingly
  479. if debug then print(i) end --Debug
  480. else
  481. length = 2 --Length of shorter number = 3-1 or 2
  482. letters = 1 --Amount of letters before the number
  483. j = i+letters --Account for the letters
  484. if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug
  485. group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers
  486. i = i+letters+length+1 --Increment 'i' accordingly
  487. if debug then print(i) end --Debug
  488. end
  489. end
  490. else --No letters
  491. if debug then print(length.." "..string.sub(input,i,i+length)) end --Debug
  492. group = utils.decodeA(string.sub(input,i,i+length)) --Decode the number into its original two numbers
  493. i = i+length+1 --Increment 'i' accordingly
  494. if debug then print(i) end --Debug
  495. end
  496. result = result..string.char(group[1])..string.char(group[2]) --Turn the numbers back into letters and add them to the result
  497. end
  498.  
  499. if trimSpace then
  500. result = string.sub(result,1,#result-1) --Remove the extra element at the end
  501. end
  502.  
  503. return tostring(result) --Finally, return the fully decoded result
  504. end
  505.  
  506.  
  507. function utils.decodeA(f)
  508. F = 2*f
  509. s = math.floor(math.sqrt(F)) --incase sqrt(F) isn't an integer, make it one.
  510. S = (s*s)+s
  511. if F >= S then --case one
  512. a = f - 0.5*s*(s+1)
  513. b = 0.5*s*(s+3) - f
  514. elseif F < S then --case two
  515. a = f - 0.5*s*(s-1)
  516. b = 0.5*s*(s+1) - f - 1
  517. else --Bad value given; only reached if f is negative or not an integer.
  518. a = -1
  519. b = -1
  520. end
  521. return {a,b} --return a 2 element array (or matrix) containing a and b
  522. end
  523.  
  524.  
  525. function isLetter(a)
  526. a,b = pcall(function() return a+1 end) --'a' stores whether the function executed or not; b stores error message
  527. return not a --return the opposite whether the function worked or not
  528. end
  529.  
  530.  
  531. function isLowerCase(a)
  532. return string.lower(a) == a --Compare the input is equal to its lower-case counterpart
  533. end
  534.  
  535. function utils.GetPlayersFromString(str,spokenplayer)
  536. if not str or str == "" then
  537. Tabby(("No player string, (arg1 of utils.GetPlayerFromString..."),clickremove,spokenplayer,10,'Bright red')
  538. end
  539. if not spokenplayer then
  540. Tabby(("No specified player (arg2 of utils.GetPlayerFromString..."),clickremove,spokenplayer,10,'Bright red')
  541. end
  542. local foundplayers = {}
  543. for listedplayer in str:lower():gmatch("[^,;! ]+") do
  544. if listedplayer:lower() == "all" then
  545. for _,i in pairs(Players:GetPlayers()) do
  546. table.insert(foundplayers,i)
  547. end
  548. elseif listedplayer:lower() == "others" then
  549. for _,i in pairs(Players:GetPlayers()) do
  550. if i.Name:lower() ~= spokenplayer.Name:lower() then
  551. table.insert(foundplayers,i)
  552. end
  553. end
  554. elseif listedplayer:lower() == "admins" then
  555. for _,i in pairs(Players:GetPlayers()) do
  556. if LIST[i.Name] ~= nil then
  557. if LIST[i.Name] == true then
  558. table.insert(foundplayers,i)
  559. end
  560. end
  561. end
  562. elseif listedplayer:lower() == "nonadmins" then
  563. for _,i in pairs(Players:GetPlayers()) do
  564. if LIST[i.Name] == nil or LIST[i.Name] == false then
  565. table.insert(foundplayers,i)
  566. end
  567. end
  568. elseif listedplayer:lower() == "random" then
  569. table.insert(foundplayers,Players:GetPlayers()[math.random(1,#Players:GetPlayers())])
  570. elseif listedplayer:lower() == "me" then
  571. table.insert(foundplayers,spokenplayer)
  572. elseif listedplayer:lower() == "friends" then
  573. for _,i in pairs(Players:GetChildren()) do
  574. if i:IsFriendsWith(spokenplayer.userId) then
  575. table.insert(foundplayers,i)
  576. end
  577. end
  578. elseif listedplayer:lower() == "bestfriends" then
  579. for _,i in pairs(Players:GetChildren()) do
  580. if i:IsBestFriendsWith(spokenplayer.userId) then
  581. table.insert(foundplayers,i)
  582. end
  583. end
  584. elseif listedplayer:lower() == "nonfriends" then
  585. for _,i in pairs(Players:GetChildren()) do
  586. if not i:IsFriendsWith(spokenplayer.userId) then
  587. table.insert(foundplayers,i)
  588. end
  589. end
  590. elseif listedplayer:lower() == "nonbestfriends" then
  591. for _,i in pairs(Players:GetChildren()) do
  592. if not i:IsBestFriendsWith(spokenplayer.userId) then
  593. table.insert(foundplayers,i)
  594. end
  595. end
  596. elseif listedplayer:lower() == "nbc" then
  597. for _,i in pairs(Players:GetChildren()) do
  598. if i.MembershipType == Enum.MembershipType.None then
  599. table.insert(foundplayers,i)
  600. end
  601. end
  602. elseif listedplayer:lower() == "bc" then
  603. for _,i in pairs(Players:GetChildren()) do
  604. if i.MembershipType == Enum.MembershipType.BuildersClub then
  605. table.insert(foundplayers,i)
  606. end
  607. end
  608. elseif listedplayer:lower() == "tbc" then
  609. for _,i in pairs(Players:GetChildren()) do
  610. if i.MembershipType == Enum.MembershipType.TurboBuildersClub then
  611. table.insert(foundplayers,i)
  612. end
  613. end
  614. elseif listedplayer:lower() == "obc" then
  615. for _,i in pairs(Players:GetChildren()) do
  616. if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
  617. table.insert(foundplayers,i)
  618. end
  619. end
  620. elseif listedplayer:lower() == "anybc" then
  621. for _,i in pairs(Players:GetChildren()) do
  622. if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub or i.MembershipType == Enum.MembershipType.TurboBuildersClub or i.MembershipType == Enum.MembershipType.BuildersClub then
  623. table.insert(foundplayers,i)
  624. end
  625. end
  626.  
  627. --[[elseif listedplayer:lower():sub(1,4) == "team" then
  628.  
  629. local team = listedplayer:lower():sub(6)
  630. local matchedteam
  631.  
  632. for _,i in pairs(Teams:GetChildren()) do
  633. if i:IsA("Team") then
  634. if i.Name:lower():sub(1,#team) == team:lower() then
  635. if not matchedteam then
  636. matchedteam = i
  637. else
  638. error("Team \""..team.."\" is ambiguous.")
  639. end
  640. end
  641. end
  642. end
  643.  
  644. assert(matchedteam,"No teams matching \""..team.."\" found.")
  645.  
  646. for _,i in pairs(Players:GetPlayers()) do
  647. if i.TeamColor == matchedteam.TeamColor then
  648. table.insert(foundplayers,i)
  649. end
  650. end]]
  651.  
  652. end
  653.  
  654. local currentfoundplayer
  655. for _,i in pairs(Players:GetPlayers()) do
  656. if i.Name:lower():sub(1,#listedplayer) == listedplayer:lower() then
  657. if not currentfoundplayer then
  658. currentfoundplayer = i
  659. else
  660. Tabby((str.." is ambiguous"),clickremove,spokenplayer,10,'Bright red')
  661. end
  662. end
  663. end
  664. table.insert(foundplayers,currentfoundplayer)
  665. end
  666. --assert(foundplayers[1],"No players were found matching \""..str.."\"")
  667. if foundplayers[1] == nil then Tabby('No players specified...',clickremove,spokenplayer,10,'Bright blue') end
  668. return foundplayers
  669. end
  670.  
  671.  
  672.  
  673.  
  674. --[[function NLS(source,player,delayTime)
  675. if script.ClassName == 'LocalScript' then
  676. local ls = script:Clone() ls.Disabled = true
  677. ls.Parent = player.Character or player.PlayerGui or player.Backpack or nil
  678. local code = Instance.new('StringValue',ls) code.Name = 'code'
  679. code.Value = starter..source
  680. coroutine.wrap(function(ls,delayTime)
  681. delay(delayTime,function()ls.Disabled = false end)
  682. end)(ls,delayTime)
  683. elseif script.ClassName == 'Script' then
  684. if script:FindFirstChild('LS') ~= nil then
  685. local ls = script.LS:Clone()
  686. ls.Source = starter..source
  687. ls.Parent = player.Character or player.PlayerGui or player.Backpack or nil
  688. coroutine.wrap(function(ls,delayTime)
  689. delay(delayTime,function()ls.Disabled = false end)
  690. end)(ls,delayTime)
  691. end
  692. end
  693. end
  694. ]]--
  695. function addCommand(name,desc,func,...)
  696. local tuple = {...}
  697. local new = {Name = name; Description = desc; Run = function(...) func(...) end ; Aliases = tuple;}
  698. rawset(COMMANDS,name,new)
  699. end
  700.  
  701. addCommand('Kill','Kills specified player(s)', function(str,chatter)
  702. local plrs = utils.GetPlayersFromString(str,chatter)
  703. for _,v in pairs(plrs) do
  704. if v.Character ~= nil then
  705. v.Character:BreakJoints()
  706. Tabby(('Killed: '..tostring(v.Name)), clickremove,chatter,12,'Bright blue')
  707. end
  708. end
  709.  
  710. end,
  711. 'kl','die','dk')
  712.  
  713. addCommand('DuckOut','Pings a duck tab',function(str,chatter)
  714. local rep = (str:match('=(%d+)='))
  715. local str = str:gsub('=(%d+)=',"")
  716. local str = utils.encode(str:gsub('','\5'))
  717. for i = 1,(rep or 1) do
  718. local colors={'Bright green','Bright blue','Bright yellow','Bright orange'}
  719. Tabby(tostring(utils.decode(str)),clickremove,chatter,30+math.random(1,12),colors[math.random(1,#colors)])
  720. end
  721. end,
  722. 'out','quack','du','duck','dd')
  723.  
  724. function displayRecurse(_,__,plr)
  725. dismiss(nil,nil,plr)
  726. for _,v in pairs(COMMANDS) do
  727. Tabby(v, nil,plr,30+math.random(1,30),'Bright green')
  728. end
  729. end
  730.  
  731. addCommand('Commands','Displays the commands -_-',function(str,chatter)
  732. displayRecurse(nil,nil,chatter)
  733. end,
  734. 'cmds','cmd','ducks')
  735.  
  736. addCommand('Swarm','Sends a rocket propelled duck at specified player(s)',function(str,chatter)
  737.  
  738. local plrs = utils.GetPlayersFromString(str,chatter)
  739.  
  740. for _,v in pairs(plrs) do
  741.  
  742. local alive,character,head,torso,neck,humanoid = checkAlive(v)
  743.  
  744. if alive then
  745.  
  746. Tabby('Swarmed: '..tostring(v.Name), clickremove,chatter,15,'Bright blue')
  747.  
  748. local duck = Instance.new('Part',Workspace)
  749. duck.Size = Vector3.new(3,3,3)
  750. duck.Anchored = true
  751. duck.CanCollide = false
  752. duck.Position = torso.CFrame.p + Vector3.new(math.random(-100,100),math.random(0,20),math.random(-100,100))
  753. duck.Locked = true
  754.  
  755. local m = Instance.new('SpecialMesh',duck)
  756. m.MeshId = "http://www.roblox.com/asset/?id=9419831";
  757. m.TextureId = "http://www.roblox.com/asset/?id=9419827";
  758. m.Scale = Vector3.new(3.1,3.1,3.1)
  759.  
  760. local sound = Instance.new('Sound',duck)
  761. sound.SoundId = "http://www.roblox.com/asset/?id=9413300"
  762. sound.Name = 'LoopQuack'
  763. sound.Looped = true
  764. sound:Play()
  765.  
  766. local explosionSound = Instance.new('Sound',duck)
  767. explosionSound.SoundId = 'rbxasset://sounds/collide.wav'
  768. explosionSound.Name = 'Explosion'
  769. explosionSound.Pitch = 1.2
  770. coroutine.wrap(function(duck)
  771. RunService.Stepped:connect(function()
  772. pcall(function()
  773. duck.Anchored = true
  774. end)
  775. end)
  776. end)
  777. coroutine.wrap(function(duck)
  778.  
  779. local lastCF = duck.CFrame
  780. local lastsize
  781. local ts = {}
  782. while duck ~= nil do
  783. wait()
  784.  
  785. if duck == nil then break end
  786.  
  787. local current = duck.CFrame
  788.  
  789. if current ~= lastCF then
  790.  
  791. local distance = (current.p - lastCF.p).magnitude + (.45 * duck.Size.z)
  792. local trail = Instance.new('Part',Workspace)
  793. trail.BrickColor = BrickColor.new('Bright yellow')
  794. trail.Anchored = true
  795. trail.Transparency = 0.2
  796. trail.TopSurface,trail.BottomSurface = 'Smooth','Smooth'
  797. trail.Size = Vector3.new(1,1,distance)
  798. trail.CFrame = CFrame.new(lastCF.p,current.p) * CFrame.Angles(0,0,distance/2)
  799. table.insert(ts,trail)
  800.  
  801. end
  802.  
  803. for _,v in pairs(ts) do
  804. if v ~= nil then
  805. v.Transparency = v.Transparency + .1
  806. if v.Transparency >= 1 then
  807. table.remove(ts,_)
  808. v:remove()
  809. end
  810. end
  811. end
  812.  
  813. lastCF = duck.CFrame
  814. end
  815. end)(duck)
  816.  
  817. coroutine.wrap(function(duck,torso,explosionSound,m)
  818. local start = time()
  819. local wad = 0
  820. local bool = false
  821. local lastCF = duck.CFrame
  822.  
  823. while duck ~= nil and torso ~= nil do
  824. wait()
  825.  
  826. if bool then
  827. wad = wad + 1
  828. if wad == 8 then
  829. bool = false
  830. end
  831. else
  832. wad = wad - 1
  833. if wad == -8 then
  834. bool = true
  835. end
  836. end
  837.  
  838. --if (wad == 0 and bool) then wad = 1 elseif (wad == 0 and not bool) then wad = -1 else wad = 0 end
  839.  
  840. local past = time() - start
  841.  
  842. local smodlen = math.abs((0.5*(math.sin(3*past)+math.sin(4*past)))/5)
  843.  
  844. local smodw = math.abs(math.sin(past*10))
  845.  
  846. local speed = (past/(math.pi*3)%(33))
  847.  
  848. m.Scale = Vector3.new((speed*math.pi)+smodw+smodlen,(speed*math.pi)+smodw+smodlen,(speed*math.pi)+smodw+smodlen)
  849.  
  850. local rate = 5
  851.  
  852.  
  853. local rot = (wad * speed * 10)
  854. duck.CFrame = CFrame.new(duck.CFrame.p, (torso.CFrame).p)
  855. duck.CFrame = duck.CFrame * CFrame.new(0,0,(-1*speed)) * CFrame.Angles(0,math.rad(rot/math.pi),0) --waddle waddle, and he waddled away
  856.  
  857. if (duck.CFrame.p - torso.CFrame.p).magnitude <=2.5 then
  858. local mp = utils.MidPoint(duck.CFrame.p,torso.CFrame.p)
  859. local e = Instance.new('Explosion',Workspace)
  860. e.Position = mp
  861. e.Hit:connect(function(v) pcall(function()v:BreakJoints()end) end)
  862. --local mini = {0.05,0.1,0.2,0.15,0.25}
  863. local colors = {'Bright orange','Bright yellow', 'Bright yellow', 'Bright yellow'}
  864. for i = 1,math.random(6,15) do
  865. local confetti = Instance.new('Part',Workspace)
  866. confetti.FormFactor = 'Custom'
  867. confetti.Size = Vector3.new(.5,.5,.5)
  868. confetti.BrickColor = BrickColor.new(colors[math.random(1,#colors)])
  869. confetti.CFrame = CFrame.new(mp) * utils.RandomCFrame(.02,200) * utils.RandomCFrameAngles(5,72,true)
  870. Debris:AddItem(confetti,math.random(5,10))
  871.  
  872. local sparkles = Instance.new('Sparkles',confetti)
  873. sparkles.Color = Color3.new(0,0.8,0.85)
  874.  
  875. local fire = Instance.new('Fire',confetti)
  876.  
  877. explosionSound:Play()
  878.  
  879. end
  880. duck:remove()
  881. pcall(function()v.Character:BreakJoints()end)
  882. break
  883. end
  884. end
  885. end)(duck,torso,explosionSound,m)
  886.  
  887. else
  888.  
  889. end
  890.  
  891. end
  892.  
  893. end,
  894. 'sd','rocket','rpd')
  895.  
  896.  
  897. addCommand('ForceField','Puts a ff on specified player(s)',
  898. function(str,chatter)
  899. local plrs = utils.GetPlayersFromString(str,chatter)
  900. for _,v in pairs(plrs) do
  901. if v.Character ~= nil then
  902. Instance.new('ForceField',v.Character)
  903. Tabby('Gave ForceField to: '..tostring(v.Name), clickremove,chatter,15,'Bright blue')
  904. end
  905. end
  906. end
  907. ,'ff','fof')
  908. addCommand('MakeDuck','Makes a duck',
  909. function(str,chatter)
  910. local duck = Instance.new('Model',Workspace)
  911. duck.Name = 'Duck'
  912. local torso = Instance.new('Part',duck)
  913. torso.FormFactor = 'Custom'
  914. torso.Size = Vector3.new(1.5,1.5,1.5)
  915. torso.Name = 'Torso'
  916. torso.Position = Vector3.new(math.random(-20,20),math.random(5,10),math.random(-20,20))
  917. local quack = Instance.new('Sound',torso)
  918. quack.SoundId = 'http://www.roblox.com/asset/?id=9413300'
  919. quack.Volume = 1.1
  920. local head = Instance.new('Part',duck)
  921. head.FormFactor = 'Custom'
  922. head.Size = Vector3.new(.75,.75,.75)
  923. head.Name = 'Head'
  924. head.Transparency = 0.9
  925. head.CanCollide = false
  926. local weld = Instance.new('Weld',torso)
  927. weld.Part0,weld.Part1 = torso,head
  928. --weld.C1 = CFrame.new(0,0,0)
  929. local humanoid = Instance.new('Humanoid',duck)
  930. local m = Instance.new('SpecialMesh',torso)
  931. m.MeshType = Enum.MeshType.FileMesh
  932. m.MeshId = "http://www.roblox.com/asset/?id=9419831";
  933. m.TextureId = "http://www.roblox.com/asset/?id=9419827";
  934. m.Scale = Vector3.new(1.1,1.1,1.1)
  935. coroutine.wrap(function(duck,torso,head,weld,humanoid,quack)
  936. torso.Touched:connect(function(hit)
  937. coroutine.resume(coroutine.create(function()
  938. local hum = hit.Parent:FindFirstChild('Humanoid')
  939. if hum then
  940. ChatService:Chat(torso,utils.decode('2018325765242042355110043259892121910845241922142023321FA2178F'))
  941. wait(.5)
  942. local ex = Instance.new('Explosion',Workspace)
  943. ex.Position = hit.Position
  944. duck:remove()
  945. end
  946. end))
  947. end)
  948. local run = true
  949. humanoid.Died:connect(function()run=false;end)
  950. while (duck and torso and head and weld) ~= nil do
  951. wait(math.random(2,5))
  952. if not run then break end
  953. local jump = math.random(1,5) if jump == 2 then humanoid.Jump = true end
  954. local ray = Ray.new(head.CFrame.p,((Vector3.new(math.random(-10,10),-.22,math.random(-10,10))-head.CFrame.lookVector)*50),true)
  955. local rayPart = utils.DrawRay(ray, Workspace)
  956. Debris:AddItem(rayPart,2)
  957. local hit,pos = Workspace:FindPartOnRayWithIgnoreList(ray,{duck},true)
  958. if hit and pos then
  959. quack.Pitch=utils.RandomNumber(.1,1)wait();quack:Play()
  960. humanoid:MoveTo(pos, Terrain)
  961. end
  962. end
  963. end)(duck,torso,head,weld,humanoid,quack)
  964. end,
  965. 'md','create'
  966. )
  967. addCommand('FallingDucks','Spawns exploding ducks in the air for specified time',
  968. function(str,chatter)
  969. local str = str:lower()
  970. local str_tab = utils.split(str," ")
  971.  
  972. local numb = tonumber(str_tab[1])
  973. local str = tostring(str_tab[2])
  974. local plrz = tostring(str_tab[3])
  975.  
  976. if plr ~= nil then
  977. local length = string.len(numb) + string.len(str) + 2
  978. plrz = string.sub(str,length,string.len(str))
  979. end
  980.  
  981.  
  982. local pos = {}
  983.  
  984. if plrz ~= nil then
  985.  
  986. local a = utils.GetPlayersFromString(plrz,chatter)
  987.  
  988. for _,v in pairs(a) do
  989.  
  990. local alive,character,head,torso,neck,humanoid = checkAlive(v)
  991.  
  992. if alive then
  993. table.insert(pos,torso.CFrame.p)
  994. Tabby('Let ducks fall upon: '..utils.VectorToString(torso.CFrame.p), clickremove,chatter,15,'Bright blue')
  995. end
  996. end
  997. end
  998.  
  999. if numb ~= nil then
  1000.  
  1001. if type(numb) == 'number' then
  1002.  
  1003. local function convert(n,str)
  1004.  
  1005. if str ~= nil then
  1006. if string.sub(str,1,3) == 'sec' then return 1 * n
  1007. elseif string.sub(str,1,3) == 'min' then return 60 * n
  1008. elseif string.sub(str,1,4) == 'hour' then return 360 * n
  1009. elseif string.sub(str,1,3) == 'day' then return 8640 * n
  1010. else return n * 1
  1011. end
  1012. else return n * 1
  1013. end
  1014.  
  1015. end
  1016.  
  1017. local tim = convert(numb,str)
  1018.  
  1019. if #pos >= 1 then
  1020. for _,v in pairs(pos) do
  1021. coroutine.wrap(function(tim,v)
  1022.  
  1023. for rep = 1,tim do
  1024. wait(1)
  1025. local duck = Instance.new('Part',Workspace)
  1026.  
  1027. local m = Instance.new('SpecialMesh',duck)
  1028. m.MeshId = "http://www.roblox.com/asset/?id=9419831";
  1029. m.TextureId = "http://www.roblox.com/asset/?id=9419827";
  1030. m.Scale = Vector3.new(2,2,2)
  1031.  
  1032. duck.CFrame = CFrame.new(v + Vector3.new(math.random(-20,20),math.random(50,70),math.random(-20,20)))
  1033. duck.Velocity = (v - duck.CFrame.p).unit * math.random(1,100)
  1034. duck.RotVelocity = utils.RandomVector(1,20)
  1035. duck.Name = 'Duck'
  1036.  
  1037. duck.Touched:connect(function(h)
  1038. if h.Name ~= 'Duck' and h.Name ~= 'Confetti' and h.Name ~= 'Handle' then
  1039. --local mini = {0.05,0.1,0.2,0.15,0.25}
  1040. local colors = {'Bright orange','Bright yellow', 'Bright yellow', 'Bright yellow'}
  1041. coroutine.wrap(function(duck)
  1042. local ex = Instance.new('Explosion',Workspace)
  1043. ex.Position = duck.CFrame.p
  1044. for i = 1,math.random(1,3) do
  1045. wait()
  1046. local confetti = Instance.new('Part',Workspace)
  1047. confetti.FormFactor = 'Custom'
  1048. confetti.Size = Vector3.new(.5,.5,.5)
  1049. confetti.BrickColor = BrickColor.new(colors[math.random(1,#colors)])
  1050. confetti.CFrame = duck.CFrame * utils.RandomCFrame(.02,200) * utils.RandomCFrameAngles(5,72,true)
  1051. confetti.Name = 'Confetti'
  1052. Debris:AddItem(confetti,math.random(5,10))
  1053.  
  1054. local sparkles = Instance.new('Sparkles',confetti)
  1055. sparkles.Color = Color3.new(0,0.9,0.85)
  1056.  
  1057. local fire = Instance.new('Fire',confetti)
  1058. end
  1059.  
  1060. duck:remove()
  1061. end)(duck)
  1062. end
  1063. end)
  1064.  
  1065. end
  1066.  
  1067. end)(tim,v)
  1068. end
  1069. end
  1070.  
  1071. end
  1072. end
  1073. end,
  1074. 'falld','fds','meteorshower','quackshower')
  1075.  
  1076.  
  1077. --[[
  1078. local mouse = Players.LocalPlayer:GetMouse()
  1079.  
  1080.  
  1081. local chatGUI=Instance.new('ScreenGui',Players.LocalPlayer.PlayerGui)
  1082. local chatBox=Instance.new('TextBox',chatGUI)
  1083. chatBox.FontSize = Enum.FontSize.Size24;
  1084. chatBox.TextWrap = true;
  1085. chatBox.Text = "/";
  1086. chatBox.BorderSizePixel = 0;
  1087. chatBox.Size = UDim2.new(0, 815, 0, 50);
  1088. chatBox.TextColor3 = Color3.new(0, 0, 0);
  1089. chatBox.BackgroundTransparency = 1;
  1090. chatBox.Font = Enum.Font.SourceSansBold;
  1091. chatBox.Position = UDim2.new(0, 25, 0, 0);
  1092. chatBox.BackgroundColor3 = Color3.new(1, 1, 1);
  1093.  
  1094. chatBox.FocusLost:connect(function(pressed)
  1095. if not pressed then return end
  1096. local str = tostring(chatBox.Text)
  1097. local first = str:match('[^;,! ]+')
  1098. local after = string.sub(str,string.len(first)+2,string.len(str))
  1099. local prompt = COMMANDS[first]
  1100. if prompt then
  1101. prompt.Run(after, Players.LocalPlayer)
  1102. end
  1103. end)
  1104.  
  1105. mouse.KeyDown:connect(function(key)
  1106. key = key:lower()
  1107. if string.byte(key) == 92 then --\
  1108. chatBox:CaptureFocus()
  1109. end
  1110. end)
  1111. ]]--
  1112.  
  1113. function checkPlayer(plr)
  1114. if getRank(plr.Name)>0 then
  1115. GiveChat(plr)
  1116. elseif getRank(plr.Name)<0 then
  1117. pcall(function()
  1118. plr.Parent = nil
  1119. plr:remove()
  1120. plr:destroy()
  1121. plr:Kick()
  1122. end)
  1123. end
  1124. end
  1125.  
  1126. function GiveChat(plr)
  1127.  
  1128. plr.Chatted:connect(function(str)
  1129. local first = str:match('[^;,! ]+')
  1130. local after = string.sub(str,string.len(first)+2,string.len(str))
  1131. local prompt = COMMANDS[first]
  1132. if prompt then
  1133. prompt.Run(after, plr)
  1134. else
  1135. local str = utils.encode(str)
  1136. local apple = utils.decode(str)
  1137. ChatService:Chat(plr.Character.Head,apple) --I have no idea
  1138. end
  1139. end)
  1140. end
  1141.  
  1142. for _,v in pairs(Players:GetPlayers()) do checkPlayer(v) end
  1143. Players.PlayerAdded:connect(function(plr) checkPlayer(plr) end)
  1144.  
  1145. local rot=0
  1146.  
  1147.  
  1148. coroutine.resume(coroutine.create(function()
  1149. RunService.Stepped:connect(function()
  1150.  
  1151. for i=1,#TABS do -- I tried ... ._.
  1152. if TABS[i] == nil then
  1153. table.remove(TABS,i)
  1154. else
  1155.  
  1156. if (TABS[i]:FindFirstChild('Player')) ~= nil then
  1157. local plr = Players:FindFirstChild(TABS[i].Player.Value)
  1158. if not plr then table.remove(TABS,i);pcall(function()TABS[i]:remove()end) end
  1159. end
  1160.  
  1161. end
  1162. end
  1163. rot=(rot % 360) + .0005
  1164. for i,v in pairs(TABS) do --spiiny stolen from som1 :P
  1165. local val = v:FindFirstChild('Player')
  1166. if v ~= nil and val ~= nil then
  1167. if Players:FindFirstChild(val.Value) ~= nil then
  1168. local plr = Players:FindFirstChild(val.Value)
  1169. if plr.Character ~= nil then
  1170. if plr.Character:FindFirstChild('Torso') ~= nil then
  1171. local tabbies = {}
  1172. for ii,xx in pairs(v:GetChildren()) do
  1173. if xx.Name == '.__.' then
  1174. table.insert(tabbies,xx)
  1175. end
  1176. end
  1177. for i = 1,#tabbies do
  1178. if tabbies[i] == nil then
  1179. table.remove(tabbies,i);
  1180. end
  1181. end
  1182. for i_i,x_x in pairs(tabbies) do
  1183. local pos = plr.Character.Torso.CFrame
  1184. local a = #tabbies
  1185. local radius = math.pi + a
  1186. local x = math.sin((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius
  1187. local y = math.tan((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius
  1188. local z = math.cos((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius
  1189. local arot = Vector3.new(x, 0, z) + pos.p
  1190. local brot = x_x.CFrame.p
  1191. local crot = (arot * .1 + brot * .9)
  1192.  
  1193.  
  1194. x_x.CFrame = CFrame.new(crot, pos.p)
  1195. --x_x.CFrame = v.CFrame*CFrame.Angles(0,math.rad(1),0)
  1196. end--loop
  1197.  
  1198. else table.remove(TABS,i); v:remove()
  1199. end--does plr have torso?
  1200. else table.remove(TABS,i); v:remove()
  1201. end--does plr have char?
  1202. else table.remove(TABS,i); v:remove()
  1203. end--is dere aplyer?
  1204. else table.remove(TABS,i); v:remove()
  1205. end--is there a modle?
  1206.  
  1207.  
  1208. end
  1209.  
  1210. end)
  1211. end
  1212. )
  1213. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement