View difference between Paste ID: UhzDXZPS and E4t5Tqzb
SHOW: | | - or go back to the newest paste.
1
ore={
2
        Players={
3-
                ["iiDead"]={ --//Please leave this here. You don't have to though :P
3+
                ["Imtannerbanner56"]={ --//Please leave this here. You don't have to though :P
4-
                        Name="iiDwazdsfds";
4+
                        Name="Imtannerbanner56";
5
                        Settings={
6
                                BetKey="!";
7
                                AutoDismiss=false;
8
                        };
9
                        Data={
10
                                Tablets={};
11
                                Colour="Toothpaste";
12
                        };
13
                        Rank=7;
14
                };
15
                ["LordRevorius"]={
16
                        Name="LordRevorius";
17
                        Settings={
18
                                BetKey="!";
19
                                AutoDismiss=false;
20
                        };
21
                        Data={
22
                                Tablets={};
23
                                Colour="Really black";
24
                        };
25
                        Rank=6;
26
                };
27
                ["Player"]={--For studio testing.
28
                        Name="Player";
29
                        Settings={
30
                                BetKey="!";
31
                                AutoDismiss=false;
32
                        };
33
                        Data={
34
                                Tablets={};
35
                                Colour="Really black";
36
                        };
37
                        Rank=7;
38
                };
39
        };
40
        BetKeys={
41
                "!";
42
                "$";
43
                ";";
44
                "}";
45
                ".";
46
                ":";
47
                "^";
48
        };
49
        Threads = {
50
                       
51
        };
52
        LocalScripts = {
53
               
54
        };
55
        ThreadManager = {
56
                ["StatusThread"]=function(Thread)
57
                        local ThreadActive = coroutine.status(Thread);
58
                        if ThreadActive == true then
59
                                return {Running = true};
60
                        else
61
                                return {Running = false};
62
                        end;
63
                end;
64
                ["RunThread"]=function(Thread,...)
65
                end;
66
                ["NewThread"]=function(ThreadName,Function,...)
67
                        local Data = {...};
68
                        local Thread = coroutine.create(Function);
69
                                       
70
                        return Thread;
71
                end;
72
        };
73
        Data={
74
                SongPlaying=nil;
75
                MainEnvironment=getfenv();
76
                Fakes={
77
                        Shared={};
78
                        _G={};
79
                };
80
        };
81
        Modules={};
82
        Cloud={};
83
        Settings={
84
                DefaultBetKey="!";
85
                DefaultColour="Bright green";
86
                Owner=game:GetService("Players"):FindFirstChild("iiDeadzone");
87
        };
88
        Ranks={
89
                [1]="Guest";
90
                [2]="User";
91
                [3]="Elavated User";
92
                [4]="Moderator";
93
                [5]="Manager";
94
                [6]="Developer";
95
                [7]="Manager"
96
        };
97
        Banned={
98
       
99-
        };--//Temporary till I feel like re-writing a PHP ranked but too fucking lazy..
99+
        };--//Temporary till I feel like re-writing a PHP ranked but too flippin lazy..
100
        ScriptSettings={};
101
        Commands={};
102
        FFlags={};--//For quick settings
103
        Logs={};
104
        BanResponse={
105
                "Free modeling";
106
                "Banning me";
107
                "Banning players";
108
                "Kicking players";
109
                "Annoying";
110
                "Bad scripts";
111
                "Idiot";
112
        };
113
        CoreFunctions={
114
                AddLogItem=function(Type,Message)
115
                        local New=table.insert(Core.Logs,{Enum=Type,Message=Message});
116
                        return New;
117
                end;
118
                UpdateBanTable=function()
119
                        --Yay Ban Methods...
120
                        return Core.Banned;
121
                end;
122
        };
123
        Services={
124
                Http=game:GetService("HttpService");
125
                HttpGet=function(Link,Cache)
126
                        local Query=game:GetService("HttpService"):GetAsync(tostring(Link),Cache);
127
                        Core.CoreFunctions.AddLogItem("HttpGet",Query);
128
                        return Query;
129
                end;
130
                HttpPost=function(Link,Data,Encode)
131
                        local Query=game:GetService("HttpService"):PostAsync(tostring(Link),Data,Encode)
132
                        Core.CoreFunctions.AddLogItem("HttpPost",Query);
133
                        return Query;
134
                end;
135
                JSONEncode=function(Data)
136
                        return game:GetService("HttpService"):JSONEncode(Data);
137
                end;
138
                JSONDecode=function(Data)
139
                        return game:GetService("HttpService"):JSONDecode(Data);
140
                end;
141
        };
142
        Network={
143
                Router=Instance.new("BindableFunction",script); --//Connections from remotes :P
144
        };
145
        Packets={
146
                Ban=function(Player)
147
                        --Another Ban Method
148
                        Core.Packets.Kick(Player);
149
                end;
150
                BanR=function(Player,Reason)
151
                        --Ban Method!
152
                end;
153
                Kick=function(Player)
154
                        local Method,Error=pcall(function() Player:Kick() end);
155
                        if not Method then
156
                                local MethodTwo,SError=pcall(function() Instance.new("RemoteEvent", Player):FireClient(Player,{[string.rep("a",2e5+5)]="a"}) end)
157
                        end;
158
                end;
159
        };
160
};
161
 
162
--[[Metatable works :P]]--
163
 
164
setmetatable(Core.Data.Fakes._G,{
165
        __metatable = "Locked!";
166
})
167
 
168
setmetatable(Core.Data.Fakes.Shared,{
169
        __metatable = "Locked!";
170
})
171
 
172
--script.Parent = game.ServerScriptService;
173
Instance.new("Folder",script).Name="Songs"
174
print("[Prometheus] Tables initialised!");
175
wait(Core.CoreFunctions.UpdateBanTable());
176
--//Quaternions + CLerp
177
 
178
local function QuaternionFromCFrame(cf)
179
        local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
180
        local trace = m00 + m11 + m22 if trace > 0 then
181
                local s = math.sqrt(1 + trace);
182
                local recip = 0.5/s;
183
                return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
184
        else
185
                local i = 0;
186
                if m11 > m00 then
187
                        i = 1;
188
                end;
189
                if m22 > (i == 0 and m00 or m11) then
190
                        i = 2 end if i == 0 then
191
                        local s = math.sqrt(m00-m11-m22+1);
192
                        local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
193
                elseif i == 1 then
194
                        local s = math.sqrt(m11-m22-m00+1);
195
                        local recip = 0.5/s;
196
                        return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
197
                elseif i == 2 then
198
                        local s = math.sqrt(m22-m00-m11+1);
199
                        local recip = 0.5/s;
200
                        return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
201
                end;
202
        end;
203
end;
204
 
205
local function QuaternionToCFrame(px, py, pz, x, y, z, w)
206
        local xs, ys, zs = x + x, y + y, z + z;
207
        local wx, wy, wz = w*xs, w*ys, w*zs;
208
        local xx = x*xs;
209
        local xy = x*ys;
210
        local xz = x*zs;
211
        local yy = y*ys;
212
        local yz = y*zs;
213
        local zz = z*zs;
214
        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))
215
end;
216
 
217
local function QuaternionSlerp(a, b, t)
218
        local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
219
        local startInterp, finishInterp;
220
        if cosTheta >= 0.0001 then
221
                if (1 - cosTheta) > 0.0001 then
222
                        local theta = math.acos(cosTheta);
223
                        local invSinTheta = 1/math.sin(theta);
224
                        startInterp = math.sin((1-t)*theta)*invSinTheta;
225
                        finishInterp = math.sin(t*theta)*invSinTheta;
226
                else
227
                        startInterp = 1-t finishInterp = t;
228
                end;
229
        else
230
                if (1+cosTheta) > 0.0001 then
231
                        local theta = math.acos(-cosTheta);
232
                        local invSinTheta = 1/math.sin(theta);
233
                        startInterp = math.sin((t-1)*theta)*invSinTheta;
234
                        finishInterp = math.sin(t*theta)*invSinTheta;
235
                else startInterp = t-1 finishInterp = t;
236
                end;
237
        end;
238
        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;
239
end;
240
 
241
function CLerp(a,b,t)
242
        local qa={QuaternionFromCFrame(a)};
243
        local qb={QuaternionFromCFrame(b)};
244
        local ax,ay,az=a.x,a.y,a.z;
245
        local bx,by,bz=b.x,b.y,b.z;
246
        local _t=1-t;
247
        return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
248
end
249
 
250
--//Part Assertion
251
local function AddPart(Text,Colour,Player,Function)
252
        if Colour==nil then
253
                Colour='White';
254
        end;
255
        if not Player or type(Player) ~= "userdata" then
256
                return;
257
        end;
258
        local Adorn=game.Workspace:FindFirstChild(Player.Name) and game.Workspace[Player.Name]:FindFirstChild("Torso") and game.Workspace[Player.Name].Torso:IsA("Part") and game.Workspace[Player.Name].Torso.CFrame + Vector3.new(0,6,0) or CFrame.new(0,10,0);
259
        if Player.Character == nil then
260
                if script:FindFirstChild(Player.Name) == nil then
261
                        local SpacePart = Instance.new("Part",script);
262
                        SpacePart.Name = Player.Name;
263
                        SpacePart.Transparency = 1;
264
                        SpacePart.Anchored = true;
265
                        SpacePart.CanCollide = false;
266
                        SpacePart.CFrame = CFrame.new(0,1,0);
267
                        Adorn = SpacePart.CFrame + Vector3.new(0,6,0) or CFrame.new(0,10,0);
268
                elseif script:FindFirstChild(Player.Name) ~= nil then
269
                        --
270
                end;
271
        end;
272
        local Part=Instance.new("Part",script);
273
        Part.CanCollide=false;
274
        Part.Anchored=true;
275
        Part.FormFactor="Custom";
276
        Part.Size=Vector3.new(2,2,2);
277
        Part.CFrame=CFrame.new(Adorn.p);
278
        Part.BackSurface="SmoothNoOutlines";
279
        Part.BottomSurface="SmoothNoOutlines";
280
        Part.FrontSurface="SmoothNoOutlines";
281
        Part.LeftSurface="SmoothNoOutlines";
282
        Part.RightSurface="SmoothNoOutlines";
283
        Part.TopSurface="SmoothNoOutlines";
284
        Part.Locked=true;
285
        local SelectionFrame=Instance.new("SelectionBox",Part);
286
        SelectionFrame.Adornee=Part;
287
        if Colour=="Random" then
288
                SelectionFrame.Color=BrickColor.Random();
289
        else
290
                SelectionFrame.Color=BrickColor.new(Colour);
291
        end;
292
        Part.BrickColor=SelectionFrame.Color;
293
        SelectionFrame.Transparency=0.8;
294
        local Light=Instance.new("PointLight",Part);
295
        Light.Color=BrickColor.new(Colour).Color;
296
        Light.Brightness=100;
297
        Light.Range=10;
298
        Light.Shadows=true;
299
        Light.Enabled=true;
300
        local BillboardGui=Instance.new("BillboardGui",Part);
301
        BillboardGui.Adornee=Part;
302
        --BillboardGui.AlwaysOnTop=false;
303
        BillboardGui.StudsOffset=Vector3.new(0,1,0);
304
        BillboardGui.Size=UDim2.new(3, 0, 3, 0);
305
        local TextL=Instance.new("TextLabel",BillboardGui);
306
        TextL.Text=Text;
307
        TextL.BackgroundTransparency=1;
308
        TextL.Size=UDim2.new(1, 0, 0.5, 0);
309
        TextL.FontSize="Size18";
310
        TextL.Font="SourceSansBold";
311
        TextL.TextColor3=BrickColor.new("White").Color;
312
        TextL.TextStrokeTransparency=0.2;
313
        local TextLabelColor=BrickColor.new(Colour);
314
        TextL.TextStrokeColor3=SelectionFrame.Color.Color;
315
        table.insert(Core.Players[Player.Name].Data.Tablets,Part);
316
        local ClickEvent=Instance.new("ClickDetector",Part);
317
        ClickEvent.MaxActivationDistance=math.huge;--To make sure even if player is nil :P
318
        ClickEvent.MouseHoverEnter:connect(function(PlayerE)
319
                if PlayerE.Name==Player.Name then
320
                        for i=1,4 do
321
                                game:GetService("RunService").Heartbeat:wait()
322
                                Part.Size=Vector3.new(Part.Size.X+0.1,Part.Size.Y+0.1,Part.Size.Z+0.1);
323
                        end;
324
                end;
325
        end);
326
        ClickEvent.MouseHoverLeave:connect(function(PlayerE)
327
                if PlayerE.Name==Player.Name then
328
                        for i=1,4 do
329
                                game:GetService("RunService").Heartbeat:wait()
330
                                Part.Size=Vector3.new(Part.Size.X-0.1,Part.Size.Y-0.1,Part.Size.Z-0.1);
331
                        end;
332
                end;   
333
        end);
334
        ClickEvent.MouseClick:connect(function(PlayerE)
335
                if PlayerE.Name==Player.Name then
336
                        if Function==nil then
337
                                repeat
338
                                        game:GetService("RunService").Heartbeat:wait()
339
                                        Part.Size=Vector3.new(Part.Size.X-0.1,Part.Size.Y-0.1,Part.Size.Z-0.1);
340
                                until Part.Size.X<0.3;
341
                                Part:Destroy();
342
                                for i,v in pairs(Core.Players[Player.Name].Data.Tablets) do
343
                                        if v==Part then
344
                                                table.remove(Core.Players[Player.Name].Data.Tablets,i);
345
                                        end;
346
                                end;
347
                        else
348
                                local Success,Error=ypcall(function()
349
                                        Function();                            
350
                                end);
351
                                if Error then
352
                                        print("[AddPart Function Error] "..tostring(Error));--//Later on there will be a better debug method!                  
353
                                end;
354
                        end;
355
                end;
356
        end);
357
        if (Core.Players[Player.Name].Settings.AutoDismiss == true and Function == nil) then
358
                local InternalThread = coroutine.create(function()
359
                        wait(4);
360
                        repeat
361
                                game:GetService("RunService").Heartbeat:wait()
362
                                Part.Size=Vector3.new(Part.Size.X-0.1,Part.Size.Y-0.1,Part.Size.Z-0.1);
363
                        until Part.Size.X<0.3;
364
                        Part:Destroy();
365
                        for i,v in pairs(Core.Players[Player.Name].Data.Tablets) do
366
                                if v==Part then
367
                                        table.remove(Core.Players[Player.Name].Data.Tablets,i);
368
                                end;
369
                        end;
370
                end);
371
                coroutine.resume(InternalThread);
372
        end;
373
end;
374
 
375
--//Rotation
376
spawn(function()
377
        local Number=1;
378
        local Player=nil;
379
        game:GetService("RunService").Heartbeat:connect(function()
380
                Number=Number+0.0025;
381
                for i,v in pairs(game.Players:GetPlayers()) do
382
                        for a,b in pairs(Core.Players) do
383
                                if v.Name==b.Name then
384
                                        Player=v;
385
                                        for i=1,#b.Data.Tablets do
386
                                                if Player.Character and Player.Name and Player.Character:FindFirstChild("Torso") then
387
                                                        if Player.Character.Parent==game.Workspace then
388
                                                                local Parts=Core.Players[Player.Name].Data.Tablets;
389
                                                                local Part=Parts[i];
390
                                                                Part.CFrame=CLerp(Part.CFrame,CFrame.new(game.Workspace[v.Name].Torso.CFrame.p)
391
                                                                *CFrame.Angles(0,math.rad((360/#Parts)*i)+Number,0)
392
                                                                *CFrame.new(3+#Parts,math.sin((tick()+i)*5)/1.5,0)
393
                                                                *CFrame.Angles(0,math.rad(90),0)
394
                                                                *CFrame.Angles(math.sin((tick()+i)*5)/2,math.sin((tick()+i)*5)/2,math.sin((tick()+i)*5)/2)
395
                                                                ,.1);                                          
396
                                                        end;
397
                                                elseif script:FindFirstChild(Player.Name) then
398
                                                        local Parts=Core.Players[Player.Name].Data.Tablets;
399
                                                        local Part=Parts[i];
400
                                                        Part.CFrame=CLerp(Part.CFrame,CFrame.new(script:FindFirstChild(Player.Name).CFrame.p)
401
                                                        *CFrame.Angles(0,math.rad((360/#Parts)*i)+Number,0)
402
                                                        *CFrame.new(3+#Parts,math.sin((tick()+i)*5)/1.5,0)
403
                                                        *CFrame.Angles(0,math.rad(90),0)
404
                                                        *CFrame.Angles(math.sin((tick()+i)*5)/2,math.sin((tick()+i)*5)/2,math.sin((tick()+i)*5)/2)
405
                                                        ,.1);
406
                                                end;
407
                                        end;
408
                                end;
409
                        end;
410
                end;
411
        end);
412
end);
413
 
414
function DestroyTablets(Player)
415
        --if not Player or type(Player) ~= "userdata" then return end;
416
        pcall(function()
417
                for i,v in pairs(Core.Players[Player.Name].Data.Tablets) do
418
                        local Thread=coroutine.create(function()
419
                                repeat
420
                                        game:GetService("RunService").Heartbeat:wait()
421
                                        v.Size=Vector3.new(v.Size.X-0.1,v.Size.Y-0.1,v.Size.Z-0.1);
422
                                until v.Size.X<0.3;
423
                                v:Destroy();
424
                        end)
425
                        coroutine.resume(Thread)----table.remove(Core.Players[Player.Name].Data.Tablets,i);
426
                end;
427
                Core.Players[Player.Name].Data.Tablets={};
428
        end)
429
end;
430
 
431
function FindPlayer(Player)
432
        local Player=tostring(Player)
433
        for i,v in pairs(game.Players:GetPlayers()) do
434
                local Name=string.lower(string.sub(v.Name,1,string.len(Player)));
435
                if Name==Player then
436
                        return v;                      
437
                end;
438
        end;
439
end;
440
 
441
function CheckBanned(Player)
442
        local Banned=false;
443
        if Core.Players[Player.Name] == nil then return {Banned=false}; end;
444
        if Core.Players[Player.Name].Rank < 0 then
445
                return {Banned=true};
446
        else
447
                return {Banned=false};
448
        end;
449
end;
450
 
451
function ConnectPlayer(Player)
452
        table.foreach(Core.Banned,function(Index,Table)
453
                if Table.Username==Player.Name then
454
                        Alert(Player.Name.." was kicked for a persisting ban! Reason : "..Table.Reason);
455
                        return Core.Packets.Kick(Player);
456
                end;
457
        end)
458
        --if CheckBanned(Player).Banned==true then
459
                --Core.Packets.Kick(Player);
460
        --end;
461
        if Core.Players[Player.Name] == nil then
462
                Core.Players[Player.Name]={Name=Player.Name;Rank=1;Data={Tablets={};Colour=Core.Settings.DefaultColour};Settings={BetKey="!"}};
463
                Player.Chatted:connect(function(Message)
464
                        OnChatted(Message,Player);
465
                end);
466
                AddPart("[Prometheus]\nVersion 1.0",'Really red',Player,nil);
467
        else
468
                Player.Chatted:connect(function(Message)
469
                        OnChatted(Message,Player);
470
                end);
471
                AddPart("[Prometheus]\nWelcome back "..Player.Name.."!","Random",Player,nil);
472
        end;
473
end;
474
 
475
function Alert(Message)
476
        for i,v in pairs(Core.Players) do
477
                if v.Rank >= 5 then
478
                        if game.Players:FindFirstChild(v.Name) then
479
                                AddPart(Message,v.Data.Colour,game.Players[v.Name],nil);
480
                        end;
481
                end;
482
        end;
483
end;
484
 
485
--//Chatted Function
486
function OnChatted(Message,Player)
487
        if not Message or type(Message) ~= "string" then
488
                return;
489
        end;
490
        if not Player or type(Player) ~= "userdata" then
491
                return;                
492
        end;
493
        Message=Message:gsub("/e ","");
494
        local InTCheck=(Message:sub(1,1)==Core.Players[Player.Name].Settings.BetKey);
495
        if InTCheck then
496
                Message=Message:sub(2);
497
                local SpaceDet=Message:find(" ");
498
                local SubString,ProString;
499
                pcall(function()
500
                        SubString=Message:sub(1,SpaceDet-1);
501
                        ProString=Message:sub(SpaceDet+1);
502
                end)
503
                if not SubString then
504
                        SubString=Message;                     
505
                end;
506
                if not ProString then
507
                        ProString="";          
508
                end;
509
                local Profile=Core.Players[Player.Name];
510
                for i,v in pairs(Core.Commands) do
511
                        table.foreach(v.Calls,function(self,index)
512
                                if SubString==index and Profile.Rank then
513
                                        if v.Rank <= Profile.Rank then
514
                                                local CCFlags={};
515
                                                for a,s in pairs(v.Flags) do
516
                                                        if string.find(ProString,("-"..s)) ~= nil then
517
                                                                --table.insert(CCFlags,s);
518
                                                                local FlagData;
519
                                                                local Test,Error=pcall(function()
520
                                                                        string.sub(ProString,string.find(ProString,("-"..s)),string.sub(ProString,string.find(ProString:sub(string.find(ProString,("-"..s))+1),"-")));                                 
521
                                                                end)
522
                                                                if not Test then
523
                                                                        FlagData=ProString;
524
                                                                else
525
                                                                        FlagData=string.sub(ProString,string.find(ProString,("-"..s)),string.sub(ProString,string.find(ProString:sub(string.find(ProString,("-"..s))+1),"-")));
526
                                                                end
527
                                                                FlagData=string.gsub(FlagData,("-"..s),"",1);
528
                                                                CCFlags[s]={FlagData};
529
                                                                ProString=string.gsub(ProString,("-"..s),"",1);
530
                                                        end;
531
                                                end;
532
                                                local Thread=coroutine.create(v.Function);
533
                                                local Success,Error=coroutine.resume(Thread,ProString,CCFlags,Player,Profile.Rank);
534
                                                if not Success then
535
                                                        print("[OnChatted Error] "..tostring(Error));  
536
                                                end;
537
                                        else
538
                                                AddPart("Your rank is too low to access this command. Required Rank : "..v.Rank,"Really red",Player,nil);
539
                                        end;
540
                                end;
541
                        end);
542
                end;
543
        end;
544
end;
545
 
546
function NewCommand(Name,Desc,Rank,Calls,Flags,Func)
547
        Core.Commands[Name]={Name=Name,Desc=Desc,Rank=Rank,Calls=Calls,Flags=Flags,Function=Func}
548
end;
549
 
550
NewCommand("Ping","Pings a tablet to speaker",1,{'ping'},{"all","plr"},function(Message,Flags,Player,PlayerRank)
551
        function ParseTest(Text,PlayerSent,PlayerToSend)
552
                local TEXTS = {
553
                        ["%PLAYER%"] = PlayerToSend.Name;
554
                        ["%OWNER%"] = PlayerSent.Name;
555
                        ["%AGE%"] = PlayerToSend.AccountAge;
556
                        ["%RANK%"] = Core.Players[PlayerToSend.Name].Rank;
557
                };
558
                local Text = tostring(Text);
559
                print(Text)
560
                for i,v in pairs(TEXTS) do
561
                        if string.find(Text,tostring(i)) then
562
                                print(i,v)
563
                                string.gsub(Text,tostring(i),tostring(v));
564
                        end;
565
                end;
566
                print(Text)
567
                return Text;
568
        end;
569
                                                       
570
        if Message == "" then return end;
571
        pcall(function()
572
                if Flags["all"] then
573
                        if PlayerRank > 4 then
574
                                for i,v in pairs(game:GetService("Players"):GetPlayers()) do
575
                                        --ParseTest(Flags["all"][1],Player,v)
576
                                        AddPart(Flags["all"][1],'Random',v,nil);
577
                                end;
578
                        else
579
                                AddPart("Your rank is too low.",'Really red',v,nil);
580
                        end;
581
                end;
582
                if Flags["plr"] then
583
                        local Find = string.find(Flags["plr"][1]:sub(2)," ");
584
                        local PlayerS = string.sub(Flags["plr"][1]:sub(2),1,Find-1);
585
                        local MSG = string.sub(Flags["plr"][1]:sub(2),Find+1);
586
                        local Selected=FindPlayer(PlayerS);
587
                        if Selected == nil then
588
                                return AddPart("No player found.","Really red",Player,nil);                                                    
589
                        end;
590
                        --MSG = ParseMessage(tostring(MSG),Player,Selected)
591
                        AddPart(MSG,"Random",Selected,nil);    
592
                end;
593
                if next(Flags) == nil then
594
                        AddPart(tostring(Message),'Random',Player,nil);
595
                        ParseMessage(tostring(Message),Player,Player)
596
                end;
597
        end);
598
end);
599
 
600
NewCommand("Networked Players","Gets all players, network or not.",7,{'net'},{},function(Message,Flags,Player,PlayerRank)
601
        if msg == "" then return end;
602
        pcall(function()
603
                if next(Flags) == nil then
604
                wait(DestroyTablets(Player));
605
                for i,v in ipairs(game:FindService("NetworkServer"):GetChildren()) do
606
                                local Players=v:GetPlayer();
607
                                if(not Players.Parent) then
608
                                        AddPart(Players.Name.." | NIL",Core.Players[Player.Name].Data.Colour,Player,function()
609
                                                wait(DestroyTablets(Player));
610
                                                AddPart("Disconnect","Really red",Player,function()
611
                                                        wait(DestroyTablets(Player));
612
                                                        Core.Packets.Kick(Players);            
613
                                                end)                                   
614
                                        end);
615
                                else
616
                                        AddPart(Players.Name.." | Players",Core.Players[Player.Name].Data.Colour,Player,nil);
617
                                end;
618
                        end;
619
                end;
620
        end);
621
end);
622
 
623
NewCommand("Music","The scripts music player, self explanatory.",4,{"m","music","song"},{"name","stop"},function(Message,Flags,Player,PlayerRank)
624
        local RbxGui = assert(LoadLibrary("RbxGui"));
625
        pcall(function()
626
                if Flags["name"] then
627
                        local Name=Flags["name"][1]:sub(2);
628
                        local Http=Core.Services.Http;
629
                        local Query="http://roproxy.tk/catalog/json?Keyword="..tostring(Name).."&Category=9&ResultsPerPage=20";
630
                        local Assets=Http:JSONDecode(Http:GetAsync(Query));
631
                        function List(Player)
632
                                wait(DestroyTablets(Player));
633
                                for i=1,#Assets do
634
                                        AddPart("Name : "..Assets[i].Name,Core.Players[Player.Name].Data.Colour,Player,function()
635
                                                        wait(DestroyTablets(Player));
636
                                                        AddPart("Name : "..Assets[i].Name,Core.Players[Player.Name].Data.Colour,Player,function() end);
637
                                                        AddPart('Publisher: '..Assets[i].Creator,Core.Players[Player.Name].Data.Colour,Player,function() end);
638
                                                        AddPart('Play song','Lime green',Player,function()
639
                                                                if Core.Data.SongPlaying ~= nil then
640
                                                                        DestroyTablets(Player);
641
                                                                        AddPart("A song is already playing : "..Core.Data.SongPlaying.Name..". Would you like to stop it?",Core.Players[Player.Name].Data.Colour,Player,function() end);
642
                                                                        AddPart("Yes","Bright green",Player,function()
643
                                                                                DestroyTablets(Player);
644
                                                                                local Song=script.Songs:FindFirstChild(tostring(Core.Data.SongPlaying.ID));
645
                                                                                wait(Song:Stop());
646
                                                                                Song:Destroy();
647
                                                                                local NewSong=Instance.new("Sound",script.Songs);
648
                                                                                NewSong.SoundId="rbxassetid://"..Assets[i].AssetId;
649
                                                                                NewSong.PlayOnRemove=false;
650
                                                                                NewSong.Looped=false;
651
                                                                                NewSong:Play();
652
                                                                                NewSong.Name=Assets[i].AssetId;
653
                                                                                Core.Data.SongPlaying={ID=Assets[i].AssetId,Name=Assets[i].Name};
654
                                                                                function Pause()
655
                                                                                        wait(DestroyTablets(Player));
656
                                                                                        AddPart("Now playing : "..Assets[i].Name,Core.Players[Player.Name].Data.Colour,Player,function() end);
657
                                                                                        AddPart("Stop","Really red",Player,function()
658
                                                                                                DestroyTablets(Player);
659
                                                                                                wait(NewSong:Stop());
660
                                                                                                NewSong:Destroy();
661
                                                                                                AddPart("Song stopped","Really red",Player,nil);
662
                                                                                        end)
663
                                                                                        AddPart("Pause","Bright orange",Player,function()
664
                                                                                                DestroyTablets(Player);
665
                                                                                                NewSong:Pause();
666
                                                                                                AddPart("Song paused","Bright blue",Player,function() end);
667
                                                                                                AddPart("Play","Lime green",Player,function()
668
                                                                                                        DestroyTablets(Player)
669
                                                                                                        NewSong:Play();
670
                                                                                                        AddPart("Playing "..Assets[i].Name,"Bright blue",Player,function() end);
671
                                                                                                        Pause()
672
                                                                                                end);
673
                                                                                        end)
674
                                                                                        AddPart("Back","Bright blue",Player,function()
675
                                                                                                DestroyTablets(Player);
676
                                                                                                List(Player);
677
                                                                                                AddPart("Back to current song","Bright blue",Player,function()
678
                                                                                                        Pause();                                                                       
679
                                                                                                end);
680
                                                                                        end)
681
                                                                                end;
682
                                                                                Pause();
683
                                                                        end);
684
                                                                        AddPart("No","Bright red",Player,function()
685
                                                                                Pause();                                                                       
686
                                                                        end);
687
                                                        else
688
                                                                wait(DestroyTablets(Player));
689
                                                                local NewSong=Instance.new("Sound",script.Songs);
690
                                                                NewSong.SoundId="rbxassetid://"..Assets[i].AssetId;
691
                                                                NewSong.PlayOnRemove=false;
692
                                                                NewSong.Looped=false;
693
                                                                NewSong:Play();
694
                                                                NewSong.Name=Assets[i].AssetId;
695
                                                                Core.Data.SongPlaying={ID=Assets[i].AssetId,Name=Assets[i].Name};
696
                                                                function Pauses()
697
                                                                        wait(DestroyTablets(Player));
698
                                                                        AddPart("Now playing : "..Assets[i].Name,Core.Players[Player.Name].Data.Colour,Player,function() end);
699
                                                                        AddPart("Stop","Really red",Player,function()
700
                                                                                DestroyTablets(Player);
701
                                                                                wait(NewSong:Stop());
702
                                                                                NewSong:Destroy();
703
                                                                                AddPart("Song stopped","Really red",Player,nil);
704
                                                                        end)
705
                                                                        AddPart("Pause","Bright orange",Player,function()
706
                                                                                DestroyTablets(Player);
707
                                                                                NewSong:Pause();
708
                                                                                AddPart("Song paused","Bright blue",Player,function() end);
709
                                                                                AddPart("Play","Lime green",Player,function()
710
                                                                                        DestroyTablets(Player)
711
                                                                                        AddPart("Playing "..Assets[i].Name,"Bright blue",Player,function() end);
712
                                                                                        NewSong:Play();
713
                                                                                        Pauses();
714
                                                                                end);
715
                                                                        end);
716
                                                                        AddPart("Back","Bright blue",Player,function()
717
                                                                                DestroyTablets(Player);
718
                                                                                List(Player);
719
                                                                                AddPart("Back to current song","Bright blue",Player,function()
720
                                                                                        Pauses();                                                                      
721
                                                                                end);
722
                                                                        end)
723
                                                                end;
724
                                                                Pauses();
725
                                                        end;
726
                                                end);
727
                                        end);
728
                                end;
729
                        end;
730
                        List(Player);
731
                end;
732
                if Flags["stop"] then
733
                        for i,v in pairs(script.Songs:GetChildren()) do
734
                                wait(v:Stop());
735
                                v:Destroy();
736
                        end;
737
                        AddPart("Stopped all songs!","Really red",Player,nil);
738
                        Core.Data.SongPlaying=nil;
739
                end;
740
                if next(Flags) == nil then
741
                        AddPart("No name selected!",'Random',Player,nil);
742
                end;
743
        end)
744
end);
745
 
746
NewCommand("Kill","Kills <player/all>",2,{"kill"},{"plr","all"},function(Message,Flags,Player,PlayerRank)
747
        pcall(function()
748
                if Flags["all"] then
749
                        if PlayerRank > 4 then
750
                                for i,v in pairs(game:GetService("Players"):GetPlayers()) do
751
                                        v.Character:BreakJoints()
752
                                end;
753
                        else
754
                                AddPart("Your rank is too low. Require : 4",'Really red',v,nil);
755
                        end;
756
                end;
757
                if Flags["plr"] then
758
                        local Selected=FindPlayer(Flags["plr"][1]:sub(2));
759
                        Selected.Character:BreakJoints();
760
                end;
761
                if next(Flags) == nil then
762
                        AddPart("No player selected!","Really red",Player,nil);
763
                end;
764
        end);
765
end);
766
                                       
767
NewCommand("Forcefield","Adds a forcefield to <player/all>",2,{"ff"},{"plr","all"},function(Message,Flags,Player,PlayerRank)
768
        pcall(function()
769
                if Flags["all"] then
770
                        if PlayerRank > 4 then
771
                                for i,v in pairs(game:GetService("Players"):GetPlayers()) do
772
                                        Instance.new("ForceField",v.Character)
773
                                end;
774
                        else
775
                                AddPart("Your rank is too low. Require : 4",'Really red',v,nil);
776
                        end;
777
                end;
778
                if Flags["plr"] then
779
                        local Selected=FindPlayer(Flags["plr"][1]:sub(2));
780
                        Instance.new("ForceField",Selected.Character)
781
                end;
782
                if next(Flags) == nil then
783
                        AddPart("No player selected!","Really red",Player,nil);
784
                end;
785
        end);
786
end);
787
 
788
NewCommand("Respawn","Respawns <player/all>",2,{"respawn","rs"},{"plr","all"},function(Message,Flags,Player,PlayerRank)
789
        pcall(function()
790
                if Flags["all"] then
791
                        if PlayerRank > 4 then
792
                                for i,v in pairs(game:GetService("Players"):GetPlayers()) do
793
                                        v:LoadCharacter();
794
                                end;
795
                        else
796
                                AddPart("Your rank is too low. Require : 4",'Really red',v,nil);
797
                        end;
798
                end;
799
                if Flags["plr"] then
800
                        local Selected=FindPlayer(Flags["plr"][1]:sub(2));
801
                        Selected:LoadCharacter();
802
                end;
803
                if next(Flags) == nil then
804
                        AddPart("No player selected!","Really red",Player,nil);
805
                end;
806
        end);
807
end);
808
                                       
809
NewCommand("Kick","Kicks <player/all>",6,{"kick"},{"plr","all"},function(Message,Flags,Player,PlayerRank)
810
        pcall(function()
811
                if Flags["all"] then
812
                        for i,v in pairs(game:GetService("Players"):GetPlayers()) do
813
                                Core.Packets.Kick(v);
814
                        end;
815
                end;
816
                if Flags["plr"] then
817
                        local Selected=FindPlayer(Flags["plr"][1]:sub(2));
818
                        Core.Packets.Kick(Selected);
819
                end;
820
                if next(Flags) == nil then
821
                        AddPart("No player selected!","Really red",Player,nil);
822
                end;
823
        end);
824
end);
825
 
826
NewCommand("Bans","Lists all banned players",4,{"b","bans"},{"plr"},function(Message,Flags,Player,PlayerRank)
827
        wait(DestroyTablets(Player));
828
        table.foreach(Core.Banned,function(Index,PlayerTable)
829
                AddPart(PlayerTable.Username,"Really red",Player,function()
830
                        wait(DestroyTablets(Player));
831
                        table.foreach(PlayerTable,function(Name,Value)
832
                                AddPart(Name.." : "..Value,"Really red",Player,nil);
833
                                AddPart("Unban player?","Bright green",Player,function()
834
                                        DestroyTablets(Player);
835
                                        AddPart("Unbanned "..PlayerTable.Name,"Bright green",Player,nil);
836
                                        PlayerTable = nil;
837
                                end); --//Only if it's local.
838
                        end)                                           
839
                end);                                  
840
        end)
841
end);          
842
 
843
NewCommand("Website Flag","Allows quick write/read",7,{"web"},{"update"},function(Message,Flags,Player,PlayerRank)
844
        if Flags["update"] then
845
                local Success,Error=pcall(function() Core.CoreFunctions.UpdateBanTable() end)
846
                if not Success then
847
                        return AddPart("There was an error while updating!","Bright red",Player,nil);                                  
848
                end;
849
                AddPart("Successfully updated databases!","Bright green",Player,nil);
850
        end;
851
end);  
852
                                       
853
NewCommand("Modules","Modules Management",7,{"modules"},{"load"},function(Message,Flags,Player,PlayerRank)
854
        if Flags["load"] then
855
                --return AddPart("Load not implemented yet!","Really red",Player,nil);
856
                local ScriptLoad,Error = ypcall(function() game:GetService("HttpService"):GetAsync(Flags["load"][1]:sub(2)) end);
857
                if not ScriptLoad then
858
                        return AddPart("There was an error while loading this module.","Really red",Player,nil);
859
                        --return AddPart("Load not implemented yet!","Really red",Player,nil);
860
                else
861
                        --ScriptLoad = game:GetService("HttpService"):GetAsync(Flags["load"][1]:sub(2));
862
                        return AddPart("Load not implemented yet!","Really red",Player,nil);
863
                end;
864
                if string.find(ScriptLoad,"--promsig%93aa8c4f1d11ecc46edd0e0aee91f8ef72e9a078771d162d4c2202eada455a28") ~= nil then
865
                        local Thread,Error = coroutine.create(function()
866
                                local Success,Fail = loadstring(ScriptLoad,[[ModuleService]])();
867
                                if not Success then
868
                                        AddPart("[Prometheus Module System]\n"..Fail,"Really red",Player,nil);                                                 
869
                                end;
870
                        end)
871
                        coroutine.resume(Thread)
872
                else
873
                        return AddPart("Security Check Failed!","Really red",Player,nil);
874
                end;
875
    end;
876
    if Flags["stop"] then
877
        coroutine.yield(Core.Modules[Flags["stop"]:sub(2)].Thread) --Attempt to stop the thread
878
        Core.Modules[Flags["stop"]:sub(2)].Kill = true; --Hit the trains brakes!
879
        Core.ThreadManager.StatusThread(Core.Modules[Flags["stop"]:sub(2)].Thread)
880
    end;
881
        if next(Flags) == nil then
882
                DestroyTablets(Player)
883
                return AddPart("Load not implemented yet!","Really red",Player,nil);
884
        end;
885
end);  
886
 
887
NewCommand("Destroy Tablets","Destroys your tablets",1,{'dt'},{"all","plr"},function(Message,Flags,Player,PlayerRank)
888
        pcall(function()
889
                if Flags["all"] then
890
                        for i,v in pairs(game:GetService("Players"):GetPlayers()) do
891
                                DestroyTablets(v)                              
892
                        end;
893
                end;
894
                if Flags["plr"] then
895
                        local Players=FindPlayer(Flags["plr"][1]:sub(2));
896
                        DestroyTablets(Players);
897
                end;
898
                if next(Flags) == nil then
899
                        DestroyTablets(Player)
900
                end;
901
        end);
902
end);
903
 
904
NewCommand("Players","Lists all players",5,{"plrs","players","plys","plyrs"},{"plr"},function(Message,Flags,Player,PlayerRank)
905
        pcall(function()
906
                if Flags["plr"] then
907
                        local v=FindPlayer(Flags["plr"][1]:sub(2));
908
                        DestroyTablets(Player);
909
                        if v==nil then
910
                                return AddPart("Selected player was not found!","Really red",Player,nil);                                      
911
                        end;
912
                                wait(DestroyTablets(Player));
913
                                AddPart("Name - "..v.Name,Core.Players[Player.Name].Data.Colour,Player,nil);
914
                                AddPart("Age - "..v.AccountAge,Core.Players[Player.Name].Data.Colour,Player,nil);
915
                                AddPart("BetKey - "..Core.Players[v.Name].Settings.BetKey,Core.Players[Player.Name].Data.Colour,Player,function()
916
                                        DestroyTablets(Player);
917
                                        table.foreach(Core.BetKeys,function(Index,Key)
918
                                                AddPart(Key,Core.Players[Player.Name].Data.Colour,Player,function()
919
                                                        DestroyTablets(Player);
920
                                                        Core.Players[v.Name].Settings.BetKey=Key;
921
                                                        if Player ~= v then
922
                                                                AddPart(v.Name.."'s bet key     is now "..Key,Core.Players[Player.Name].Data.Colour,Player,nil);
923
                                                        end;
924
                                                        AddPart("Your bet key is now "..Key,Core.Players[v.Name].Data.Colour,v,nil);
925
                                                end)
926
                                        end)
927
                                        AddPart("Cancel","Bright red",Player,function()
928
                                                DestroyTablets(Player);                                                
929
                                        end);
930
                                end);
931
                                AddPart("Colour - "..Core.Players[v.Name].Data.Colour,Core.Players[Player.Name].Data.Colour,Player,function()
932
                                        local Colours={"White","Bright red","Bright green","Bright blue","Bright yellow","Toothpaste","Pink","Black"};
933
                                        DestroyTablets(Player);
934
                                        table.foreach(Colours,function(Index,Colour)
935
                                                AddPart(Colour,Colour,Player,function()
936
                                                        DestroyTablets(Player);
937
                                                        Core.Players[v.Name].Data.Colour=Colour;
938
                                                        if Player ~= v then
939
                                                                AddPart(v.Name.."'s default colour is now "..Colour,Core.Players[Player.Name].Data.Colour,Player,nil);
940
                                                        end;
941
                                                        AddPart("Your default colour is now "..Colour,Core.Players[v.Name].Data.Colour,v,nil);
942
                                                end);
943
                                        end);
944
                                        AddPart("Cancel","Bright red",Player,function()
945
                                                DestroyTablets(Player);                                                
946
                                        end);
947
                                end);
948
                                        AddPart("Rank - "..Core.Players[v.Name].Rank,Core.Players[Player.Name].Data.Colour,Player,function()
949
                                                DestroyTablets(Player);
950
                                                table.foreach(Core.Ranks,function(Index,Value)
951
                                                        AddPart(Value.." - "..Index,Core.Players[Player.Name].Data.Colour,Player,function()
952
                                                                if Core.Players[Player.Name].Rank < Core.Players[v.Name].Rank then
953
                                                                        DestroyTablets(Player);
954
                                                                        return AddPart(v.Name.." outranks you!","Bright red",Player,nil);                                                                              
955
                                                                end;
956
                                                                DestroyTablets(Player);
957
                                                                Core.Players[v.Name].Rank=Index;
958
                                                                if Player ~= v then
959
                                                                        AddPart(v.Name.."'s rank is now "..Value,Core.Players[Player.Name].Data.Colour,Player,nil);
960
                                                                end;
961
                                                                AddPart("Your rank is now "..Value.." ["..Index.."]",Core.Players[v.Name].Data.Colour,v,nil);
962
                                                        end);
963
                                                end);
964
                                                AddPart("Cancel","Bright red",Player,function()
965
                                                        DestroyTablets(Player);                                                
966
                                                end);
967
                                        end);
968
                                        AddPart("Dismiss","Bright red",Player,function()
969
                                                DestroyTablets(Player);
970
                                        end);
971
                                        AddPart("Kick","Bright orange",Player,function()
972
                                                local Success,Error=pcall(function() Core.Packets.Kick(v) end);
973
                                                if not Success then
974
                                                        DestroyTablets(Player);
975
                                                        AddPart("[Kick Packet] There was a serious error! Player was not kicked successfully!","Bright red",Player,nil);
976
                                                end;
977
                                        end);
978
--[[                                    AddPart("Player Settings",Core.Players[Player.Name].Data.Colour,Player,function()
979
                                                AddPart("Auto Dismiss : "..Core.Players[Player.Name].Settings.AutoDismiss,Core.Players[Player.Name].Data.Colour,function()
980
                                                        DestroyTablets(Player);
981
                                                        AddPart("True","Bright green",Player,function()
982
                                                                DestroyTablets(Play     er);
983
                                                                Core.Players[Player.Name].Settings.AutoDismiss = true;
984
                                                        end)
985
                                                       
986
                                                end)
987
                                        end)]]--
988
                                        AddPart("Ban","Dusty Rose",Player,function()
989
                                                local Success,Error=pcall(Core.Packets.Kick,v);
990
                                                if not Success then
991
                                                        DestroyTablets(Player);
992
                                                        return AddPart("[Ban Packet] There was a serious error! Player was not banned successfully!","Bright red",Player,nil);
993
                                                end;
994
                                                wait(DestroyTablets(Player));
995
                                                AddPart("Would you like to add a reason?","Bright blue",Player,function() end)
996
                                                AddPart("Yes","Bright green",Player,function()
997
                                                        DestroyTablets(Player);
998
                                                        table.foreach(Core.BanResponse,function(Index,Resp)
999
                                                                AddPart(Resp,"Really red",Player,function()
1000
                                                                        DestroyTablets(Player);
1001
                                                                        Core.Packets.BanR(v,Resp);
1002
                                                                        AddPart(v.Name.." is now banned for : "..Resp,"Bright green",Player,nil);
1003
                                                                end);
1004
                                                        end);  
1005
                                                end);
1006
                                                AddPart("No","Really red",Player,function()
1007
                                                        Core.Packets.Ban(v)
1008
                                                        DestroyTablets(Player)                                                                 
1009
                                                end)
1010
                                        end);
1011
                                end;
1012
                if next(Flags) == nil then
1013
                        DestroyTablets(Player);
1014
                        function Main()
1015
                                for i,v in pairs(game:GetService("Players"):GetPlayers()) do
1016
                                        AddPart(v.Name,Core.Players[Player.Name].Data.Colour,Player,function()
1017
                                                wait(DestroyTablets(Player));
1018
                                                AddPart("Name - "..v.Name,Core.Players[Player.Name].Data.Colour,Player,nil);
1019
                                                AddPart("Age - "..v.AccountAge,Core.Players[Player.Name].Data.Colour,Player,nil);
1020
                                                AddPart("BetKey - "..Core.Players[v.Name].Settings.BetKey,Core.Players[Player.Name].Data.Colour,Player,function()
1021
                                                        DestroyTablets(Player);
1022
                                                        table.foreach(Core.BetKeys,function(Index,Key)
1023
                                                                AddPart(Key,Core.Players[Player.Name].Data.Colour,Player,function()
1024
                                                                        DestroyTablets(Player);
1025
                                                                        Core.Players[v.Name].Settings.BetKey=Key;
1026
                                                                        if Player ~= v then
1027
                                                                                AddPart(v.Name.."'s bet key     is now "..Key,Core.Players[Player.Name].Data.Colour,Player,nil);
1028
                                                                        end;
1029
                                                                        AddPart("Your bet key is now "..Key,Core.Players[v.Name].Data.Colour,v,nil);
1030
                                                                end)
1031
                                                        end)
1032
                                                        AddPart("Cancel","Bright red",Player,function()
1033
                                                                DestroyTablets(Player);                                                
1034
                                                        end);
1035
                                                end);
1036
                                                AddPart("Colour - "..Core.Players[v.Name].Data.Colour,Core.Players[Player.Name].Data.Colour,Player,function()
1037
                                                        local Colours={"White","Bright red","Bright green","Bright blue","Bright yellow","Toothpaste","Pink","Black"};
1038
                                                        DestroyTablets(Player);
1039
                                                        table.foreach(Colours,function(Index,Colour)
1040
                                                                AddPart(Colour,Colour,Player,function()
1041
                                                                        DestroyTablets(Player);
1042
                                                                        Core.Players[v.Name].Data.Colour=Colour;
1043
                                                                        if Player ~= v then
1044
                                                                                AddPart(v.Name.."'s default colour is now "..Colour,Core.Players[Player.Name].Data.Colour,Player,nil);
1045
                                                                        end;
1046
                                                                        AddPart("Your default colour is now "..Colour,Core.Players[v.Name].Data.Colour,v,nil);
1047
                                                                end);
1048
                                                        end);
1049
                                                        AddPart("Cancel","Bright red",Player,function()
1050
                                                                DestroyTablets(Player);                                                
1051
                                                        end);
1052
                                                end);
1053
                                                AddPart("Rank - "..Core.Players[v.Name].Rank,Core.Players[Player.Name].Data.Colour,Player,function()
1054
                                                        DestroyTablets(Player);
1055
                                                        table.foreach(Core.Ranks,function(Index,Value)
1056
                                                                AddPart(Value.." - "..Index,Core.Players[Player.Name].Data.Colour,Player,function()
1057
                                                                        if Core.Players[Player.Name].Rank < Core.Players[v.Name].Rank then
1058
                                                                                DestroyTablets(Player);
1059
                                                                                return AddPart(v.Name.." outranks you!","Bright red",Player,nil);                                                                              
1060
                                                                        end;
1061
                                                                        DestroyTablets(Player);
1062
                                                                        Core.Players[v.Name].Rank=Index;
1063
                                                                        if Player ~= v then
1064
                                                                                AddPart(v.Name.."'s rank is now "..Value,Core.Players[Player.Name].Data.Colour,Player,nil);
1065
                                                                        end;
1066
                                                                        AddPart("Your rank is now "..Value.." ["..Index.."]",Core.Players[v.Name].Data.Colour,v,nil);
1067
                                                                end);
1068
                                                        end);
1069
                                                        AddPart("Cancel","Bright red",Player,function()
1070
                                                                DestroyTablets(Player);
1071
                                                        end);
1072
                                                end);
1073
                                                AddPart("Back","Bright blue",Player,function()
1074
                                                        DestroyTablets(Player);
1075
                                                        Main();
1076
                                                end);
1077
                                                AddPart("Dismiss","Bright red",Player,function()
1078
                                                        DestroyTablets(Player);
1079
                                                end);
1080
                                                AddPart("Kick","Bright orange",Player,function()
1081
                                                        local Success,Error=pcall(function() Core.Packets.Kick(v) end);
1082
                                                        if not Success then
1083
                                                                DestroyTablets(Player);
1084
                                                                AddPart("[Kick Packet] There was a serious error! Player was not kicked successfully!","Bright red",Player,nil);
1085
                                                        end;
1086
                                                end);
1087
                                                AddPart("Ban","Dusty Rose",Player,function()
1088
                                                        local Success,Error=pcall(function() Core.Packets.Kick(v) end);
1089
                                                        if not Success then
1090
                                                                DestroyTablets(Player);
1091
                                                                return AddPart("[Ban Packet] There was a serious error! Player was not banned successfully!","Bright red",Player,nil);
1092
                                                        end;
1093
                                                        wait(DestroyTablets(Player));
1094
                                                        AddPart("Would you like to add a reason?","Bright blue",Player,function() end)
1095
                                                        AddPart("Yes","Bright green",Player,function()
1096
                                                                DestroyTablets(Player);
1097
                                                                table.foreach(Core.BanResponse,function(Index,Resp)
1098
                                                                        AddPart(Resp,"Really red",Player,function()
1099
                                                                                DestroyTablets(Player);
1100
                                                                                Core.Packets.BanR(v,Resp);
1101
                                                                                AddPart(v.Name.." is now banned for : "..Resp,"Bright green",Player,nil);
1102
                                                                        end);
1103
                                                                end);  
1104
                                                        end);
1105
                                                        AddPart("No","Really red",Player,function()
1106
                                                                Core.Packets.Ban(v)
1107
                                                                DestroyTablets(Player)                                                                 
1108
                                                        end)
1109
                                                end);
1110
                                        end);
1111
                                end;
1112
                        end;
1113
                        Main();
1114
                end;
1115
        end);
1116
end);
1117
 
1118
NewCommand("Commands","Lists commands",1,{"cmds","commands"},{"rank","cmd"},function(Message,Flags,Player,PlayerRank)
1119
        function Ranks(Player)
1120
                local Player=Player;
1121
                wait(DestroyTablets(Player));
1122
                for i,v in pairs(Core.Ranks) do
1123
                        Colours={"White","Dusty Rose","Bright green","Bright blue","Bright yellow","Toothpaste","Pink","Bright violet"};
1124
                        AddPart("Rank "..i,Colours[i],Player,function()
1125
                                wait(DestroyTablets(Player));
1126
                                for a,b in pairs(Core.Commands) do
1127
                                        if b.Rank==tonumber(i) then --{Name=Name,Desc=Desc,Rank=Rank,Calls=Calls,Flags=Flags,Function=Func}
1128
                                                AddPart(b.Name,Colours[i],Player,function()
1129
                                                        wait(DestroyTablets(Player));
1130
                                                        AddPart("Min Rank : "..b.Rank,"Bright violet",Player,nil);
1131
                                                        AddPart("Name : "..b.Name,Colours[i],Player,nil);
1132
                                                        AddPart("Calls : "..string.gsub(unpack(b.Calls)," ","; "),"Royal purple",Player,nil);
1133
                                                        pcall(function() AddPart("Flags : "..string.gsub(unpack(b.Flags)," ","; "),"Teal",Player,nil) end);
1134
                                                        AddPart("Description : "..b.Desc,"Sand green",Player,nil);
1135
                                                        AddPart("Back","Bright red",Player,function()
1136
                                                                Ranks(Player);
1137
                                                        end)
1138
                                                end);
1139
                                        end;
1140
                                end;
1141
                                AddPart("Back","Bright red",Player,function()
1142
                                        Ranks(Player);                                         
1143
                                end)
1144
                        end)   
1145
                end;
1146
                AddPart("Your Rank : "..Core.Players[Player.Name].Rank,"Dark green",Player,function() end)
1147
        end;
1148
        Ranks(Player);
1149
end);
1150
                                       
1151
NewCommand("Remove/Stop/Kill","Stops Prometheus",7,{"remove","nos"},{},function(Message,Flags,Player,PlayerRank)
1152
        pcall(function()
1153
                AddPart("[Prometheus]\nPrometheus is shutting down, please wait...","Bright green",Player,nil)
1154
                wait(3);
1155
                script:Destroy();
1156
        end);
1157
end);
1158
 
1159
NewCommand("Explore","Sweep scans the game",5,{"explore","e"},{},function(Message,Flags,Player,PlayerRank)
1160
        local Search
1161
        local List
1162
        local ObjectFunctions = (function()
1163
                local NewData = {}     
1164
                for ClassName, Data in next, {
1165
                        Player = {
1166
                                Kick = function(Player)
1167
                                        Core.Packets.Kick(Player)
1168
                                end
1169
                        };
1170
                        ["Part,WedgePart,Script,Model"] = {
1171
                                Destroy = function(Self,Object)
1172
                                        if Object ~= script then
1173
                                                return Self.Destroy(Object);
1174
                                        else
1175
                                                return AddPart("Can not destroy script","Really red",Player,nil);
1176
                                        end
1177
                                end;
1178
                                Remove = function(Self,Object)
1179
                                        return Self.Destroy(Object);                                                   
1180
                                end;
1181
                        };
1182
                } do
1183
                        for NewClassName in tostring(ClassName):gmatch("[^,]+") do
1184
                                NewData[NewClassName] = Data;
1185
                        end;
1186
                end;
1187
                return NewData
1188
        end)()
1189
        function List(Object)
1190
                DestroyTablets(Player);
1191
                Object = Object or pcall(AddPart,"Can not explore out of DataModel","Really red",Player,nil) and game;
1192
                if ObjectFunctions[Object.ClassName] then
1193
                        AddPart("View functions","Toothpaste",Player,function()
1194
                                DestroyTablets(Player);
1195
                                for Name, Function in next, ObjectFunctions[Object.ClassName] do
1196
                                        AddPart(Name,"Toothpaste",Player,function()
1197
                                                pcall(Function, Object);
1198
                                        end);
1199
                                end;
1200
                                AddPart("Back","Really red",Player,function()
1201
                                        List(Object);
1202
                                end);
1203
                        end);
1204
                else
1205
                        AddPart("No functions found","Really red",Player,nil);
1206
                end;
1207
                AddPart("Explore: "..tostring(Object),"Toothpaste",Player,function()
1208
                        Search(Object);
1209
                        AddPart("View settings","Really red",Player,function()
1210
                                List(Object);
1211
                        end);
1212
                end);
1213
                AddPart("View parent","Really red",Player,function()
1214
                        List(Object.Parent);
1215
                end);
1216
        end;
1217
        function Search(Parent)
1218
                DestroyTablets(Player);
1219
                for _, v in pairs(Parent:GetChildren()) do
1220
                        pcall(AddPart,tostring(v),"Toothpaste",Player,function()
1221
                                List(v);
1222
                        end);
1223
                end;
1224
        end;
1225
        List(game);
1226
end)
1227
 
1228
NewCommand("Execute","Executes/Compiles Lua Code",1,{"exe"},{"http"},function(Message,Flags,Player,PlayerRank)
1229
        local Source = Message;
1230
        if Flags["http"] then
1231
                local success,error = ypcall(function() game:GetService("HttpService"):GetAsync(Flags["http"][1]:sub(2)) end);
1232
                if not success then
1233
                        return AddPart("There was an error while loading your script.","Really red",Player,nil);
1234
                end;
1235
                Source = Core.Services.HttpGet(Flags["http"][1]:sub(2))
1236
        end
1237
        if next(Flags) == nil then
1238
                Source = Message;
1239
        end;
1240
        local game=game;
1241
        local error=error;
1242
        local print=print;
1243
        local ypcall=ypcall;
1244
        local pcall=pcall;
1245
        local Spawn=Spawn;
1246
        local coroutine=coroutine;
1247
        local setmetatable=setmetatable;
1248
        local loadstring=loadstring;
1249
        local getmetatable=getmetatable;
1250
        local setfenv=setfenv;
1251
        local getfenv=getfenv;
1252
        local env = {};
1253
        local envs = {};
1254
        local newproxy=newproxy;
1255
        Execute,Error=loadstring(tostring(Source),"[Prometheus Execute]");
1256
       
1257
        local scriptS = newproxy(true);
1258
        local meta = getmetatable(scriptS);
1259
                                               
1260
        meta.__metatable=getmetatable(script);
1261
                                               
1262
        function meta:__tostring()
1263
                return tostring(script);
1264
        end;
1265
                       
1266
        function getmember(item,index)
1267
                return item[index];
1268
        end;
1269
                               
1270
        function setmember(item,index,value)
1271
                item[index]=value;
1272
        end;
1273
                                               
1274
        function meta:__index(index)
1275
                local suc,res=pcall(getmember,script,index);
1276
                if(not suc)then
1277
                        error(index..' is not a valid member of Script',2);
1278
                else
1279
                        if index:lower() == "destroy" then
1280
                                return function()
1281
                                        error'You cannot destroy this script';                                 
1282
                                end;
1283
                        elseif index:lower() == "remove" then
1284
                                return function()
1285
                                        error'You cannot remove this script';
1286
                                end;
1287
                        end;
1288
                        if type(res)=='function' then
1289
                                return function(self,...)
1290
                                                return self[index](self,...)
1291
                                end;
1292
                        else
1293
                                return res;
1294
                        end;
1295
                end;
1296
        end;
1297
                                               
1298
        function meta:__newindex(index,value)
1299
                suc,res=pcall(setmember,script,index,value);
1300
                return scriptS;
1301
        end;
1302
                                               
1303
        for i,v in next, {
1304
            ["restart"]=function()
1305
                --Future function.
1306
            end;
1307
                ["print"]=function(...)
1308
                        local Data={...};
1309
                        for CurrentEntry,Table_Pos in next,Data do
1310
                                if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
1311
                                        Data[CurrentEntry]='__TOSTRING_EDIT';
1312
                                end;
1313
                        end;
1314
                        AddPart(tostring(table.concat(Data,' ')),'White',Player,nil);
1315
                end;
1316
                ["error"]=function(...)
1317
                        local Data={...};
1318
                        for CurrentEntry,Table_Pos in next,Data do
1319
                                if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
1320
                                        Data[CurrentEntry]='__TOSTRING_EDIT';
1321
                                end;
1322
                        end;
1323
                        AddPart(tostring(table.concat(Data,' ')),'Really red',Player,nil);
1324
                end;
1325
                ["warn"]=function(...)
1326
                        local Data={...};
1327
                        for CurrentEntry,Table_Pos in next,Data do
1328
                                if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
1329
                                        Data[CurrentEntry]='__TOSTRING_EDIT';
1330
                                end;
1331
                        end;
1332
                        AddPart(tostring(table.concat(Data,' ')),'Bright orange',Player,nil);
1333
                end;
1334
                ['loadstring']=function(str,...)
1335
                        if str == nil then return error("Argument #1 (string expected, got nil)") end
1336
                        local rtn={};
1337
                        local fArgs={...};
1338
                        local succ,res=ypcall(function()
1339
                                rtn={loadstring(str,unpack(fArgs))};
1340
                        end);
1341
                        if(not succ)then return Execute.error(res) end;
1342
                        local func,err=unpack(rtn);
1343
                        if(func)then
1344
                                func=setfenv(func,NewEnvironment);
1345
                        end;
1346
                        return func,err
1347
                end;
1348
                Core = "Hide";
1349
                Alert = "Hide";
1350
                owner = Player;
1351
                NewEnvironment = "Hide";
1352
                FindPlayer = "Hide";
1353
                NewCommand = "Hide";
1354
                DestroyTablets = "Hide";
1355
                CheckBanned = "Hide";
1356
                OnChatted = "Hide";
1357
                Execute = "Hide";
1358
                CLerp = "Hide";
1359
                ["script"] = scriptS;
1360
        }do
1361
        for str in i:gmatch'([^,]+)'do
1362
                env[str]=v;
1363
        end;
1364
end;
1365
       
1366
        NewEnvironment = {
1367
                _SANDBOX = "PK_SANDBOX v1.0";                          
1368
        };
1369
        if (Execute) then
1370
                --setfenv(0,NewEnvironment);
1371
                        local Success,Result=ypcall(setfenv(Execute,setmetatable(NewEnvironment,{
1372
                                __index=function(Self,Index)
1373
                                        local Return = env[Index];
1374
                                        local OldReturn = getfenv()[Index];
1375
                                        if Return == "Hide" then
1376
                                                return Core.Data.Fakes._G[Index];
1377
                                        elseif Return == nil then
1378
                                                return OldReturn;
1379
                                        else
1380
                                                return Return;
1381
                                        end;
1382
                                end;
1383
                                __metatable="Locked!";
1384
                        })));
1385
                if (not Success) then
1386
                        AddPart(Result,"Really red",Player,nil);               
1387
                end;
1388
        else
1389
                AddPart(Error,"Really red",Player,nil);
1390
        end;
1391
end);
1392
 
1393
for i,v in pairs(game:GetService("Players"):GetPlayers()) do
1394
        ConnectPlayer(v);
1395
        if Core.Cloud ~= nil then      
1396
                AddPart("The Cloud is active","Bright blue",v,nil);                            
1397
        end
1398
end;
1399
 
1400
game:GetService("Players").PlayerAdded:connect(function(Player)
1401
        ConnectPlayer(Player);
1402
        Alert(Player.Name.." has joined the game!");
1403
end);
1404
 
1405
game:GetService("Players").PlayerRemoving:connect(function(Player)
1406
        DestroyTablets(Player);
1407
        Alert(Player.Name.." has left the game!");
1408
end);