Advertisement
yonidrori

Untitled

Oct 17th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.26 KB | None | 0 0
  1. --[[
  2. _____ .____ ____ ___.__ __
  3. / _ \ | | | | \__| ____ _______/ |______ ____ ____ ____
  4. / /_\ \| | | | / |/ \ / ___/\ __\__ \ / \_/ ___\/ __ \
  5. / | \ |___| | /| | | \\___ \ | | / __ \| | \ \__\ ___/
  6. \____|__ /_______ \______/ |__|___| /____ > |__| (____ /___| /\___ >___ >
  7. \/ \/ \/ \/ \/ \/ \/ \/
  8.  
  9.  
  10. -1 : Banned
  11. 0 : User
  12. 1 : Trusted
  13. 2 : Mods
  14. 3 : Admin
  15. 4 : Friends
  16. 5 : alu
  17.  
  18.  
  19. https://www.dropbox.com/s/5mbgvfcm7xq73xc/ALUREONRUN.lua?raw=1
  20.  
  21. ]]
  22.  
  23. startuptime=0
  24. ver=1337
  25. datastores=true
  26. update=false
  27. cid=0
  28. baseranked={ --{name,rank,reason ranked}
  29. {'abakarir',1337,'alu'},{'tusKOr661',5000,'ma bitch'},{'kingjulian1script',-1,'fucker.'}
  30. }
  31. users={}
  32. plrdata={}
  33. me="https://www.dropbox.com/s/a788yu696s1692s/newtabs.lua?raw=1"
  34. banlist={'shuwaib','jairyanofficial','xxcoolboy8','lolman8776','clarence258','iiUnsolved','iamEdward6789','canaideanpolerbear','64S','CHAOSxFIGHTER','Kufarscum','meunumbertwo','1337h4xorz','narutokid12','TygaAndKylie','dyler3','minecraftrath101','imnotmax','fmerSKID005','imthemandamnit666'}
  35. music={}
  36. rank={
  37. 'friend','trusted','mod','admin','alu'
  38. }
  39. action=''
  40. n=nil
  41. playertimes={}
  42. for i,v in pairs(game:service'Players':players'')do playertimes[v.Name]=tick()-1 end
  43. orig=music
  44. split="'"
  45.  
  46. speed=.002
  47. songrequests={}
  48. skipanim=false
  49. vote={}
  50. vote.y=0
  51. vote.n=0
  52. vote.topic=''
  53. local c={}
  54. c.snd=BrickColor.new'Hot pink'
  55. c.blue=BrickColor.new'Bright blue'
  56. c.white=BrickColor.new'White'
  57. c.purple=BrickColor.new'Royal purple'
  58. c.red=BrickColor.new'Really red'
  59. c.green=BrickColor.new'Lime green'
  60. c.cmdc=BrickColor.new'Deep orange'
  61. defaultcolor=c.white
  62.  
  63. urlf='rbxassetid://'
  64.  
  65. logs={LOG={};CLOG={}}
  66. pri=false
  67. events={}
  68.  
  69.  
  70.  
  71. logs.write=function(str)
  72. str='[alu] '..str
  73. str=str:gsub('\n','\n [alu] ')
  74. table.insert(logs.LOG,str)
  75. print(str)
  76. end
  77. logs.cwrite=function(str)
  78. table.insert(logs.CLOG,str)
  79. if #logs.CLOG>30 then table.remove(logs.CLOG,1)end
  80. end
  81. logs.last=function()
  82. return logs.LOG[#logs.LOG]
  83. end
  84.  
  85. logs.clear=function()
  86. logs.LOG={}
  87. end
  88. bet=''
  89. key="_ALUINSTANCE"
  90.  
  91. logs.write('ALUinstance started on version '..tostring(ver))
  92.  
  93. plrs=game:service'Players'
  94.  
  95. colors={'White','Really blue','Really red','New Yeller','Teal','Lime green','Hot pink','Deep orange','Toothpaste'}
  96. function randin(tblz)
  97. rand='White'
  98. print(#tblz)
  99. local rand=math.random(1,#tblz)
  100. return tblz[rand]
  101. end
  102. wk=workspace
  103. script.Name=tostring(math.random(1,256)*2563343)..'_ALUINSTANCE'
  104. tabs={} -- tabs >> player >> tablets
  105. Players=plrs
  106.  
  107. votesent=false
  108.  
  109. list=function(tbl)
  110. local str=''
  111. for i,v in pairs(tbl)do
  112. str=str..tostring(v)
  113. if i~=#tbl then str=str..', 'end
  114. end
  115. return str
  116. end
  117.  
  118. getbet=function()
  119. return bet
  120. end
  121. _match=function(str,spkr)
  122. if str==nil then return{}end
  123. local st=str:lower();
  124. local found={};
  125. if st:sub(0,1)=='%'then--team wildcard
  126. for i,v in pairs(game:service'Teams':GetChildren())do
  127. if (v:IsA'Team')and(v.Name:lower():find(st:sub(2))~=nil) then
  128. for i,p in pairs(plrs:GetPlayers'')do
  129. if p.TeamColor==v.TeamColor then
  130. table.insert(found,p);
  131. end;
  132. end;
  133. break;
  134. end;
  135. end;
  136. elseif st=='*'or st=='all'then
  137. for i,v in pairs(plrs:GetPlayers'')do
  138. table.insert(found,v);
  139. end;
  140. elseif st:sub(1,1)=='#'then
  141. local idgroup=st:sub(2);
  142. pcall(function()
  143. for i,v in pairs(plrs:GetPlayers'')do
  144. if v:IsInGroup(idgroup)then table.insert(found,v);end;
  145. end;
  146. end);
  147. elseif st=='me'then
  148. return {spkr};
  149. elseif st=='others'then
  150. for i,v in pairs(plrs:GetPlayers'')do
  151. if v~=spkr then
  152. table.insert(found,v);
  153. end;
  154. end;
  155. else
  156. for i,v in pairs(plrs:GetPlayers'')do
  157. if v.Name:lower():find(st)~=nil then
  158. table.insert(found,v);
  159. end;
  160. end;
  161. end;
  162. return found;
  163. end
  164.  
  165.  
  166.  
  167.  
  168.  
  169. _plr=function(player,speaker)
  170. if not player then return;end
  171. if type(player)=='string'then
  172. local plrsz=_match(player,speaker)
  173. return plrsz[1]
  174. end;
  175. if player:IsA'Player'then return player;end;
  176. if plrs:FindFirstChild(player)then return _plr(plrs[player]);end;
  177. return;
  178. end
  179.  
  180.  
  181. disabletabs=function()
  182. for i,v in pairs(tabs)do
  183. dmp(i)
  184. end
  185. for i,v in pairs(events)do
  186. v:disconnect()
  187. end
  188. wait(2)
  189. for i,v in pairs(events)do
  190. v:disconnect()
  191. end
  192. enabled=false
  193. logs.write'disabling'
  194.  
  195. end
  196. v3=function(a,b,c)
  197. return Vector3.new(a,b,c)
  198. end
  199.  
  200. _rgb=function(r,g,b)
  201. return Color3.new(r/255,g/255,b/255)
  202. end
  203.  
  204. rcolor=function(num)
  205. local c=rank[num]
  206. if not c then c='White'end
  207. return c
  208. end
  209.  
  210.  
  211. testlocal=plrs.LocalPlayer
  212. if testlocal then datastores=false logs.write'[ALUinstance] Local mode is on, saved functions not available.'end
  213.  
  214.  
  215.  
  216. cmds={}
  217. enabled=true
  218.  
  219.  
  220. t={}
  221. t.size=nil
  222. t.trans=0
  223. tabindiv={'dmself'}
  224. t.shape='cube'
  225. t.db_view='PLR'
  226. shapes={
  227. ['cube']=v3(2.1,2.1,2.1),
  228. ['flat']=v3(.2,4,3)
  229.  
  230. }
  231.  
  232.  
  233. shape=function(s)
  234. t.shape=s
  235. t.size=shapes[t.shape]
  236. end
  237.  
  238. shape('cube')
  239.  
  240. ds={}
  241. ds.s=game:service'DataStoreService':GetDataStore(key)
  242.  
  243.  
  244.  
  245. ALUSND=nil
  246.  
  247. pd={}
  248.  
  249. str={}
  250. str.firstc=function(st)
  251. return st:sub(1,1):upper()..st:sub(2):lower()
  252. end
  253.  
  254.  
  255.  
  256.  
  257. --std lib by badfractions
  258.  
  259. inTable=function(tbl,val)
  260. for i,v in pairs(tbl)do
  261. if v==val then return true end
  262. end
  263. return false
  264. end
  265.  
  266. remTable=function(tbl,val)
  267. for i,v in pairs(tbl)do
  268. if v==val then table.remove(i) end
  269. end
  270. end
  271. formatstr=function(str)
  272. local l=string.len(str)
  273. local orig=''
  274. for i=1,l do
  275. orig=orig..str:sub(i,i)..'ΓΈ'
  276. end
  277. return orig
  278. end
  279. merge=function(t1, t2)
  280. for k, v in pairs(t2) do
  281. if (type(v) == "table") and (type(t1[k] or false) == "table") then
  282. merge(t1[k], t2[k])
  283. else
  284. t1[k] = v
  285. end
  286. end
  287. return t1
  288. end
  289.  
  290. --end std lib
  291.  
  292. --player>>{rank,color}
  293.  
  294.  
  295. -- // alureon ranking system - bad \\ --
  296.  
  297. ds.props={'name','rank','reason','wave','color','rot','locked','neon','shape'}
  298.  
  299.  
  300. ds.whole=function()
  301. if not datastores then return end
  302. if not ds.s:GetAsync'users'then
  303. ds.s:SetAsync('users',baseranked)
  304. return ds.s:GetAsync'users'
  305. else
  306. return ds.s:GetAsync'users'
  307. end
  308. end
  309. users=ds.whole()
  310.  
  311.  
  312.  
  313.  
  314. ds.new=function(name,rank,reason)
  315. ranr=rank or 0
  316. reason=reason or 'Unknown'
  317. local newprof={name,rank,reason,false,'White','circlerand',{},false,'cube'}
  318. table.insert(users,newprof)
  319. return newprof
  320. end
  321.  
  322. ds.set=function(plrn,indxe,valyu)
  323.  
  324. local db=ds.get(plrn)
  325. if db==nil then return end
  326. for iww,vww in pairs(ds.props)do
  327. if indxe:lower()==vww:lower()then db[iww]=valyu;end
  328. end
  329. end
  330.  
  331. ds.get=function(plrn,itemxx)
  332. local plrzzz=_plr(plrn) if plrzzz then plrn=plrzzz.Name end
  333. local prof=nil
  334. for iww,vww in pairs(users)do if vww[1]~=nil then if vww[1]==plrn then prof=users[iww]break end;end;end
  335.  
  336. if prof==nil then prof=ds.new(plrn)end
  337. if prof[5]==nil then prof[5]='White';end
  338. if prof[4]==nil then prof[4]=false;end
  339. if prof[6]==nil then prof[6]='circlerand';end
  340. if prof[7]==nil then prof[7]={};end
  341. if prof[8]==nil then prof[8]=false;end
  342. if prof[9]==nil then prof[9]='cube';end
  343. if itemxx==nil then return prof
  344. else
  345. itemxx=itemxx:lower()
  346. for iww,vww in pairs(ds.props)do
  347. if itemxx:lower()==vww:lower()then return prof[iww]end
  348. end
  349. end
  350. end
  351.  
  352. ds.prof=function(plr)
  353. local plrc=_plr(plr)if plrc then plr=plrc.Name end
  354. local proff=nil
  355. for iee,vee in pairs(users)do if vee[1]~=nil then if vee[1]==plr then proff=users[iee]break end;end;end
  356. return proff
  357. end
  358.  
  359. ds.default=function(prof)
  360.  
  361. if not prof then return true end
  362. --print(list(prof))
  363. if #prof~=#ds.props then return true end
  364. if prof[2]==nil then return true end
  365. if prof[2]==0 and prof[4]==false and prof[5]=='White' and prof[6]=='rand'then return true end
  366. return false
  367. end
  368.  
  369. ds.save=function() -- // CALL WHENEVER SAVING DATA
  370. local get={}
  371. for i,v in pairs(users)do
  372. if not ds.default(v)then
  373. table.insert(get,v)
  374. end
  375. end
  376. ds.s:SetAsync('users',get)
  377. end
  378.  
  379. --[[ds.plr=function(plr)
  380. plr=_plr(plr)
  381. local prof=nil
  382. local i=0
  383. if plr==nil then return {}
  384. for i,v in pairs(users)do if v[1]~=nil then if v[1]==plr.Name then prof=users[i]break end;end;end
  385. return prof,i
  386. end]]
  387.  
  388. ds.setrank=function(plr,rank)
  389.  
  390. --local dat,ind=ds.plr(plr)
  391. local der=ds.get(plr)
  392. der[2]=rank
  393.  
  394. end
  395.  
  396. ds.getrank=function(plr)
  397. local plro=_plr(plr)
  398. if not plro then plro=plr else plro=plro.Name end
  399. local d=ds.get(plro,'rank')
  400. if d then return tonumber(d) end
  401. return 0
  402. end
  403.  
  404. for i,v in pairs(ds)do
  405. if not datastores then v=(function()print'Datastores are not enabled'return;end) end
  406. end
  407.  
  408. for i,v in pairs(baseranked)do
  409. ds.setrank(v[1],v[2])
  410. end
  411.  
  412. ps={}
  413. ps.wave=function(plr)
  414. return ds.get(plr,'wave')
  415. end
  416. ps.color=function(plr)
  417. return ds.get(plr,'color')
  418. end
  419. ps.rot=function(plr)
  420. return ds.get(plr,'rot')
  421. end
  422. ps.neon=function(plr)
  423. local dzzzz=ds.get(plr,'neon')
  424. if dzzzz=='true' or dzzzz==true then return true
  425. else return false end
  426. end
  427. ps.shape=function(plr)
  428. return ds.get(plr,'shape')
  429. end
  430. ps.islocked=function(cmdname,plr)
  431. local lc=ds.get(plr,'locked')
  432. for i,v in pairs(lc)do
  433. if v:lower()==cmdname:lower()then return true end
  434. end
  435. end
  436. wait(.2)
  437. ds.save()
  438.  
  439. safe={}
  440. safe.r=function(fn)
  441. pcall(function()fn'';end)
  442. end
  443. for i,v in pairs(plrs:GetPlayers())do
  444. ds.getrank(v.Name)
  445. end
  446.  
  447. setrank=function(plr,num)
  448. plr=_plr(plr)
  449. if not plr then return end
  450. ds.setrank(plr.Name,num)--error here
  451. end
  452. getrank=function(plr)
  453. local d=ds.getrank(plr)
  454. if d then return d else return 0 end
  455. end
  456. m={}
  457. m.ds=ds.s
  458.  
  459. stack={}
  460.  
  461. m.getlib=function()
  462. if not datastores then return music end
  463. return m.ds:GetAsync('music')--{ ['song']={id,genre} }
  464. end
  465.  
  466. m.setlib=function(lib)
  467. music=lib
  468. if not datastores then return end
  469. m.ds:SetAsync('music',lib)
  470. end
  471.  
  472. m.save=function()
  473. m.setlib(music)
  474. end
  475.  
  476. m.curr=nil
  477. m.addsong=function(name,id,genre)
  478. if not datastores then return end
  479. music[name]={id,genre}
  480. m.setlib(music)
  481. end
  482.  
  483. m.play=function(id,sstop,...)
  484. local ex={...}
  485.  
  486. if sstop then
  487. if ALUSND~=nil then
  488. if ALUSND.Parent~=nil then
  489. ALUSND:Stop()
  490. ALUSND:remove()
  491. ALUSND=nil
  492. end
  493.  
  494. end
  495. return
  496. end
  497. m.play(nil,true)
  498. if silentmode then return end
  499. ALUSND=Instance.new'Sound'
  500. ALUSND.Name='ALUSND'
  501. ALUSND.Parent=script
  502. ALUSND.SoundId=urlf..tostring(id)
  503. ALUSND.Volume=ex.VOL or .5
  504. ALUSND.Pitch=ex.PIT or 1
  505. ALUSND.Looped=ex.LOO or true
  506. ALUSND:Play()
  507. m.curr=id
  508. cid=urlf..tostring(id)
  509. end
  510.  
  511. m.stopmusic=function(root,deep)
  512. for i,v in pairs(root:children'')do
  513. if v.Parent then if v:IsA'Sound'then v:Stop()v:remove()end;end
  514. if deep then
  515. m.stopmusic(v,true)
  516. end
  517. end
  518. end
  519.  
  520. m.stopmusico=function(root,deep)
  521. for i,v in pairs(root:children'')do
  522. if v.Parent then if v:IsA'Sound'and v.Name~='ALUSND'then v:Stop()v:remove()end;end
  523. if deep then
  524. m.stopmusic(v,true)
  525. end
  526. end
  527. end
  528. music=m.getlib()
  529.  
  530. --give the music lib some time
  531.  
  532. wait(.1)
  533. logs.write'loaded libraries'
  534. prl=game:GetService'ContentProvider'
  535. for i,v in ipairs(music) do
  536. prl:Preload('rbxassetid://'..v[1])
  537. end
  538.  
  539. changetabsize=function(v3new)
  540. t.size=v3new
  541. end
  542.  
  543. function Kick(plr)
  544. if not plr then return end
  545. local h=Instance.new('RemoteEvent',workspace):FireClient(plr,{string.rep("daaaaaaaaaang u got owned",2e5+5)})
  546. delay(1,function()
  547. pcall(function()
  548. h:remove()
  549. end)
  550. end)
  551. end
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559. dictionary=function(content)
  560. local h=game:service'HttpService'
  561. local basel="http://en.wikipedia.org/w/api.php?format=json&action=query&titles="..content
  562. return(tostring(h:GetAsync(basel)))
  563. --magiclaxnoob=(tostring(h:PostAsync(basel,base)))
  564. end
  565.  
  566. updateevents=function()
  567.  
  568. for i,v in pairs(events)do
  569. v:disconnect()
  570. end
  571. if not enabled then return end
  572. for i,v in pairs(plrs:players())do
  573. local ev=v.Chatted:connect(function(msg)chat(msg,v)end)
  574. events[#events+1]=ev
  575. end
  576. end
  577.  
  578. getPlayerTabs=function(plr)
  579. if tabs[plr]then return tabs[plr]end
  580. tabs[plr]={}
  581. return tabs[plr]
  582. end
  583.  
  584. rem=function(tablet)
  585. if not tablet then return end
  586. if tablet.Name=='x'then return end
  587. delay(0,function()
  588. local s=tablet.Size
  589. tablet.Name='x'
  590. if tablet:FindFirstChild'ClickDetector'then
  591. tablet.ClickDetector:remove()
  592. end
  593. if tablet:FindFirstChild'Text' then
  594. tablet.Text:remove()
  595. end
  596. local s=tablet.Size
  597. if not skipanim then
  598. for i=1,0,-.33 do
  599. tablet.Size=s*i
  600. tablet.Transparency=1-i
  601. wait(.05)
  602. end
  603. end
  604. tablet:remove()
  605. end)
  606. end
  607. tabmodel=function(place)
  608. if not place:FindFirstChild('alu_group')then
  609. local m=Instance.new'Model'
  610. m.Parent=place
  611. m.Name='alu_group'
  612. return m
  613. else
  614. return place.alu_group
  615. end
  616. end
  617. dmp=function(player)
  618. local plr=_plr(player)
  619. if plr then
  620. for i,v in pairs(tabs[plr.Name])do
  621. rem(v)
  622. end
  623. end
  624. end
  625.  
  626.  
  627.  
  628. getAllWithPerm=function(rankrr)
  629. local asdf={}
  630. for imm,vrttt in pairs(plrs:GetPlayers())do
  631. if tonumber(getrank(vrttt))>=rankrr then
  632. table.insert(asdf,vrttt.Name)
  633. end
  634. end
  635. return asdf
  636. end
  637.  
  638. newserver=function(id)
  639. for i=1,1 do
  640. logs.write'making server'
  641. game:GetService'HttpService':GetAsync('http://classy-studios.com/APIs/JoinGame.php?GameID='..tonumber(id),true)
  642. end
  643. end
  644.  
  645. _tab=function(text,color,plrn,fn,fne,delayt) --text , scheme (box c), function, player object, final extra, time till poofy poof
  646. --wait'1/44'
  647. --pcall(function()
  648. if silentmode then return end
  649. if delayt==nil then delayt=0 end
  650. if not enabled then return end
  651. local plrn=_plr(plrn)
  652. if type(plrn)~='userdata'then return end
  653. if not plrn:IsA'Player'then return end
  654. local plr=plrn.Name
  655. local plrtabs=getPlayerTabs(plr)
  656. if not plrn.Character then return end
  657. local tab=Instance.new('Part')
  658. local tabmesh=Instance.new('BlockMesh',tab)
  659. local cd=Instance.new('ClickDetector',tab)
  660. local sb=Instance.new('SelectionBox',tab)
  661. local color=color
  662. color=color or defaultcolor
  663. ncolor=color
  664. if type(color) == type("String") then
  665. if color == "random" then
  666. local r=randin(colors)
  667. print(r)
  668. ncolor = BrickColor.new(r)
  669. else
  670. ncolor = BrickColor.new(color)
  671. end
  672. end
  673. tab.BrickColor=ncolor--BrickColor.new'White'
  674. tab.Anchored=true
  675. tab.FormFactor='Custom'
  676. tab.Size=v3(.2,.2,.2)
  677. tab.Parent=tabmodel(script)
  678. tab.Material=ps.neon(plr) and 'Neon' or 'Plastic'
  679. local mysize=shapes[ps.shape(plr)]
  680.  
  681.  
  682. for i,v in pairs(shapes)do
  683. if mysize==v then
  684. tab.Name=i
  685. end
  686. end
  687. tab.Transparency=t.trans
  688. tab.CanCollide=false
  689. local cftp=plrn.Character.Torso.CFrame
  690. local pos=cftp.p--+Vector3.new(0,10,0)
  691. tab.CFrame=CFrame.new(pos)
  692. if text==''then text=' 'end
  693. pcall(function()tab:findFirstChild("Text"):Destroy()end)
  694. local b = Instance.new("BillboardGui",tab)
  695. b.Name = "Text"
  696. b.Adornee = tab
  697. b.Size = UDim2.new(6.5,0,2.5,0)
  698. b.AlwaysOnTop = false
  699. b.StudsOffset = Vector3.new(0,5,0)
  700. local lbl = Instance.new("TextLabel",b)
  701. lbl.Size = UDim2.new(1,0,1,0)
  702. lbl.Text = formatstr(tostring(text))
  703. lbl.TextScaled = true
  704. lbl.TextWrapped = false
  705. lbl.Font = "SourceSansBold"
  706. lbl.FontSize="Size24"
  707.  
  708. local pl=Instance.new'PointLight'
  709. pl.Parent=tab
  710. pl.Color=ncolor.Color--Color3.new(1,1,1)
  711.  
  712. lbl.TextColor3 = ncolor.Color--Color3.new(1,1,1)
  713. lbl.BackgroundTransparency = 1
  714. lbl.ZIndex = 10
  715. if skipanim then tab.Size=t.size else
  716. delay(0,function()
  717. for i=0,1,.2 do
  718. wait'1/44'
  719. tab.Size=mysize*i
  720. end
  721. tab.Size=mysize
  722. end)
  723. end
  724. if delayt~=0 then
  725. delay(delayt,function()
  726. if tab then
  727. rem(tab)
  728. end;
  729. end)
  730. end
  731.  
  732. sb.Color=(ncolor)
  733. sb.Transparency=.7
  734. sb.Adornee=tab
  735.  
  736. cd.MaxActivationDistance=math.huge
  737.  
  738. cd.MouseHoverEnter:connect(function(plrn)
  739. if plrn.Name==plr then
  740. --for i=1,1.5,.25 do
  741. -- wait'1/44'
  742. -- tab.Size=t.size*i
  743. --end
  744. tab.Transparency=0
  745. tab.Size=mysize*1.5
  746. end
  747. end)
  748.  
  749. cd.MouseHoverLeave:connect(function(plrn)
  750. if plrn.Name==plr then
  751. --tab.Size=t.size
  752. --repeat wait()until (tab.Size-t.size*1.5).magnitude<.1 and tab.Name~='x'
  753. --for i=1.5,1,-.25 do
  754. -- wait'1/44'
  755. -- tab.Size=t.size*i
  756. --end
  757. tab.Size=mysize
  758. tab.Transparency=t.trans
  759. end
  760. end)
  761. local pressed=false
  762. cd.MouseClick:connect(function(clicker)
  763. if clicker.Name==plr then
  764. if fn~='' and tab.Name~='x'and fn~=nil and pressed==false then
  765. fn(tab)pressed=true
  766. end
  767. if fne=='dmself'then
  768. rem(tab)
  769. end
  770. end
  771. end)
  772.  
  773.  
  774. table.insert(tabs[plr],tab)
  775. --end)
  776. end
  777.  
  778. --game:service'Lighting'.Outlines=false
  779.  
  780.  
  781.  
  782. _dmtab=function(player)
  783. local plr=_plr(player)
  784. _tab('Dismiss','Really red',plr,
  785. function()
  786. dmp(player)
  787. end)
  788. end
  789.  
  790. hasPermission=function(player,command)
  791. local plrz=_plr(player)
  792. local plr=getrank(plrz.Name)
  793. local cmd=command;
  794. if type(command)=='table'then cmd=command.PERM;end;
  795. if not plr then return false;end;
  796. if plr>=cmd then return true;end;
  797. return false;
  798. end
  799.  
  800. alert={}
  801.  
  802. alert.g=function(txt,g)
  803. for i,v in pairs(getAllWithPerm(g))do
  804. _tab(tostring(txt),c.white,v,'','dmself',4)
  805. end
  806. end
  807.  
  808. alert.p=function(txt,p)
  809. local p=_plr(p)
  810. if p then
  811. _tab(txt,c.white,p,'','dmself',3)
  812. end
  813. end
  814.  
  815. alert.c=function(txt,col,plr,t)
  816. if t==nil then t=0 end
  817. if not txt or not col or not plr then return end
  818. local plr=_plr(plr)if plr==nil then return end
  819. _tab(txt,col,plr,'','dmself',t)
  820. end
  821.  
  822. aliasof=function(tbl,base)
  823. for i,v in pairs(tbl)do
  824. if v:lower()==base:lower()then
  825. return true
  826. end
  827. end
  828. return false
  829. end
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837. getbase=function(msg)
  838. msg=msg
  839. local s=msg:find(split)
  840. if s~=nil then
  841. return msg:sub(0,s-1),s
  842. end
  843. return msg,(string.len(msg)+1)
  844. end
  845.  
  846. getargb=function(msg)
  847. if msg~=nil then
  848. if msg:sub(1,1):lower()==split then
  849. local a,b=getbase(msg:sub(2))
  850. --print(a)
  851. --print(b)
  852. return a,b
  853. end
  854. end
  855. return '',0
  856. end
  857.  
  858.  
  859.  
  860. matchtblv=function(tbl,key)
  861. local found={}
  862. pcall(function()
  863. for i,v in pairs(tbl)do
  864. if v:lower():find(key:lower())~=nil then
  865. table.insert(found,v)
  866. end
  867. end;end)
  868. return found
  869. end
  870.  
  871. changerank=function(plr,speaker)
  872. local plrc=_plr(plr)
  873. if plrc then plr = plrc.Name end
  874. local speaker=speaker
  875. if (getrank(plr)>=getrank(speaker))then return end
  876. if getrank(plr)==5 then return end
  877. _dmtab(speaker)
  878. _tab('changing rank of '..plr,n,speaker)
  879. local nmddd=0
  880. for nmddd=-1,5 do
  881. if nmddd>=getrank(speaker)and not getrank(speaker)==5 then else
  882. _tab(nmddd,c.snd,speaker,
  883. function()
  884. setrank(plr,nmddd)
  885. dmp(speaker)
  886. if nmddd==-1 or nmdd==0 and pri then
  887. Kick(plrc)
  888. else
  889. alert.p(plr..' is now rank '..tostring(nmddd),speaker)
  890. if plrc then
  891. alert.p('you are now rank '..tostring(nmddd),plrc)end
  892. end
  893. end)
  894. end
  895. end
  896. end
  897.  
  898. matchtbli=function(tbl,key)
  899. local found={}
  900. for i,v in pairs(tbl)do
  901. if tostring(i):lower():find(key:lower())~=nil then
  902. table.insert(found,i)
  903. end
  904. end
  905. return found
  906. end
  907. plrfunc=function(plr,speaker)
  908. dmp(speaker)
  909. _dmtab(speaker)
  910. local pss=ps.color(plr)
  911. _tab('Back','Teal',speaker,function()plrmen(plr,speaker)end)
  912. if plr~=speaker and getrank(speaker)>getrank(plr) and getrank(speaker)>=4 then
  913. _tab('kick',pss,speaker,function()Kick(plr)end)
  914. if datastores then
  915. _tab('ban',pss,speaker,function()table.insert(banlist,plr.Name)setrank(plr.Name,-1)Kick(plr)end)
  916. end
  917. end
  918. if getrank(speaker)>=3 then
  919. _tab('god',pss,speaker,function()pcall(function()plr.Character.Humanoid.MaxHealth=math.huge;end)end)
  920. _tab('kill',pss,speaker,function()pcall(function()plr.Character.Head:remove()plr.Character.Humanoid.Health=0;end)end)
  921. end
  922. end
  923.  
  924. function rainbow(hue)
  925. local section = hue % 1 * 3
  926. local secondary = 0.5 * math.pi * (section % 1)
  927. if section < 1 then
  928. return 1, 1 - math.cos(secondary), 1 - math.sin(secondary)
  929. elseif section < 2 then
  930. return 1 - math.sin(secondary), 1, 1 - math.cos(secondary)
  931. else
  932. return 1 - math.cos(secondary), 1 - math.sin(secondary), 1
  933. end
  934. end
  935.  
  936. wavemenu=function(plr,speaker)
  937. dmp(speaker)
  938. local pc=ps.color(plr)
  939. _tab('Enable',c.green,speaker,
  940. function(tabc)
  941. local e=ds.get(plr)
  942. ds.set(plr,'wave',true)
  943. e[4]=true
  944. end)
  945. _tab('Disable',c.red,speaker,
  946. function(tabc)
  947. local e=ds.get(plr)
  948. ds.set(plr,'wave',false)
  949. e[4]=false
  950. end)
  951. end
  952.  
  953. rotmenu=function(plr,speaker)
  954. dmp(speaker)
  955. pc=ps.color(plr)
  956. _tab('Layered',pc,speaker,function()
  957. dmp(speaker)
  958. _tab('Layered flat',pc,speaker,
  959. function(tabc)
  960. dmp(speaker)
  961. ds.set(plr,'rot','lf')
  962. ds.set(plr,'shape','cube')
  963. end)
  964. _tab('Layered rand',pc,speaker,
  965. function(tabc)
  966. dmp(speaker)
  967. ds.set(plr,'rot','lrand')
  968. ds.set(plr,'shape','cube')
  969. end)
  970. end)
  971. _tab('Circle',pc,speaker,function()
  972. dmp(speaker)
  973. _tab('Circle rand',pc,speaker,
  974. function(tabc)
  975. dmp(speaker)
  976. ds.set(plr,'rot','circlerand')
  977. ds.set(plr,'shape','cube')
  978.  
  979. end)
  980. _tab('Circle flat',pc,speaker,
  981. function(tabc)
  982. --local e=ds.get(plr)
  983. dmp(speaker)
  984. ds.set(plr,'rot','circleflat')
  985. ds.set(plr,'shape','cube')
  986. --e[6]='circleflat'
  987. end)
  988. _tab('Flat tab',pc,speaker,
  989. function(tabc)
  990. --local e=ds.get(plr)\
  991. dmp(speaker)
  992. ds.set(plr,'rot','flattab')
  993. ds.set(plr,'shape','flat')
  994. end)
  995. end)
  996. end
  997.  
  998. neonmenu=function(plr,speaker)
  999. local plrc=_plr(plr)if plrc then plr = plrc.Name end
  1000. local pc=ps.color(speaker)
  1001. dmp(speaker)
  1002. _tab('Neon on',pc,speaker,function()
  1003. dmp(speaker)
  1004. alert.c(speaker~=plr and plr..'\'s neon enabled' or plr..'Neon enabled',pc,speaker)
  1005. ds.set(plr,'neon',true)
  1006. end)
  1007.  
  1008. _tab('Neon off',pc,speaker,function()
  1009. dmp(speaker)
  1010. alert.c(speaker~=plr and plr..'\'s neon disabled' or plr..'Neon disabled',pc,speaker)
  1011. ds.set(plr,'neon',false)
  1012. end)
  1013. end
  1014. configtab=function(plr,speaker)
  1015. local plrc=_plr(plr)if plrc then plr = plrc.Name end
  1016. if getrank(speaker.Name)>getrank(plr) and getrank(speaker.Name)>3 or plrc==speaker then
  1017. if plr~=speaker and getrank(speaker)>=4 and plrc then
  1018. _tab('actions','Lime green',speaker,function()plrfunc(plrc,speaker)end)
  1019. end
  1020. local pc=ps.color(plr)
  1021. _tab('Player Configuration','New Yeller',speaker,
  1022. function(tab)
  1023. rem(tab)
  1024. if plr~=speaker and getrank(speaker)>getrank(plr) and getrank(speaker)>=4 or plr==speaker and getrank(speaker)>=3 then
  1025. _tab('Set rank',rank[getrank(plr)],speaker,function()dmp(speaker)changerank(plr,speaker)end)
  1026. end
  1027. _tab('Set wave',pc,speaker,
  1028. function(tab2)
  1029. wavemenu(plr,speaker)
  1030. _tab('Back','Teal',speaker,function()plrmen(plr,speaker)end)
  1031. end)
  1032. _tab('Set rot',pc,speaker,
  1033. function(tab2)
  1034. rotmenu(plr,speaker)
  1035. _tab('Back','Teal',speaker,function()plrmen(plr,speaker)end)
  1036. end)
  1037. _tab('Set color',pc,speaker,
  1038. function()
  1039. dmp(speaker)
  1040. _tab('Back','Teal',speaker,function()plrmen(plr,speaker)end)
  1041. _tab('Select a color',pc,speaker)
  1042. for i,v in pairs(colors)do
  1043. _tab('['..v..']',v,speaker,
  1044. function()
  1045. local e=ds.get(plr)
  1046. e[4]=v
  1047. ds.set(plr,'color',v)
  1048. alert.c('Your color is now '..v,v,plrc)
  1049. if plrc~=speaker then
  1050. alert.c('You set '..tostring(plr)..'\'s color to '..v,ps.color(speaker),speaker)
  1051. end
  1052. plrmen(plr,speaker)end)
  1053. end
  1054.  
  1055. end)
  1056. _tab('Set Neon',pc,speaker,
  1057. function()
  1058. neonmenu(plr,speaker)
  1059. end)
  1060. end)
  1061.  
  1062. end
  1063. end
  1064.  
  1065. plrmen=function(plr,speaker,ccc)
  1066. dmp(speaker)
  1067. _dmtab(speaker)
  1068. --ct('Back','Teal',ccc,speaker)
  1069. local plrc=_plr(plr)
  1070. if plrc==nil then else plr=plrc.Name end
  1071. local pc=ps.color(plr)
  1072. _tab(plr,n,speaker)
  1073. local v=ds.prof(plr)
  1074. _tab('Rank:\n'..getrank(plr),pc,speaker)
  1075. if v then
  1076. _tab('Reason:\n'..v[3],pc,speaker)
  1077. _tab('Color:\n'..v[5],v[5],speaker)
  1078. _tab('Wave:\n'..tostring(ps.wave(v[1])),v[5],speaker)
  1079. end
  1080. if plrc then _tab('age:\n'..tostring(plrc.AccountAge),pc,speaker)end
  1081. _tab('color:\n'..ps.color(plr),pc,speaker)
  1082. local nr=ds.default(ds.prof(plr))nr=not nr
  1083. _tab('stored in users:\n'..str.firstc(tostring(nr)),pc,speaker)
  1084. configtab(plrc,speaker)
  1085.  
  1086.  
  1087.  
  1088.  
  1089. end
  1090.  
  1091. assettype=function(id)
  1092. local i=game:GetService("MarketplaceService"):GetProductInfo(tonumber(id))
  1093. return i.AssetTypeId
  1094. end
  1095. plrinfo=function(plr,speaker)
  1096. plr=_plr(plr)
  1097. dmp(speaker)
  1098. _dmtab(speaker)
  1099.  
  1100. end
  1101.  
  1102. getAllArgs=function(str)
  1103. local found={}
  1104. local runw=true
  1105. while runw do
  1106. local arg,ends=getargb(str)
  1107. --print(ends)
  1108. if arg~='' and ends~=0 then
  1109. table.insert(found,arg)
  1110. str=str:sub(ends+1)
  1111. else
  1112. runw=false
  1113. end
  1114. end
  1115. if found~={}then
  1116. return found end
  1117. end
  1118.  
  1119. songmenu=function(n,speaker)
  1120. dmp(speaker)
  1121.  
  1122. if type(n)==type('hi')then
  1123. n=music[n][1]
  1124. end if not n then return end
  1125. _dmtab(speaker)
  1126. local i=game:GetService("MarketplaceService"):GetProductInfo(tonumber(n))
  1127. name=i.Name
  1128. t.t("Name: "..i.Name, "Hot pink",speaker)
  1129. t.t("Sales: "..i.Sales, "New Yeller",speaker)
  1130. t.t("Id: "..i.AssetId,'Deep orange',speaker)
  1131. local inlib=false
  1132. for i,v in pairs(music)do
  1133. if v[1]==i.AssetId then
  1134. music[i]=nil inlib=true
  1135. end
  1136. end
  1137. if inlib then music[i.Name]={i.AssetId,'Downloaded'}end
  1138. _tab("Play sound", 'Lime green',speaker,
  1139. function()
  1140. dmp(speaker)
  1141. chat("sm'deep",speaker)
  1142. m.play(nil,true)
  1143. m.play(tonumber(i.AssetId))
  1144. alert.c('now playing:\n'..i.Name,'Lime green',speaker,3)
  1145. end)
  1146. if (getrank(speaker.Name)<4) then return end
  1147. if music[i.Name]then
  1148. _tab("Remove from library",'Bright red',speaker,
  1149. function()
  1150. local mz=m.getlib()
  1151. mz[i.Name]=nil
  1152. m.setlib(mz)
  1153. alert.c('Removed song','Really red',speaker,4)
  1154. end,'dmself')
  1155. else
  1156. _tab("Add to library",'Teal',speaker,
  1157. function()
  1158. m.addsong(i.Name,tonumber(i.AssetId),'Downloaded')
  1159. music[i.Name]={i.AssetId,'Downloaded'}
  1160. alert.c('Added song','Teal',speaker,4)
  1161. end,'dmself')
  1162. end
  1163. end
  1164.  
  1165. genrelist=function(speaker,genreq)
  1166. local genres={}
  1167. for i,v in pairs(music)do
  1168. if v[2]~=nil then
  1169. local g=v[2]:lower()
  1170. g=g:sub(1,1):upper()..g:sub(2)
  1171. if not genres[g]then genres[g]={}end
  1172. table.insert(genres[g],i)
  1173. else
  1174. if not genres['Uncategorized']then genres['Uncategorized']={}end
  1175. table.insert(genres['Uncategorized'],i)
  1176. end
  1177. end
  1178. _dmtab(speaker)
  1179. if genreq == nil then
  1180. for i,v in pairs(genres)do--name , table of names
  1181. local g=genres[i]--table of stuff
  1182. if i=='Downloaded'and #v==0 then else
  1183. local ccc=c.purple
  1184. if i=='Downloaded'then
  1185. ccc='Lime green'
  1186. end
  1187. _tab(i..' ['..#g..']',ccc,speaker,
  1188. function()
  1189. dmp(speaker)
  1190. _dmtab(speaker)
  1191. _tab('['..i..']',c.purple,speaker)
  1192. for k,z in pairs(g)do
  1193. songmenu(z,speaker)
  1194. end
  1195. end)
  1196. end
  1197. end
  1198. else
  1199. if genres[genreq]~=nil then
  1200. local req=genres[genreq]
  1201. local ccc=c.purple
  1202. if i=='Downloaded'then
  1203. ccc='Lime green'
  1204. end
  1205. for k,z in pairs(req)do
  1206. songmenu(z,speaker)
  1207. end
  1208. end
  1209. end
  1210. end
  1211. t.t=function(text,color,player,t)
  1212. t=t or 0
  1213. if not text or not color or not player then return end
  1214. local plr=_plr(player)
  1215. _tab(text,color,plr,'','',t)
  1216. end
  1217.  
  1218. settime=function(t)
  1219. game:service'Lighting'.TimeOfDay=t
  1220. end
  1221.  
  1222. ct=function(txt,color,chatm,plr,flag)
  1223. _tab(txt,color,plr,function()chat(chatm,plr)end,flag)
  1224. end
  1225.  
  1226. iscmd=function(str)
  1227. for i,v in pairs(cmds)do
  1228. if v.NAME:lower()==str:lower() or aliasof((c.ALIAS or {}),str)then return v end
  1229. end
  1230. end
  1231. chat=function(msg,plr)--obj
  1232. if not enabled then return end
  1233. local iscmd=false
  1234. logs.cwrite(plr.Name..': '..msg)
  1235. if msg:sub(1,3)=='/e 'then msg=msg:sub(4)iscmd=true end
  1236. if msg:sub(1,string.len(getbet()))==getbet() then msg=msg:sub((string.len(getbet()))+1)iscmd=true end
  1237. if not iscmd then return end
  1238. local base,ends=getbase(msg)
  1239. logs.cwrite(plr.Name..': '..msg)
  1240. local cmd=nil;
  1241. local test=playertimes[plr.Name]
  1242. if not test then playertimes[plr.Name]=tick()end
  1243.  
  1244. if tick()-playertimes[plr.Name]<.4 then return end
  1245. playertimes[plr.Name]=tick()
  1246. if base then
  1247. for i,c in pairs(cmds)do
  1248. if c.NAME:lower()==base:lower() or aliasof(c.ALIAS,base)then
  1249. local cmd=c;
  1250. local arg=getAllArgs(msg:sub(ends))
  1251. local rc=ps.islocked(c.NAME,plr)
  1252. if hasPermission(plr,c.PERM)and not rc then
  1253. --print(arg[1])
  1254. local run,error=ypcall(function()
  1255. c.FUNC(plr,arg,msg)
  1256. end)
  1257. if not run then dmp(plr)alert.c('Error','White',plr)alert.c(error,'Really red',plr) end
  1258. elseif rc then
  1259. alert.c('This command has been locked for you!','Really red',plr)
  1260. else
  1261. alert.c('You do not have permission for that command! ['..c.PERM..']','Really red',plr)
  1262. end
  1263. end
  1264. end
  1265. end
  1266. end
  1267.  
  1268. addcmd=function(name,desc,permission,args,fn,aliases)
  1269.  
  1270. --COMMAND NAME
  1271.  
  1272. --COMMAND DESCRIPTION
  1273.  
  1274. --MINIMUM PERMISSION LEVEL
  1275.  
  1276. --ARGS
  1277.  
  1278. --FUNCTION (SPEAKER, ARGS)
  1279.  
  1280. --ALIAS TABLE (OPTIONAL)
  1281.  
  1282. aliases=aliases or {}
  1283.  
  1284. table.insert(cmds,{
  1285. NAME =name;
  1286. DESC =desc;
  1287. PERM =permission;
  1288. ARGS =args;
  1289. FUNC =fn;
  1290. ALIAS =aliases;
  1291. })
  1292. end
  1293.  
  1294. runas=function(msg,plr)
  1295. chat(msg,plr)
  1296. end
  1297.  
  1298.  
  1299. cmdmenu=function(v,speaker)
  1300. _tab((v.NAME),ps.color(speaker),speaker,
  1301. function()
  1302. dmp(speaker)
  1303. _dmtab(speaker)
  1304. t.t(v.NAME,c.cmdc,speaker)
  1305.  
  1306. local pc=c.red
  1307. local ps='You can\'t use this'
  1308.  
  1309. local r=getrank(speaker)
  1310.  
  1311. if r>=v.PERM then pc=c.green ps='You can use this!'end
  1312. t.t('Permission: '..v.PERM,c.white,speaker)
  1313. t.t(ps,pc,speaker)
  1314. t.t(v.DESC,c.white,speaker)
  1315. if v.ALIAS[1]~=nil then
  1316. _tab('Aliases: '..list(v.ALIAS),c.white,speaker)
  1317. end
  1318.  
  1319. end)
  1320. end
  1321.  
  1322. getCommandsWithPerm=function(num)
  1323. local found={}
  1324. for i,v in pairs(cmds)do
  1325. if v.PERM<=num then
  1326. table.insert(found,v)
  1327. end
  1328. end
  1329. return found
  1330. end
  1331.  
  1332. addcmd('cmds','Show commands',0,1,
  1333. function(speaker,a,o)
  1334. dmp(speaker)
  1335. local r=getrank(speaker)
  1336. local s=speaker
  1337. local pc=ps.color(speaker)
  1338. _dmtab(speaker)
  1339. _tab('Your rank: '..r,pc,speaker,
  1340. function()
  1341. dmp(speaker)
  1342. local z=getCommandsWithPerm(getrank(speaker))
  1343. _dmtab(speaker)
  1344. ct('BACK','Teal','cmds',speaker)
  1345. for i,v in pairs(z)do
  1346. cmdmenu(v,speaker)
  1347. end
  1348. end)
  1349.  
  1350. for i=0,5 do
  1351. _tab(i..' ['..(rank[i] or 'guest')..']',pc,speaker,
  1352. function()
  1353. dmp(speaker)
  1354. _dmtab(speaker)
  1355. local z=getCommandsWithPerm(i)
  1356. ct('Go back','Teal','cmds',speaker)
  1357. for i,v in pairs(z)do
  1358. cmdmenu(v,speaker)
  1359. end
  1360. end)
  1361. end
  1362. _tab('View all',pc,speaker,
  1363. function()
  1364. dmp(speaker)
  1365. _dmtab(speaker)
  1366. local z=getCommandsWithPerm(10)
  1367. ct('Go back','Teal','cmds',speaker)
  1368. for i,v in pairs(z)do
  1369. cmdmenu(v,speaker)
  1370. end
  1371. end)
  1372. end,{'commands'})
  1373.  
  1374. addcmd('ping','output with text\nargs: text to display',0,1,
  1375. function(speaker,args)
  1376. if args[1]~=nil and args[2]~=nil and getrank(speaker)>2 and tonumber(args[1]) then
  1377. for i=1,tonumber(args[1])do
  1378. alert.c(args[2]or 'pong',c.white,speaker)
  1379. end
  1380. return
  1381. elseif args[2]~=nil and getrank(speaker)>=2 and _match(args[1],speaker)~={} then
  1382. local plr=_match(args[1],speaker)
  1383. table.foreach(plr,function(k,v)
  1384. alert.c(args[2] or '',c.white,_plr(v))end)
  1385.  
  1386. else
  1387. alert.c(args[1] or 'Pong.',c.white,speaker)
  1388. end
  1389. end,
  1390. {'print','out'})
  1391.  
  1392. addcmd('removesongs','mass library editing',5,0,
  1393. function(speaker,args)
  1394. --print(args[2])
  1395. for i,v in pairs(music)do
  1396. _tab(i,c.red,speaker,function(tablet)rem(tablet)music[i]=nil;end)
  1397. end
  1398. _tab('save','Lime green',speaker,function()m.setlib(music)dmp(speaker)alert.c('music library rewritten','White',speaker)end)
  1399. end,{})
  1400.  
  1401.  
  1402. addcmd('removeusers','mass user editing',5,0,
  1403. function(speaker,args)
  1404. --print(args[2])
  1405. for i,v in pairs(users)do
  1406. _tab(v[1],'White',speaker,function(tablet)rem(tablet)table.remove(users,i);end)
  1407. end
  1408. _tab('save','Lime green',speaker,function()ds.save()dmp(speaker)alert.c('user library rewritten','White',speaker)end)
  1409. end,{})
  1410.  
  1411.  
  1412. addcmd('time','adjust time',4,0,
  1413. function(speaker,args)
  1414. _dmtab(speaker)
  1415. _tab('Midnight','Really black',speaker,function()settime(0)dmp(speaker)end)
  1416. _tab('Morning','White',speaker,function()settime(6)dmp(speaker)end)
  1417. _tab('Noon','White',speaker,function()settime(12)dmp(speaker)end)
  1418. _tab('Evening','Really black',speaker,function()settime(18)dmp(speaker)end)
  1419. end,
  1420. {'timemenu'})
  1421.  
  1422.  
  1423. addcmd('dt','dismiss tabs\nargs: player',0,1,
  1424. function(speaker,args)
  1425. if args[1]and hasPermission(speaker,{PERM=4})then
  1426. local fplrs=_match(args[1],speaker)
  1427. table.foreach(fplrs,function(ki,vi)dmp(_plr(vi))end)
  1428. else
  1429. dmp(speaker)
  1430. end
  1431. end,
  1432. {'dismiss','dm'})
  1433.  
  1434. addcmd('music','show music list',3,1,--todo id
  1435. function(speaker,args)
  1436. dmp(speaker)
  1437. local r=getrank(speaker)
  1438. if args[1]==nil then
  1439. if r>=3 then
  1440. _dmtab(speaker)
  1441. --alert.p(tostring(args[1]),speaker)
  1442. for i,v in pairs(music)do --id,genre
  1443. _tab(i,'Lime green',speaker,
  1444. function()
  1445. songmenu(v[1],speaker)
  1446. end)
  1447. end
  1448. end
  1449. elseif inTable({'stop','sm'},args[1]:lower())and r>=3 then
  1450. chat("stopmusic"..split..'deep',speaker)
  1451. elseif args[1]:lower()=='id'and args[2]~=nil then
  1452. if not tonumber(args[2])then return end
  1453. songmenu(tonumber(args[2]),speaker)
  1454. elseif args[1]~=nil and r>=3 then
  1455. if tonumber(args[1])~=nil then
  1456. _tab('ID','Hot pink',speaker,function()
  1457. songmenu(tonumber(args[1]),speaker)
  1458. end)
  1459. end
  1460. _dmtab(speaker)
  1461. t.t('showing results for:\n'..args[1],'White',speaker)
  1462. local rzzz=matchtbli(music,tostring(args[1]))
  1463. local mz=m.getlib()
  1464. for kn,zn in pairs(rzzz)do
  1465.  
  1466. if mz[zn]==nil then
  1467. local s=music[zn]
  1468. _tab(zn,c.snd,speaker,
  1469. function()
  1470. dmp(speaker)
  1471. m.play(s[1])
  1472. alert.c('now playing:\n'..zn,'Lime green',speaker,3)
  1473. end,'',3)
  1474. end
  1475. end
  1476.  
  1477. local searchterm=args[1]
  1478. http=game:GetService'HttpService'
  1479. local url="http://roproxy.tk/catalog/json?Keyword="..http:UrlEncode(searchterm).."&Category=9&ResultsPerPage=20"
  1480. local assets=http:JSONDecode(http:GetAsync(url))
  1481. if #assets==0 then alert.p('no results!',speaker)return else
  1482.  
  1483.  
  1484. for i,v in pairs(assets)do
  1485. wait()
  1486. local cddd='New Yeller'
  1487. local songcheck=m.getlib()
  1488. if songcheck[v.Name]~=nil then
  1489. cddd='Lime green'
  1490. end
  1491. _tab(v.Name,cddd,speaker,function()
  1492. songmenu(v.AssetId,speaker)
  1493.  
  1494.  
  1495. end)
  1496. end
  1497. end
  1498. --[[elseif args[1]~=nil and args[2]~=nil then
  1499. if inTable({'l','lib','ls','slib'},args[1]:lower())then
  1500. local r=matchtbli(music,args[2])
  1501. for k,z in pairs(r)do
  1502. local s=music[z]
  1503. _tab(z,c.snd,
  1504. function()
  1505. dmp(speaker)
  1506. m.play(s[1])
  1507. alert.p('now playing: '..z,speaker)
  1508. end,speaker,3)
  1509. end
  1510. end]]
  1511. end
  1512. end,
  1513. {'snd','snds'})
  1514.  
  1515.  
  1516.  
  1517. addcmd('stopmusic','stops music / args: deep',3,1,
  1518. function(speaker,args)
  1519. if ALUSND then
  1520. if ALUSND.Parent~=nil then
  1521. ALUSND:Stop()
  1522. ALUSND:remove()
  1523. end
  1524. end
  1525. local g=''
  1526. if args[1]~=nil then
  1527. if type(args[1])=='string'then g=args[1]:lower() end
  1528. end
  1529. if g=='true'or g=='deep'then
  1530. m.stopmusic(workspace,true)
  1531. elseif g=='o'or g=='others'then--team
  1532. m.stopmusico(workspace,true)
  1533. else
  1534. m.play(nil,true)
  1535. end
  1536. if silentmode then return end
  1537. for i,v in pairs(script.Parent:children'')do
  1538. if v.ClassName~=nil then
  1539. if v:IsA'Sound'then v:Stop()v:remove()end
  1540. end
  1541. end
  1542. end,
  1543. {'sm'})
  1544.  
  1545.  
  1546. addcmd('net','show connected players',0,0,
  1547. function(speaker,args)
  1548. dmp(speaker)
  1549. for i,v in pairs(plrs:GetPlayers())do
  1550. --local cl=rank[getrank(v.Name)]
  1551. local cl=ps.color(v.Name)
  1552. if cl==nil then cl='White'end
  1553. --if speaker==v then cl=c.snd end
  1554. _tab(v.Name,cl,speaker,function()
  1555. if getrank(speaker)>getrank(v) and getrank(speaker)>3 or speaker==v then
  1556. dmp(speaker)
  1557. local plr=v
  1558. plrmen(v,speaker,'net')
  1559. end
  1560. end)
  1561. end
  1562. end,
  1563. {'plrs','players'})
  1564.  
  1565. addcmd('badtabs','show credits',0,0,
  1566. function(speaker)
  1567. dmp(speaker)
  1568.  
  1569. print('tostring(ver))
  1570. alert.c('ALUinstance by GalacticParadox loaded.'New Yeller',speaker)
  1571. alert.c('Your rank: '..getrank(speaker),'New Yeller',speaker)
  1572. _tab('say cmds\' to get your commands','New Yeller',speaker,function()dmp(speaker)chat("cmds",speaker)end,'')
  1573. alert.c('Made by GalacticParadox','New Yeller',speaker)
  1574. end,
  1575. {'cred'})
  1576.  
  1577. addcmd('dtall','dismiss all players tabs',4,0,
  1578. function()
  1579. for i,v in pairs(tabs)do
  1580. dmp(i)
  1581. end
  1582. end,
  1583. {'dismissall'})
  1584.  
  1585. addcmd('save','saves the stuff',4,0,
  1586. function(speaker)
  1587. ds.save()
  1588. alert.c('saved the stuff','Lime green',speaker)
  1589. end)
  1590.  
  1591. addcmd('fixlighting','Fixes lighting properties',3,0,
  1592. function()
  1593. local l=game:service'Lighting'
  1594. l.Ambient=_rgb(178,178,178)
  1595. l.Brightness=1
  1596. l.Outlines=false
  1597. l.TimeOfDay=14
  1598. end,
  1599. {'fixl'})
  1600.  
  1601. promptvote=function(v,q)
  1602. _tab(q,c.snd,v,'','',10)
  1603. _tab('Vote Yes',c.green,v,function()dmp(v)vote.y=vote.y+1;alert.p('Vote counted',v)end,'',10)
  1604. _tab('Vote No','Really red',v,function()dmp(v)vote.n=vote.n+1;alert.p('Vote counted',v)end,'',10)
  1605. _tab('No vote','White',v,function()dmp(v);end,'',10)
  1606. end
  1607.  
  1608. addcmd('vote','vote\nargs: plr/tp,(yn,k,b)',4,0,
  1609. function(speaker,args)
  1610.  
  1611. if args[1]~=nil and args[2]~=nil then
  1612. q=args[1]
  1613. vote.y=0;
  1614. vote.n=0;
  1615. local plr=nil
  1616. if args[2]:lower()=='k'then
  1617. plr=_plr(q)
  1618. if plr~=nil then
  1619. for i,v in pairs(plrs:getPlayers())do
  1620. promptvote(v,'Vote: Kick '..plr.Name..'?')
  1621. vote.topic='Kick '..plr.Name..'?'
  1622. action='k'
  1623. end
  1624. end
  1625. elseif args[2]:lower()=='b'then
  1626. plr=_plr(q)
  1627. if plr~=nil then
  1628. for i,v in pairs(plrs:getPlayers())do
  1629. promptvote(v,'Vote: Ban '..plr.Name..'?')
  1630. vote.topic='Ban '..plr.Name..'?'
  1631. action='b'
  1632. end
  1633. end
  1634. elseif args[2]:lower()=='yn'then
  1635. for i,v in pairs(plrs:getPlayers())do
  1636. promptvote(v,'Vote: '..q)
  1637. vote.topic=q
  1638. end
  1639. end
  1640. end
  1641. if args[1] ==nil then return end
  1642. if inTable({'view','results','check'},args[1]:lower()) then
  1643. delay(0,function()
  1644. if vote.topic~='' then
  1645. _dmtab(speaker)
  1646. _tab('Vote results',c.white,speaker)
  1647. _tab('Topic: '..vote.topic,'Bright blue',speaker)
  1648. _tab('YES: '..vote.y,c.green,speaker)
  1649. _tab('NO: '..vote.n,'Really red',speaker)
  1650. if 1+1==3 and vote.y>vote.n and inTable({'k','b'},action:lower())then
  1651. _tab('Vote succeeded. Click here to execute.','New Yeller',speaker,
  1652. function()
  1653. dmp(speaker)
  1654. local zz=action:lower()
  1655. if zz=='k'then
  1656. Kick(_plr(q))
  1657. t.c('Kicked player','Really red',speaker,4)
  1658. elseif zz=='b'then
  1659. setrank(v.Name,-1)
  1660. Kick(v)
  1661. t.c('Banned player','Really red',speaker,4)
  1662. end;
  1663. end)
  1664. end
  1665. end
  1666. end)
  1667. end
  1668. end,
  1669. {'poll','ballot'})
  1670.  
  1671. addcmd('disabletabs','disables tabs',5,0,
  1672. function(speaker,args)
  1673. _tab('click to confirm',c.purple,speaker,
  1674. function()
  1675. alert.p('saved all libraries',speaker)
  1676. delay(4,disabletabs)
  1677. end,'dmself',4)
  1678. end,
  1679. {'stop'})
  1680.  
  1681. addcmd('update','updates instance of tabs',5,0,
  1682. function(speaker,args)
  1683. update=true
  1684. alert.p('updating',speaker)
  1685. delay(1,disabletabs)
  1686. end)
  1687.  
  1688. addcmd('shutdown','kills game',5,0,
  1689. function(speaker,args)
  1690. for i,v in pairs(plrs:GetPlayers'')do
  1691. Kick(v)
  1692. end
  1693. end)
  1694.  
  1695. addcmd('newserver','creates new game server at id',5,1,
  1696. function(speaker,args)
  1697. if args[1]~=nil then
  1698. local x=nil
  1699. if inTable({'place','here','this','game'},tostring(args[1]))then x=game.PlaceId end
  1700. if x==nil then
  1701. x=tonumber(args[1])
  1702. end
  1703. if x then
  1704. alert.c('Created new server','Lime green',speaker)
  1705. newserver(x)
  1706.  
  1707. end
  1708. else
  1709. alert.c('Created new server','Lime green',speaker)
  1710. newserver(game.PlaceId)
  1711. end
  1712. end,
  1713. {'ns','createserver'})
  1714.  
  1715.  
  1716. addcmd('afk','go afk',0,0,
  1717. function(speaker,args)
  1718. dmp(speaker)
  1719. for i=1,5 do
  1720. _tab(speaker.Name..' is afk','White',speaker,function()dmp(speaker)end)
  1721. end
  1722. end,
  1723. {})
  1724.  
  1725.  
  1726. addcmd('db','change db_view',5,1,
  1727. function(speaker,args)
  1728. if args[1]~=nil then
  1729. if inTable({'true','grid'},args[1]:lower())then
  1730. t.db_view='GRID'
  1731. else
  1732. t.db_view='PLR'
  1733. end
  1734. end
  1735. return
  1736. end)
  1737.  
  1738. addcmd('rank','changes a players rank',5,3,
  1739. function(speaker,args)
  1740. local plr
  1741. local rank
  1742. local reason
  1743. if args[1]then plr=_plr(args[1])end
  1744. if args[2]then rank=tonumber(args[2])end
  1745. if args[3]then reason=args[3]else reason='None'end
  1746. if plr and rank then
  1747. ds.set(plr.Name,'rank',rank)
  1748. ds.set(plr.Name,'reason',reason)
  1749. alert.c('You are now rank '..rank,ps.color(plr.Name),plr)
  1750. alert.c('You set '..plr.Name..'\'s rank to '..rank,ps.color(speaker.Name),speaker)
  1751. end
  1752. end)
  1753. addcmd('ranked','shows all ranked players',2,0,
  1754. function(speaker,args)
  1755. dmp(speaker)
  1756. _dmtab(speaker)
  1757. for i,v in pairs(users)do
  1758. --print(list(v))
  1759. local s=v[1]
  1760. if v[2]==-1 then v[5]='Really black's=s..' (Banned)'end
  1761. if type(v[1])==type('hi')then
  1762. _tab(v[1],v[5],speaker,
  1763. function()
  1764. dmp(speaker)
  1765. _dmtab(speaker)
  1766.  
  1767. plrmen(v[1],speaker,'ranked')
  1768. end)
  1769. end
  1770. end
  1771. end)
  1772.  
  1773. addcmd('pri','opens pri options',5,0,
  1774. function(speaker,args)
  1775. local sss='off'
  1776. local pc=c.red
  1777. if pri then sss='on';pc='Lime green' end
  1778. dmp(speaker)
  1779. _tab('pri is '..sss,pc,speaker)
  1780. _tab((pri and '[DISABLE]') or '[ENABLE]',pri and 'Really red' or 'Lime green',speaker,function()
  1781. dmp(speaker)
  1782. pri=not pri
  1783. if pri then
  1784. for i,v in pairs(plrs:GetPlayers'')do
  1785. if getrank(v.Name)<1 then Kick(v)end
  1786. end
  1787. end
  1788. alert.c('pri was '..(pri and 'enabled' or 'disabled'),c.white,speaker)
  1789. end)
  1790. end)
  1791.  
  1792. addcmd('jump','makes player jump',3,1,function(speaker,args)
  1793. local fplr=_match(args[1],speaker)
  1794. for i,v in pairs(fplr)do
  1795. safe.r(function()_plr(v).Character.Humanoid.Jump=true;end)
  1796. end
  1797. end)
  1798.  
  1799. addcmd('rot','changes players rot style',1,1,function(speaker,args)
  1800. local targ=speaker
  1801.  
  1802. if args[1]~=nil then
  1803. if _plr(targ)~=nil then targ=_plr(targ)end
  1804. end
  1805. rotmenu(targ,speaker)
  1806. end)
  1807.  
  1808. addcmd('sit','makes player sit',3,1,function(speaker,args)
  1809. local fplr=_match(args[1],speaker)
  1810. for i,v in pairs(fplr)do
  1811. safe.r(function()_plr(v).Character.Humanoid.Sit=true;end)
  1812. end
  1813. end)
  1814.  
  1815. addcmd('kill','makes player dead',3,1,function(speaker,args)
  1816. local fplr=_match(args[1],speaker)
  1817. for i,v in pairs(fplr)do
  1818. safe.r(function()_plr(v).Character.Head:remove()end)
  1819. end
  1820. end)
  1821.  
  1822. addcmd('fling','next plane to china',4,1,function(speaker,args)
  1823. local fplr=_match(args[1],speaker)
  1824. for i,v in pairs(fplr)do
  1825. safe.r(function()_plr(v).Character.Humanoid.Sit=true;_plr(v).Character.Torso.Velocity=v3(4000,4000,4000)end)
  1826. end
  1827. end)
  1828.  
  1829. addcmd('god','makes player godly',3,1,function(speaker,args)
  1830. local fplr=_match(args[1],speaker)
  1831. for i,v in pairs(fplr)do
  1832. safe.r(function()_plr(v).Character.Humanoid.MaxHealth=math.huge;end)
  1833. end
  1834. end)
  1835.  
  1836. addcmd('kick','makes player gone',4,1,function(speaker,args)
  1837. local fplr=_match(args[1],speaker)
  1838. for i,v in pairs(fplr)do
  1839. safe.r(function()Kick(_plr(v));end)
  1840. end
  1841. end)
  1842.  
  1843. addcmd('ban','makes player gone forever',5,2,function(speaker,args)
  1844. local fplr=_plr(args[1])if not fplr then return end
  1845. if getrank(fplr.Name)<getrank(speaker.Name)then
  1846. if args[2]~=nil then ds.set(fplr,'reason',args[2])end
  1847. safe.r(function()setrank(fplr,-1)Kick(_plr(fplr));end)
  1848. end
  1849. end)
  1850.  
  1851. addcmd('menu','opens menu',4,1,function(speaker,args)
  1852. dmp(speaker)
  1853. local pc=ps.color(speaker)
  1854. _tab('music','Lime green',speaker,function()
  1855. chat('music',speaker)
  1856. end)
  1857. _tab('players','Bright blue',speaker,function()
  1858. chat('net',speaker)
  1859. end)
  1860. _tab('logs','Bright yellow',speaker,function()
  1861. chat('logs',speaker)
  1862. end)
  1863. _tab('settings',ps.color(speaker),speaker,function()
  1864. dmp(speaker)
  1865. _tab('rotation',pc,speaker,function()rotmenu(speaker,speaker)end)
  1866. _tab('neon',pc,speaker,function()neonmenu(speaker,speaker)end)
  1867. end)
  1868. end)
  1869.  
  1870. addcmd('silent','puts script in silent mode',5,0,
  1871. function()
  1872. silentmode=true
  1873. for i,v in pairs(plrs:GetPlayers'')do
  1874. dmp(v)
  1875. end
  1876. script=nil
  1877. logs.write'silent mode active'
  1878. end)
  1879.  
  1880. addcmd('set','sets plr attribute',5,3,
  1881. function(speaker,args)
  1882. --plr att val
  1883. if args[1]~=nil and args[2]~=nil and args[3]~=nil then
  1884. local plr=_plr(args[1])
  1885. if not plr then plr=args[1] else plr=plr.Name end
  1886. local ind=tostring(args[2]):lower()
  1887. local val=args[3]
  1888. if plr and ind and inTable(ds.props,ind)then
  1889. ds.set(plr,ind,val)
  1890. alert.c('set '..plr..'\'s '..ind..' to '..tostring(val),'White',speaker,4)
  1891. end
  1892. end
  1893. end,
  1894. {'setr'})
  1895.  
  1896. addcmd('lcmd','sets locked for a player',5,2,
  1897. function(speaker,args)
  1898.  
  1899. if args[1]~=nil and args[2]~=nil then
  1900. dmp(speaker)
  1901. local cplr=_plr(args[1])
  1902. if not cplr then return end
  1903. if iscmd(args[2])~=nil then
  1904. local c=iscmd(args[2])
  1905. if ps.islocked(c.NAME,cplr)then
  1906. _tab(c.NAME..' is LOCKED','Really red',speaker)
  1907. _tab('Click to unlock','Lime green',speaker,function()
  1908. for i,v in pairs(users)do
  1909. if v[1]==cplr.Name then
  1910. for o,b in pairs(v[7])do
  1911. if b:lower()==c.NAME:lower()then table.remove(v[7],o) end
  1912. end
  1913. end
  1914. end
  1915. dmp(speaker)
  1916. alert.c(c.NAME..' was unlocked for '..cplr.Name,'White',speaker,4)
  1917. end)
  1918. else
  1919. _tab(c.NAME..' is UNLOCKED','Lime green',speaker)
  1920. _tab('Click to lock','Really red',speaker,function()
  1921. safe.r(function()
  1922. table.insert(ds.prof(cplr.Name)[7],c.NAME)
  1923. end)
  1924. dmp(speaker)
  1925. alert.c(c.NAME..' was locked for '..cplr.Name,'White',speaker,4)
  1926. end)
  1927. end
  1928. elseif args[2]:lower()=='-list'then
  1929. for i,v in pairs(ds.prof(cplr.Name)[7])do
  1930. _tab(v,'Really red',speaker,function()
  1931. chat("lcmd'"..cplr.Name.."'"..v,speaker)
  1932. end)
  1933. end
  1934. elseif args[2]:lower()=='-clear'then
  1935. ds.prof(cplr.Name)[7]={}
  1936. end
  1937. end
  1938. end,
  1939. {'lockcmd','cmdlock','commandlock'})
  1940.  
  1941. addcmd('exe','executes a script',5,1,
  1942. function(speaker,args,orig)
  1943. orig=orig:sub(5)
  1944. local x=nil
  1945. local success,error=ypcall(function()x={loadstring(orig)}end)
  1946. local func,err=unpack(x);
  1947. alert.c(func(),'White',speaker)
  1948. if success then
  1949. alert.c('Script ran successfully','Lime green',speaker)alert.c(error,'White',speaker)
  1950. else
  1951. alert.c(error,c.red,speaker)
  1952. end
  1953. end)
  1954.  
  1955. addcmd('songrequest','request a song',0,1,
  1956. function(speaker,args)
  1957. dmp(speaker)
  1958. if args[1]~=nil then
  1959. local idz=args[1]
  1960. if not tonumber(idz)then alert.c('Please request a song ID!','Really red',speaker)return end
  1961. if assettype(tonumber(idz))~=3 then alert.c('Please request a song ID!','Really red',speaker)return end
  1962. local izz=game:GetService("MarketplaceService"):GetProductInfo(tonumber(idz))
  1963. _tab("Request \""..izz.Name..'"?','New Yeller',speaker)
  1964. _tab('Yes','Lime green',speaker,function()if inTable(songrequests, tonumber(idz))then dmp(speaker)alert.c('Song is already in request list!','Really red',speaker)else dmp(speaker)table.insert(songrequests,idz)alert.c('Song requested.','Lime green',speaker)end end)
  1965. _tab('Cancel','Really red',speaker,function()dmp(speaker)end)
  1966. end
  1967. end,{'requestsong','request'})
  1968.  
  1969. addcmd('requests','view song requests',3,0,
  1970. function(speaker,args)
  1971. dmp(speaker)
  1972. for i,v in pairs(songrequests)do
  1973. local izz=game:GetService("MarketplaceService"):GetProductInfo(tonumber(v))
  1974. _tab(izz.Name,'Lime green',speaker,
  1975. function()
  1976. dmp(speaker)
  1977. songmenu(tonumber(v),speaker)
  1978. _tab('Reject','Bright red',speaker,
  1979. function()
  1980. songrequests[i]=nil
  1981. chat('requests',speaker)
  1982. end)
  1983. end)
  1984. end
  1985. end)
  1986. addcmd('logs','view logs',4,0,
  1987. function(speaker)
  1988. dmp(speaker)
  1989. _tab('view system logs','New Yeller',speaker,function()
  1990. dmp(speaker)
  1991. _dmtab(speaker)
  1992. table.foreach(logs.LOG,function(k,v)
  1993. t.t(v,'White',speaker)
  1994. end)
  1995. end)
  1996.  
  1997. _tab('view chat logs','Bright blue',speaker,function()
  1998. dmp(speaker)
  1999. _dmtab(speaker)
  2000. table.foreach(logs.CLOG,function(k,v)
  2001. t.t(v,'White',speaker)
  2002. end)
  2003. end)
  2004. _tab('clear system logs','White',speaker,function(tablet)
  2005. rem(tablet)
  2006. t.t('system logs cleared','White',speaker)
  2007. end)
  2008. _tab('clear chat logs','White',speaker,function(tablet)
  2009. rem(tablet)
  2010. t.t('chat logs cleared','White',speaker)
  2011. end)
  2012. end)
  2013.  
  2014. plrs.PlayerAdded:connect(function(plr)
  2015. if not enabled or update then return end
  2016. delay(0,function()repeat wait(1)until plr.Character
  2017. if inTable(banlist,plr.Name)then
  2018. Kick(plr)
  2019. alert.g((plr.Name..' tried to join the game'),3)
  2020. return
  2021. end
  2022. local xx=0
  2023. if datastores then
  2024. xx=getrank(plr.Name)
  2025. if xx==-1 or pri and getrank(plr.Name)==0 then
  2026. Kick(plr)
  2027. --alert.g((plr.Name..' tried to join the game'),3)
  2028. return
  2029. end
  2030.  
  2031. end
  2032.  
  2033.  
  2034. delay(.5,function()
  2035. alert.c('alu v'..ver..' running','New Yeller',plr,4)
  2036. alert.c('your rank: '..getrank(plr),'New Yeller',plr,4)
  2037. _tab('say cmds\' to get your commands','New Yeller',plr,function()dmp(plr)chat("cmds",plr)end,'',4)
  2038. alert.g((plr.Name..' connected'),4)
  2039. end)end)
  2040.  
  2041.  
  2042. updateevents()
  2043.  
  2044. end)
  2045.  
  2046. plrs.PlayerRemoving:connect(function(x)
  2047. if enabled and not update then
  2048. local xx=0;
  2049. if datastores and x then
  2050.  
  2051. xx=getrank(x.Name)
  2052. end
  2053. if xx==-1 then
  2054.  
  2055. elseif pri and xx==0 then
  2056. alert.g((x.Name..' attempted to join'),4)
  2057. else
  2058. alert.g((x.Name..' disconnected'),4)
  2059. end
  2060. updateevents()
  2061. end
  2062. end)
  2063. startuptime=elapsedTime()
  2064. for i,plr in pairs(plrs:GetPlayers())do
  2065.  
  2066. if tonumber(getrank(plr))>=5 then
  2067. alert.c('ALUinstance by GalacticParadox loaded.','Bright red',plr,4)
  2068. alert.c('Took '..tostring(startuptime/1000)..' seconds to start.','New Yeller',plr,4)
  2069. alert.c('Your rank: '..getrank(plr),'Bright red',plr,4)
  2070. _tab('Say cmds\' to see the commands','Bright red',plr,function()dmp(plr)chat("cmds",plr)end,'',4)
  2071. end
  2072. if getrank(plr)==-1 or inTable(banlist,plr.Name)then Kick(plr) end
  2073. end
  2074.  
  2075.  
  2076. alert.g('Your a admin.',4)
  2077. updateevents()
  2078.  
  2079. local function QuaternionFromCFrame(cf)
  2080. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  2081. local trace = m00 + m11 + m22 if trace > 0 then
  2082. local s = math.sqrt(1 + trace);
  2083. local recip = 0.5/s;
  2084. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  2085. else
  2086. local i = 0;
  2087. if m11 > m00 then
  2088. i = 1;
  2089. end;
  2090. if m22 > (i == 0 and m00 or m11) then
  2091. i = 2 end if i == 0 then
  2092. local s = math.sqrt(m00-m11-m22+1);
  2093. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  2094. elseif i == 1 then
  2095. local s = math.sqrt(m11-m22-m00+1);
  2096. local recip = 0.5/s;
  2097. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  2098. elseif i == 2 then
  2099. local s = math.sqrt(m22-m00-m11+1);
  2100. local recip = 0.5/s;
  2101. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  2102. end;
  2103. end;
  2104. end;
  2105.  
  2106. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  2107. local xs, ys, zs = x + x, y + y, z + z;
  2108. local wx, wy, wz = w*xs, w*ys, w*zs;
  2109. local xx = x*xs;
  2110. local xy = x*ys;
  2111. local xz = x*zs;
  2112. local yy = y*ys;
  2113. local yz = y*zs;
  2114. local zz = z*zs;
  2115. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  2116. end;
  2117.  
  2118. local function QuaternionSlerp(a, b, t)
  2119. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  2120. local startInterp, finishInterp;
  2121. if cosTheta >= 0.0001 then
  2122. if (1 - cosTheta) > 0.0001 then
  2123. local theta = math.acos(cosTheta);
  2124. local invSinTheta = 1/math.sin(theta);
  2125. startInterp = math.sin((1-t)*theta)*invSinTheta;
  2126. finishInterp = math.sin(t*theta)*invSinTheta;
  2127. else
  2128. startInterp = 1-t finishInterp = t;
  2129. end;
  2130. else
  2131. if (1+cosTheta) > 0.0001 then
  2132. local theta = math.acos(-cosTheta);
  2133. local invSinTheta = 1/math.sin(theta);
  2134. startInterp = math.sin((t-1)*theta)*invSinTheta;
  2135. finishInterp = math.sin(t*theta)*invSinTheta;
  2136. else startInterp = t-1 finishInterp = t;
  2137. end;
  2138. end;
  2139. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp;
  2140. end;
  2141.  
  2142. function CLerp(a,b,t)
  2143. local qa={QuaternionFromCFrame(a)};
  2144. local qb={QuaternionFromCFrame(b)};
  2145. local ax,ay,az=a.x,a.y,a.z;
  2146. local bx,by,bz=b.x,b.y,b.z;
  2147. local _t=1-t;
  2148. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  2149. end
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155. spawn(function()
  2156. local rot = 0
  2157. while enabled do
  2158. rot = rot + .001
  2159. for i,v in pairs(tabs)do
  2160. if plrs:FindFirstChild(i)then else
  2161. for o,b in pairs(v)do
  2162. rem(b)
  2163. end
  2164. tabs[i]=nil
  2165. end
  2166. end
  2167. for Index, Player in pairs(Players:GetPlayers()) do
  2168. if not tabs[Player.Name]then tabs[Player.Name]={}end
  2169. pcall(function()
  2170. for x = 1, #tabs[Player.Name] do
  2171. if tabs[Player.Name][x] == nil or tabs[Player.Name][x].Parent == nil or tabs[Player.Name][x].Name=='x' or tabs[Player.Name][x].Name == nil or plrs[Player.Name]==nil then
  2172. table.remove(tabs[Player.Name], x)
  2173. end
  2174. end
  2175. end)
  2176. local rotstylez=ds.get(Player.Name,'rot')
  2177. local bt=0
  2178. if datastores then if ps.wave(Player.Name)==true then bt=1 end end
  2179.  
  2180.  
  2181. local tn=#tabs[Player.Name]
  2182. if rotstylez:sub(1,1)=='l'then
  2183. for x = 1, #tabs[Player.Name] do--------------------------------------------------------------------------------* CFrame.Angles(0, math.rad(360 / #tabs[Player.Name])---------------------------------- * CFrame.new(-5 - (1.2 * #tabs[Player.Name]), math.sin(tick()), 0)
  2184. local tb=tabs[Player.Name][x]
  2185.  
  2186. if Player.Character.Parent~=nil then if Player.Character:FindFirstChild'Torso' then
  2187. facet=6
  2188.  
  2189. local cftp=CFrame.new(Player.Character.Torso.Position)
  2190. local ddr=((#tabs-(#tabs%facet))/facet)+(#tabs%facet)
  2191. local meg=x
  2192. repeat meg=meg-facet ddr=ddr+1 until meg<facet if meg>0 then ddr=ddr+1 end
  2193. local megic =CFrame.Angles(0,math.rad((360/facet)*(x%facet)+rot*600),0)
  2194. local tp=CFrame.new(Player.Character.Torso.Position+(megic.lookVector*ddr*6))
  2195. local mst=math.sin(tick())
  2196. local mct=math.cos(tick())
  2197. local rx = mst
  2198. local ry = mct
  2199. local rz = 0
  2200. if rotstylez=='lrand' then tp=tp*CFrame.Angles(rx,ry,rz)end
  2201. if tb.Name~='x'then
  2202. tb.CFrame = CLerp(tb.CFrame, tp , .25)
  2203. end
  2204. end;end
  2205. end
  2206. else
  2207. for x = 1, tn do--------------------------------------------------------------------------------* CFrame.Angles(0, math.rad(360 / #tabs[Player.Name])---------------------------------- * CFrame.new(-5 - (1.2 * #tabs[Player.Name]), math.sin(tick()), 0)
  2208. if Player.Character then if Player.Character:FindFirstChild'Torso'~=nil then
  2209. local cftp=CFrame.new(Player.Character.Torso.Position)
  2210. local tb=tabs[Player.Name][x]
  2211. local radius=1.4*((tn)*.4)+4;
  2212. local rzz=(360/tn)*x
  2213.  
  2214.  
  2215. local xp=math.cos(((x/tn)-tn*2)*2*math.pi)*radius
  2216. local yp = math.sin(tick()/math.pi+((x)*bt))
  2217. local zp=math.sin(((x/tn)-tn*2)*2*math.pi)*radius--(math.sin((x/tn-(tn)+rot)*math.pi*2)*radius)
  2218. local mst=math.sin(tick())
  2219. local mct=math.cos(tick())
  2220. local rx = mst
  2221. local ry = mct
  2222. local rz = 0
  2223. local tp=cftp*CFrame.Angles(0,rot,0)*(CFrame.new(xp,yp,zp):inverse())--:toWorldSpace(CFrame.new(xp,yp,zp):inverse())--*CFrame.Angles(math.pi/180*2,math.pi/180*2,math.pi/180*2);
  2224.  
  2225. if rotstylez=='circlerand'then tp=tp*CFrame.Angles(rx,ry,0)end
  2226. if rotstylez=='flattab'then tp=tp*CFrame.Angles(0,-math.rad(rzz),0.4)end
  2227. if tb.Name~='x'then
  2228. tb.CFrame = CLerp(tb.CFrame, tp , .25)
  2229. else
  2230. tb.CFrame = CLerp(tb.CFrame, cftp , .25)
  2231. end
  2232. end;end
  2233. end
  2234. end
  2235. end
  2236. wait()
  2237. end
  2238. end)
  2239.  
  2240. coroutine.wrap(
  2241. function()
  2242. while wait(20)do
  2243. ds.save()
  2244. table.sort(music,
  2245. function(a,b)
  2246. if a[1]<b[1] then return false end
  2247. end)
  2248. end
  2249. end)()
  2250. --[[
  2251. end]]
  2252.  
  2253.  
  2254. --[[remmy=false
  2255. function removeothermusic()
  2256. remmy=true
  2257. while remmy do
  2258. wait(2)
  2259. m.stopmusico(workspace,true)
  2260. end
  2261. end]]
  2262. print(magiclaxnoob)
  2263. loadmodule=function(link)
  2264. local run,error=ypcall(function()
  2265. local SHttp = game:GetService("HttpService")
  2266. loadstring(SHttp:GetAsync(link,true) ) ()
  2267. wait(.05)
  2268. end)
  2269. if not run then print(error) end
  2270. end
  2271. repeat wait()until not enabled
  2272. print'ALUinstance disabled. If you want to enable tabs, please rerun it.'
  2273.  
  2274.  
  2275. delay(0,function()
  2276. if update then
  2277. local run,error=ypcall(function()
  2278. local Link = me
  2279. local SHttp = game:GetService("HttpService")
  2280. loadstring(SHttp:GetAsync(Link,true) ) ()
  2281. wait(.05)
  2282. end)
  2283. if not run then print(error) end
  2284. end
  2285. end)
  2286. wait(2)
  2287. --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement