Advertisement
Verhed

Untitled

Jul 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.78 KB | None | 0 0
  1. --//Some unnamed Admin-Gui
  2. --//Made by Chebureki#5214
  3. --//Possible upates coming
  4.  
  5. --//Release related Information, mostly for myself
  6. local Name = "CMD-ADMIN"
  7. local Version = "v1.0"
  8. local Changelogs = [[
  9. -Release ^^
  10. -Added the framework
  11. -Made the gui]]
  12. --//
  13.  
  14. local ScreenGui = Instance.new("ScreenGui")
  15. local Header = Instance.new("Frame")
  16. local Container = Instance.new("Frame")
  17. local Output = Instance.new("ScrollingFrame")
  18. local InputIndicator = Instance.new("TextLabel")
  19. local Input = Instance.new("TextBox")
  20. local Template = Instance.new("TextLabel")
  21. local Title = Instance.new("TextLabel")
  22. local Close = Instance.new("TextButton")
  23. local Minimize = Instance.new("TextButton")
  24.  
  25. local Min = Minimize
  26. local ExampleLine = Template
  27.  
  28. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  29. ScreenGui.ResetOnSpawn = false
  30. ScreenGui.Name = "CMD-ADMIN"
  31.  
  32. Header.Name = "Header"
  33. Header.Parent = ScreenGui
  34. Header.Active = true
  35. Header.BackgroundColor3 = Color3.new(0, 0, 0)
  36. Header.BorderSizePixel = 0
  37. Header.Draggable = true
  38. Header.Position = UDim2.new(0.0670785606, 0, 0.409535438, 0)
  39. Header.Size = UDim2.new(0, 338, 0, 21)
  40.  
  41. Container.Name = "Container"
  42. Container.Parent = Header
  43. Container.BackgroundColor3 = Color3.new(0, 0, 0)
  44. Container.BackgroundTransparency = 0.30000001192093
  45. Container.BorderColor3 = Color3.new(0, 0, 0)
  46. Container.BorderSizePixel = 0
  47. Container.ClipsDescendants = true
  48. Container.Position = UDim2.new(0.00128474832, 0, 1.00211155, 0)
  49. Container.Size = UDim2.new(0, 338, 0, 294)
  50.  
  51. Output.Name = "Output"
  52. Output.Parent = Container
  53. Output.BackgroundColor3 = Color3.new(1, 1, 1)
  54. Output.BackgroundTransparency = 1
  55. Output.Size = UDim2.new(0, 338, 0, 265)
  56. Output.BottomImage = ""
  57. Output.CanvasSize = UDim2.new(0, 0, 0, 300)
  58. Output.ScrollBarThickness = 5
  59. Output.TopImage = ""
  60.  
  61. InputIndicator.Name = "InputIndicator"
  62. InputIndicator.Parent = Container
  63. InputIndicator.BackgroundColor3 = Color3.new(0, 0, 0)
  64. InputIndicator.BackgroundTransparency = 0.89999997615814
  65. InputIndicator.Position = UDim2.new(0, 0, 0.901360571, 0)
  66. InputIndicator.Size = UDim2.new(0, 32, 0, 29)
  67. InputIndicator.Font = Enum.Font.Code
  68. InputIndicator.Text = ">"
  69. InputIndicator.TextColor3 = Color3.new(1, 1, 1)
  70. InputIndicator.TextSize = 14
  71.  
  72. Input.Name = "Input"
  73. Input.Parent = Container
  74. Input.BackgroundColor3 = Color3.new(0, 0, 0)
  75. Input.BorderSizePixel = 0
  76. Input.BackgroundTransparency = 0.89999997615814
  77. Input.Position = UDim2.new(0.0946745574, 0, 0.901360571, 0)
  78. Input.Size = UDim2.new(0, 300, 0, 29)
  79. Input.Font = Enum.Font.Code
  80. Input.Text = ""
  81. Input.TextColor3 = Color3.new(1, 1, 1)
  82. Input.TextSize = 14
  83. Input.TextWrapped = true
  84. Input.TextXAlignment = Enum.TextXAlignment.Left
  85.  
  86. Template.Name = "Template"
  87. Template.Parent = Input
  88. Template.BackgroundColor3 = Color3.new(1, 1, 1)
  89. Template.BackgroundTransparency = 1
  90. Template.Size = UDim2.new(0, 332, 0, 15)
  91. Template.Visible = false
  92. Template.Font = Enum.Font.Code
  93. Template.Text = "[OUT]TEST"
  94. Template.TextColor3 = Color3.new(1, 1, 1)
  95. Template.TextSize = 14
  96. Template.TextXAlignment = Enum.TextXAlignment.Left
  97.  
  98. Title.Name = "Title"
  99. Title.Parent = Header
  100. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  101. Title.BackgroundTransparency = 1
  102. Title.Size = UDim2.new(0, 175, 0, 21)
  103. Title.Font = Enum.Font.SourceSans
  104. Title.Text = Name..Version
  105. Title.TextColor3 = Color3.new(1, 1, 1)
  106. Title.TextSize = 14
  107.  
  108. Close.Name = "Close"
  109. Close.Parent = Header
  110. Close.BackgroundColor3 = Color3.new(0, 0, 0)
  111. Close.BorderSizePixel = 0
  112. Close.Position = UDim2.new(0.881656826, 0, 0, 0)
  113. Close.Size = UDim2.new(0, 40, 0, 21)
  114. Close.Font = Enum.Font.SourceSans
  115. Close.Text = "X"
  116. Close.TextColor3 = Color3.new(1, 1, 1)
  117. Close.TextSize = 14
  118.  
  119. Minimize.Name = "Minimize"
  120. Minimize.Parent = Header
  121. Minimize.BackgroundColor3 = Color3.new(0, 0, 0)
  122. Minimize.BorderSizePixel = 0
  123. Minimize.Position = UDim2.new(0.763313651, 0, 0, 0)
  124. Minimize.Size = UDim2.new(0, 40, 0, 21)
  125. Minimize.Font = Enum.Font.SourceSans
  126. Minimize.Text = "_"
  127. Minimize.TextColor3 = Color3.new(1, 1, 1)
  128. Minimize.TextSize = 14
  129.  
  130. --//Gui Style stuff
  131. local obama = 0
  132.  
  133. function fade(outPutColor)
  134. obama = math.random(1,10000)
  135. local check = obama
  136. local originalColor = Close.BackgroundColor3
  137. for i=0,1,0.1 do
  138. if check~= obama then break end
  139. Close.BackgroundColor3 = originalColor:lerp(outPutColor,i)
  140. wait()
  141. end
  142. end
  143.  
  144. Close.MouseEnter:Connect(function()
  145. fade(Color3.new(1,0,0))
  146. end)
  147.  
  148. Close.MouseLeave:Connect(function()
  149. fade(Color3.new(0,0,0))
  150. end)
  151.  
  152. Close.MouseButton1Click:Connect(function()
  153. ScreenGui:Destroy()
  154. end)
  155.  
  156. local minimized = false
  157. local originalSize = Container.Size
  158.  
  159. Min.MouseButton1Click:Connect(function()
  160. if minimized then
  161. Container:TweenSize(originalSize,Enum.EasingDirection.Out,Enum.EasingStyle.Quint,0.4)
  162. else
  163. Container:TweenSize(originalSize-UDim2.new(0,0,0,originalSize.Y.Offset),Enum.EasingDirection.Out,Enum.EasingStyle.Quint,0.4)
  164. end
  165. minimized = not minimized
  166. end)
  167. --//
  168.  
  169. --//User Settings
  170. local settings = {}
  171. settings.UserColor = Color3.new(1,1,1)
  172. --//
  173.  
  174. --//Parsing Stuff
  175. local parse = {}
  176. parse.getArgs = function(input)
  177. local Arguments = {}
  178. for arg in input:gmatch("%w+")do
  179. arg = string.gsub(arg,"%s","")
  180. table.insert(Arguments,arg)
  181. end
  182. return Arguments
  183. end
  184.  
  185.  
  186. local colorList = {
  187. ["red"] = Color3.new(1,0,0),
  188. ["green"] = Color3.new(0,1,0),
  189. ["blue"] = Color3.new(0,0,1)
  190. }
  191. parse.getColor3 = function(input)
  192. if colorList[input] ~= nil then
  193. return colorList[input]
  194. else
  195. return nil
  196. end
  197. end
  198.  
  199. function getPlayers(input,player)
  200. local players = {}
  201. if input == "me" then
  202. return {player}
  203. end
  204. if input == "all" then
  205. return game.Players:GetPlayers()
  206. end
  207.  
  208. if input == "others" then
  209. for _,v in pairs(game.Players:GetPlayers())do
  210. if v ~= player then
  211. table.insert(players,v)
  212. end
  213. end
  214. else
  215. for i,v in pairs(game.Players:GetPlayers())do
  216. if v.Name:match(input) then
  217. table.insert(players,v)
  218. end
  219. end
  220. end
  221. return players
  222. end
  223. --//
  224.  
  225. --//Console Related functions
  226. local console = {}
  227. console.out = function(input,color,symbol)
  228. if color == nil then color = settings.UserColor end
  229. if symbol == nil then symbol = "" end
  230. if input == nil then input = "" end
  231. local line = ExampleLine:Clone()
  232. line.Position = UDim2.new(0,0,0,15*#(Output:GetChildren()))
  233.  
  234. if string.find(input,"\n") ~=nil then
  235. local _,pos = string.find(input,"\n")
  236. console.out(string.sub(input,1,pos-1),color,symbol)
  237. console.out(string.sub(input,pos+1,#input),color,symbol)
  238. return
  239. end
  240.  
  241. if #input > 44 then
  242. console.out(string.sub(input,1,44),color,symbol)
  243. console.out(string.sub(input,45,#input),color,symbol)
  244. return
  245. end
  246.  
  247. line.Text = "["..symbol.."]"..input
  248. line.Visible = true
  249. line.Parent = Output
  250. line.TextColor3 = color
  251.  
  252. Output.CanvasSize = UDim2.new(0,0,0,#(Output:GetChildren())*15)
  253. Output.CanvasPosition = Vector2.new(0,-15*17+15*#(Output:GetChildren()))
  254. end
  255.  
  256. console.error = function(input)
  257. console.out(input,Color3.new(1,0,0),"?")
  258. end
  259. local commands = {}
  260.  
  261. local addCommand = function(Name,Description,Command)
  262. commands[Name] = {}
  263. local container = commands[Name]
  264. container.Description = Description
  265. container.cmd = Command
  266. end
  267.  
  268. addCommand("help","prints the use", function(Arguments,Raw)
  269. if Arguments[2] == nil then
  270. local counter = 1
  271. for command,func in pairs(commands)do
  272. console.out(command..": "..func.Description,Color3.new(1,1,0),counter)
  273. counter = counter+1
  274. end
  275. else
  276. if commands[Arguments[2]] ~= nil then
  277. console.out(Arguments[2]..": "..commands[Arguments[2]].Description,Color3.new(1,1,0))
  278. else
  279. console.error(Arguments[2].." is not a cmd!")
  280. end
  281. end
  282. end)
  283.  
  284. addCommand("changelogs","self-explanatory", function(Arguments,Raw)
  285. console.out(Changelogs,Color3.new(1,1,0))
  286. end)
  287.  
  288. addCommand("print","prints duh", function(Arguments,Raw)
  289. console.out(string.sub(Raw,string.len(Arguments[1])+2,string.len(Raw)))
  290. end)
  291.  
  292. addCommand("toggleclear","Toggles the option", function(Arguments,Raw)
  293. Input.ClearTextOnFocus = not Input.ClearTextOnFocus
  294. console.out("Toggled to: "..tostring(Input.ClearTextOnFocus),Color3.new(0.5,0.5,1))
  295. end)
  296.  
  297. addCommand("clear","clears the output", function(Arguments,Raw)
  298. Output:ClearAllChildren()
  299. console.out("Console has been cleared",Color3.new(0.5,0.5,1),"!")
  300. end)
  301.  
  302. addCommand("color","changes the usercolor", function(Arguments,Raw)
  303. if parse.getColor3(Arguments[2]) ~= nil then
  304. settings.UserColor = parse.getColor3(Arguments[2])
  305. else
  306. console.error(Arguments[2].." is not a valid color!")
  307. end
  308. end)
  309.  
  310. addCommand("lua","execute lua", function(Arguments,Raw)
  311. local success,message = pcall(function()
  312. print = function(...)
  313. console.out(table.concat({...}," "))
  314. end
  315. warn = function(...)
  316. console.out(table.concat({...}," "),Color3.new(1, 0.54902, 0),"!")
  317. end
  318. loadstring(string.sub(Raw,string.len(Arguments[1])+2,string.len(Raw)))()
  319. end)
  320. if not success then
  321. console.error("An error occured!")
  322. console.error(message)
  323. end
  324. end)
  325.  
  326. addCommand("kill","kill [Target]",function(parameters,Raw,speaker)
  327. for _,player in pairs(getPlayers(parameters[2],speaker))do
  328. if player.Character then
  329. player.Character.Humanoid.Health = 0
  330. end
  331. end
  332. end)
  333.  
  334. addCommand("tp","tp [Target] [Destination]",function(parameters,Raw,speaker)
  335. for _,player in pairs(getPlayers(parameters[2],speaker))do
  336. if getPlayers(parameters[3],speaker)[1]== nil or #(getPlayers(parameters[3],speaker)) > 1 then
  337. return
  338. end
  339. for _,player in pairs(getPlayers(parameters[2],Raw,speaker))do
  340. if player.Character then
  341. player.Character:MoveTo(getPlayers(parameters[3],speaker)[1].Character.HumanoidRootPart.Position)
  342. end
  343. end
  344. end
  345. end)
  346.  
  347. addCommand("kill","kill [Target]",function(parameters,Raw,speaker)
  348. for _,player in pairs(getPlayers(parameters[2],speaker))do
  349. if player.Character then
  350. player.Character.Humanoid.Health = 0
  351. end
  352. end
  353. end)
  354.  
  355. addCommand("ws","ws [Target] [WalkSpeed]",function(parameters,Raw,speaker)
  356. for _,player in pairs(getPlayers(parameters[2],speaker))do
  357. if player.Character then
  358. player.Character.Humanoid.WalkSpeed = parameters[3]
  359. end
  360. end
  361. end)
  362.  
  363. addCommand("jp","jp [Target] [JumpPower]",function(parameters,Raw,speaker)
  364. for _,player in pairs(getPlayers(parameters[2],speaker))do
  365. if player.Character then
  366. player.Character.Humanoid.JumpPower = parameters[3]
  367. end
  368. end
  369. end)
  370.  
  371. addCommand("fire","fire [Target]",function(parameters,Raw,speaker)
  372. for _,player in pairs(getPlayers(parameters[2],speaker))do
  373. if player.Character then
  374. Instance.new("Fire",player.Character.HumanoidRootPart)
  375. end
  376. end
  377. end)
  378.  
  379. addCommand("sparkle","sparkle [Target]",function(parameters,Raw,speaker)
  380. for _,player in pairs(getPlayers(parameters[2],speaker))do
  381. if player.Character then
  382. Instance.new("Sparkles",player.Character.HumanoidRootPart)
  383. end
  384. end
  385. end)
  386.  
  387. addCommand("smoke","smoke [Target]",function(parameters,Raw,speaker)
  388. for _,player in pairs(getPlayers(parameters[2],speaker))do
  389. if player.Character then
  390. Instance.new("Smoke",player.Character.HumanoidRootPart)
  391. end
  392. end
  393. end)
  394.  
  395. addCommand("ff","ff [Target]",function(parameters,Raw,speaker)
  396. for _,player in pairs(getPlayers(parameters[2],speaker))do
  397. if player.Character then
  398. Instance.new("ForceField",player.Character)
  399. end
  400. end
  401. end)
  402.  
  403. addCommand("god","god [Target]",function(parameters,Raw,speaker)
  404. for _,player in pairs(getPlayers(parameters[2],speaker))do
  405. if player.Character then
  406. player.Character.Humanoid.MaxHealth = math.huge
  407. player.Character.Humanoid.Health = math.huge
  408. end
  409. end
  410. end)
  411.  
  412.  
  413. addCommand("explode","explode [Target]",function(parameters,Raw,speaker)
  414. for _,player in pairs(getPlayers(parameters[2],speaker))do
  415. if player.Character then
  416. Instance.new("Explosion",player.Character).Position = player.Character.HumanoidRootPart.Position
  417. end
  418. end
  419. end)
  420.  
  421. addCommand("freeze","freeze [Target]",function(parameters,Raw,speaker)
  422. for _,player in pairs(getPlayers(parameters[2],speaker))do
  423. if player.Character then
  424. for _,part in pairs(player.Character:GetChildren())do
  425. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  426. part.Anchored = true
  427. end
  428. end
  429. end
  430. end
  431. end)
  432.  
  433. addCommand("clone","clone [Target]",function(parameters,Raw,speaker)
  434. for _,player in pairs(getPlayers(parameters[2],speaker))do
  435. if player.Character then
  436. player.Character.Archivable = true
  437. player.Character:Clone().Parent = workspace
  438. player.Character.Archivable = false
  439. end
  440. end
  441. end)
  442.  
  443. addCommand("grav","grav [Force]",function(parameters,Raw,speaker)
  444. if tonumber(parameters[2]) == nil then return end
  445. workspace.Gravity = tonumber(parameters[2])
  446. end)
  447.  
  448. addCommand("taw","taw [Target]",function(parameters,Raw,speaker)
  449. for _,player in pairs(getPlayers(parameters[2],speaker))do
  450. if player.Character then
  451. for _,part in pairs(player.Character:GetChildren())do
  452. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  453. part.Anchored = false
  454. end
  455. end
  456. end
  457. end
  458. end)
  459.  
  460. addCommand("heal","heal [Target] [Amount]",function(parameters,Raw,speaker)
  461. if tonumber(parameters[3]) == nil then parameters[3] = math.huge end
  462. for _,player in pairs(getPlayers(parameters[2],speaker))do
  463. if player.Character then
  464. player.Character.Humanoid.Health = player.Character.Humanoid.Health + parameters[3]
  465. end
  466. end
  467. end)
  468.  
  469. addCommand("damage","damage [Amount]",function(parameters,Raw,speaker)
  470. if tonumber(parameters[3]) == nil then return end
  471. for _,player in pairs(getPlayers(parameters[2],speaker))do
  472. if player.Character then
  473. player.Character.Humanoid.Health = player.Character.Humanoid.Health - parameters[3]
  474. end
  475. end
  476. end)
  477.  
  478. addCommand("health","health [Amount]",function(parameters,Raw,speaker)
  479. if tonumber(parameters[3]) == nil then return end
  480. for _,player in pairs(getPlayers(parameters[2],speaker))do
  481. if player.Character then
  482. if tonumber(parameters[3]) > player.Character.Humanoid.MaxHealth then
  483. player.Character.Humanoid.MaxHealth = tonumber(parameters[3])
  484. end
  485. player.Character.Humanoid.Health = parameters[3]
  486. end
  487. end
  488. end)
  489.  
  490. addCommand("sit","sit [Target]",function(parameters,Raw,speaker)
  491. for _,player in pairs(getPlayers(parameters[2],speaker))do
  492. if player.Character then
  493. player.Character.Humanoid.Sit = true
  494. end
  495. end
  496. end)
  497.  
  498. addCommand("btools","btools [Target]",function(parameters,Raw,speaker)
  499. for _,player in pairs(getPlayers(parameters[2],speaker))do
  500. Instance.new("HopperBin",player.Backpack).BinType = Enum.BinType.Clone
  501. Instance.new("HopperBin",player.Backpack).BinType = Enum.BinType.Grab
  502. Instance.new("HopperBin",player.Backpack).BinType = Enum.BinType.Hammer
  503. end
  504. end)
  505.  
  506. addCommand("transp","transp [Target] [Percentage]",function(parameters,Raw,speaker)
  507. if tonumber(parameters[3]) == nil then
  508. parameters[3] = 100
  509. end
  510. for _,player in pairs(getPlayers(parameters[2],speaker))do
  511. if player.Character then
  512. for _,part in pairs(player.Character:GetDescendants())do
  513. if (part:IsA("BasePart") and part.Name ~= "HumanoidRootPart") or part:IsA("Decal") then
  514. part.Transparency = tonumber(parameters[3])/100
  515. end
  516. end
  517. end
  518. end
  519. end)
  520. --//
  521.  
  522. --//Input Stuff
  523. Input.FocusLost:Connect(function()
  524. local input = Input.Text
  525. if input == "" or input == nil then return end
  526. local Arguments = parse.getArgs(input)
  527. if commands[Arguments[1]]~= nil then
  528. commands[Arguments[1]].cmd(Arguments,input,game.Players.LocalPlayer)
  529. else
  530. console.error(Arguments[1].." is not a valid command!")
  531. end
  532. end)
  533. --//
  534.  
  535. --//Beginning Messages
  536. console.out("G'day "..game.Players.LocalPlayer.Name,Color3.new(0.5,0.5,1),"!")
  537. console.out("Bazinga",Color3.new(0.5,0.5,1),"Server Message")
  538. console.out("Use 'help' to view all commands!",Color3.new(0.5,0.5,1),"!")
  539. --//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement