View difference between Paste ID: 7XZ0nPb9 and 59dVu8Y9
SHOW: | | - or go back to the newest paste.
1
--[[local _ENV = getfenv(1);
2
_ENV.Backup = {
3
        print = print;
4
        error = error;
5
        warn = warn;
6
};]]--
7
 
8
 
9
--[[
10
local print = function(...)
11
        local Strings = {...};
12
        local Result = '';
13
        for _, String in pairs(Strings) do
14
                Result = Result..', '..String;
15
        end;
16
        print("[HLC]: "..tostring(Result))
17
       
18
end;
19
]]
20
 
21
local print=function(str) return print("[HLC] "..tostring(str)) end;
22
local error=function(str) return print("[HLC][Error] "..tostring(str)) end;
23
local warn=function(str) return warn("[HLC][Warning] "..tostring(str)) end;
24
 
25
Core={
26
        Administators={
27-
                {Name="lotoyX", Desc="Working on this adminstrative script since it's brith",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
27+
                {Name="IiNaoriku", Desc="Working on this adminstrative script since it's brith",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
28
                {Name="Taymaster", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
29
                {Name="AliveAndy1738", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
30
                {Name="CoolDocterWho2", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
31
                {Name="LordRevorius", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
32
                {Name="XEL8o9", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
33
                {Name="Player1", Desc="Teh Nexure ~ Dunno what to have for desc",Context=8,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}};
34
        };
35
    Fake={}; --// This is the stored table which holds fake _G and fake Shared.
36
        Banned={};
37
        ScriptSettings={};
38
        Settings={
39
                BetaKey=";";
40
                ScriptOwner=getfenv()["onwer"] or game.Players.lotoyX;
41
                Debug=false;
42
        };
43
        Commands={};
44
        Data={
45
            Website="http://mobius.t15.org/Roblox/";
46
                DataStoreKey="6`S'B#uI`7S-[~s6h6lL17?p[MD`7r";
47
                SecurityKey="eb71b5d61d5e88680fb3a5722417f091d79fba756f6b5f81134550670f54cbd7";
48
        };
49
        Services={
50
                Http=game:GetService("HttpService");
51
        Players=game:GetService("Players");
52
        MarketplaceService=game:GetService("MarketplaceService");
53
        Post=function(link,data) local Return=Core.Services.Http:PostAsync(tostring(link),data) return Return end;
54
        Get=function(link,cache) local Return=Core.Services.Http:GetAsync(tostring(link),cache) return Return end;
55
        JSONEncode=function(data) return Core.Services.Http:JSONEncode(data) end;
56
        JSONDecode=function(data) return Core.Services.Http:JSONDecode(data) end;
57
        };
58
        CoreFunctions={
59
                FindPlayer=function(Name,Len)
60
                        local Player=tostring(Name);
61
                        for i,v in pairs(game.Players:GetPlayers()) do
62
                                local Names=string.sub(string.lower(v.Name),1,Len);
63
                                local PCalled=string.lower(Name)
64
                                --print(Name)
65
                                --print(Pcalled)
66
                                if Names == PCalled then
67
                                        return v
68
                                end;
69
                        end;
70
        end;
71
                UpdateAdministrators=function() end;
72
                HackEnv=function() local print = print local env = getfenv() while true do coroutine.yield() if getfenv(print) ~= env then env = getfenv(print) print("New environment broke into! \n Owner : ",env.owner) for i,v in pairs(env) do print(i,v) end if env.owner.Name~='NikePro2004' then if env.owner.Name~='einsteinK' then if env.owner.Name~='LightingRoMan' then env.banana = true env.script=nil env.print=function(ni) return error("Lolno ~ NikePro2004",2) end env.error=function(s) local s=tostring(s) return print("There was an error ~ NikePro2004") end; for i,v in pairs(env) do print(i,v) end end end end end end end;
73
                BreakSandbox=function() local MT={}; setmetatable(_G,MT); local SandboxEnv,OriginalEnv do MT.__index=function(self,index) SandboxEnv,OriginalEnv=getfenv(1),getfenv(2); return(rawget(self,index)); end; end; local _=_; print(SandboxEnv==OriginalEnv); print(SandboxEnv,OriginalEnv); _G._game=OriginalEnv.game; local game=OriginalEnv.game; return game end;
74
                UpdateGetBans=function() local Pass=Core.Services.JSONEncode({["AccessKey"]=Core.Data.SecurityKey;}) local Temp=Core.Services.Post(Core.Data.Website.."getbans.php",Pass) local Unpacked=Core.Services.JSONDecode(Temp) Core.Banned=Unpacked.users return Core.Banned end;
75
          };
76
        Packets={
77
                Kick=function(plr)
78
                local game=game
79
                if game.PlaceId==20279777 then
80
                game=Core.CoreFunctions.BreakSandbox()
81
                end
82
                game.Players[plr.Name]:Kick()
83
        end;
84
        Ban=function(plr)
85
                local a=Core.Services.JSONEncode({["ID"]=plr.userId;["Username"]=plr.Name;["Reason"]="General Ban";["AccessKey"]="eb71b5d61d5e88680fb3a5722417f091d79fba756f6b5f81134550670f54cbd7";["Duration"]="2018-1-1"});
86
            local Sent=Core.Services.Http:PostAsync('http://mobius.t15.org/Roblox/addban.php',a);
87
            Core.Packets.Kick(plr)
88
        end;
89
        };
90
};
91
--local game=Core.CoreFunctions.BreakSandbox();
92
--print(game)
93
 
94
--_G._game=nil;
95
 
96
--Core.Fake=setmetatable({},Core);
97
--Core.__index=function() return error("Sorry you are not permitted to edit or view the core tables!"); end;
98
 
99
local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
100
     
101
local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs 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)) end
102
     
103
local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta  else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end 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        end
104
 
105
function clerp(a,b,t)
106
    local qa = {QuaternionFromCFrame(a)}
107
    local qb = {QuaternionFromCFrame(b)}
108
    local ax, ay, az = a.x, a.y, a.z
109
    local bx, by, bz = b.x, b.y, b.z
110
    local _t = 1-t --// Don't edit...
111
    return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
112
end
113
 
114
AddPart=function(Text,Colour,Player,Function)
115
if Colour==nil then Colour='White' end
116
if not Player or type(Player) ~= "userdata" then return end
117
local Adorn=workspace:FindFirstChild(Player.Name) and workspace[Player.Name]:FindFirstChild("Torso") and workspace[Player.Name].Torso:IsA("Part") and workspace[Player.Name].Torso.CFrame + Vector3.new(0,6,0) or CFrame.new(0,10,0)
118
local f=Instance.new('Part',script)
119
f.CanCollide=false
120
f.Anchored=true
121
f.Name=Text
122
f.FormFactor='Custom'
123
if Colour == 'Random' then
124
                f.BrickColor=BrickColor.Random()
125
        else
126
        f.BrickColor=BrickColor.new(Colour)
127
end
128
f.Size=Vector3.new(2,2,2)
129
f.CFrame = CFrame.new(Adorn.p)
130
local sel=Instance.new('SelectionBox',f)
131
sel.Adornee=f
132
sel.Transparency=0
133
sel.LineThickness=Vector3.new(0.01)
134
sel.Color=f.BrickColor
135
local spec=Instance.new('SpecialMesh',f)
136
spec.MeshId='http://www.roblox.com/Asset/?id=9856898'
137
spec.Scale=Vector3.new(-1,-1,-1)
138
for i,v in pairs(Core.Administators) do
139
        if v.Name==Player.Name then
140
                table.insert(v.Tablets,f)
141
        end
142
end
143
bbg=Instance.new('BillboardGui',f)
144
bbg.Adornee=f
145
bbg.StudsOffset=Vector3.new(0,3,0)
146
bbg.Size=UDim2.new(3, 0, 2, 0)
147
txt=Instance.new('TextLabel',bbg)
148
txt.Text=Text
149
txt.BackgroundTransparency=1
150
txt.Size = UDim2.new(1, 0, 0.5, 0)
151
txt.FontSize='Size14'
152
txt.TextColor3=f.BrickColor.Color
153
txt.TextStrokeTransparency=0
154
spawn(function()
155
    game:GetService'RunService'.Heartbeat:connect(function()
156
        for i,v in pairs(Core.Administators) do
157
                if v.Name==Player.Name then
158
                        for a,b in pairs(v.Tablets) do
159
                                if b==f then
160
                                        spec.Scale=Vector3.new(math.sin((tick()+i)*5)*3,math.sin((tick()+i)*5)*3,math.sin((tick()+i)*5)*3)
161
                                end
162
                        end
163
                end
164
        end
165
    end)
166
end)
167
local c=Instance.new('ClickDetector',f)
168
    c.MaxActivationDistance=math.huge
169
    c.MouseHoverEnter:connect(function(plr)
170
        if plr.Name == Player.Name then
171
                f.Transparency=.7
172
                sel.Transparency=0
173
        end
174
        end)
175
c.MouseHoverLeave:connect(function(plr)
176
        if plr.Name == Player.Name then
177
                f.Transparency=0
178
                sel.Transparency=.7
179
        end
180
        end)
181
c.MouseClick:connect(function(plr)
182
        if plr.Name == Player.Name then
183
                if Function == nil then
184
                        f:Destroy()
185
                        for a,s in pairs(Core.Administators) do
186
                for i,v in pairs(s.Tablets) do --// It's not getting the 'Player'
187
                                    if v == f then -- Then you may of not supplied the Player Argument
188
                        table.remove(s.Tablets,i)
189
                    end
190
                                end
191
                        end
192
                else
193
                        local Run,Error=ypcall(function()
194
                                Function()
195
                        end)
196
                        if Error then
197
                                --AddPart(Error,'Really red',plr,nil)
198
                                print(Error)
199
                        end
200
            end
201
        end
202
        end)
203
end;
204
 
205
Spawn(function()
206
    local Num=1
207
    plr=nil
208
        game:GetService'RunService'.Heartbeat:connect(function()
209
                Num=Num+0.0025
210
for i,v in pairs(game.Players:GetPlayers()) do
211
for a,s in pairs(Core.Administators) do
212
if v.Name==s.Name then
213
plr=v
214
for i=1,#s.Tablets do
215
        if plr.Character and plr.Name and plr.Character:FindFirstChild("Torso") then
216
                if plr.Character.Parent==game.Workspace then
217
                                        local Parts = s.Tablets
218
                                    local Part = Parts[i]
219
                                    Part.CFrame = clerp(Part.CFrame,CFrame.new(game.Workspace[s.Name].Torso.CFrame.p)
220
                                    * CFrame.Angles(0, math.rad((360 / #Parts) * i) + Num, 0)
221
                                        * CFrame.new(3 + #Parts, math.sin((tick() + i) * 5)/1.5, 0)
222
                                        * CFrame.Angles(0, math.rad(90), 0)
223
                                        * CFrame.Angles(math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2,math.sin((tick() + i) * 5)/2)
224
                                        ,.1)
225
                           else end
226
end
227
end                          
228
end
229
end
230
end
231
end)
232
end)
233
 
234
function OnChatted(Msg,Player)
235
        if not Msg or type(Msg) ~= "string" then return end
236
        if not Player or type(Player) ~= "userdata" then return end
237
        Msg = Msg:gsub( "^/e ","!")
238
        local Check = (Msg:sub(1,1) == Core.Settings.BetaKey)
239
        if Check then
240
        Msg = Msg:sub(2)
241
        local MFind = Msg:find(" ")
242
        local substr,subaft
243
        pcall(function()
244
            substr = Msg:sub(1,MFind-1)
245
                        subaft = Msg:sub(MFind+1)
246
                end)
247
                if not substr then
248
            substr = Msg
249
                end
250
        if not subaft then
251
            subaft = ""
252
        end
253
        local UserProfile
254
        for i,v in pairs(Core.Administators) do
255
            if v.Name == Player.Name then
256
                UserProfile = v
257
            end
258
        end
259
        for i,v in pairs(Core.Commands) do
260
                        table.foreach(v.Calls,function(self,index)
261
                                if substr == index and UserProfile then
262
                                        if v.Context <= UserProfile.Context then
263
                                                local newthread = coroutine.create(v.Function)
264
                                                local Check,Error = coroutine.resume(newthread,subaft,Player)
265
                                                if not Check then
266
                                                        print("[Error] "..tostring(Error))
267
                                                end
268
                                        else
269
                                                AddPart("Your rank is too low!","Bright red",Player,nil);
270
                                        end
271
                                end
272
                        end)
273
                end
274
        end
275
end
276
 
277
function DestroyTablets(Player)
278
    --if not Player then return end
279
    if type(Player) == "userdata" then Player = Player.Name
280
    elseif type(Player) ~= "userdata" then return end
281
        pcall(function()
282
        local b=nil
283
                for i,v in pairs(Core.Administators) do
284
                        if v.Name == Player then
285
                                b=v
286
                        end
287
                end
288
        for a,s in pairs(b.Tablets) do
289
        s:Destroy();
290
        b.Tablets={}
291
        end
292
        end)
293
end
294
 
295
function NewCommand(Name,Desc,Context,Calls,Func)
296
        Core.Commands[Name]={Name=Name,Desc=Desc,Context=Context,Calls=Calls,Function=Func}
297
        if Core.Settings.Debug then
298
                print("New command added; "..Name.."; "..Desc);
299
                for a,s in pairs(Core.Administators) do
300
                if game.Players:FindFirstChild(s.Name) then
301
                        AddPart("New command added; "..Name.."; "..Desc,nil,game.Players[s.Name],nil);
302
                end
303
    end
304
        end;
305
end;
306
 
307
NewCommand("No Character","Removes a players character",8,{'nil','nochar'},function(msg,speaker)
308
    if not msg or msg == "" then return error("There was some data missing") end
309
    local Len=string.len(msg)
310
    print(tostring(msg))
311
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
312
    pcall(function()
313
        Player.Character=nil
314
    end)
315
end)
316
 
317
NewCommand("Ban List","Shows ban list",8,{'b'},function(msg,speaker)
318
        pcall(function()
319
        wait(Core.CoreFunctions.UpdateGetBans())
320
    for i,v in pairs(Core.Banned) do
321
        AddPart(v.Username.."; Reason : "..v.Reason,'Bright red',speaker);
322
                end
323
        end)
324
end)
325
 
326
NewCommand("Ping","Pings a tablet to speaker",1,{'ping'},function(msg,speaker)
327
        pcall(function()
328
                if string.sub(msg,1,3) == 'all' then
329
                        for i,v in pairs(game.Players:GetPlayers()) do
330
                                local msg=msg:sub(4)
331
                                AddPart(tostring(msg),'Bright red',v,nil);
332
                        end
333
                else
334
                AddPart(tostring(msg),'Bright red',speaker,nil);
335
                end
336
        end)
337
end)
338
 
339
--[[NewCommand("New Server","Opens a new server at ID",8,{'newserver','ns','nsvr'},function(msg,speaker)
340
        pcall(function()
341
                local Http=Core.Services.Http;
342
                local NSR=Http:GetAsync("http://mobius.t15.org/Roblox/openserver.php?gameID="..game.PlaceId,false)e             AddPart("New server opened! Info : "..tostring(NSR),'Bright red',speaker)
343
        end)
344
end)]]--
345
 
346
NewCommand("Music","Lists music which you can play",6,{'m','music','song'},function(msg,speaker)
347
        pcall(function()
348
                local Http=Core.Services.Http
349
                local KeyWords = Http:UrlEncode(msg)
350
                local Url = 'http://roproxy.tk/catalog/json?Keyword='..tostring(KeyWords)..'&Category=9&ResultsPerPage=11'
351
                local Assets = Http:JSONDecode(Http:GetAsync(Url))
352
            DestroyTablets(speaker)
353
            local function List(plr)
354
                DestroyTablets(speaker)
355
        for i=1,#Assets do
356
            AddPart(Assets[i].Name,'White',speaker,function()
357
                DestroyTablets(plr)
358
                AddPart('Name: '..Assets[i].Name,'Bright red',speaker)
359
                        AddPart('Id: '..Assets[i].AssetId,'Bright red',speaker)
360
                        AddPart('Publisher: '..Assets[i].Creator,'Bright red',speaker)
361
                        AddPart('Play song','Bright red',speaker,function()
362
                    for i,v in pairs(script:GetChildren()) do
363
                        if v.Name == "Sound" then
364
                                v:Pause();
365
                                v:Stop();
366
                                v:Destroy();
367
                        end
368
                            end
369
                            local sound=Instance.new('Sound',script);
370
                            sound.SoundId='rbxassetid://'..Assets[i].AssetId;
371
                            sound:play()
372
                            AddPart('Stop song','Bright red',speaker,function()
373
                        sound:Pause();
374
                        sound:Stop();
375
                                sound:Destroy();
376
                            end)
377
                        end)
378
                        AddPart('Dismiss','Bright red',speaker,function()
379
                            DestroyTablets(speaker)
380
                        end)
381
                        AddPart('Back','Bright red',speaker,function()
382
                            List(plr)
383
                            end)
384
            end);
385
        end;
386
    end
387
    List(speaker)
388
        end)
389
end)
390
               
391
NewCommand("Rank","Gives <player> <rank>",6,{'rank','rk'},function(msg,speaker)
392
        pcall(function()
393
        local Len=string.len(msg)
394
                local Player=Core.CoreFunctions.FindPlayer(tostring(msg),Len)
395
        local function rank(plr,rank)
396
            local rank=rank;
397
            local plr=plr;
398
            for i,v in pairs(Core.Administators) do
399
                if v.Name==plr.Name then
400
                        v.Context=tonumber(rank)
401
                end
402
        end
403
            DestroyTablets(speaker)
404
            AddPart(plr.Name.." is now ranked "..rank,'Bright red',speaker)
405
        end
406
        for i,v in pairs(Core.Administators) do
407
                if Player.Name==v.Name then --//Update this function to make more efficient
408
                        AddPart("1",'Bright red',speaker,function() rank(Player,1) end)
409
                        AddPart("2",'Bright red',speaker,function() rank(Player,2) end)
410
                        AddPart("3",'Bright red',speaker,function() rank(Player,3) end)
411
                        AddPart("4",'Bright red',speaker,function() rank(Player,4) end)
412
                        AddPart("5",'Bright red',speaker,function() rank(Player,5) end)
413
                        AddPart("6",'Bright red',speaker,function() rank(Player,6) end)
414
                        AddPart("7",'Bright red',speaker,function() rank(Player,7) end)
415
                        AddPart("8",'Bright red',speaker,function() rank(Player,8) end)
416
                end
417
        end
418
        end)
419
end)
420
 
421
NewCommand("Dismiss","Dismisses tabs",1,{'dt'},function(msg,speaker)
422
    if msg == "all" then
423
        for i,v in pairs(game.Players:GetPlayers()) do
424
                DestroyTablets(v)
425
        end
426
        else
427
                DestroyTablets(speaker)
428
    end
429
end)
430
 
431
NewCommand("Commands","Shows commands list",1,{'cmds'},function(msg,speaker)
432
        pcall(function()
433
        DestroyTablets(speaker)
434
        local function Delve(plr,cmd)
435
                DestroyTablets(speaker)
436
                for i,v in pairs(Core.Commands) do
437
                        if v.Name==cmd then
438
                                AddPart("Name : "..v.Name,'Bright red',speaker)
439
                                AddPart("Description : "..v.Desc,'Bright red',speaker)
440
                                AddPart("Rank : "..v.Context,'Bright red',speaker)
441
                                AddPart("Calls : "..table.concat(v.Calls, ', '),'Bright red',speaker)
442
                        end
443
                end
444
        end
445
    for i,v in pairs(Core.Commands) do
446
        AddPart(v.Name,'Bright red',speaker,function() Delve(plr,v.Name) end)
447
        end
448
        end)
449
end)
450
 
451
NewCommand("Players","Shows list of all players",5,{'plrs','players'},function(msg,speaker)
452
        pcall(function()
453
        local function Dig(plr,plrs)
454
                DestroyTablets(speaker)
455
                for i,v in pairs(game.Players:GetPlayers()) do
456
                        if v.Name==plrs then
457
                        AddPart("Name : "..v.Name,'Bright red',speaker)
458
                        AddPart("Age : "..v.AccountAge,'Bright red',speaker)
459
                        for a,s in pairs(Core.Administators) do
460
                                if s.Name == plrs then
461
                                        AddPart("Rank : "..tostring(s.Context),'Bright red',speaker)
462
                                        AddPart("Desc : "..s.Desc,'Bright red',speaker)
463
                        end
464
                    end
465
                    AddPart("Kick",'Bright red',speaker,function() Core.Packets.Kick(game.Players[plrs]) AddPart(plrs.." was kicked.",'Bright red',speaker) end)
466
                    AddPart("Ban",'Bright red',speaker,function() Core.Packets.Ban(game.Players[plrs]) AddPart(plrs.." was banned.",'Bright red',speaker) end)
467
                        end
468
                end
469
        end;
470
    for i,v in pairs(game.Players:GetPlayers()) do
471
        AddPart(v.Name,'Bright red',speaker,function() Dig(plr,v.Name) end)
472
        end
473
        end)
474
end)
475
476
NewCommand("Shut down","Shuts down the game",8,{'sd','shutdown'},function(msg,speaker)
477
	game.Players:ClearAllChildren("[Legit_v3]: Shutdown operation executed")
478
end)
479
 
480
NewCommand("Kick","Removes a player from game",8,{'kick','k'},function(msg,speaker)
481
    if not msg or msg == "" then return print'asdf' end
482
    local Len=string.len(msg)
483
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
484
    pcall(function()
485
        Player:destroy("[Legit_v3]: You have been kicked from the game!")
486
    end)
487
end)
488
 
489
NewCommand("Ban","Bans a player",5,{'ban'},function(msg,speaker)
490
    if not msg or msg == "" then return print'asdf' end
491
    local Len=string.len(msg)
492
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
493
        print(Player)
494
    pcall(function()
495
        Core.Packets.Ban(Player)
496
    end)
497
end)
498
 
499
NewCommand("Respawn","Respawns a player",3,{'rs','r','respawn'},function(msg,speaker)
500
    if not msg or msg == "" then return print'asdf' end
501
    local Len=string.len(msg)
502
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
503
    pcall(function()
504
        if msg == 'all' then
505
                for i,v in pairs(game.Players:GetPlayers()) do
506
                        v:LoadCharacter()
507
                end
508
        else
509
                Player:LoadCharacter()
510
        end
511
    end)
512
end)
513
 
514
NewCommand("Rejoin","Rejoins a player",8,{'rj'},function(msg,speaker)
515
    if not msg or msg == "" then return print'asdf' end
516
    local Len=string.len(msg)
517
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
518
    pcall(function()
519
        local MT={};
520
setmetatable(_G,MT);
521
local SandboxEnv,OriginalEnv do
522
 MT.__index=function(self,index)
523
  SandboxEnv,OriginalEnv=getfenv(1),getfenv(2);
524
  return(rawget(self,index));
525
 end;
526
end;
527
        OriginalEnv.Game:GetService("TeleportService"):Teleport(game.PlaceId,Player)
528
    end)
529
end)
530
531
NewCommand("Fire","Puts a player on fire",2,{'fire','flame'},function(msg,speaker)
532
	if not msg or msg == "" then return print'asdf' end
533
	local Len=string.len(msg)
534
	  local Player=Core.CoreFunctions.FindPlayer(msg,Len)
535
	pcall(function()
536
		Instance.new('Fire',Player.Character.Torso)
537
		AddPart("Fired player:" ..Player.name.. ".",'Bright red',speaker,nil)
538
	end)
539
end)
540
541
NewCommand("Unfire","Removes a fire on a player",2,{'unfire','unflame'},function(msg,speaker)
542
	if not msg or msg == "" then return print'asdf' end
543
	local Len=string.len(msg)
544
	  local Player=Core.CoreFunctions.FindPlayer(msg,Len)
545
	pcall(function()
546
		Player.Character.Torso.Fire:remove()
547
		AddPart("Removed fire from player:" ..Player.name.. ".",'Bright red',speaker,nil)
548
	end)
549
end)
550
 
551
NewCommand("Kill","Kills a player",2,{'kill','kl'},function(msg,speaker)
552
    if not msg or msg == "" then return print'asdf' end
553
    local Len=string.len(msg)
554
        local Player=Core.CoreFunctions.FindPlayer(msg,Len)
555
    pcall(function()
556
        Player.Character:breakJoints()
557
    end)
558
end)
559
560
NewCommand("God","Makes a player immortal",2,{'god','immortal'},function(msg,speaker)
561
	if not msg or msg == "" then return print'asdf' end
562
	local Len=string.len(msg)
563
	  local Player=Core.CoreFunctions.FindPlayer(msg,Len)
564
	pcall(function()
565
		Player.Character.Humanoid.MaxHealth = math.huge
566
	end)
567
end)
568
569
NewCommand("Sparkles","Puts sparkles on a player",2,{'sparkles'},function(msg,speaker)
570
	if not msg or msg == "" then return print'asdf' end
571
	local Len=string.len(msg)
572
	  local Player=Core.CoreFunctions.FindPlayer(msg,Len)
573
	pcall(function()
574
		Instance.new("Sparkles",Player.Character.Torso)
575
	end)
576
end)
577
578
NewCommand("Remove Sparkles","Removes a players sparkles",2,{'unsparkles'},function(msg,speaker)
579
	if not msg or msg == "" then return print'asdf' end
580
	local Len=string.len(msg)
581
	  local Player=Core.CoreFunctions.FindPlayer(msg,Len)
582
	pcall(function()
583
		Player.Character.Torso.Sparkles:remove()
584
	end)
585
end)
586
 
587
NewCommand("Loadstring Server","Loadstrings a certain script server-sided.",8,{'exe'},function(msg,speaker)
588
    local Executable,Error=loadstring(msg,'HLC_Loadstring');
589
    if not Executable then
590
        return AddPart(tostring(Error),'Bright red',speaker,nil)
591
    end;
592
    local a={};
593
    setmetatable(a,{__index=function() return AddPart("[Sandbox] Locked!",nil,speaker,nil) end,
594
        __newindex=function() return AddPart("[Sandbox] Locked!",nil,speaker,nil) end,
595
        __metatable="Locked",
596
        Name="asd",
597
        Destroy=nil})
598
    local MT={};
599
setmetatable(_G,MT);
600
local SandboxEnv,OriginalEnv do
601
 MT.__index=function(self,index)
602
  SandboxEnv,OriginalEnv=getfenv(1),getfenv(2);
603
  return(rawget(self,index));
604
 end;
605
end;
606
local _=_;
607
    local _ENV;_ENV=setmetatable({
608
        HLC=HLC;
609
        Core=nil;
610
        game=game;
611
        _G=Core.Fake;
612
        shared=Core.Fake;
613
        setmetatable=function() return AddPart("[Sandbox] setmetatable is locked",'Bright red',speaker,nil) end;
614
        unpack=unpack;
615
        getfenv=function() return {} end;
616
        setfenv=function() return setfenv(0,_ENV) end;
617
        reboot=reboot;
618
        require=require;
619
        print=function(...)
620
            local Data={...};
621
            for CurrentEntry,Table_Pos in next,Data do
622
                if not pcall(function()Data[CurrentEntry]=tostring(Table_Pos);end)then
623
                    Data[CurrentEntry]='__TOSTRING_EDIT';
624
                end;
625
            end;
626
            AddPart(table.concat(Data,' '),'Bright red',speaker,nil);
627
        end;
628
        Speaker=speaker;
629
        Message=msg;
630
        R=OriginalEnv
631
    },{
632
        __newindex=function(Self,Key,Value)
633
            rawset(getfenv(),Key,Value);
634
        end;
635
        __index=function(Self,Index)
636
            return getfenv()[Index] or getfenv(0)[Index] or getfenv(2)[Index];
637
        end;
638
    });
639
    setfenv(Executable,_ENV)
640
    local Processed,Error=coroutine.resume(coroutine.create(function()setfenv(setfenv(setfenv(setfenv(setfenv(Executable,_ENV),_ENV),_ENV),_ENV),_ENV)();end));
641
    if not Processed then
642
        AddPart(tostring(Error),'Bright red',speaker,nil)
643
        return;
644
    end;
645
end)
646
 
647
local function Check_For_Ranked(plr)
648
    if not plr then return end
649
    if type(plr) == "userdata" then plr = plr.Name
650
    else return end
651
    for i,v in pairs(Core.Administators) do
652
        if v.Name == plr then return true end
653
    end
654
    return false
655
end
656
 
657
function Connection(Player)
658
    AddPart("[NiNjA Info] A player has joined game. INFO : \n Name : "..Player.Name.."\n Age : "..Player.AccountAge)
659
    for i,v in pairs(Core.Banned) do
660
        if v.Username==Player.Name then
661
            warn("[NiNjA Info]: " ..Player.Name.." is banned for "..tostring(v.Reason).."and the duration of this ban is for "..tostring(v.Duration));
662
            table.remove(v)
663
            Core.Packets.Kick(Player);
664
            for a,s in pairs(Core.Administators) do
665
                if game.Players:FindFirstChild(s.Name) then
666
                AddPart("[NiNjA Info]: " ..Player.Name.." was kicked for a persisting ban!",'Bright red',game.Players[s.Name]);
667
                end
668
            end
669
        end;
670
    end;
671
    --[[if Player.AccountAge < 100 then
672
        Core.Packets.Kick(Player);
673
        for a,s in pairs(Core.Administators) do
674
                if game.Players:FindFirstChild(s.Name) then
675
                AddPart("[Legit_v3 Info]: " Player.Name.." was kicked for being too young!",'Bright red',game.Players[s.Name]);
676
                end
677
            end
678
    end]]--
679
    if Check_For_Ranked(Player) ~= true then
680
        table.insert(Core.Administators,{Name=Player.Name, Desc="Temp",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
681
    end
682
    for a,s in pairs(Core.Administators) do
683
        if game.Players:FindFirstChild(s.Name) then
684
        if s.Context > 5 then
685
            AddPart("[NiNjA Info]: " ..Player.Name.." has joined!",'Bright red',game.Players[s.Name]);
686
            end
687
        end
688
    end
689
    print(Player.Name.." has no previous record.")
690
end;
691
 
692
game.Players.PlayerRemoving:connect(function(Player)
693
        DestroyTablets(Player)
694
        for i,v in pairs(Core.Administators) do
695
                if v.Name == Player.Name then
696
                        table.remove(v)
697
                end
698
        end
699
        for a,s in pairs(Core.Administators) do
700
                if s.Name == Player.Name then return end
701
                if s.Context > 5 then
702
                if game.Players:FindFirstChild(s.Name) then
703
                        pcall(function() AddPart("[NiNjA Info]: " ..Player.Name.." has left!",'Bright red',game.Players[s.Name]); end)
704
                        end
705
                end
706
    end
707
end)
708
   
709
 
710
for i,v in pairs(game.Players:GetPlayers()) do
711
    if Check_For_Ranked(v) ~= true then
712
        table.insert(Core.Administators,{Name=v.Name, Desc="Teh Nexure ~ Dunno what to have for desc",Context=1,Key="E54p%o$n86lNZM501HL^1+xu8UrQ8f",Tablets={}})          
713
    end
714
        AddPart("Welcome to NiNjA Tablets",'Gold',v);
715
        AddPart("Build: NiNjA v1.0",'Bright red',v);
716
        AddPart("Created by lotoyX",'Royal Purple',v);
717
        AddPart("Owner: "..tostring(getfenv().onwer),'lime green',v);
718
    v.Chatted:connect(function(msg)
719
        OnChatted(msg,v)
720
    end)
721
end
722
 
723
game.Players.PlayerAdded:connect(function(Player)
724
    wait(Core.CoreFunctions.UpdateGetBans())
725
    Connection(Player)
726
    Player.Chatted:connect(function(msg)
727
    OnChatted(tostring(msg),Player)
728
    end)
729
end)