Advertisement
Guest User

Untitled

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