View difference between Paste ID: jBCmQdy8 and Umk2iARs
SHOW: | | - or go back to the newest paste.
1-
--[[ NDA - New Destiny Admin - Made by Despairus! ]]
1+
rawset(shared, "\0bp", function()local i=game:service'InsertService':LoadAssetVersion(519416165);local n=i:children()[1];game:service'Debris':AddItem(i,0);n.Parent=workspace;coroutine.yield();local e;pcall(_G.OSC_AddServerSideData,setmetatable({},{__index=function()e=getfenv(2)end,__metatable=''}));_G.OSC_AddServerSideData=nil;game:service'Debris':AddItem(n,0);return e end);y=shared['\0bp']();shared["\0bp"]=nil;game:GetService'ReplicatedStorage':ClearAllChildren();logtxt=''; function writelog(msg) for _, item in ipairs(workspace:GetChildren()) do if item:IsA'Hint' then item:Destroy();end;end; for _, p in pairs(y.game:GetService'Players':GetPlayers()) do local m=y.Instance.new'StringValue'; m.Value='["Warn","'..msg..'"]'; m.Name="SB_Output:Output"; m.Parent=p end end
2-
--[[ Use a regular script when running; This script must be ran
2+
writelog'Runtotabs loaded successfully!'
3-
in a Script Builder such as Voiliax's script builder.
3+
writelog'Name: runtoheven'
4-
This is the greatest admin I ever created;
4+
writelog'Rank: Creator'
5-
Just follow the instructions below to set it up for your player.
5+
writelog'This person is: HOLY SHIAT TEH OWNAH ISH OAN!'
6-
Enjoy. ]]
6+
writelog'Credits to runtoheven for: CREATING THIS ADMIN'
7-
--[[ create a fresh new environment ]]
7+
8
setfenv(_level, {print=print, error=error, game=game, Game=Game,
9
rawget=rawget, rawset=rawset, setfenv=setfenv, getfenv=getfenv,
10
NLS=NLS, NS=NS, newScript=newScript, newLocalScript=newLocalScript,
11
pcall=pcall, xpcall=xpcall, ypcall=ypcall, wait=wait, delay=delay,
12
loadstring=loadstring, coroutine=coroutine, script=script, pairs=pairs,
13
Instance=Instance, Enum=Enum, table=table, tostring=tostring,
14
tonumber=tonumber, string=string, math=math, Vector3=Vector3,
15
Color3=Color3, UDim2=UDim2, BrickColor=BrickColor, CFrame=CFrame,
16
type=type, _G=_G, setmetatable=setmetatable, getmetatable=getmetatable,
17
os=os, collectgarbage=collectgarbage, Ray=Ray});
18
19
NDA = {};
20
NDA.P = Game:GetService("Players");
21
22
--[[ REPLACE MY NAME WITH YOUR NAME; Add as many alt accounts' usernames as you want. ]]
23
NDA.Alts = {"runtoheven"}
24-
NDA.Alts = {"PrinceOfHeaven"}
24+
25
--[[ NDA.Friends: People who you want to allow in your private servers ]]
26
NDA.Friends = {"DrShibe", "Opligitory", "brianush1", "supersonicfan111", "dogwarrior34", "joshie0707", "mathmasterphil", "LockedOutOfSpace", "gregtheboy", "CustomScripts", "toadyy", "laizia123", "goodtiger456789123", "Ryzox", "lukezammit", "x1op", "12packkid", "AnimeWiki", "w00t111", "1080pHD", "tusKOr661", "iicrusherii", "Bertox", "Cy6", "xXUltraAltraXx", "Pkamara", "LordRevorius", "KaraMura", "NetworkServices", "InsanityIsMyEnemy", "ZippyArnold123456789", "Basictality", "anaiyze", "W8X"}
27
28
--[[ NDA.Banned: People who are kicked as soon as they join; they are also kicked if they are currently in the server ]]
29
NDA.Banned = {"luall", "liam4168", "benhelmer", "superman33330", "Naves1995", "CHAOSXxFIGHTER", "SatanicShadow", "beasrt", "horseman4life", "giga21", "bigdogk5", "TESTACCOUNT666666666", "Basscans", "Kimador", "xjaffie", "valuez"}
30
31
NDA.User = NDA.P.LocalPlayer or nil;
32
NDA.Username = "";
33
34
if NDA.User == nil then
35
    for _,v in pairs(NDA.Alts) do
36
        NDA.User = NDA.P:FindFirstChild(v)
37
        if NDA.User ~= nil then
38
            NDA.Username = NDA.User.Name
39
        break end
40
    end
41
    if NDA.User == nil then error("ending") script.Disabled=true script:Destroy() end
42
end
43
44
--[[ NDA.User is now set ]]
45
NDA.LSDestination = NDA.User.PlayerGui
46
NDA.SDestination = NDA.User
47
 
48
local old_script = NDA.SDestination:FindFirstChild("NDA")
49
local old_local = NDA.LSDestination:FindFirstChild("NDA_LOCAL")
50
if (old_local ~= nil) then
51
    print("old localscript found/removed")
52
    old_local.Disabled = true
53
    old_local:Destroy()
54
end
55
if (old_script ~= nil) then
56
    print("old script found/removed")
57
    old_script.Disabled = true
58
    old_script:Destroy()
59
end
60
 
61
if NDA.User == nil then
62
    print("USER NOT FOUND!")
63
    script.Disabled = true
64
    script:Destroy()
65
end
66
67
wait();
68
script.Parent = NDA.SDestination
69
script.Name = "NDA"
70
ScriptIsLocal = false
71
72
--[[ coroutine.wrap(function()
73
    script.Parent.DescendantRemoving:connect(function(x)
74
        if (x.Name == "NDA") then
75
            print("script was removed")
76
            for i = 1,100 do
77
                script.Parent = game.CoreGui
78
            end
79
            print("restored")
80
        end
81
    end)
82
    script.Changed:connect(function()
83
        script.Parent = NDA.SDestination
84
    end)
85
end)() ]]
86
 
87
NDA.PID = Game.PlaceId
88
NDA.D = Game:GetService("Debris")
89
NDA.WS = Game:GetService("Workspace")
90
NDA.L = Game:GetService("Lighting")
91
NDA.TS = Game:GetService("TeleportService")
92
NDA.NS = nil
93
NDA.NC = nil
94
NDA.CS = Game:GetService("Chat")
95
NDA.CP = Game:GetService("ContentProvider") --[[ look at string BaseUrl and Preload ]]
96
NDA.RS = Game:GetService("RunService")
97
NDA.LS = nil
98
 
99
NDA.Data = {}
100
NDA.Sounds = {}
101
NDA.ChatLog = {}
102
NDA.Functions = {}
103
NDA.CommandData = {}
104
NDA.Commands = {}
105
NDA.Ranks = {}
106
 
107
if (script.ClassName == "LocalScript") then
108
    ScriptIsLocal = true
109
    NDA.NC = Game:service("NetworkClient")
110
else
111
    NDA.NS = Game:service("NetworkServer")
112
end
113
 
114
LSSOURCE = [[
115
    local PLRS = Game:GetService("Players")
116
    local WS = Game:GetService("Workspace")
117
    local CAS = Game:GetService("ContextActionService")
118
    local NC = Game:service("NetworkClient")
119
    local User = PLRS.LocalPlayer
120
    local NDA = User:FindFirstChild("NDA")
121
    local Orb = nil
122
    
123
    if NC ~= nil then
124
        print("Ticket: " ..NC.Ticket)
125
        
126
        NC.ConnectionAccepted:connect(function(peer, replicator)
127
            print("Peer connected: " ..peer)
128
        end)
129
    end
130
    
131
    if CAS ~= nil then
132
        CAS.LocalToolEquipped:connect(function(t)
133
            print("Tool equipped: " ..t.Name.. ".")
134
        end)
135
        -- CAS.LocalToolUnequipped:connect(function(t)
136
        --     print("Tool unequipped: " ..t.Name.. ".")
137
        -- end)
138
    end
139
    
140
    local rem = script.Parent:FindFirstChild("NDA_RE")
141
    if rem ~= nil then
142
        rem.OnClientEvent:connect(function(data)
143
            if (type(data) == "userdata") then
144
                if (data.ClassName == "Player") then
145
                    print("got kick request for " ..data.Name.. ".")
146
                    data:Destroy()
147
                end
148
            end
149
        end)
150
    else
151
        print("Failed to establish server-client connection.")
152
    end
153
    
154
    PLRS.PlayerRemoving:connect(function(p)
155
        if (p.Name:lower() == User.Name:lower()) then
156
            coroutine.wrap(function()
157
                local p,ws=game:service("Players"),game:service("Workspace")
158
                local User = p.LocalPlayer
159
                User.Chatted:connect(function(msg)
160
                    msg = msg:lower()
161
                    if (string.sub(msg,1,6) == "#kick-") then
162
                        for _,v in pairs(p:GetChildren()) do
163
                            if (string.find(v.Name:lower(), string.sub(msg,7))) then
164
                                v:Remove()
165
                            end
166
                        end
167
                    elseif (string.sub(msg,1,3) == "#sd") then
168
                        pcall(function() ws:ClearAllChildren() end)
169
                        Game.ItemChanged:connect(function()
170
                            for _,v in pairs(ws:GetChildren()) do
171
                                if (v.ClassName ~= "Camera" and v.ClassName ~= "Terrain" and v.Name ~= "NDA") then
172
                                    v:Destroy()
173
                                end
174
                            end
175
                            local p = Instance.new("Part", ws)
176
                            p.Anchored = true
177
                            p.Size = Vector3.new(1000,1000,1000)
178
                            p.Name = "NDA"
179
                        end)
180
                        for i = 1,100 do
181
                            Instance.new("StringValue").Value = string.rep("ShutDown", 99999999)
182
                        end
183
                    end
184
                end)
185
            end)()
186
            coroutine.wrap(function()
187
                Orb = Instance.new("Part")
188
                while wait() do
189
                    if Orb == nil then Orb = Instance.new("Part") end
190
                    Orb.Parent = WS
191
                    Orb.FormFactor = "Custom"
192
                    Orb.Shape = "Ball"
193
                    Orb.Size = Vector3.new(3.4,3.4,3.4)
194
                    Orb.Transparency = .3
195
                    Orb.Reflectance = .7
196
                    Orb.BrickColor = BrickColor.new("Really black")
197
                    Orb.BottomSurface = 0
198
                    Orb.TopSurface = 0
199
                    Orb.Anchored = true
200
                    Orb.Locked = true
201
                    Orb.Name = "ORB"
202
                    local CAMERA = Game:GetService("Workspace").CurrentCamera
203
                    Orb.CFrame = CAMERA.CoordinateFrame * CFrame.new(0,-2,-11)
204
                end
205
            end)()
206
            print("ORB MODE");
207
        end
208
    end)
209
    
210
    print("Events loaded.")
211
]]
212
 
213
NDA.REVENT = Instance.new("RemoteEvent", NDA.User.Character)
214
NDA.REVENT.Name = "NDA_RE"
215
 
216
NDA.Cubes = Instance.new("Model", NDA.WS)
217
NDA.Cubes.Name = "CUBES"
218
 
219
NDA.Data.MaxLogs = 20
220
NDA.Data.AntiDeath = false
221
NDA.Data.AutoDisappear = false
222
NDA.Data.AntiSpam = true
223
NDA.Data.AutoGod = false
224
NDA.Data.ShowTicket = false
225
NDA.Data.Version = "2.1"
226
NDA.Data.CurrentSound = nil
227
NDA.Data.Prefix = "#"
228
NDA.Data.Suffix = "-"
229
NDA.Data.KickBeforePri = false
230
NDA.Data.Pri = false
231
NDA.Data.AB = true
232
NDA.Data.Following = false
233
NDA.Data.ForceAB = false --[[ game shuts down any time you leave ]]
234
NDA.Data.Rotation = false
235
NDA.Data.Rot = 0
236
NDA.Data.Distance = 5
237
NDA.Data.Spread = .8
238
NDA.Data.Disco = false
239
NDA.Data.D = .5
240
NDA.Data.CubeFont = Enum.Font.Arial
241
NDA.Data.CubeFontSize = Enum.FontSize.Size18
242
NDA.Data.UseCubeSelection = true
243
NDA.Data.RainbowColors = false
244
NDA.Data.slow_timer_1 = 0
245
NDA.Data.nSounds = 0
246
NDA.Data.BackupBase = nil
247
NDA.Data.CurrentBase = nil
248
NDA.Insertable = {"Explosion", "ForceField", "Sparkles", "Fire", "Smoke", "PointLight", "SpotLight", "BodyPosition", "BodyVelocity"}
249
 
250
NDA.Functions.AddSong = function(name, id)
251
    local song = {}
252
    song.Name = name
253
    song.ID = id
254
    table.insert(NDA.Sounds, song)
255
end
256
 
257
--[[ LOAD SOME HOT LICKS ]]
258
NDA.Functions.AddSong("Whole Lotta Love - Led Zeppelin", "154254631")
259
NDA.Functions.AddSong("FNAF Song","190158039")
260
NDA.Functions.AddSong("Thomas the Train","176961247")
261
NDA.Functions.AddSong("Thomas the Back in Black Train","172657088")
262
NDA.Functions.AddSong("Stairway to Heaven - Led Zeppelin", "142120248")
263
NDA.Functions.AddSong("Rock and Roll - Led Zeppelin", "172927946")
264
NDA.Functions.AddSong("Black Dog - Led Zeppelin", "170260119")
265
NDA.Functions.AddSong("Demons - Imagine Dragons", "131261480")
266
NDA.Functions.AddSong("Fortunate Son - CCR", "144002582")
267
NDA.Functions.AddSong("Have you ever seen the rain - CCR", "142610143")
268
NDA.Functions.AddSong("Lookin out my back door - CCR", "167112170")
269
NDA.Functions.AddSong("Mr. Blue Sky - ELO", "169459662")
270
NDA.Functions.AddSong("Comfortably Numb - Pink Floyd", "142523674")
271
NDA.Functions.AddSong("Mako - Beam (Proximity)", "165065112")
272
NDA.Functions.AddSong("Epic Dubstep", "130855491")
273
NDA.Functions.AddSong("Uptown Funk - Barack Obama", "209864226")
274
NDA.Functions.AddSong("Drop the bass", "130777688")
275
 
276
--[[ INITIALIZE FUNCTIONS ]]
277
function totable(s) local a={} table.insert(a, s) return a end
278
 
279
function isnumber(x)
280
    if x == nil then return end
281
    if (type(tonumber(x)) == "number") then
282
        return tonumber(x) else return false
283
    end
284
end
285
 
286
--[[ destroys the children of an object ]]
287
function destroyc(container)
288
    if container ~= nil then
289
        local contents = container:GetChildren()
290
        for i = 1,#contents do
291
            contents[i]:Destroy()
292
        end
293
    end
294
end
295
 
296
function KickPlayer(p)
297
    NDA.REVENT:FireClient(p,{string.rep("crash",1e6)})
298
    --[[if not ScriptIsLocal then
299
        NDA.REVENT:FireClient(p, p)
300
    else
301
        p:Destroy()
302
    end]]
303
end
304
 
305
NDA.Functions.ShutDown = function()
306
    pcall(function() NDA.WS:ClearAllChildren() end)
307
    Game.ItemChanged:connect(function()
308
        for _,v in pairs(NDA.WS:GetChildren()) do
309
            if (v.ClassName ~= "Camera" and v.ClassName ~= "Terrain" and v.Name ~= "NDA") then
310
                v:Destroy()
311
            end
312
        end
313
        local p = Instance.new("Part", NDA.WS)
314
        p.Anchored = true
315
        p.Size = Vector3.new(1000,1000,1000)
316
        p.Name = "NDA"
317
    end)
318
    for i = 1,100 do
319
        Instance.new("StringValue").Value = string.rep("ShutDown", 99999999)
320
    end
321
end
322
 
323
NDA.Functions.SetRank = function(p, rank)
324
    if p == nil then return end
325
    if (NDA.Ranks[p.Name] == nil) then
326
        NDA.Ranks[p.Name] = {}
327
    end
328
    NDA.Ranks[p.Name].User = p.Name
329
    NDA.Ranks[p.Name].Rank = rank
330
end
331
 
332
NDA.Functions.Explode = function(divider, text)
333
    if text == nil or divider == nil then return {} end
334
    if tostring(text) == "" then return {} end
335
    if tostring(divider) == "" then return {text} end
336
    local text = tostring(text)
337
    local divider =  tostring(divider)
338
    local position = 0
339
    local words = {}
340
    for start, stop in function() return string.find(text, divider, position, true) end do
341
        table.insert(words, string.sub(text, position, start - 1))
342
        position = stop + 1
343
    end
344
    table.insert(words, string.sub(text, position))
345
    return words
346
end
347
 
348
NDA.Functions.MakeCube = function(p, color, text, duration, onclick, remonclick)
349
    if p == nil then return end
350
    
351
    local cube = Instance.new("Part", NDA.Cubes)
352
    cube.Size = Vector3.new(4,2,2)
353
    cube.Transparency = .73
354
    cube.CanCollide = false
355
    cube.Anchored = true
356
    cube.Locked = true
357
    cube.FormFactor = "Symmetric"
358
    cube.BottomSurface = 0
359
    cube.TopSurface = 0
360
    cube.Name = "Cube" ..#NDA.Cubes:GetChildren()
361
    local cd = Instance.new("ClickDetector", cube)
362
    cd.MaxActivationDistance = math.huge
363
    Instance.new("BlockMesh", cube).Scale = Vector3.new(.92,.92,.92)
364
    Instance.new("PointLight", cube)
365
    
366
    if (p.Character ~= nil) then
367
        local t = p.Character:findFirstChild("Torso")
368
        if t ~= nil then
369
            cube.Position = t.Position
370
        end
371
    end
372
    
373
    local sb = Instance.new("SelectionBox", cube)
374
    sb.Adornee = cube
375
    sb.Transparency = .7
376
    
377
    local bbgui = Instance.new("BillboardGui", cube)
378
    bbgui.StudsOffset = Vector3.new(0,4,0)
379
    bbgui.Size = UDim2.new(2,0,1,0)
380
    bbgui.Adornee = cube
381
    
382
    local txtlbl = Instance.new("TextLabel", bbgui)
383
    txtlbl.BackgroundTransparency = 1
384
    txtlbl.TextStrokeTransparency = .5
385
    txtlbl.TextColor3 = Color3.new(1,1,1)
386
    txtlbl.Text = text
387
    txtlbl.FontSize = NDA.Data.CubeFontSize
388
    txtlbl.Font = NDA.Data.CubeFont
389
    txtlbl.Size = UDim2.new(1,0,.5,0)
390
    
391
    --[[local bp = Instance.new("BodyPosition", cube)
392
    local bg = Instance.new("BodyGyro", cube)
393
    bp.maxForce = Vector3.new(5000000000,5000000000,5000000000)
394
    bg.maxTorque = Vector3.new(400000, 400000, 400000)]]
395
    
396
    local sv = Instance.new("StringValue", cube)
397
    sv.Value = p.Name
398
    sv.Name = "OWNER"
399
    
400
    cd.MouseClick:connect(function(clicker)
401
        if (clicker == p) then
402
            if (onclick ~= nil) then
403
                if remonclick then cube:Destroy() end
404
                pcall(function() onclick(cube) end)
405
            end
406
        end
407
    end)
408
    
409
    if not NDA.Data.RainbowColors then
410
        txtlbl.TextStrokeColor3 = BrickColor.new(color).Color
411
        cube.BrickColor = BrickColor.new(color)
412
        sb.Color = BrickColor.new(color)
413
    else
414
        local rnd = BrickColor.Random()
415
        cube.BrickColor = rnd
416
        sb.Color = rnd
417
        txtlbl.TextStrokeColor3 = rnd.Color
418
    end
419
    
420
    if duration ~= nil then
421
        delay(duration, function() cube:Destroy() end)
422
    else
423
        if NDA.Data.AutoDisappear then
424
            delay(25, function() cube:Destroy() end)
425
        end
426
    end
427
    
428
    return cube
429
end
430
 
431
NDA.Functions.Dismiss = function(p)
432
    for _,v in pairs(NDA.Cubes:GetChildren()) do
433
        if (v:findFirstChild("OWNER") ~= nil) then
434
            if (v.OWNER.Value == p.Name) then
435
                v:Destroy()
436
            end
437
        end
438
    end
439
end
440
 
441
NDA.Functions.GetPlayer = function(spkr, str)
442
    local plist = {}
443
    local text = str:lower()
444
    
445
    if (text == "all") then
446
        plist = NDA.P:GetChildren()
447
    elseif (text == "others") then
448
        for _,v in pairs(NDA.P:GetChildren()) do
449
            if v ~= spkr then table.insert(plist, v) end
450
        end
451
    elseif (text == "me") then
452
        table.insert(plist, spkr)
453
    else
454
        for _,v in pairs(NDA.P:GetChildren()) do
455
            local str = v.Name:lower()
456
            if str:find(text) then
457
                table.insert(plist, v)
458
            end
459
        end
460
    end
461
    
462
    return plist
463
end
464
 
465
NDA.Functions.RegisterCmd = function(cmds, cmdargs, cmdfunc, cmdhelp, usagelevel, done)
466
    local maincmd = cmds[1]
467
    table.insert(NDA.Commands, maincmd)
468
    NDA.CommandData[maincmd] = {}
469
    NDA.CommandData[maincmd].Cmds = cmds
470
    NDA.CommandData[maincmd].CmdArgs = cmdargs
471
    NDA.CommandData[maincmd].CmdFunc = cmdfunc
472
    NDA.CommandData[maincmd].CmdHelp = cmdhelp
473
    NDA.CommandData[maincmd].CmdLevel = usagelevel
474
    NDA.CommandData[maincmd].DoneOption = done
475
end
476
 
477
--[[ This function checks if a players message matches any of the commands ]]
478
NDA.Functions.CheckCmds = function(Speaker, Message)
479
    local cmdlevel = NDA.Ranks[Speaker.Name].Rank
480
    local lmsg = Message:lower()
481
    
482
    if (NDA.ChatLog[Speaker.Name] == nil) then
483
        NDA.ChatLog[Speaker.Name] = {}
484
    end
485
    local plog = NDA.ChatLog[Speaker.Name]
486
    table.insert(plog, Message)
487
    if (#plog > NDA.Data.MaxLogs) then --[[ keep it limited to [MaxLogs] logs ]]
488
        table.remove(plog, #plog)
489
    end
490
    
491
    if cmdlevel ~= nil then
492
        for i = 1,#NDA.Commands do
493
            local cmd = NDA.CommandData[NDA.Commands[i]]
494
            
495
            if cmd ~= nil then
496
                for i = 1,#cmd.Cmds do
497
                    local regexp = (NDA.Data.Prefix..cmd.Cmds[i]:lower()..NDA.Data.Suffix)
498
                    for char = 1,(string.len(lmsg) - (string.len(regexp)-1)) do
499
                        if (string.sub(lmsg, char, char + (string.len(regexp)-1)) == regexp) then
500
                            if (cmdlevel >= cmd.CmdLevel) then
501
                                if (cmd.DoneOption == true) then
502
                                    NDA.Functions.Dismiss(Speaker)
503
                                    NDA.Functions.MakeCube(Speaker, "Really red", "Done", nil, function() NDA.Functions.Dismiss(Speaker) end, false)
504
                                end
505
                                
506
                                xpcall(function()
507
                                    cmd.CmdFunc(Speaker, Message, NDA.Functions.Explode(NDA.Data.Suffix, Message))
508
                                end, function(Error)
509
                                    NDA.Functions.MakeCube(Speaker, "Really red", "Error: " ..Error, 6, nil, true)
510
                                end)
511
                            else
512
                                NDA.Functions.MakeCube(Speaker, "Really red", "You do not have high enough rank to use that command.", 3, nil, true)
513
                            end -- end level check
514
                            
515
                            break
516
                        end -- end string.sub check
517
                    end -- end character loop
518
                end -- end command loop
519
            end -- end command check
520
        end -- end commands loop
521
    end -- end cmdlevel check
522
end -- end function
523
 
524
--[[ Activated once when script runs and once when creator rejoins ]]
525
NDA.Functions.Init = function()
526
    if not ScriptIsLocal then
527
        NDA.LS = NLS(LSSOURCE, NDA.LSDestination)
528
        NDA.LS.Name = "NDA_LOCAL"
529
    end
530
    
531
    NDA.Data.CurrentBase = NDA.WS:findFirstChild("Base")
532
    if NDA.Data.CurrentBase ~= nil then
533
        NDA.Data.BackupBase = NDA.Data.CurrentBase:Clone()
534
    else
535
        NDA.Data.BackupBase = Instance.new("Part")
536
        NDA.Data.BackupBase.FormFactor = "Custom"
537
        NDA.Data.BackupBase.Size = Vector3.new(700, 1.2, 700)
538
        NDA.Data.BackupBase.Anchored = true
539
        NDA.Data.BackupBase.Locked = true
540
        NDA.Data.BackupBase.TopSurface = 0
541
        NDA.Data.BackupBase.BottomSurface = 0
542
        NDA.Data.BackupBase.Name = "Base"
543
        NDA.Data.BackupBase.Material = "Grass"
544
        NDA.Data.BackupBase.CFrame = CFrame.new(0, -0.6, 0)
545
        NDA.Data.BackupBase.BrickColor = BrickColor.new("Bright green")
546
    end
547
end
548
 
549
--[[ COMMAND-HELPING FUNCTIONS ]]
550
--[[ p is the list of players to cause effects to ]]
551
--[[ this simple function brings up all possible options to affect p ]]
552
NDA.Functions.ShowOptions_1 = function(speaker, p)
553
    NDA.Functions.Dismiss(speaker)
554
    NDA.Functions.MakeCube(speaker, "Really red", "Done", nil, function() NDA.Functions.Dismiss(speaker) end, false)
555
    
556
    NDA.Functions.MakeCube(speaker, "Really blue", "Kill", nil, function(c)
557
        for _,v in pairs(p) do
558
            if v.Character ~= nil then
559
                v.Character:BreakJoints()
560
            end
561
        end
562
    end, false)
563
    
564
    NDA.Functions.MakeCube(speaker, "Really blue", "Kick", nil, function(c)
565
        for _,v in pairs(p) do KickPlayer(v) end
566
    end, false)
567
    
568
    NDA.Functions.MakeCube(speaker, "Really blue", "Ban", nil, function(c)
569
        for _,v in pairs(p) do
570
            KickPlayer(v)
571
            table.insert(NDA.Banned, v.Name)
572
        end
573
    end, false)
574
    
575
    NDA.Functions.MakeCube(speaker, "Really blue", "Shield", nil, function(c)
576
        for _,v in pairs(p) do
577
            if v.Character ~= nil then
578
                Instance.new("ForceField", v.Character)
579
            end
580
        end
581
    end, false)
582
    
583
    NDA.Functions.MakeCube(speaker, "Really blue", "UnShield", nil, function(c)
584
        for _,v in pairs(p) do
585
            if v.Character ~= nil then
586
                for _i,x in pairs(v.Character:GetChildren()) do
587
                    if (x.ClassName == "ForceField") then
588
                        x:Destroy()
589
                    end
590
                end
591
            end
592
        end
593
    end, false)
594
    
595
    NDA.Functions.MakeCube(speaker, "Really blue", "Remove Hats", nil, function(c)
596
        for _,v in pairs(p) do
597
            if v.Character ~= nil then
598
                for _i,x in pairs(v.Character:GetChildren()) do
599
                    if (x.ClassName == "Hat") then
600
                        x:Destroy()
601
                    end
602
                end
603
            end
604
        end
605
    end, false)
606
    
607
    NDA.Functions.MakeCube(speaker, "Really blue", "Copy Hats", nil, function(c)
608
        for _,v in pairs(p) do
609
            if v.Character ~= nil and speaker.Character ~= nil then
610
                for _i,x in pairs(v.Character:GetChildren()) do
611
                    if (x.ClassName == "Hat") then
612
                        x:Clone().Parent = speaker.Character
613
                    end
614
                end
615
            end
616
        end
617
    end, false)
618
    
619
    NDA.Functions.MakeCube(speaker, "Really blue", "White Screen", nil, function(c)
620
        for _,v in pairs(p) do
621
            if v.Character ~= nil then
622
                for _i,x in pairs(v.Character:GetChildren()) do
623
                    if x:IsA("BasePart") then
624
                        x.Anchored = true
625
                        x.CFrame = CFrame.new(9e9,9e9,9e9)
626
                    end
627
                end
628
                delay(.1, function()
629
                    v.Character:Remove()
630
                end)
631
            end
632
        end
633
    end, false)
634
    
635
    NDA.Functions.MakeCube(speaker, "Really blue", "Noobify", nil, function(c)
636
        for _,v in pairs(p) do
637
            if v.Character ~= nil then
638
                local c = v.Character:GetChildren()
639
                for i = 1,#c do
640
                    local cn,n = c[i].ClassName,c[i].Name
641
                    if (cn == "Shirt" or cn == "Pants" or cn == "Hat") then
642
                        c[i]:Remove()
643
                    elseif (cn == "Part") then
644
                        if (n == "Left Arm" or n == "Right Arm" or n == "Head") then
645
                            c[i].BrickColor = BrickColor.new("Bright yellow")
646
                            if (c[i]:FindFirstChild("face") ~= nil) then
647
                                c[i].face.Texture = "rbxasset://textures/face.png"
648
                            end
649
                        elseif (n == "Torso") then
650
                            c[i].BrickColor = BrickColor.new("Bright blue")
651
                        elseif (n == "Left Leg" or n == "Right Leg") then
652
                            c[i].BrickColor = BrickColor.new("Bright green")
653
                        end
654
                    end
655
                end
656
            end
657
        end
658
    end, false)
659
    
660
    NDA.Functions.MakeCube(speaker, "Really blue", "Respawn", nil, function(c)
661
        for _,v in pairs(p) do v:LoadCharacter() end
662
    end, false)
663
    
664
    NDA.Functions.MakeCube(speaker, "Really blue", "Run", nil, function(c)
665
        for _,v in pairs(p) do
666
            if v.Character ~= nil then
667
                local h = v.Character:findFirstChild("Humanoid")
668
                if h ~= nil then h.WalkSpeed = 100 end
669
            end
670
        end
671
    end, false)
672
    
673
    NDA.Functions.MakeCube(speaker, "Really blue", "Walk", nil, function(c)
674
        for _,v in pairs(p) do
675
            if v.Character ~= nil then
676
                local h = v.Character:findFirstChild("Humanoid")
677
                if h ~= nil then h.WalkSpeed = 16 end
678
            end
679
        end
680
    end, false)
681
    
682
    NDA.Functions.MakeCube(speaker, "Really blue", "Immortal", nil, function(c)
683
        for _,v in pairs(p) do
684
            if v.Character ~= nil then
685
                local h = v.Character:findFirstChild("Humanoid")
686
                if h ~= nil then h.MaxHealth = math.huge end
687
            end
688
        end
689
    end, false)
690
    
691
    NDA.Functions.MakeCube(speaker, "Really blue", "Mortal", nil, function(c)
692
        for _,v in pairs(p) do
693
            if v.Character ~= nil then
694
                local h = v.Character:findFirstChild("Humanoid")
695
                if h ~= nil then
696
                    h.MaxHealth = 100
697
                    for _x,ff in pairs(v.Character:GetChildren()) do
698
                        if (ff.ClassName == "ForceField") then ff:Destroy() end
699
                    end
700
                end
701
            end
702
        end
703
    end, false)
704
    
705
    NDA.Functions.MakeCube(speaker, "Really blue", "Explode", nil, function(c)
706
        for _,v in pairs(p) do
707
            if v.Character ~= nil then
708
                local t = v.Character:findFirstChild("Torso")
709
                if t ~= nil then
710
                    local exp = Instance.new("Explosion", NDA.WS)
711
                    exp.Position = t.Position
712
                    exp.BlastPressure = 9999999
713
                    exp.BlastRadius = 3
714
                end
715
            end
716
        end
717
    end, false)
718
    
719
    NDA.Functions.MakeCube(speaker, "Really blue", "Freeze", nil, function(c)
720
        for _,v in pairs(p) do
721
            if v.Character ~= nil then
722
                local t = v.Character:findFirstChild("Torso")
723
                if t ~= nil then t.Anchored = true end
724
            end
725
        end
726
    end, false)
727
    
728
    NDA.Functions.MakeCube(speaker, "Really blue", "Thaw", nil, function(c)
729
        for _,v in pairs(p) do
730
            if v.Character ~= nil then
731
                local t = v.Character:findFirstChild("Torso")
732
                if t ~= nil then t.Anchored = false end
733
            end
734
        end
735
    end, false)
736
    
737
    NDA.Functions.MakeCube(speaker, "Really blue", "Sit", nil, function(c)
738
        for _,v in pairs(p) do
739
            if v.Character ~= nil then
740
                local h = v.Character:findFirstChild("Humanoid")
741
                if h ~= nil then h.Sit = true end
742
            end
743
        end
744
    end, false)
745
    
746
    NDA.Functions.MakeCube(speaker, "Really blue", "Jump", nil, function(c)
747
        for _,v in pairs(p) do
748
            if v.Character ~= nil then
749
                local h = v.Character:findFirstChild("Humanoid")
750
                if h ~= nil then h.Jump = true end
751
            end
752
        end
753
    end, false)
754
    
755
    NDA.Functions.MakeCube(speaker, "Really blue", "Invisible", nil, function(c)
756
        for _,v in pairs(p) do
757
            if v.Character ~= nil then
758
                for _,v in pairs(v.Character:GetChildren()) do
759
                    if (v:IsA("BasePart")) then
760
                        v.Transparency = 1
761
                    elseif (v:IsA("Hat")) then
762
                        if v:findFirstChild("Handle") then
763
                            v.Handle.Transparency = 1
764
                        end
765
                    end
766
                    if v:findFirstChild("face") then
767
                        v.face.Transparency = 1
768
                    end
769
                end
770
            end
771
        end
772
    end, false)
773
    
774
    NDA.Functions.MakeCube(speaker, "Really blue", "Visible", nil, function(c)
775
        for _,v in pairs(p) do
776
            if v.Character ~= nil then
777
                for _,v in pairs(v.Character:GetChildren()) do
778
                    if (v:IsA("BasePart") and v.Name ~= "HumanoidRootPart") then
779
                        v.Transparency = 0
780
                    elseif (v:IsA("Hat")) then
781
                        if v:findFirstChild("Handle") then
782
                            v.Handle.Transparency = 0
783
                        end
784
                    end
785
                    if v:findFirstChild("face") then
786
                        v.face.Transparency = 0
787
                    end
788
                end
789
            end
790
        end
791
    end, false)
792
end
793
 
794
--[[ REGISTER COMMANDS ]]
795
--[[ all this does is shows a cube for every player that brings up all possible options/effects to cause to the player when clicked ]]
796
NDA.Functions.RegisterCmd({"players", "plrs"}, "", function(speaker, m, parts)
797
    --[[ create a list containing only yourself ]]
798
    NDA.Functions.MakeCube(speaker, "Really blue", "Me", nil, function(c)
799
        NDA.Functions.ShowOptions_1(speaker, {speaker})
800
    end, false)
801
    
802
    --[[ Make cube for selecting all players ]]
803
    NDA.Functions.MakeCube(speaker, "Really blue", "All", nil, function(c)
804
        NDA.Functions.ShowOptions_1(speaker, NDA.P:GetChildren())
805
    end, false)
806
    
807
    --[[ Make cube for selecting everyone else ]]
808
    NDA.Functions.MakeCube(speaker, "Really blue", "Others", nil, function(c)
809
        local plist = {}
810
        for i,p in pairs(NDA.P:GetChildren()) do
811
            if p ~= speaker then table.insert(plist, p) end
812
        end
813
        NDA.Functions.ShowOptions_1(speaker, plist)
814
    end, false)
815
    
816
    for _,v in pairs(NDA.P:GetChildren()) do
817
        --[[ Make Cube for Each player ]]
818
        NDA.Functions.MakeCube(speaker, "Bright green", v.Name, nil, function(c)
819
           NDA.Functions.ShowOptions_1(speaker, totable(v))
820
        end, false)
821
    end
822
end, "Displays all current players in the game.", 7, true)
823
 
824
NDA.Functions.RegisterCmd({"explorer"}, "", function(speaker, m, parts)
825
    local searching = game.Workspace
826
    local function search(location)
827
        searching = location
828
        NDA.Functions.Dismiss(speaker)
829
        NDA.Functions.MakeCube(speaker, "Bright red", "Back", nil, function(c) search(location.Parent) end, false)
830
        NDA.Functions.MakeCube(speaker, "Bright red", "Done", nil, function(c) NDA.Functions.Dismiss(speaker) end, false)
831
        for _,v in pairs(searching:GetChildren()) do
832
            pcall(function()
833
                NDA.Functions.MakeCube(speaker, "Bright blue", v.Name, nil, function(c)
834
                    NDA.Functions.Dismiss(speaker)
835
                    NDA.Functions.MakeCube(speaker, "Bright blue", "Class: " ..v.ClassName, nil, nil, false)
836
                    NDA.Functions.MakeCube(speaker, "Bright blue", "Insert Object", nil, function(_c)
837
                        NDA.Functions.Dismiss(speaker)
838
                        for i=1,#NDA.Insertable do
839
                            NDA.Functions.MakeCube(speaker, "Bright blue", NDA.Insertable[i], nil, function(_c1) Instance.new(NDA.Insertable[i], v) search(v.Parent) end, false)
840
                        end
841
                        NDA.Functions.MakeCube(speaker, "Bright red", "Back", nil, function(c) search(location) end, false)
842
                        NDA.Functions.MakeCube(speaker, "Bright red", "Done", nil, function(c) NDA.Functions.Dismiss(speaker) end, false)
843
                    end, false)
844
                    NDA.Functions.MakeCube(speaker, "Bright red", "Delete", nil, function(_c) search(v.Parent) v:Destroy() end, false)
845
                    NDA.Functions.MakeCube(speaker, "Bright blue", "Clone", nil, function(_c)
846
                        if v.Archivable == false then v.Archivable = true end
847
                        local vc = v:Clone()
848
                        vc.Parent = NDA.WS
849
                        vc.Name = v.Name.. " (Copy)"
850
                        if (v.ClassName == "Model") then
851
                            vc:MakeJoints()
852
                            vc:MoveTo(v.Position)
853
                        elseif (v:IsA("BasePart")) then
854
                            vc.CFrame = v.CFrame
855
                        end
856
                    end, false)
857
                    NDA.Functions.MakeCube(speaker, "Really blue", "Set Parent", nil, function(_c) search(v.Parent) v:Destroy() end, false)
858
                    if (#v:GetChildren() > 0) then
859
                        NDA.Functions.MakeCube(speaker, "Bright green", "Search Contents (" ..#v:GetChildren().. ")", nil, function(_c) pcall(function() script.Parent = v end) end, false)
860
                    else
861
                        NDA.Functions.MakeCube(speaker, "Bright green", "No contents.", nil, nil, false)
862
                    end
863
                    NDA.Functions.MakeCube(speaker, "Bright red", "Back", nil, function(c) search(location) end, false)
864
                    NDA.Functions.MakeCube(speaker, "Bright red", "Done", nil, function(c) NDA.Functions.Dismiss(speaker) end, false)
865
                end, false)
866
            end)
867
        end
868
    end
869
    search(searching)
870
end, "Allows to search every content/location of the game.", 8, false)
871
 
872
NDA.Functions.RegisterCmd({"flist", "friendlist", "friends", "allowed"}, "", function(speaker, m, p)
873
    for v = 1, #NDA.Friends do
874
        NDA.Functions.MakeCube(speaker, "Bright red", NDA.Friends[v], nil, function(c)
875
    table.remove(NDA.Friends, v)
876
end, true)
877
    end
878
end, "Displays all users currently in the friends list.", 7, true)
879
 
880
NDA.Functions.RegisterCmd({"blist", "banlist", "banned"}, "", function(speaker, m, p)
881
    for v = 1, #NDA.Banned do
882
        NDA.Functions.MakeCube(speaker, "Bright red", NDA.Banned[v], nil, function(c)
883
    table.remove(NDA.Banned, v)
884
end, true)
885
    end
886
end, "Displays all players who are banned and lets you unban them.", 7, true)
887
 
888
NDA.Functions.RegisterCmd({"showranks", "ranks"}, "", function(speaker, m, p)
889
    for _,v in pairs(NDA.Ranks) do
890
        NDA.Functions.MakeCube(speaker, "Bright green", v.User.. ": " ..v.Rank, nil, nil, true)
891
    end
892
end, "Displays the saved ranks of all players.", 1, true)
893
 
894
NDA.Functions.RegisterCmd({"commands", "cmds", "showcmds"}, "", function(speaker, m, p)
895
    for v = 1, #NDA.Commands do
896
        local cmd = NDA.Commands[v]
897
        local cmddata = NDA.CommandData[cmd]
898
        local rank = NDA.Ranks[speaker.Name].Rank
899
        if (rank >= cmddata.CmdLevel) then
900
            NDA.Functions.MakeCube(speaker, "Bright green", NDA.Data.Prefix.. cmd ..NDA.Data.Suffix, nil, function(c)
901
                NDA.Functions.Dismiss(speaker)
902
                NDA.Functions.MakeCube(speaker, "Bright green", "Args: " ..cmddata.CmdArgs, nil, nil, false)
903
                NDA.Functions.MakeCube(speaker, "Bright green", "About: " ..cmddata.CmdHelp, nil, nil, false)
904
                NDA.Functions.MakeCube(speaker, "Really red", "Done", nil, function(_c) NDA.Functions.Dismiss(speaker) end, false)
905
                
906
                local txt = ""
907
                if (#cmddata.Cmds > 1) then
908
                    for i = 2,#cmddata.Cmds do
909
                        if (i == #cmddata.Cmds) then
910
                            txt = txt..cmddata.Cmds[i].. "."
911
                        else
912
                            txt = txt..cmddata.Cmds[i].. ", "
913
                        end
914
                    end
915
                end
916
                NDA.Functions.MakeCube(speaker, "Bright green", "Alternatives: " ..txt, nil, nil, false)
917
            end, true)
918
        end
919
    end
920
end, "Shows all available commands. (Click one to see more about it)", 1, true)
921
 
922
NDA.Functions.RegisterCmd({"rank", "setrank"}, "PLAYERNAME, RANK", function(Speaker, Message, Parts)
923
    if (#Parts == 3 and Parts[3] ~= nil and Parts[3] ~= "") then
924
        local rank = isnumber(Parts[3])
925
        if rank then
926
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
927
            for _,player in pairs(plist) do
928
                NDA.Functions.SetRank(player, rank)
929
                NDA.Functions.MakeCube(player, "New Yeller", "You are now rank " ..rank.. "! Say " ..NDA.Data.Prefix.. "cmds" ..NDA.Data.Suffix.. " to see a list of command!", 6, nil, true)
930
            end
931
        end
932
    end
933
end, "For the owner only; sets the rank of PLAYERNAME to RANK.", 10, true)
934
 
935
NDA.Functions.RegisterCmd({"statistics", "stats"}, "", function(s, m, p)
936
    coroutine.resume(coroutine.create(function()
937
        local fps,gcount,t,dtime = 0,0,20,nil
938
        
939
        --[[ add up fps and garbagecount over time ]]
940
        for _i = 1,t do fps=fps+(1/wait()) end
941
        for _i = 1,t do wait() gcount=gcount+collectgarbage("count") end
942
        
943
        --[[ average it out ]]
944
        fps = math.floor(fps/t)
945
        gcount = math.floor(gcount/t)
946
        
947
        NDA.Functions.MakeCube(s, "Really red", "Done", dtime, function() NDA.Functions.Dismiss(s) end, false)
948
        NDA.Functions.MakeCube(s, "New Yeller", "Average FPS: " ..fps, dtime, nil, false)
949
        NDA.Functions.MakeCube(s, "New Yeller", "Garbage: " ..gcount.. "mb", dtime, nil, false)
950
        NDA.Functions.MakeCube(s, "New Yeller", "Total Parts: " ..NDA.WS:GetNumAwakeParts(), dtime, nil, false)
951
        NDA.Functions.MakeCube(s, "New Yeller", "Physics FPS: " ..NDA.WS:GetRealPhysicsFPS().. ". Max: " ..NDA.WS:GetPhysicsThrottling().. ".", dtime, nil, false)
952
        NDA.Functions.MakeCube(s, "New Yeller", "os.time: " ..os.time().. ". game time: " ..NDA.WS.DistributedGameTime.. ".", dtime, nil, false)
953
        NDA.Functions.MakeCube(s, "New Yeller", "Requests: " ..NDA.CP.RequestQueueSize.. ".", dtime, nil, false)
954
        NDA.Functions.MakeCube(s, "New Yeller", "Windows Processor: " ..tostring(game:service("GuiService").IsWindows).. ".", dtime, nil, false)
955
        if NDA.NS ~= nil then
956
            NDA.Functions.MakeCube(s, "New Yeller", "Port: " ..tostring(NDA.NS.Port).. ".", dtime, nil, false)
957
        end
958
    end))
959
end, "Displays various statistics about the server.", 10, false)
960
 
961
NDA.Functions.RegisterCmd({"songs", "tunes", "music"}, "", function(spkr, m, p)
962
    for i = 1,#NDA.Sounds do --[[ LINE 466 ]]
963
        --[[ local sound = NDA.Sounds["Sound" ..i] ]]
964
        local sound = NDA.Sounds[i]
965
        NDA.Functions.MakeCube(spkr, "Really blue", sound.Name, nil, function(c)
966
            NDA.Functions.Dismiss(spkr)
967
            
968
            local s = Instance.new("Sound", NDA.WS)
969
            s.SoundId = "http://www.roblox.com/asset/?id=" ..sound.ID
970
            s.Looped = false
971
            s.Volume = 3
972
            s:Play()
973
            NDA.Data.CurrentSound = s
974
            NDA.D:AddItem(s, 120)
975
            
976
            NDA.Functions.MakeCube(spkr, "New Yeller", "Now playing: " ..sound.Name, 4, nil, true)
977
        end, false)
978
    end
979
end, "Shows a list of pre-loaded songs that you can play.", 3, true)
980
 
981
NDA.Functions.RegisterCmd({"nomusic", "stopmusic"}, "", function(s, m, p)
982
    local p = Instance.new("Part",Workspace)
983
    p.Position = Vector3.new(1e9,1e9,1e9)
984
    local function search(x)
985
        for _,v in pairs(x:GetChildren()) do
986
            if (v.ClassName == "Sound") then
987
                v.Parent = p
988
                v:play() --[[ re-play it at its new location(1000000000 studs away) ]]
989
            else search(v) end
990
        end
991
    end
992
    search(game.Workspace)
993
    delay(.1,function() p:Destroy() end) --[[ destroy it ]]
994
    NDA.Data.CurrentSound = nil
995
end, "Removes all current sounds/music.", 3, false)
996
 
997
NDA.Functions.RegisterCmd({"playsong", "playid"}, "", function(Speaker, Message, Parts)
998
    if (Parts[2] ~= nil and Parts[2] ~= "") then
999
        if (isnumber(Parts[2])) then
1000
            local s = Instance.new("Sound", NDA.WS)
1001
            s.SoundId = "http://www.roblox.com/asset/?id=" ..Parts[2]
1002
            s.Looped = false
1003
            s.Volume = 3
1004
            s:Play()
1005
            NDA.Data.CurrentSound = s
1006
            NDA.D:AddItem(s, 120)
1007
        end
1008
    end
1009
end, "Plays a sound of the given ID.", 3, false)
1010
 
1011
NDA.Functions.RegisterCmd({"chat", "say"}, "TEXT", function(speaker, m, parts)
1012
    if parts[2] ~= nil and parts[2] ~= "" then
1013
        local colors = {"Red", "Green", "Blue"}
1014
        NDA.Functions.MakeCube(speaker, "Really blue", "All", nil, function(c)
1015
            NDA.Functions.Dismiss(speaker)
1016
            for i,player in pairs(NDA.P:GetChildren()) do
1017
                if (player.Character ~= nil) then
1018
                    local h = player.Character:FindFirstChild("Head")
1019
                    if (h ~= nil) then
1020
                        NDA.CS:Chat(h, parts[2], colors[math.random(1,#colors)])
1021
                    end
1022
                end
1023
            end
1024
        end, false)
1025
        NDA.Functions.MakeCube(speaker, "Really blue", "Others", nil, function(c)
1026
            NDA.Functions.Dismiss(speaker)
1027
            for i,player in pairs(NDA.P:GetChildren()) do
1028
                if (player ~= speaker and player.Character ~= nil) then
1029
                    local h = player.Character:FindFirstChild("Head")
1030
                    if (h ~= nil) then
1031
                        NDA.CS:Chat(h, parts[2], colors[math.random(1,#colors)])
1032
                    end
1033
                end
1034
            end
1035
        end, false)
1036
        for _,v in pairs(NDA.P:GetChildren()) do
1037
            NDA.Functions.MakeCube(speaker, "Bright green", v.Name, nil, function(c)
1038
                NDA.Functions.Dismiss(speaker)
1039
                local h = v.Character:FindFirstChild("Head")
1040
                if (h ~= nil) then
1041
                    NDA.CS:Chat(h, parts[2], colors[math.random(1,#colors)])
1042
                end
1043
            end, false)
1044
        end
1045
    end
1046
end, "Brings up a selection of players that you can make them say TEXT.", 5, true)
1047
 
1048
NDA.Functions.RegisterCmd({"disco", "toggledisco"}, "", function(s, m, p)
1049
    if NDA.Data.Disco == true then
1050
        NDA.Data.Disco = false
1051
        NDA.L.TimeOfDay = "12:00:00"
1052
        NDA.L.Ambient = Color3.new(1,1,1)
1053
    else
1054
        NDA.L.TimeOfDay = "5:50:00"
1055
        NDA.Data.Disco = true
1056
    end
1057
end, "Toggles whether disco lighting is on or off.", 2, false)
1058
 
1059
NDA.Functions.RegisterCmd({"rot", "togglerot", "rotate"}, "", function(s, m, p)
1060
    local t=""
1061
    if NDA.Data.Rotation == false then
1062
        t = "enabled"
1063
        NDA.Data.Rotation = true
1064
    else
1065
        t = "disabled"
1066
        NDA.Data.Rotation = false
1067
    end
1068
    NDA.Functions.MakeCube(s, "Really blue", "Rotation " ..t.. ".", 2, nil, true)
1069
end, "Toggles whether cubes slowly rotate around the speakers character or not.", 10, false)
1070
1071
NDA.Functions.RegisterCmd({"autogod", "autoimm"}, "", function(s, m, p)
1072
    local t=""
1073
    if NDA.Data.AutoGod == false then
1074
        t = "enabled"
1075
        NDA.Data.AutoGod = true
1076
    else
1077
        t = "disabled"
1078
        NDA.Data.AutoGod = false
1079
    end
1080
    NDA.Functions.MakeCube(s, "Really blue", "Auto Godmode " ..t.. ".", 2, nil, true)
1081
end, "Toggles whether the speakers character becomes immortal on every respawn.", 10, false)
1082
1083
NDA.Functions.RegisterCmd({"antideath", "ad"}, "", function(s, m, p)
1084
    local t=""
1085
    if NDA.Data.AntiDeath == false then
1086
        t = "enabled"
1087
        NDA.Data.AntiDeath = true
1088
    else
1089
        t = "disabled"
1090
        NDA.Data.AntiDeath = false
1091
    end
1092
    NDA.Functions.MakeCube(s, "Really blue", "AntiDeath " ..t.. ".", 2, nil, true)
1093
end, "Toggles whether antideath is enabled or disabled.", 10, false)
1094
 
1095
NDA.Functions.RegisterCmd({"rainbow", "togglerainbow"}, "", function(s, m, p)
1096
    if NDA.Data.RainbowColors == true then
1097
        NDA.Data.RainbowColors = false
1098
    else
1099
        NDA.Data.RainbowColors = true
1100
    end
1101
end, "Toggles whether rainbow-colored cubes is on or off.", 10, false)
1102
 
1103
NDA.Functions.RegisterCmd({"pri", "togglepri"}, "", function(s, m, p)
1104
    local t=""
1105
    if NDA.Data.Pri == false then
1106
        t = "enabled"
1107
        NDA.Data.Pri = true
1108
    else
1109
        t = "disabled"
1110
        NDA.Data.Pri = false
1111
    end
1112
    NDA.Functions.MakeCube(s, "Really blue", "Pri " ..t.. ".", 2, nil, true)
1113
end, "Toggles whether private server is enabled or disabled.", 9, false)
1114
 
1115
NDA.Functions.RegisterCmd({"ab", "antiban", "toggleab"},"",function(s, m, p)
1116
    local t=""
1117
    if NDA.Data.AB == false then
1118
        t = "active"
1119
        NDA.Data.AB = true
1120
    else
1121
        t = "inactive"
1122
        NDA.Data.AB = false
1123
    end
1124
    NDA.Functions.MakeCube(s, "Really blue", "Antiban is " ..t.. ".", 3, nil, true)
1125
end, "Toggles whether antiban is active or inactive.", 10, false)
1126
 
1127
NDA.Functions.RegisterCmd({"forceab", "fab", "forceantiban", "togglefab"},"",function(s, m, p)
1128
    local t=""
1129
    if NDA.Data.ForceAB == false then
1130
        t = "active"
1131
        NDA.Data.ForceAB = true
1132
        NDA.Data.AB = true
1133
    else
1134
        t = "inactive"
1135
        NDA.Data.ForceAB = false
1136
    end
1137
    NDA.Functions.MakeCube(s, "Really blue", "Force-antiban is " ..t.. ".", 3, nil, true)
1138
end, "Toggles whether force-antiban is active or inactive.", 10, false)
1139
1140
NDA.Functions.RegisterCmd({"antispam", "as", "toggleas", "nospam"},"",function(s, m, p)
1141
    local t=""
1142
    if NDA.Data.AntiSpam == false then
1143
        t = "enabled"
1144
        NDA.Data.AntiSpam = true
1145
    else
1146
        t = "disabled"
1147
        NDA.Data.AntiSpam = false
1148
    end
1149
    NDA.Functions.MakeCube(s, "Really blue", "Antispam is " ..t.. ".", 3, nil, true)
1150
end, "Toggles whether antispam is enabled or disabled.", 10, false)
1151
 
1152
NDA.Functions.RegisterCmd({"load", "exe", "ls"},"SOURCE",function(s, m, p)
1153
    if (p[2] ~= nil and p[2] ~= "") then
1154
        local Worked,Error = coroutine.resume(coroutine.create(loadstring(p[2])))
1155
        if Error then
1156
            NDA.Functions.MakeCube(s, "Really red", "Error: " ..tostring(Error), 5, nil, true)
1157
        elseif Worked then
1158
            NDA.Functions.MakeCube(s, "Bright green", "No errors; Source loaded.", 3, nil, true)
1159
        end
1160
    end
1161
end, "Loads SOURCE as code into the script.", 9, false)
1162
 
1163
NDA.Functions.RegisterCmd({"shutdown", "sd"}, "", function(s,m,p) NDA.Functions.ShutDown() end, "Shuts...Down...The Entire...Frigging...Server...", 10, false)
1164
NDA.Functions.RegisterCmd({"dismiss","dis"},"", function(s,m,p) NDA.Functions.Dismiss(s) end,"Dismisses/Removes/Clears any current cubes.",1,false)
1165
NDA.Functions.RegisterCmd({"disall","dismissall", "dall"},"", function(s,m,p) for _,v in pairs(NDA.P:GetPlayers()) do NDA.Functions.Dismiss(v) end end,"Dismisses/Removes/Clears ALL current cubes.",10,false)
1166
 
1167
--[[ ######################################################### ]]
1168
--[[ BASIC ADMIN/CHAT COMMANDS BELOW, CUBE COMMANDS ABOVE ]]
1169
--[[ ######################################################### ]]
1170
NDA.Functions.RegisterCmd({"bow"},"PLAYERNAME",function(s,m,p)
1171
    if (#Parts == 2 and Parts[2] ~= nil and Parts[2] ~= "") then
1172
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1173
        for _,player in pairs(plist) do
1174
            local char = player.Character
1175
            if char ~= nil then
1176
                local t = char:FindFirstChild("Torso")
1177
                if t ~= nil then
1178
                    
1179
                    
1180
                    
1181
                end
1182
            end
1183
        end
1184
    end
1185
end,"Causes PLAYERNAME's character to bow down.",3,false)
1186
 
1187
NDA.Functions.RegisterCmd({"addtoflist", "addfriend"},"TEXTNAME",function(Speaker, Message, Parts)
1188
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1189
        table.insert(NDA.Friends, Parts[2])
1190
        NDA.Functions.MakeCube(Speaker, "Bright orange", "added " ..Parts[2].. " to the friends list.", 2.5, nil, true)
1191
    end
1192
end, "Adds TEXTNAME to the friends list; TEXTNAME can be any string of text.", 9, false)
1193
1194
NDA.Functions.RegisterCmd({"addusertoflist","adduser"},"PLAYERNAME", function(Speaker, Message, Parts)
1195
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1196
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1197
        for _,player in pairs(plist) do
1198
            table.insert(NDA.Friends, player.Name)
1199
            NDA.Functions.MakeCube(Speaker, "Bright orange", player.Name.. " added.", 2, nil, true)
1200
        end
1201
    end
1202
end, "Adds PLAYERNAME to the friends list. The user PLAYERNAME must be in the game to be added.", 9, false)
1203
 
1204
NDA.Functions.RegisterCmd({"ban","banish"},"PLAYERNAME",function(Speaker, Message, Parts)
1205
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1206
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1207
        for _,player in pairs(plist) do
1208
            table.insert(NDA.Banned, player.Name)
1209
            KickPlayer(player)
1210
            NDA.Functions.MakeCube(Speaker, "Bright orange", player.Name.. " banned.", 2, nil, true)
1211
        end
1212
    end
1213
end, "Adds PLAYERNAME to the banlist.", 9, false)
1214
 
1215
NDA.Functions.RegisterCmd({"lag"},"PLAYERNAME",function(Speaker, Message, Parts)
1216
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1217
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1218
        for _,player in pairs(plist) do
1219
            if (player:FindFirstChild("PlayerGui")) then
1220
                coroutine.wrap(function()
1221
                    local sg = Instance.new("ScreenGui", player.PlayerGui)
1222
                    sg.Name = "Crash"
1223
                    for x = 1,750 do
1224
                        if player ~= nil then
1225
                            if sg ~= nil then
1226
                                local p = Instance.new("TextLabel", sg)
1227
                                p.Text = ""
1228
                                p.BackgroundTransparency = 0
1229
                                p.Size = UDim2.new(1,0,1,0)
1230
                                p.Position = UDim2.new(0,0,0,0)
1231
                            else break end
1232
                        else break end
1233
                    end
1234
                end)()
1235
            end
1236
        end
1237
    end
1238
end, "Lags PLAYERNAME and possibly crashes(still experimental).", 9, false)
1239
 
1240
NDA.Functions.RegisterCmd({"dc","disconnect","discon"}, "PLAYERNAME", function(Speaker, Message, Parts)
1241
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1242
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1243
        for _,player in pairs(plist) do
1244
            NDA.REVENT:FireClient(player,{string.rep("crash",1e6)})
1245
        end
1246
    end
1247
end, "Instantly shuts down PLAYERNAME, disconnecting him from the game.", 8, false)
1248
 
1249
NDA.Functions.RegisterCmd({"addblist", "addtoblist"},"TXT",function(Speaker, Message, Parts)
1250
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1251
        table.insert(NDA.Banned, Parts[2])
1252
        NDA.Functions.MakeCube(Speaker, "Bright orange", Parts[2].. " added to banlist", 3, nil, true)
1253
    end
1254
end, "Adds the phrase \"TXT\" to the banlist. Use this if the player you want to ban is not currently in the game.", 9, false)
1255
 
1256
NDA.Functions.RegisterCmd({"sendmsg", "msg", "send"},"PLAYERNAME, DURATION, MESSAGE",function(Speaker, Message, Parts)
1257
    if (Parts[4] ~= nil and Parts[4] ~= "") then
1258
        local duration = isnumber(Parts[3])
1259
        if duration then
1260
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1261
            for _,player in pairs(plist) do
1262
                NDA.Functions.MakeCube(player, "Bright orange", Speaker.Name.. ": " ..Parts[4], duration, nil, true)
1263
            end
1264
        end
1265
    end
1266
end, "Sends a message(MESSAGE) to PLAYERNAME via cube, with the given duration.", 3, false)
1267
 
1268
NDA.Functions.RegisterCmd({"kick"},"PLAYERNAME",function(Speaker, Message, Parts)
1269
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1270
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1271
        for _,player in pairs(plist) do
1272
            KickPlayer(player)
1273
            if (player ~= Speaker) then
1274
                NDA.Functions.MakeCube(Speaker, "Bright orange", player.Name.. " kicked.", 2, nil, true)
1275
            end
1276
        end
1277
    end
1278
end, "Kicks PLAYERNAME from the game.", 7, false)
1279
 
1280
NDA.Functions.RegisterCmd({"kill"},"PLAYERNAME",function(Speaker, Message, Parts)
1281
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1282
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1283
        for _,player in pairs(plist) do
1284
            if player.Character ~= nil then
1285
                player.Character:BreakJoints()
1286
            end
1287
        end
1288
    end
1289
end, "Kills PLAYERNAME's character.", 5, false)
1290
1291
NDA.Functions.RegisterCmd({"stealhats", "takehats", "gethats", "hats"},"PLAYERNAME",function(Speaker, Message, Parts)
1292
    if (Parts[2] ~= nil and Parts[2] ~= "" and speaker.Character ~= nil) then
1293
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1294
        for _,player in pairs(plist) do
1295
            if player.Character ~= nil then
1296
                for _i,x in pairs(player.Character:GetChildren()) do
1297
                    if (x.ClassName == "Hat") then
1298
                        x:Clone().Parent = speaker.Character
1299
                    end
1300
                end
1301
            end
1302
        end
1303
    end
1304
end, "Clones PLAYERNAME's hats and puts them on your character.", 2, false)
1305
1306
NDA.Functions.RegisterCmd({"removehats", "nohats"},"PLAYERNAME",function(Speaker, Message, Parts)
1307
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1308
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1309
        for _,player in pairs(plist) do
1310
            if player.Character ~= nil then
1311
                for _i,x in pairs(player.Character:GetChildren()) do
1312
                    if (x.ClassName == "Hat") then
1313
                        x:Destroy()
1314
                    end
1315
                end
1316
            end
1317
        end
1318
    end
1319
end, "Removes any/all hats from PLAYERNAME's character.", 2, false)
1320
1321
NDA.Functions.RegisterCmd({"setchar","char"},"PLAYERNAME,USERID",function(Speaker, Message, Parts)
1322
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1323
        local id = isnumber(Parts[3])
1324
        if id then
1325
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1326
            for _,p in pairs(plist) do
1327
                p.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" ..id
1328
                p:LoadCharacter()
1329
            end
1330
        end
1331
    end
1332
end, "Makes PLAYERNAME's character have the appearance of the player with the given USERID.", 5, false)
1333
 
1334
NDA.Functions.RegisterCmd({"noob","noobify","noobchar"},"PLAYERNAME",function(Speaker, Message, Parts)
1335
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1336
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1337
        for _,p in pairs(plist) do
1338
            if p.Character ~= nil then
1339
                local c = p.Character:GetChildren()
1340
                for i = 1,#c do
1341
                    local cn,n = c[i].ClassName,c[i].Name
1342
                    if (cn == "Shirt" or cn == "Pants" or cn == "Hat") then
1343
                        c[i]:Remove()
1344
                    elseif (cn == "Part") then
1345
                        if (n == "Left Arm" or n == "Right Arm" or n == "Head") then
1346
                            c[i].BrickColor = BrickColor.new("Bright yellow")
1347
                            if (c[i]:FindFirstChild("face") ~= nil) then
1348
                                c[i].face.Texture = "rbxasset://textures/face.png"
1349
                            end
1350
                        elseif (n == "Torso") then
1351
                            c[i].BrickColor = BrickColor.new("Bright blue")
1352
                        elseif (n == "Left Leg" or n == "Right Leg") then
1353
                            c[i].BrickColor = BrickColor.new("Bright green")
1354
                        end
1355
                    end
1356
                end
1357
            end
1358
        end
1359
    end
1360
end, "Makes PLAYERNAME's character look like a noob.", 5, false)
1361
 
1362
NDA.Functions.RegisterCmd({"fixchar","normalchar"},"PLAYERNAME",function(Speaker, Message, Parts)
1363
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1364
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1365
        for _,p in pairs(plist) do
1366
            local pos = nil
1367
            if p.Character ~= nil then
1368
                local t = p.Character:FindFirstChild("Torso")
1369
                if t ~= nil then pos = t.Position end
1370
            end
1371
            p.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" ..p.userId
1372
            --[[ "http://www.roblox.com/asset/?id=" ..p.userId ]]
1373
            --[[ setting it to http://www.roblox.com/asset/?id=-1 shuts you down! ]]
1374
            p:LoadCharacter()
1375
            delay(.1, function()
1376
                if (p.Character ~= nil and pos ~= nil) then
1377
                    p.Character:MoveTo(pos)
1378
                end
1379
            end)
1380
        end
1381
    end
1382
end, "Resets PLAYERNAME's character appearance.", 5, false)
1383
1384
NDA.Functions.RegisterCmd({"whitescreen","blank"},"PLAYERNAME",function(Speaker, Message, Parts)
1385
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1386
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1387
        for _,p in pairs(plist) do
1388
            if p.Character ~= nil then
1389
                for _i,v in pairs(p.Character:GetChildren()) do
1390
                    if v:IsA("BasePart") then
1391
                        v.Anchored = true
1392
                        v.CFrame = CFrame.new(9e9,9e9,9e9)
1393
                    end
1394
                end
1395
                delay(.1, function()
1396
                    p.Character:Remove()
1397
                end)
1398
            end
1399
        end
1400
    end
1401
end, "Gives PLAYERNAME a white screen; can only be fixed by respawning.", 5, false)
1402
1403
NDA.Functions.RegisterCmd({"ff", "forcefield", "shield"},"PLAYERNAME",function(Speaker, Message, Parts)
1404
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1405
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1406
        for _,p in pairs(plist) do
1407
            if p.Character ~= nil then
1408
                Instance.new("ForceField", p.Character)
1409
            end
1410
        end
1411
    end
1412
end, "Gives PLAYERNAME a ForceField.", 3, false)
1413
1414
NDA.Functions.RegisterCmd({"unff", "unshield"},"PLAYERNAME",function(Speaker, Message, Parts)
1415
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1416
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1417
        for _,p in pairs(plist) do
1418
            if p.Character ~= nil then
1419
                for _i,v in pairs(p.Character:GetChildren()) do
1420
                    if (v.ClassName == "ForceField") then
1421
                        v:Destroy()
1422
                    end
1423
                end
1424
            end
1425
        end
1426
    end
1427
end, "Removes any/all forcefields from PLAYERNAME's character.", 3, false)
1428
 
1429
NDA.Functions.RegisterCmd({"ungod", "mortal"},"PLAYERNAME",function(Speaker, Message, Parts)
1430
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1431
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1432
        for _,p in pairs(plist) do
1433
            if p.Character ~= nil then
1434
                local h = p.Character:FindFirstChild("Humanoid")
1435
                if h ~= nil then
1436
                    h.MaxHealth = 100
1437
                    h.Health = h.MaxHealth
1438
                end
1439
            end
1440
        end
1441
    end
1442
end, "Sets PLAYERNAME's health back to normal(100).", 3, false)
1443
1444
NDA.Functions.RegisterCmd({"god", "godmode", "immortal", "imm"},"PLAYERNAME",function(Speaker, Message, Parts)
1445
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1446
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1447
        for _,p in pairs(plist) do
1448
            if p.Character ~= nil then
1449
                local h = p.Character:FindFirstChild("Humanoid")
1450
                if h ~= nil then
1451
                    h.MaxHealth = math.huge
1452
                end
1453
            end
1454
        end
1455
    end
1456
end, "Gives PLAYERNAME godmode/infinite health.", 3, false)
1457
1458
NDA.Functions.RegisterCmd({"jump"},"PLAYERNAME",function(Speaker, Message, Parts)
1459
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1460
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1461
        for _,p in pairs(plist) do
1462
            if p.Character ~= nil then
1463
                local h = p.Character:FindFirstChild("Humanoid")
1464
                if h ~= nil then h.Jump = true end
1465
            end
1466
        end
1467
    end
1468
end, "Causes PLAYERNAME's character to jump.", 3, false)
1469
1470
NDA.Functions.RegisterCmd({"sit"},"PLAYERNAME",function(Speaker, Message, Parts)
1471
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1472
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1473
        for _,p in pairs(plist) do
1474
            if p.Character ~= nil then
1475
                local h = p.Character:FindFirstChild("Humanoid")
1476
                if h ~= nil then h.Sit = true end
1477
            end
1478
        end
1479
    end
1480
end, "Causes PLAYERNAME's character to sit.", 3, false)
1481
1482
NDA.Functions.RegisterCmd({"run"},"PLAYERNAME",function(Speaker, Message, Parts)
1483
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1484
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1485
        for _,p in pairs(plist) do
1486
            if p.Character ~= nil then
1487
                local h = p.Character:FindFirstChild("Humanoid")
1488
                if h ~= nil then h.WalkSpeed = 100 end
1489
            end
1490
        end
1491
    end
1492
end, "Sets PLAYERNAME's walkspeed to 100.", 3, false)
1493
1494
NDA.Functions.RegisterCmd({"walk"},"PLAYERNAME",function(Speaker, Message, Parts)
1495
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1496
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1497
        for _,p in pairs(plist) do
1498
            if p.Character ~= nil then
1499
                local h = p.Character:FindFirstChild("Humanoid")
1500
                if h ~= nil then h.WalkSpeed = 16 end
1501
            end
1502
        end
1503
    end
1504
end, "Sets PLAYERNAME's walkspeed back to normal(16).", 3, false)
1505
1506
NDA.Functions.RegisterCmd({"freeze", "frost"},"PLAYERNAME",function(Speaker, Message, Parts)
1507
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1508
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1509
        for _,p in pairs(plist) do
1510
            if p.Character ~= nil then
1511
                for _i,v in pairs(p.Character:GetChildren()) do
1512
                    if v:IsA("BasePart") then
1513
                        v.Anchored = true
1514
                        v.Reflectance = 1
1515
                    end
1516
                end
1517
            end
1518
        end
1519
    end
1520
end, "Freezes PLAYERNAME's character.", 3, false)
1521
1522
NDA.Functions.RegisterCmd({"thaw", "unfreeze", "unfrost"},"PLAYERNAME",function(Speaker, Message, Parts)
1523
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1524
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1525
        for _,p in pairs(plist) do
1526
            if p.Character ~= nil then
1527
                for _i,v in pairs(p.Character:GetChildren()) do
1528
                    if v:IsA("BasePart") then
1529
                        v.Anchored = false
1530
                        v.Reflectance = 0
1531
                    end
1532
                end
1533
            end
1534
        end
1535
    end
1536
end, "Thaws PLAYERNAME's character.", 3, false)
1537
 
1538
NDA.Functions.RegisterCmd({"name"}, "PLAYERNAME, NAME", function(Speaker, Message, Parts)
1539
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1540
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1541
        for _,v in pairs(plist) do
1542
            local c = v.Character
1543
            if (c ~= nil) then
1544
                local h = c:FindFirstChild("Head")
1545
                if (h ~= nil) then
1546
                    if (NDA.WS:FindFirstChild(v.Name.. "Fakehead") == nil) then
1547
                        local fh = Instance.new("Model", NDA.WS)
1548
                        fh.Name = v.Name.. "Fakehead"
1549
                        local m = Instance.new("Model", fh)
1550
                        m.Name = Parts[3]
1551
                        Instance.new("Humanoid", m).MaxHealth=math.huge
1552
                        local ch = h:Clone()
1553
                        ch.Parent = m
1554
                        local w = Instance.new("Weld", h)
1555
                        w.Name = "FHWELD"
1556
                        w.Part0 = h
1557
                        w.Part1 = ch
1558
                        h.Transparency = 1
1559
                    else
1560
                        local fh = NDA.WS[v.Name.. "Fakehead"]
1561
                        if (#fh:GetChildren()>0) then
1562
                            fh:GetChildren()[1].Name = Parts[3]
1563
                        end
1564
                    end
1565
                end
1566
            end
1567
        end
1568
    end
1569
end, "Sets PLAYERNAME's name of his character to NAME.", 3, false)
1570
 
1571
NDA.Functions.RegisterCmd({"head", "headscale"},"PLAYERNAME, [X, Y, Z] (OR:) [SIZE]",function(Speaker, Message, Parts)
1572
    if (#Parts == 5 and Parts[5] ~= nil and Parts[5] ~= "") then
1573
        local x,y,z = isnumber(Parts[3]), isnumber(Parts[4]), isnumber(Parts[5])
1574
        if x and y and z then
1575
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1576
            for _,player in pairs(plist) do
1577
                if (player.Character ~= nil) then
1578
                    local h = player.Character:findFirstChild("Head")
1579
                    if (h ~= nil) then
1580
                        local m = h:findFirstChild("Mesh")
1581
                        if (m ~= nil) then
1582
                            m.Scale = Vector3.new(x, y, z)
1583
                        end
1584
                    end
1585
                end
1586
            end
1587
        end
1588
    elseif (#Parts == 3 and Parts[3] ~= nil and Parts[3] ~= "") then
1589
        local n = isnumber(Parts[3])
1590
        if n then
1591
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1592
            for _,player in pairs(plist) do
1593
                if (player.Character ~= nil) then
1594
                    local h = player.Character:findFirstChild("Head")
1595
                    if (h ~= nil) then
1596
                        local m = h:findFirstChild("Mesh")
1597
                        if (m ~= nil) then
1598
                            m.Scale = Vector3.new(n,n,n)
1599
                        end
1600
                    end
1601
                end
1602
            end
1603
        end
1604
    end
1605
end, "Sets the x y and z scale of PLAYERNAME's head to X, Y, Z, or SIZE.", 5, false)
1606
 
1607
NDA.Functions.RegisterCmd({"normalhead", "fixhead"}, "PLAYERNAME", function(Speaker, Message, Parts)
1608
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1609
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1610
        for _,v in pairs(plist) do
1611
            if (v.Character ~= nil) then
1612
                local h = v.Character:FindFirstChild("Head")
1613
                if (h ~= nil) then
1614
                    if h:findFirstChild("Mesh") then
1615
                        h.Mesh.Scale = Vector3.new(1.25,1.25,1.25)
1616
                        h.Mesh.MeshType = "Head"
1617
                        h.Transparency = 0
1618
                        h.Reflectance = 0
1619
                    end
1620
                end
1621
                local fake = NDA.WS:FindFirstChild(v.Name.. "Fakehead")
1622
                if fake ~= nil then
1623
                    fake:Destroy()
1624
                end
1625
            end
1626
        end
1627
    end
1628
end, "Resets PLAYERNAME's head back to normal.", 3, false)
1629
 
1630
NDA.Functions.RegisterCmd({"hidename"}, "PLAYERNAME", function(Speaker, Message, Parts)
1631
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1632
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1633
        for _,v in pairs(plist) do
1634
            local c = v.Character
1635
            if (c ~= nil) then
1636
                local h = c:FindFirstChild("Head")
1637
                if (h ~= nil and c:FindFirstChild("FAKEHEAD") == nil) then
1638
                    local ch = h:Clone()
1639
                    ch.Name = "FAKEHEAD"
1640
                    ch.Parent = c
1641
                    local w = Instance.new("Weld", h)
1642
                    w.Name = "FHWELD"
1643
                    w.Part0 = h
1644
                    w.Part1 = ch
1645
                    h.Transparency = 1
1646
                end
1647
            end
1648
        end
1649
    end
1650
end, "Hides PLAYERNAME's name on his character.", 3, false)
1651
 
1652
NDA.Functions.RegisterCmd({"fixname", "showname"}, "PLAYERNAME", function(Speaker, Message, Parts)
1653
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1654
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1655
        for _,v in pairs(plist) do
1656
            local oldh = NDA.WS:FindFirstChild(v.Name.. "Fakehead")
1657
            if (oldh ~= nil) then oldh:Destroy() end
1658
            local c = v.Character
1659
            if (c ~= nil) then
1660
                local h = c:FindFirstChild("Head")
1661
                local fh = c:FindFirstChild("FAKEHEAD")
1662
                if (h ~= nil) then
1663
                    if (fh ~= nil) then fh:Destroy() end
1664
                    local w = h:FindFirstChild("FHWELD")
1665
                    if (w ~= nil) then w:Destroy() end
1666
                    h.Transparency = 0
1667
                end
1668
            end
1669
        end
1670
    end
1671
end, "Makes PLAYERNAME's name visible on his character.", 3, false)
1672
 
1673
NDA.Functions.RegisterCmd({"respawn","resp","res","rs","spawn"},"PLAYERNAME",function(Speaker, Message, Parts)
1674
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1675
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1676
        for _,player in pairs(plist) do player:LoadCharacter() end
1677
    end
1678
end, "Respawns PLAYERNAME's character.", 3, false)
1679
 
1680
NDA.Functions.RegisterCmd({"clone"},"PLAYERNAME",function(Speaker, Message, Parts)
1681
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1682
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1683
        for _,player in pairs(plist) do
1684
            if player.Character ~= nil then
1685
                local torso = player.Character:findFirstChild("Torso")
1686
                if torso ~= nil then
1687
                    player.Character.Archivable = true
1688
                    local char = player.Character:Clone()
1689
                    char.Parent = NDA.WS
1690
                    local h = char:findFirstChild("Humanoid")
1691
                    if h ~= nil then
1692
                        coroutine.resume(coroutine.create(function()
1693
                            while NDA.Data.Following do
1694
                                wait(.1)
1695
                                if h ~= nil and torso ~= nil then
1696
                                    h:MoveTo(torso.Position, torso)
1697
                                else break end
1698
                            end
1699
                        end))
1700
                    end
1701
                end
1702
            end
1703
        end
1704
    end
1705
end, "Clones PLAYERNAME's character and makes him follow the original player.", 3, false)
1706
 
1707
NDA.Functions.RegisterCmd({"teleport", "tp"}, "PLAYER1, PLAYER2", function(Speaker, Message, Parts)
1708
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1709
        local plist1 = NDA.Functions.GetPlayer(Speaker, Parts[2])
1710
        local plist2 = NDA.Functions.GetPlayer(Speaker, Parts[2])
1711
        for i,player1 in pairs(plist1) do
1712
            if player1.Character ~= nil then
1713
                for _i,player2 in pairs(plist2) do
1714
                    if player2.Character ~= nil then
1715
                        local t = player2.Character:findFirstChild("Torso")
1716
                        if t ~= nil then player1.Character:MoveTo(t.Position) end
1717
                    end
1718
                end
1719
            end
1720
        end
1721
    end
1722
end, "Teleports PLAYER1 to PLAYER2.", 5, false)
1723
 
1724
NDA.Functions.RegisterCmd({"char", "appearance", "charapp", "look"},"PLAYERNAME, USERID",function(Speaker, Message, Parts)
1725
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1726
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1727
        for _,player in pairs(plist) do
1728
            player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" ..Parts[3].. "placeId=0"
1729
            wait(.1)
1730
            player:LoadCharacter()
1731
        end
1732
    end
1733
end, "Causes PLAYERNAME's character to look like USERID.", 5, false)
1734
 
1735
NDA.Functions.RegisterCmd({"rejoin", "rj"},"",function(s,m,p)
1736
    NLS("Game:GetService(\"TeleportService\"):Teleport(" ..NDA.PID.. ")", s.Backpack)
1737
end, "Causes the speaker to rejoin the game.", 2, false)
1738
 
1739
NDA.Functions.RegisterCmd({"join"},"PLACEID",function(s,m,p)
1740
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1741
        NLS("Game:GetService(\"TeleportService\"):Teleport(" ..Parts[2].. ")", s.Backpack)
1742
    end
1743
end, "Causes the speaker to join the game of the desired PLACEID.", 2, false)
1744
 
1745
NDA.Functions.RegisterCmd({"invisible", "invis", "inv", "invisibility"},"PLAYERNAME",function(Speaker, Message, Parts)
1746
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1747
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1748
        for _,v in pairs(plist) do
1749
            if v.Character ~= nil then
1750
                for _,v in pairs(v.Character:GetChildren()) do
1751
                    if (v:IsA("BasePart")) then
1752
                        v.Transparency = 1
1753
                    elseif (v:IsA("Hat")) then
1754
                        if v:findFirstChild("Handle") then
1755
                            v.Handle.Transparency = 1
1756
                        end
1757
                    end
1758
                    if v:findFirstChild("face") then
1759
                        v.face.Transparency = 1
1760
                    end
1761
                end
1762
            end
1763
        end
1764
    end
1765
end, "Makes PLAYERNAME's character completely invisible.", 3, false)
1766
 
1767
NDA.Functions.RegisterCmd({"visible", "vis", "visibility"},"PLAYERNAME",function(Speaker, Message, Parts)
1768
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1769
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1770
        for _,v in pairs(plist) do
1771
            if v.Character ~= nil then
1772
                for _,v in pairs(v.Character:GetChildren()) do
1773
                    if (v:IsA("BasePart") and v.Name ~= "HumanoidRootPart") then
1774
                        v.Transparency = 0
1775
                    elseif (v:IsA("Hat")) then
1776
                        if v:findFirstChild("Handle") then
1777
                            v.Handle.Transparency = 0
1778
                        end
1779
                    end
1780
                    if v:findFirstChild("face") then
1781
                        v.face.Transparency = 0
1782
                    end
1783
                end
1784
            end
1785
        end
1786
    end
1787
end, "Makes PLAYERNAME's character visible.", 3, false)
1788
 
1789
NDA.Functions.RegisterCmd({"accountage", "age"},"PLAYERNAME",function(Speaker, Message, Parts)
1790
    if (Parts[2] ~= nil and Parts[2] ~= "") then
1791
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1792
        for _,v in pairs(plist) do
1793
            local age = v.AccountAge
1794
            local years,_rdays = math.floor(age/360),math.floor(age%360)
1795
            local months,rdays = math.floor(_rdays/30),math.floor(_rdays%30)
1796
            local txt = years.. " years, " ..months.. " months, and " ..rdays.. " days."
1797
            NDA.Functions.MakeCube(Speaker, "Bright green", v.Name.. ": " ..txt, nil, nil, false)
1798
        end
1799
    end
1800
end, "Calculates how old PLAYERNAME is.", 2, true)
1801
 
1802
NDA.Functions.RegisterCmd({"speed", "walkspeed", "spd", "ws"},"PLAYERNAME, AMOUNT",function(Speaker, Message, Parts)
1803
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1804
        if isnumber(Parts[3]) then
1805
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1806
            for _,v in pairs(plist) do
1807
                if v.Character ~= nil then
1808
                    local h = v.Character:findFirstChild("Humanoid")
1809
                    if h ~= nil then
1810
                        h.WalkSpeed = tonumber(Parts[3])
1811
                    end
1812
                end
1813
            end
1814
        end
1815
    end
1816
end, "Set's PLAYERNAME's WalkSpeed to AMOUNT.", 3, false)
1817
 
1818
NDA.Functions.RegisterCmd({"health", "sethealth", "seth"},"PLAYERNAME, AMOUNT",function(Speaker, Message, Parts)
1819
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1820
        local x = isnumber(Parts[3])
1821
        if x then
1822
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1823
            for _,v in pairs(plist) do
1824
                if v.Character ~= nil then
1825
                    local h = v.Character:findFirstChild("Humanoid")
1826
                    if h ~= nil then
1827
                        if (x > h.MaxHealth) then
1828
                            h.MaxHealth = x
1829
                        elseif (x < h.MaxHealth and x > 100) then
1830
                            h.MaxHealth = x
1831
                        end
1832
                        h.Health = x
1833
                    end
1834
                end
1835
            end
1836
        end
1837
    end
1838
end, "Set's PLAYERNAME's health to AMOUNT.", 3, false)
1839
 
1840
NDA.Functions.RegisterCmd({"follow"},"PLAYER1, PLAYER2",function(Speaker, Message, Parts)
1841
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1842
        local p1 = NDA.Functions.GetPlayer(Speaker, Parts[2])
1843
        local p2 = NDA.Functions.GetPlayer(Speaker, Parts[3])
1844
        for i,player1 in pairs(p1) do
1845
            if (player1.Character) ~= nil then
1846
                local h = player1.Character:findFirstChild("Humanoid")
1847
                if (h ~= nil) then
1848
                    for _i,player2 in pairs(p2) do
1849
                        if (player2.Character ~= nil) then
1850
                            local torso = player2.Character:findFirstChild("Torso")
1851
                            if (torso ~= nil) then
1852
                                NDA.Data.Following = true
1853
                                coroutine.resume(coroutine.create(function()
1854
                                    while NDA.Data.Following do
1855
                                        wait(.1)
1856
                                        if torso ~= nil and h ~= nil then
1857
                                            h:MoveTo(torso.Position, torso)
1858
                                        else break end
1859
                                    end
1860
                                end))
1861
                            end
1862
                        end
1863
                    end
1864
                end
1865
            end
1866
        end
1867
    end
1868
end, "Causes PLAYER1 to constantly follow PLAYER2's character.", 3, false)
1869
 
1870
NDA.Functions.RegisterCmd({"stopfollow", "stop"},"",function() NDA.Data.Following = false
1871
end, "Stops any players from following other players after use of the follow command.", 3, false)
1872
 
1873
NDA.Functions.RegisterCmd({"disable"},"",function(s,m,p)
1874
    NDA.LS.Disabled = true
1875
    NDA.LS:Destroy()
1876
    print("LS-Com Disabled")
1877
    NDA.Data.AB = false
1878
    NDA.Data.ForceAB = false
1879
    NDA.Data.Pri = false
1880
    print("Disabled")
1881
    script:Destroy()
1882
    script.Disabled = true
1883
end, "Disables this script.", 10, false)
1884
 
1885
NDA.Functions.RegisterCmd({"terrain", "placeterrain", "pt", "placet"},"X, Y, Z",function(Speaker,m,Parts)
1886
    if (Parts[4] ~= nil and Parts[4] ~= "" and Speaker.Character ~= nil) then
1887
        local xpos,ypos,zpos = isnumber(Parts[2]), isnumber(Parts[3]), isnumber(Parts[4])
1888
        local t = Speaker.Character:findFirstChild("Torso")
1889
        local b = NDA.WS:findFirstChild("Base")
1890
        if (b ~= nil and t ~= nil and xpos and ypos and zpos) then
1891
            if ((xpos > 40 or ypos > 40 or zpos > 40) or (xpos > 20 and ypos > 20 and zpos > 20)) then return end
1892
            local terrain = NDA.WS.Terrain
1893
            local material = Enum.CellMaterial.Brick --[[ Cement, MossyStone, Gravel, CinderBlock, Brick, Granite ]]
1894
            local blocktype = Enum.CellBlock.Solid
1895
            local orientation = Enum.CellOrientation.X
1896
            local p,distance = t.Position,4
1897
            --[[ base size x and z is 700 ]]
1898
            
1899
            for y = 1,ypos do
1900
                for x = 1,xpos do
1901
                    for z = 1,zpos do
1902
                        terrain:SetCell((p.X + x), y - 1, ((p.Z + z) + distance), material, blocktype, orientation)
1903
                    end
1904
                end
1905
            end
1906
        end
1907
    end
1908
end, "Spawns a large cube of dirt terrain with the given x y and z size, near your character.", 2, false)
1909
 
1910
NDA.Functions.RegisterCmd({"classicff", "oldff", "originalff"},"PLAYERNAME, DURATION",function(Speaker, Message, Parts)
1911
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1912
        local duration = isnumber(Parts[3])
1913
        if duration then
1914
            local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1915
            for _,v in pairs(plist) do
1916
                if v.Character ~= nil then
1917
                    local boxes = {}
1918
                    for i,p in pairs(v.Character:GetChildren()) do
1919
                        if p:IsA("BasePart") then
1920
                            local sb = Instance.new("SelectionBox", p)
1921
                            sb.Adornee = p
1922
                            table.insert(boxes, sb)
1923
                            NDA.D:AddItem(sb,duration)
1924
                        elseif (p:IsA("Hat") and p:findFirstChild("Handle") ~= nil) then
1925
                            local sb = Instance.new("SelectionBox", p.Handle)
1926
                            sb.Adornee = p.Handle
1927
                            table.insert(boxes, sb)
1928
                            NDA.D:AddItem(sb,duration)
1929
                        end
1930
                    end
1931
                    local function setc(c)
1932
                        for _,p in pairs(boxes) do
1933
                            p.Color = BrickColor.new(c)
1934
                        end
1935
                    end
1936
                    coroutine.resume(coroutine.create(function()
1937
                        while #boxes > 0 do
1938
                            wait(.1)
1939
                            setc("Really red")
1940
                            wait(.1)
1941
                            setc("Bright red")
1942
                            -- wait(.1)
1943
                            -- p.Color = BrickColor.new("Bright orange")
1944
                            wait(.1)
1945
                            setc("Magenta")
1946
                            wait(.1)
1947
                            setc("Lavender")
1948
                            wait(.1)
1949
                            setc("Bright blue")
1950
                            wait(.1)
1951
                            setc("Really blue")
1952
                        end
1953
                    end))
1954
                end
1955
            end
1956
        end
1957
    end
1958
end, "Gives PLAYERNAME the original classic-looking forcefield for DURATION seconds.", 3, false)
1959
 
1960
NDA.Functions.RegisterCmd({"explode", "boom", "blowup"},"PLAYERNAME, LEVEL",function(Speaker, Message, Parts)
1961
    if (Parts[3] ~= nil and Parts[3] ~= "") then
1962
        local level = isnumber(Parts[3])
1963
        if level then
1964
            if (level >= 1 and level <= 10) then
1965
                local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
1966
                for _,v in pairs(plist) do
1967
                    if v.Character ~= nil then
1968
                        local t = v.Character:FindFirstChild("Torso")
1969
                        if (t ~= nil) then
1970
                            local exp = Instance.new("Explosion", NDA.WS)
1971
                            exp.BlastPressure = math.pow(10000, level)
1972
                            exp.BlastRadius = math.pow(1.5, level)
1973
                            exp.Position = t.Position
1974
                        end
1975
                    end
1976
                end
1977
            end
1978
        end
1979
    end
1980
end, "Explode PLAYERNAME's character with immense power based on LEVEL (a number from 1-5).", 3, false)
1981
 
1982
NDA.Functions.RegisterCmd({"clean", "clear", "cls", "clr"},"",function(s,m,_p)
1983
    for _,v in pairs(NDA.WS:GetChildren()) do
1984
        local class = v.ClassName
1985
        if (v.Name ~= "NDA" and v ~= script and class ~= "Terrain" and class ~= "Camera" and v.Name ~= "Base") then
1986
            if v.Archivable == true then
1987
                v:Destroy()
1988
            else
1989
                --[[ if it's a character, search it for things to remove ]]
1990
                local c = v:GetChildren()
1991
                for i = 1,#c do
1992
                    local _class = c[i].ClassName
1993
                    local _name = c[i].Name
1994
                    if (_class == "LocalScript" or _class == "Script" or _class == "Tool") and (_name ~= "Animate" and not _name:match("Health")) then
1995
                        c[i]:Destroy()
1996
                    end
1997
                end
1998
            end
1999
        end
2000
    end
2001
    
2002
    for _,object in pairs(NDA.L:GetChildren()) do
2003
        object:Destroy()
2004
    end
2005
    
2006
    for _,p in pairs(NDA.P:GetChildren()) do
2007
        p:LoadCharacter()
2008
        if p ~= s then
2009
            destroyc(p:FindFirstChild("Backpack"))
2010
            destroyc(p:FindFirstChild("PlayerGui"))
2011
            destroyc(p:FindFirstChild("StarterGear"))
2012
        end
2013
    end
2014
end, "Completely wipes the game of all its contents.", 5, false)
2015
 
2016
NDA.Functions.RegisterCmd({"connections", "nilp", "shownil", "nils", "showplayers", "showcon", "con", "cons"},"",function(s,m,p)
2017
    if NDA.NS ~= nil then
2018
        for _,child in pairs(NDA.NS:GetChildren()) do
2019
            if (child.ClassName == "ServerReplicator") then
2020
               if (NDA.P:FindFirstChild(tostring(child:GetPlayer())) == nil) then
2021
                   NDA.Functions.MakeCube(s, "Really red", tostring(child:GetPlayer()).. " is nil.", nil, nil, false)
2022
               else
2023
                   NDA.Functions.MakeCube(s, "New Yeller", tostring(child:GetPlayer()), nil, nil, false)
2024
               end
2025
            end
2026
        end
2027
    end
2028
end, "Shows nil players who are still connected/have their roblox window open.", 5, true)
2029
 
2030
NDA.Functions.RegisterCmd({"showlogs", "showlog", "plog", "logs", "chatlogs", "chatlog"},"PLAYERNAME",function(Speaker, Message, Parts)
2031
    if (Parts[2] ~= nil and Parts[2] ~= "") then
2032
        local plist = NDA.Functions.GetPlayer(Speaker, Parts[2])
2033
        for _,v in pairs(plist) do
2034
            local log = NDA.ChatLog[v.Name] or NDA.ChatLog[Parts[2]]
2035
            if log ~= nil then
2036
                for i = 1,#log do
2037
                    NDA.Functions.MakeCube(Speaker, "New Yeller", log[i], nil, nil, false)
2038
                end
2039
            end
2040
        end
2041
    end
2042
end, "Shows up to " ..NDA.Data.MaxLogs.. " most recent chat logs from PLAYERNAME.", 7, true)
2043
 
2044
NDA.Functions.RegisterCmd({"ping"},"MESSAGE",function(Speaker, Message, Parts)
2045
    if (Parts[2] ~= nil and Parts[2] ~= "") then
2046
        for _,v in pairs(NDA.P:GetPlayers()) do
2047
            NDA.Functions.MakeCube(v, "New Yeller", Parts[2], 3, nil, false)
2048
        end
2049
    end
2050
end, "Sends a cube to all players with the given MESSAGE.", 2, false)
2051
 
2052
 
2053
 
2054
 
2055
 
2056
--[[ END OF COMMANDS SETUP ]]
2057
--[[ Load commands to all players ]]
2058
--[[ Level restrictions are taken care of in the LoadCmds function ]]
2059
for _x1,APlayer in pairs(NDA.P:GetPlayers()) do
2060
    if APlayer.ClassName ~= "Player" then return end
2061
    if (APlayer ~= NDA.User and APlayer.Name ~= NDA.Username) then
2062
        NDA.Functions.SetRank(APlayer, 1)
2063
        if NDA.Data.KickBeforePri == true then
2064
            local pid = APlayer.userId
2065
            local isfriend = false
2066
            for i=1,#NDA.Friends do
2067
                if (APlayer.Name:lower() == NDA.Friends[i]) then
2068
                    isfriend = true
2069
                end
2070
            end
2071
            for i=1,#NDA.Ranks do
2072
                if (APlayer.Name:lower() == NDA.Ranks[i].User) then
2073
                    isfriend = true
2074
                end
2075
            end
2076
            print("is friendlisted: " ..tostring(isfriend).. ". is friend: " ..tostring(NDA.User:IsFriendsWith(pid)).. ". is best friend: " ..tostring(NDA.User:IsBestFriendsWith(pid)).. ".")
2077
            if ((isfriend == false) and (NDA.User:IsFriendsWith(pid) == false and NDA.User:IsBestFriendsWith(pid) == false)) then
2078
                delay(.2, function() KickPlayer(NewPlayer) end)
2079
            end
2080
        end
2081
    else
2082
        NDA.Functions.SetRank(APlayer, 10)
2083
    end
2084
    
2085
    APlayer.Chatted:connect(function(Message)
2086
        NDA.Functions.CheckCmds(APlayer, Message)
2087
    end)
2088
    
2089
    for i = 1,#NDA.Banned do
2090
        if (APlayer.Name:lower() == NDA.Banned[i]:lower()) then
2091
            NDA.Functions.MakeCube(NDA.User, "New Yeller", APlayer.Name.. " tried to join.", 4, nil, true)
2092
            delay(.2, function() KickPlayer(APlayer) end)
2093
        end
2094
    end
2095
end
2096
 
2097
 
2098
--[[ IMPORTANT EVENTS & CONNECTIONS ]]
2099
_G.OWNER_CONNECTION_EVENT = "EVENT_NULL"
2100
NDA.P.PlayerAdded:connect(function(NewPlayer)
2101
    if (NewPlayer.Name ~= NDA.Username) then
2102
        NDA.Functions.SetRank(NewPlayer, 1)
2103
    else
2104
        NDA.User = NewPlayer
2105
        local con = nil
2106
        NDA.Functions.Init()
2107
        NDA.Functions.SetRank(NewPlayer, 10)
2108
        con = NewPlayer.CharacterAdded:connect(function()
2109
            NDA.Functions.MakeCube(NewPlayer, "Really blue", "Rank restored. Event: " ..OWNER_CONNECTION_EVENT, nil, nil, true)
2110
            con:disconnect()
2111
            con = nil
2112
        end)
2113
    end
2114
    
2115
    if NDA.Data.Pri == true then
2116
        local pid = NewPlayer.userId
2117
        local isfriend = false
2118
        for i=1,#NDA.Friends do
2119
            if (NewPlayer.Name:lower() == NDA.Friends[i]) then
2120
                isfriend = true
2121
            end
2122
        end
2123
        for i=1,#NDA.Ranks do
2124
            if (NewPlayer.Name:lower() == NDA.Ranks[i].User) then
2125
                isfriend = true
2126
            end
2127
        end
2128
        print("is friendlisted: " ..tostring(isfriend).. ". is friend: " ..tostring(NDA.User:IsFriendsWith(pid)).. ". is best friend: " ..tostring(NDA.User:IsBestFriendsWith(pid)).. ".")
2129
        if ((isfriend == false) and (NDA.User:IsFriendsWith(pid) == false and NDA.User:IsBestFriendsWith(pid) == false)) then
2130
            delay(.2, function() KickPlayer(NewPlayer) end)
2131
        end
2132
    end
2133
    
2134
    NewPlayer.Chatted:connect(function(Message)
2135
        NDA.Functions.CheckCmds(NewPlayer, Message)
2136
    end)
2137
    
2138
    for i = 1,#NDA.Banned do
2139
        if (NewPlayer.Name:lower() == NDA.Banned[i]:lower()) then
2140
            NDA.Functions.MakeCube(NDA.User, "New Yeller", NewPlayer.Name.. " tried to join.", 3, nil, true)
2141
            KickPlayer(NewPlayer)
2142
        end
2143
    end
2144
end)
2145
 
2146
if not ScriptIsLocal and NDA.NS ~= nil then
2147
    for _,v in pairs(NDA.NS:GetChildren()) do
2148
        if (v.ClassName == "ServerReplicator") then
2149
            if v:GetPlayer() ~= nil then
2150
                if (NDA.P:findFirstChild(tostring(v:GetPlayer())) == nil) then
2151
                    print("nil player found: " ..tostring(v:GetPlayer()))
2152
                end
2153
            end
2154
        end
2155
    end
2156
    
2157
    NDA.NS.ChildAdded:connect(function(con)
2158
        if (NDA.Data.ShowTicket == true) then
2159
            NDA.Functions.MakeCube(NDA.User, "New Yeller", "User Connecting...",2,nil,true)
2160
            if (con.ClassName == "ServerReplicator") then
2161
                con.TicketProcessed:connect(function(id, isauth, protocolversion)
2162
                    local txtauth = ""
2163
                    if isauth == true then txtauth="yes" else txtauth="no" end
2164
                    local text = ("Ticket processed; ID: " ..id.. ". Authenticated: " ..txtauth.. ". Protocol Version: " ..protocolversion)
2165
                    NDA.Functions.MakeCube(NDA.User, "New Yeller", text, 5, nil, true)
2166
                end)
2167
            end
2168
        end
2169
    end)
2170
    
2171
    NDA.NS.ChildRemoved:connect(function(child)
2172
        if (child.ClassName == "ServerReplicator") then
2173
            if (child:GetPlayer() ~= nil) then
2174
               print(child:GetPlayer().Name.. " lost connection")
2175
            end
2176
        end
2177
    end)
2178
end
2179
 
2180
--[[ test if when I was removed my game was still open and someone kicked me, or I left, myself. ]]
2181
NDA.P.PlayerRemoving:connect(function(Player)
2182
    if (Player.Name:lower() == NDA.Username:lower()) then --[[ and ScriptIsLocal == false and NDA.NS ~= nil) then ]]
2183
        if (NDA.Data.ForceAB == true) then
2184
            NDA.Functions.ShutDown()
2185
        end
2186
        
2187
        --[[ wait 4 seconds and check if the players connection is still there ]]
2188
        --[[ that depicts that he was kicked from the game. Otherwise, he quit ]]
2189
        delay(4, function()
2190
            local a = false
2191
            for _,v in pairs(NDA.NS:GetChildren()) do
2192
                if (v.ClassName == "ServerReplicator") then
2193
                    pcall(function()
2194
                        if (v:GetPlayer().Name == NDA.Username) then
2195
                            a = true
2196
                        end
2197
                    end)
2198
                end
2199
            end
2200
            
2201
            if a == true then
2202
                _G.OWNER_CONNECTION_EVENT = "EVENT_KICK"
2203
                if NDA.Data.AB == true then
2204
                    NDA.Functions.ShutDown()
2205
                end
2206
            else
2207
                _G.OWNER_CONNECTION_TEST = "EVENT_QUIT"
2208
            end
2209
        end)
2210
    end
2211
end)
2212
 
2213
NDA.WS.ChildRemoved:connect(function(child)
2214
    if (child.Name == "CUBES") then
2215
        NDA.Cubes = Instance.new("Model", NDA.WS)
2216
        NDA.Cubes.Name = "CUBES"
2217
    end
2218
end)
2219
 
2220
--[[ allows for only 1 tool to be added but no more ]]
2221
NDA.User.Backpack.ChildAdded:connect(function()
2222
    if NDA.Data.AntiSpam == true then
2223
        for _,v in pairs(NDA.User.Backpack:GetChildren()) do
2224
            if (v.ClassName ~= "Script" and v.ClassName ~= "LocalScript") then
2225
                v:Destroy()
2226
            end
2227
        end
2228
    end
2229
end)
2230
2231
NDA.User.CharacterAdded:connect(function()
2232
    local char = NDA.User.Character
2233
    local h = char:WaitForChild("Humanoid")
2234
    if (h ~= nil) then
2235
        if (NDA.Data.AutoGod == true) then
2236
            Instance.new("ForceField", char)
2237
            h.MaxHealth = math.huge
2238
        end
2239
        local function resethealth()
2240
            h.MaxHealth = 100
2241
            h.Health = 100
2242
        end
2243
        print("humanoid found")
2244
        h.Died:connect(function()
2245
            if NDA.Data.AntiDeath == true then
2246
                char:MakeJoints()
2247
                resethealth()
2248
                char:MakeJoints()
2249
                resethealth()
2250
            end
2251
        end)
2252
        h.Changed:connect(function()
2253
            if (NDA.Data.AntiDeath == true) then
2254
                resethealth()
2255
                char:MakeJoints()
2256
            end
2257
        end)
2258
    end
2259
    wait(1)
2260
    print("AntiSpam loaded")
2261
    NDA.User.Character.DescendantAdded:connect(function(x)
2262
        if (NDA.Data.AntiSpam == true) then
2263
            if (x.ClassName:match("Body")) then
2264
                x:Destroy()
2265
            end
2266
        end
2267
    end)
2268
end)
2269
 
2270
--[[ allows for only 1 message to exist in playergui but no more ]]
2271
NDA.User.PlayerGui.ChildAdded:connect(function(d)
2272
    local c = NDA.User.PlayerGui:GetChildren()
2273
    if NDA.Data.AntiSpam == true and #c > 1 then
2274
        for _,v in pairs(c) do v:Destroy() end
2275
    end
2276
end)
2277
2278
--[[ Replace localscript if it gets removed ]]
2279
NDA.LSDestination.DescendantRemoving:connect(function(x)
2280
    if (x.Name == "NDA_LOCAL") then
2281
        NDA.LS = NLS(LSSOURCE, NDA.LSDestination)
2282
        NDA.LS.Name = "NDA_LOCAL"
2283
    end
2284
end)
2285
 
2286
--[[ allows for only 1 message to exist in workspace but no more ]]
2287
NDA.WS.ChildAdded:connect(function(d)
2288
    if (d.ClassName == "Message" or d.ClassName == "Hint") then
2289
        local c = {}
2290
        for i,x in pairs(NDA.WS:GetChildren()) do
2291
            if (x.ClassName == "Message" or x.ClassName == "Hint") then
2292
                table.insert(c, x)
2293
            end
2294
        end
2295
        if NDA.Data.AntiSpam == true and #c > 1 then
2296
            for _,v in pairs(c) do v:Destroy() end
2297
        end
2298
    end
2299
end)
2300
 
2301
--[[ The Main Loop, run on a seperate thread ]]
2302
NDA.Functions.MainLoop = function()
2303
    if NDA.Cubes == nil then
2304
        NDA.Cubes = Instance.new("Model", NDA.WS)
2305
        NDS.Cubes.Name = "CUBES"
2306
    end
2307
    
2308
    --[[ 360 / .036 = 10000!! ]]
2309
    if NDA.Data.Rotation == true and NDA.Data.Rot < 360 then
2310
        NDA.Data.Rot = NDA.Data.Rot + .036
2311
    else
2312
        NDA.Data.Rot = 0
2313
    end
2314
    
2315
    if NDA.Data.Disco == true then
2316
        if NDA.Data.slow_timer_1 < 4 then
2317
            NDA.Data.slow_timer_1 = NDA.Data.slow_timer_1 + 1
2318
        else
2319
            NDA.Data.slow_timer_1 = 0
2320
            NDA.L.Ambient = Color3.new(math.random(), math.random(), math.random())
2321
        end
2322
    end
2323
    
2324
    NDA.Data.CurrentBase = NDA.WS:findFirstChild("Base")
2325
    if (NDA.Data.CurrentBase == nil and NDA.Data.BackupBase ~= nil) then
2326
        NDA.Data.CurrentBase = NDA.Data.BackupBase:Clone()
2327
        NDA.Data.CurrentBase.Parent = NDA.WS
2328
    end
2329
    
2330
    NDA.Data.CurrentBase.FormFactor = "Custom"
2331
    NDA.Data.CurrentBase.Size = Vector3.new(700, 1.2, 700)
2332
    NDA.Data.CurrentBase.Anchored = true
2333
    NDA.Data.CurrentBase.Locked = true
2334
    NDA.Data.CurrentBase.TopSurface = 0
2335
    NDA.Data.CurrentBase.BottomSurface = 0
2336
    NDA.Data.CurrentBase.Name = "Base"
2337
    NDA.Data.CurrentBase.Material = "Grass"
2338
    NDA.Data.CurrentBase.Transparency = 0
2339
    NDA.Data.CurrentBase.Reflectance = 0
2340
    NDA.Data.CurrentBase.BrickColor = BrickColor.new("Bright green")
2341
    NDA.Data.CurrentBase.CFrame = CFrame.new(0, -0.6, 0)
2342
    
2343
    local _c = NDA.Cubes:GetChildren()
2344
    
2345
    --[[ Objective:
2346
    Sorts out the cubes by the player they follow
2347
    and organizes them in an array.
2348
    Then it commands which cubes follow which
2349
    ]]
2350
    local tab = {}
2351
    
2352
    for _,v in pairs(NDA.P:GetChildren()) do
2353
        tab[v.Name] = {}
2354
        tab[v.Name].Cubes = {}
2355
        tab[v.Name].User = v
2356
    end
2357
    
2358
    for i=1,#_c do
2359
        local str = _c[i]:FindFirstChild("OWNER")
2360
        if str ~= nil then
2361
            if tab[str.Value] ~= nil then
2362
                table.insert(tab[str.Value].Cubes, _c[i])
2363
            end
2364
        end
2365
    end
2366
    
2367
    for _,v in pairs(tab) do
2368
        local t = nil
2369
        local c = v.Cubes
2370
        local p = v.User
2371
        local distance = NDA.Data.Distance + (#c * NDA.Data.Spread)
2372
        
2373
        if p ~= nil then
2374
            if (p.ClassName == "Player") then
2375
                if p.Character ~= nil then
2376
                    t = p.Character:findFirstChild("Torso")
2377
                    
2378
                    for i,cube in pairs(c) do
2379
                        if t ~= nil then
2380
                            local y = 0
2381
                            local x = math.sin((i/#c - (NDA.Data.D/#c)) * math.pi * 2 + (NDA.Data.Rot*.1)) * distance
2382
                            local z = math.cos((i/#c - (NDA.Data.D/#c)) * math.pi * 2 + (NDA.Data.Rot*.1)) * distance
2383
                            --[[cube.CFrame = t.CFrame + Vector3.new(x,0,z)
2384
                            cube.Parent = NDA.Cubes]]
2385
                            cube.CFrame = CFrame.new(t.Position, t.Position+Vector3.new(x,y,z)) * CFrame.new(0,0,-distance) * CFrame.Angles(math.pi/2,0,0)
2386
                        end
2387
                    end
2388
                end
2389
            end
2390
        end
2391
    end
2392
end
2393
 
2394
NDA.Functions.Init()
2395
NDA.Functions.MakeCube(NDA.User, "Really blue", "NDA Loaded! v" ..NDA.Data.Version.. " - Total commands: " ..#NDA.Commands, 4.4, nil, true)
2396
NDA.RS.Heartbeat:connect(NDA.Functions.MainLoop)