Advertisement
Guest User

Untitled

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