Advertisement
jai1515hb

des admin

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