Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.41 KB | None | 0 0
  1. --? Boot Variables
  2. local ui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Consolidated")
  3. local console = ui.header.ScrollingFrame
  4. local ram = ui.ram
  5. local space = 17
  6. local size = 0
  7. local pos = 0
  8. local currentline = nil
  9. local username = ""
  10. local tempuser = ""
  11.  
  12. --? Find Players
  13.  
  14. function findplayers(plrs)
  15.  
  16. local output = {}
  17.  
  18. if plrs == "all" then
  19. for i,v in pairs(game.Players:GetChildren()) do
  20. table.insert(output, v)
  21. end
  22. elseif plrs == "others" then
  23. for i,v in pairs(game.Players:GetChildren()) do
  24. if v.Name ~= game.Players.LocalPlayer.Name then
  25. table.insert(output, v)
  26. end
  27. end
  28. elseif plrs == "me" then
  29. table.insert(output, game.Players.LocalPlayer)
  30. else
  31. local playerlist = {}
  32. for plr in plrs:gmatch'[^,]+' do
  33. table.insert(playerlist, plr)
  34. end
  35.  
  36. for i,v in pairs(game.Players:GetChildren()) do
  37. for i=1, #playerlist do
  38. if string.sub(string.lower(v.Name),1, string.len(playerlist[i])) == string.lower(playerlist[i]) then
  39. table.insert(output, v)
  40. end
  41. end
  42. end
  43. end
  44.  
  45. if #output > 0 then
  46. return(output)
  47. else
  48. newline('No players could be found with the given input', {244,40,43})
  49. newline("")
  50. end
  51. end
  52.  
  53. --? Commands
  54.  
  55. local commands = {
  56.  
  57. ["walkspeed"] =
  58. {
  59. ["arguments"] = 3,
  60. ["description"] = "Sets the walkspeed of users, making them go faster or slower",
  61. ["usage"] = "usage: walkspeed [user] [value]",
  62. ["function"] =
  63. function(plrs, value)
  64. local players = findplayers(plrs)
  65. for i=1, #players do
  66. players[i].Character.Humanoid.WalkSpeed = value
  67. newline("Set "..players[i].Name.."'s walkspeed to "..value, {53,255,34})
  68. wait(.1)
  69. end
  70. newline("")
  71. end
  72. },
  73.  
  74. ["jumppower"] =
  75. {
  76. ["arguments"] = 3,
  77. ["description"] = "Sets the jumppowers of users, making them jump higher or lower",
  78. ["usage"] = "usage: jumppower [user] [value]",
  79. ["function"] =
  80. function(plrs, value)
  81. local players = findplayers(plrs)
  82. for i=1, #players do
  83. players[i].Character.Humanoid.JumpPower = value
  84. newline("Set "..players[i].Name.."'s jumppower to "..value, {53,255,34})
  85. wait(.1)
  86. end
  87. newline("")
  88. end
  89. },
  90.  
  91. ["kill"] =
  92. {
  93. ["arguments"] = 2,
  94. ["description"] = "Kills the user you input,, pretty simple",
  95. ["usage"] = "usage: kill [user]",
  96. ["function"] =
  97. function(plrs)
  98. local players = findplayers(plrs)
  99. for i=1, #players do
  100. players[i].Character.Head:Destroy()
  101. newline("Killed "..players[i].Name, {53,255,34})
  102. wait(.1)
  103. end
  104. newline("")
  105. end
  106. },
  107.  
  108. ["punish"] =
  109. {
  110. ["arguments"] = 2,
  111. ["description"] = "Punishes player by deleting workspace object",
  112. ["usage"] = "usage: punish [user]",
  113. ["function"] =
  114. function(plrs)
  115. local players = findplayers(plrs)
  116. for i=1, #players do
  117. players[i].Character.Parent = game.Lighting
  118. newline("Punished "..players[i].Name, {53,255,34})
  119. wait(.1)
  120. end
  121. newline("")
  122. end
  123. },
  124.  
  125. ["unpunish"] =
  126. {
  127. ["arguments"] = 2,
  128. ["description"] = "UnPunishes player by readding to workspace",
  129. ["usage"] = "usage: unpunish [user]",
  130. ["function"] =
  131. function(plrs)
  132. local players = findplayers(plrs)
  133. for i=1, #players do
  134. players[i].Character.Parent = workspace
  135. newline("UnPunished "..players[i].Name, {53,255,34})
  136. wait(.1)
  137. end
  138. newline("")
  139. end
  140. },
  141.  
  142. ["goto"] =
  143. {
  144. ["arguments"] = 2,
  145. ["description"] = "Teleports you to a player",
  146. ["usage"] = "usage: goto [user]",
  147. ["function"] =
  148. function(plrs)
  149. local players = findplayers(plrs)
  150. for i=1, #players do
  151. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = players[i].Character.HumanoidRootPart.Position
  152. newline("Teleported "..game.Players.LocalPlayer.Name.." to "..players[i].Name, {53,255,34})
  153. wait(.1)
  154. end
  155. newline("")
  156. end
  157. },
  158.  
  159. ["bring"] =
  160. {
  161. ["arguments"] = 2,
  162. ["description"] = "Teleports a player to you",
  163. ["usage"] = "usage: bring [user]",
  164. ["function"] =
  165. function(plrs)
  166. local players = findplayers(plrs)
  167. for i=1, #players do
  168. players[i].Character.HumanoidRootPart.Position = players.Character.HumanoidRootPart.Position
  169. newline("Teleported "..players[i].Name.." to "..game.Players.LocalPlayer.Name, {53,255,34})
  170. wait(.1)
  171. end
  172. newline("")
  173. end
  174. },
  175.  
  176. ["view"] =
  177. {
  178. ["arguments"] = 2,
  179. ["description"] = "Attatches your camera on another player",
  180. ["usage"] = "usage: view [user]",
  181. ["function"] =
  182. function(plrs)
  183. local players = findplayers(plrs)
  184. for i=1, #players do
  185. game.Workspace.CurrentCamera.CameraSubject = players[i].Character.Humanoid
  186. newline("Set "..game.Players.LocalPlayer.Name.."'s camera on "..players[i].Name, {53,255,34})
  187. wait(.1)
  188. end
  189. newline("")
  190. end
  191. },
  192.  
  193. ["unview"] =
  194. {
  195. ["arguments"] = 1,
  196. ["description"] = "Resets your camera",
  197. ["usage"] = "usage: unview",
  198. ["function"] =
  199. function(plrs)
  200. local players = findplayers(plrs)
  201. for i=1, #players do
  202. game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  203. newline("Reset "..game.Players.LocalPlayer.Name.."'s camera", {53,255,34})
  204. wait(.1)
  205. end
  206. newline("")
  207. end
  208. },
  209.  
  210. ["ff"] =
  211. {
  212. ["arguments"] = 2,
  213. ["description"] = "Creates a ForceField",
  214. ["usage"] = "usage: ff [user]",
  215. ["function"] =
  216. function(plrs)
  217. local players = findplayers(plrs)
  218. for i=1, #players do
  219. Instance.new("ForceField", players[i].Character)
  220. newline("Created a ForceField on "..players[i].Name, {53,255,34})
  221. wait(.1)
  222. end
  223. newline("")
  224. end
  225. },
  226.  
  227. ["unff"] =
  228. {
  229. ["arguments"] = 2,
  230. ["description"] = "Removes a ForceField",
  231. ["usage"] = "usage: unff [user]",
  232. ["function"] =
  233. function(plrs)
  234. local players = findplayers(plrs)
  235. for i=1, #players do
  236. players[i].Character.ForceField:Destroy()
  237. newline("Removed "..players[i].Name.."'s ForceField", {53,255,34})
  238. wait(.1)
  239. end
  240. newline("")
  241. end,
  242. },
  243.  
  244.  
  245. ["heal"] =
  246. {
  247. ["arguments"] = 2,
  248. ["description"] = "Heals a player to max health",
  249. ["usage"] = "usage: heal [user]",
  250. ["function"] =
  251. function(plrs)
  252. local players = findplayers(plrs)
  253. for i=1, #players do
  254. players[i].Character.Humanoid.Health.Value = players[i].Character.Humanoid.Health.MaxHealth
  255. newline("Fully healed "..players[i].Name, {53,255,34})
  256. wait(.1)
  257. end
  258. newline("")
  259. end
  260. },
  261.  
  262. ["health"] =
  263. {
  264. ["arguments"] = 3,
  265. ["description"] = "Sets a players health",
  266. ["usage"] = "usage: health [user] [value]",
  267. ["function"] =
  268. function(plrs, value)
  269. local players = findplayers(plrs)
  270. for i=1, #players do
  271. players[i].Character.Humanoid.Health = value
  272. newline("Set "..players[i].Name.."'s health to "..value, {53,255,34})
  273. wait(.1)
  274. end
  275. newline("")
  276. end
  277. },
  278.  
  279. ["noclip"] =
  280. {
  281. ["arguments"] = 1,
  282. ["description"] = "Sets your state to NoPhysicis",
  283. ["usage"] = "usage: noclip",
  284. ["function"] =
  285. function(plrs)
  286. local players = findplayers(plrs)
  287. for i=1, #players do
  288. noclip = true
  289. game:GetService('RunService').Stepped:connect(function()
  290. if noclip then
  291. game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
  292. end
  293. end)
  294. newline("Changed "..game.Players.LocalPlayer.Name.."'s humanoid state to NoPhysics", {53,255,34})
  295. wait(.1)
  296. end
  297. newline("")
  298. end
  299. },
  300.  
  301. ["clip"] =
  302. {
  303. ["arguments"] = 1,
  304. ["description"] = "Resets your humanoid state",
  305. ["usage"] = "usage: clip",
  306. ["function"] =
  307. function(plrs)
  308. local players = findplayers(plrs)
  309. for i=1, #players do
  310. if noclip then
  311. noclip = false
  312. end
  313. newline("Reset "..game.Players.LocalPlayer.Name.."'s humanoid state", {53,255,34})
  314. wait(.1)
  315. end
  316. newline("")
  317. end
  318. }
  319.  
  320.  
  321. }
  322.  
  323. --? Other Functions
  324.  
  325. function userInput()
  326. newline("C:/Users/"..username..">"..console.input.Text)
  327. end
  328.  
  329. function newline(text, color)
  330. local addnewline = ram.output:Clone()
  331. if color then
  332. addnewline.TextColor3 = Color3.new(color[1]/255, color[2]/255, color[3]/255)
  333. end
  334. addnewline.Text = text
  335. addnewline.Parent = console
  336. addnewline.Visible = true
  337. if #console:GetChildren() > space then
  338. if not nextrun then
  339. console.CanvasSize = UDim2.new(0,0,0,size+240)
  340. console.CanvasPosition = Vector2.new(0, pos+13)
  341. pos = pos + 13
  342. size = size + 240
  343. nextrun = true
  344. else
  345. console.CanvasSize = UDim2.new(0,0,0,size+14)
  346. console.CanvasPosition = Vector2.new(0, pos+14)
  347. size = size + 14
  348. pos = pos + 14
  349. end
  350. space = space + 1
  351. end
  352. end
  353.  
  354. --? Bootup
  355.  
  356. newline("Consolidated UI [Version 1/3.19.2018]")
  357. newline("(c) 2018 Dat Boi. All rights reserved")
  358. newline("")
  359. newline("*********************")
  360. if workspace.FilteringEnabled then
  361. newline("Filtering is Enabled")
  362. else
  363. newline("Filtering is Disabled")
  364. end
  365. newline("Current Servertime is: "..workspace.DistributedGameTime)
  366. newline("Players in Server: "..#game.Players:GetChildren())
  367. newline("*********************")
  368. newline("")
  369. newline("Username:")
  370. console.input:CaptureFocus()
  371.  
  372.  
  373. --? Analyzer
  374. function analyse(text)
  375. data = {}
  376. for input in text:gmatch("%S+") do
  377. table.insert(data, input)
  378. end
  379.  
  380. if commands[string.lower(data[1])] then
  381. if #data == commands[string.lower(data[1])]["arguments"] then
  382. commands[string.lower(data[1])]["function"](data[2], data[3])
  383. else
  384. newline('Invalid Arguments, command requires: '..commands[string.lower(data[1])]["arguments"].. " You input: "..#data, {244,40,43})
  385. newline("")
  386. end
  387. elseif data[1] == "help" then
  388. if #data == 2 then
  389. if commands[string.lower(data[2])] then
  390. newline(commands[string.lower(data[2])]["description"])
  391. newline(commands[string.lower(data[2])]["usage"])
  392. newline("")
  393. else
  394. newline('"'..data[2]..'" '..'is not a valid command, please type "cmds" for a', {244,40,43})
  395. newline('list of commands', {244,40,43})
  396. newline("")
  397. end
  398. else
  399. newline('Invalid Arguments, help requires 2 You input: '..#data, {244,40,43})
  400. newline("Usage: help [command]", {244,40,43})
  401. newline("")
  402. end
  403. elseif data[1] == "cmds" then
  404. for i,v in pairs(commands) do
  405. newline(string.sub(v["usage"], 8))
  406. end
  407. newline("")
  408. else
  409. newline('Unknown Command, please type "cmds" for a list of', {244,40,43})
  410. newline("Consolidated commands.", {244,40,43})
  411. newline("")
  412. end
  413. end
  414.  
  415.  
  416. --? Input
  417.  
  418. console.input.FocusLost:connect(function(enter)
  419. if enter then
  420. if not usernameEntered then
  421. tempuser = console.input.Text
  422. newline("C:/Users/Guest>"..console.input.Text)
  423. newline("")
  424. newline("Set your username to: "..console.input.Text.." (Y/N)")
  425. console.input:CaptureFocus()
  426. usernameEntered = true
  427. elseif not confirmed then
  428. if console.input.Text == "Y" or console.input.Text == "y" then
  429. newline("C:/Users/Guest>"..console.input.Text)
  430. username = tempuser
  431. console.input.Text = ""
  432. newline("Username Confirmed, have fun using Consolidated, "..username)
  433. newline("")
  434. console.input:CaptureFocus()
  435. confirmed = true
  436. else
  437. newline("C:/Users/Guest>"..console.input.Text)
  438. newline("")
  439. newline("Username:")
  440. console.input:CaptureFocus()
  441. usernameEntered = false
  442. end
  443. else
  444. userInput()
  445. analyse(console.input.Text)
  446. console.input:CaptureFocus()
  447. end
  448. end
  449. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement