asdasdasdasdaaaa

Untitled

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