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