Advertisement
KCROL_AdminLeaks

Energy Admin [GUI] LocalScript

Jan 7th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.74 KB | None | 0 0
  1. --[[
  2.     Energy Admin
  3.     by KCROL
  4.     Another for you guys.
  5. --]]
  6.  
  7. local plr = game:GetService("Players").LocalPlayer
  8.  
  9. function showCmds()
  10.    
  11.     --This cmd GUI was converted using GUI to Lua v2.6 by Infortality on ROBLOX
  12.     -- Objects
  13.  
  14. local Cmds = Instance.new("ScreenGui")
  15. local CmdsFrame = Instance.new("Frame")
  16. local Line1 = Instance.new("TextLabel")
  17. local Line2 = Instance.new("TextLabel")
  18. local CloseButton = Instance.new("TextButton")
  19. local ScrollingFrame = Instance.new("ScrollingFrame")
  20. local _1 = Instance.new("TextLabel")
  21. local _2 = Instance.new("TextLabel")
  22. local _3 = Instance.new("TextLabel")
  23. local _4 = Instance.new("TextLabel")
  24. local _5 = Instance.new("TextLabel")
  25. local _6 = Instance.new("TextLabel")
  26. local _7 = Instance.new("TextLabel")
  27. local _8 = Instance.new("TextLabel")
  28. local _9 = Instance.new("TextLabel")
  29.  
  30. -- Properties
  31.  
  32. Cmds.Name = "Cmds"
  33. Cmds.Parent = plr.PlayerGui
  34.  
  35. CmdsFrame.Name = "CmdsFrame"
  36. CmdsFrame.Parent = Cmds
  37. CmdsFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  38. CmdsFrame.BorderSizePixel = 0
  39. CmdsFrame.Position = UDim2.new(0.5, -200, 0.5, -200)
  40. CmdsFrame.Size = UDim2.new(0, 400, 0, 400)
  41.  
  42. Line1.Name = "Line1"
  43. Line1.Parent = CmdsFrame
  44. Line1.BackgroundColor3 = Color3.new(0, 0.333333, 0)
  45. Line1.BorderSizePixel = 0
  46. Line1.Size = UDim2.new(0, 400, 0, 10)
  47. Line1.Font = Enum.Font.SourceSans
  48. Line1.Text = ""
  49. Line1.TextSize = 14
  50.  
  51. Line2.Name = "Line2"
  52. Line2.Parent = CmdsFrame
  53. Line2.BackgroundColor3 = Color3.new(0.333333, 0.666667, 0)
  54. Line2.BorderSizePixel = 0
  55. Line2.Position = UDim2.new(0, 0, 0, 10)
  56. Line2.Size = UDim2.new(0, 400, 0, 40)
  57. Line2.Font = Enum.Font.SourceSansSemibold
  58. Line2.Text = " Energy Commands for "..plr.Name
  59. Line2.TextColor3 = Color3.new(1, 1, 1)
  60. Line2.TextSize = 30
  61. Line2.TextWrapped = true
  62. Line2.TextXAlignment = Enum.TextXAlignment.Left
  63.  
  64. CloseButton.Name = "CloseButton"
  65. CloseButton.Parent = CmdsFrame
  66. CloseButton.BackgroundColor3 = Color3.new(1, 1, 1)
  67. CloseButton.BackgroundTransparency = 1
  68. CloseButton.Position = UDim2.new(0, 370, 0, 18)
  69. CloseButton.Size = UDim2.new(0, 25, 0, 25)
  70. CloseButton.Font = Enum.Font.Cartoon
  71. CloseButton.Text = "X"
  72. CloseButton.TextColor3 = Color3.new(1, 1, 1)
  73. CloseButton.TextScaled = true
  74. CloseButton.TextSize = 14
  75. CloseButton.TextWrapped = true
  76.  
  77. ScrollingFrame.Parent = CmdsFrame
  78. ScrollingFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  79. ScrollingFrame.BackgroundTransparency = 1
  80. ScrollingFrame.Position = UDim2.new(0, 0, 0, 100)
  81. ScrollingFrame.Size = UDim2.new(0, 400, 0, 300)
  82. ScrollingFrame.BottomImage = "rbxassetid://158362107"
  83. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 3, 0)
  84. ScrollingFrame.MidImage = "rbxassetid://158362107"
  85. ScrollingFrame.TopImage = "rbxassetid://158362107"
  86.  
  87. _1.Name = "1"
  88. _1.Parent = ScrollingFrame
  89. _1.BackgroundColor3 = Color3.new(1, 1, 1)
  90. _1.BackgroundTransparency = 1
  91. _1.Size = UDim2.new(0, 385, 0, 45)
  92. _1.Font = Enum.Font.SourceSans
  93. _1.Text = "  ;cmds"
  94. _1.TextScaled = true
  95. _1.TextSize = 14
  96. _1.TextWrapped = true
  97. _1.TextXAlignment = Enum.TextXAlignment.Left
  98.  
  99. _2.Name = "2"
  100. _2.Parent = ScrollingFrame
  101. _2.BackgroundColor3 = Color3.new(1, 1, 1)
  102. _2.BackgroundTransparency = 1
  103. _2.Position = UDim2.new(0, 0, 0, 50)
  104. _2.Size = UDim2.new(0, 385, 0, 45)
  105. _2.Font = Enum.Font.SourceSans
  106. _2.Text = "  ;god"
  107. _2.TextScaled = true
  108. _2.TextSize = 14
  109. _2.TextWrapped = true
  110. _2.TextXAlignment = Enum.TextXAlignment.Left
  111.  
  112. _3.Name = "3"
  113. _3.Parent = ScrollingFrame
  114. _3.BackgroundColor3 = Color3.new(1, 1, 1)
  115. _3.BackgroundTransparency = 1
  116. _3.Position = UDim2.new(0, 0, 0, 100)
  117. _3.Size = UDim2.new(0, 385, 0, 45)
  118. _3.Font = Enum.Font.SourceSans
  119. _3.Text = "  ;kill"
  120. _3.TextScaled = true
  121. _3.TextSize = 14
  122. _3.TextWrapped = true
  123. _3.TextXAlignment = Enum.TextXAlignment.Left
  124.  
  125. _4.Name = "4"
  126. _4.Parent = ScrollingFrame
  127. _4.BackgroundColor3 = Color3.new(1, 1, 1)
  128. _4.BackgroundTransparency = 1
  129. _4.Position = UDim2.new(0, 0, 0, 150)
  130. _4.Size = UDim2.new(0, 385, 0, 45)
  131. _4.Font = Enum.Font.SourceSans
  132. _4.Text = "  ;ff"
  133. _4.TextScaled = true
  134. _4.TextSize = 14
  135. _4.TextWrapped = true
  136. _4.TextXAlignment = Enum.TextXAlignment.Left
  137.  
  138. _5.Name = "5"
  139. _5.Parent = ScrollingFrame
  140. _5.BackgroundColor3 = Color3.new(1, 1, 1)
  141. _5.BackgroundTransparency = 1
  142. _5.Position = UDim2.new(0, 0, 0, 200)
  143. _5.Size = UDim2.new(0, 385, 0, 45)
  144. _5.Font = Enum.Font.SourceSans
  145. _5.Text = "  ;admin (Idk If works)"
  146. _5.TextScaled = true
  147. _5.TextSize = 14
  148. _5.TextWrapped = true
  149. _5.TextXAlignment = Enum.TextXAlignment.Left
  150.  
  151. _6.Name = "6"
  152. _6.Parent = ScrollingFrame
  153. _6.BackgroundColor3 = Color3.new(1, 1, 1)
  154. _6.BackgroundTransparency = 1
  155. _6.Position = UDim2.new(0, 0, 0, 250)
  156. _6.Size = UDim2.new(0, 385, 0, 45)
  157. _6.Font = Enum.Font.SourceSans
  158. _6.Text = "  ;ungod"
  159. _6.TextScaled = true
  160. _6.TextSize = 14
  161. _6.TextWrapped = true
  162. _6.TextXAlignment = Enum.TextXAlignment.Left
  163.  
  164. _7.Name = "7"
  165. _7.Parent = ScrollingFrame
  166. _7.BackgroundColor3 = Color3.new(1, 1, 1)
  167. _7.BackgroundTransparency = 1
  168. _7.Position = UDim2.new(0, 0, 0, 300)
  169. _7.Size = UDim2.new(0, 385, 0, 45)
  170. _7.Font = Enum.Font.SourceSans
  171. _7.Text = "  ;unff"
  172. _7.TextScaled = true
  173. _7.TextSize = 14
  174. _7.TextWrapped = true
  175. _7.TextXAlignment = Enum.TextXAlignment.Left
  176.  
  177. _8.Name = "8"
  178. _8.Parent = ScrollingFrame
  179. _8.BackgroundColor3 = Color3.new(1, 1, 1)
  180. _8.BackgroundTransparency = 1
  181. _8.Position = UDim2.new(0, 0, 0, 350)
  182. _8.Size = UDim2.new(0, 385, 0, 45)
  183. _8.Font = Enum.Font.SourceSans
  184. _8.Text = "  ;msg"
  185. _8.TextScaled = true
  186. _8.TextSize = 14
  187. _8.TextWrapped = true
  188. _8.TextXAlignment = Enum.TextXAlignment.Left
  189.  
  190. _9.Name = "8"
  191. _9.Parent = ScrollingFrame
  192. _9.BackgroundColor3 = Color3.new(1, 1, 1)
  193. _9.BackgroundTransparency = 1
  194. _9.Position = UDim2.new(0, 0, 0, 400)
  195. _9.Size = UDim2.new(0, 385, 0, 45)
  196. _9.Font = Enum.Font.SourceSans
  197. _9.Text = "  ;rmadmin"
  198. _9.TextScaled = true
  199. _9.TextSize = 14
  200. _9.TextWrapped = true
  201. _9.TextXAlignment = Enum.TextXAlignment.Left
  202.  
  203. CloseButton.MouseButton1Click:connect(function()
  204.     Cmds:Destroy()
  205. end)
  206. end
  207.  
  208. function TellPlr(plr)
  209.     -- Objects
  210.  
  211. local MessageToPlr = Instance.new("ScreenGui")
  212. local MessageFrame = Instance.new("Frame")
  213. local Line1 = Instance.new("TextLabel")
  214. local Line2 = Instance.new("TextLabel")
  215. local What = Instance.new("TextLabel")
  216. local Info = Instance.new("TextLabel")
  217. local Info2 = Instance.new("TextLabel")
  218. local Agree = Instance.new("TextButton")
  219.  
  220. -- Properties
  221.  
  222. MessageToPlr.Name = "MessageToPlr"
  223. MessageToPlr.Parent = plr.PlayerGui
  224.  
  225. MessageFrame.Name = "MessageFrame"
  226. MessageFrame.Parent = MessageToPlr
  227. MessageFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  228. MessageFrame.BorderSizePixel = 0
  229. MessageFrame.Position = UDim2.new(0.5, -200, 0.5, -200)
  230. MessageFrame.Size = UDim2.new(0, 400, 0, 400)
  231.  
  232. Line1.Name = "Line1"
  233. Line1.Parent = MessageFrame
  234. Line1.BackgroundColor3 = Color3.new(0, 0.333333, 0)
  235. Line1.BorderSizePixel = 0
  236. Line1.Size = UDim2.new(0, 400, 0, 10)
  237. Line1.Font = Enum.Font.SourceSans
  238. Line1.Text = ""
  239. Line1.TextSize = 14
  240.  
  241. Line2.Name = "Line2"
  242. Line2.Parent = MessageFrame
  243. Line2.BackgroundColor3 = Color3.new(0.333333, 0.666667, 0)
  244. Line2.BorderSizePixel = 0
  245. Line2.Position = UDim2.new(0, 0, 0, 10)
  246. Line2.Size = UDim2.new(0, 400, 0, 40)
  247. Line2.Font = Enum.Font.SourceSansSemibold
  248. Line2.Text = " Energy"
  249. Line2.TextColor3 = Color3.new(1, 1, 1)
  250. Line2.TextScaled = true
  251. Line2.TextSize = 14
  252. Line2.TextWrapped = true
  253. Line2.TextXAlignment = Enum.TextXAlignment.Left
  254.  
  255. What.Name = "What"
  256. What.Parent = MessageFrame
  257. What.BackgroundColor3 = Color3.new(1, 1, 1)
  258. What.BackgroundTransparency = 1
  259. What.Position = UDim2.new(0, 0, 0, 50)
  260. What.Size = UDim2.new(0, 400, 0, 45)
  261. What.Font = Enum.Font.SourceSansLight
  262. What.Text = "You have been given admin!"
  263. What.TextColor3 = Color3.new(0, 0, 0)
  264. What.TextSize = 36
  265. What.TextWrapped = true
  266.  
  267. Info.Name = "Info"
  268. Info.Parent = MessageFrame
  269. Info.BackgroundColor3 = Color3.new(1, 1, 1)
  270. Info.BackgroundTransparency = 1
  271. Info.Position = UDim2.new(0, 0, 0, 150)
  272. Info.Size = UDim2.new(0, 400, 0, 75)
  273. Info.Font = Enum.Font.SourceSansLight
  274. Info.Text = "To view commands, say ;cmds"
  275. Info.TextColor3 = Color3.new(0, 0, 0)
  276. Info.TextSize = 36
  277. Info.TextWrapped = true
  278.  
  279. Info2.Name = "Info2"
  280. Info2.Parent = MessageFrame
  281. Info2.BackgroundColor3 = Color3.new(1, 1, 1)
  282. Info2.BackgroundTransparency = 1
  283. Info2.Position = UDim2.new(0, 0, 0, 250)
  284. Info2.Size = UDim2.new(0, 400, 0, 75)
  285. Info2.Font = Enum.Font.SourceSansLight
  286. Info2.Text = "When using commands like ;kill or ;god, be sure to type the exact name."
  287. Info2.TextColor3 = Color3.new(0, 0, 0)
  288. Info2.TextScaled = true
  289. Info2.TextSize = 36
  290. Info2.TextWrapped = true
  291.  
  292. Agree.Name = "Agree"
  293. Agree.Parent = MessageFrame
  294. Agree.BackgroundColor3 = Color3.new(0.333333, 0.666667, 0)
  295. Agree.BorderSizePixel = 0
  296. Agree.Position = UDim2.new(0.5, -50, 0, 350)
  297. Agree.Size = UDim2.new(0, 100, 0, 30)
  298. Agree.Font = Enum.Font.SourceSans
  299. Agree.Text = "Got it!"
  300. Agree.TextColor3 = Color3.new(1, 1, 1)
  301. Agree.TextScaled = true
  302. Agree.TextSize = 14
  303. Agree.TextWrapped = true
  304.  
  305. Agree.MouseButton1Click:connect(function()
  306.     MessageToPlr:Destroy()
  307. end)
  308. end
  309.  
  310. function TellPlre(plr)
  311.     -- Objects
  312.  
  313. local MessageToPlr = Instance.new("ScreenGui")
  314. local MessageFrame = Instance.new("Frame")
  315. local Line1 = Instance.new("TextLabel")
  316. local Line2 = Instance.new("TextLabel")
  317. local What = Instance.new("TextLabel")
  318. local Info = Instance.new("TextLabel")
  319. local Info2 = Instance.new("TextLabel")
  320. local Agree = Instance.new("TextButton")
  321.  
  322. -- Properties
  323.  
  324. MessageToPlr.Name = "MessageToPlr"
  325. MessageToPlr.Parent = plr.PlayerGui
  326.  
  327. MessageFrame.Name = "MessageFrame"
  328. MessageFrame.Parent = MessageToPlr
  329. MessageFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  330. MessageFrame.BorderSizePixel = 0
  331. MessageFrame.Position = UDim2.new(0.5, -200, 0.5, -200)
  332. MessageFrame.Size = UDim2.new(0, 400, 0, 400)
  333.  
  334. Line1.Name = "Line1"
  335. Line1.Parent = MessageFrame
  336. Line1.BackgroundColor3 = Color3.new(0, 0.333333, 0)
  337. Line1.BorderSizePixel = 0
  338. Line1.Size = UDim2.new(0, 400, 0, 10)
  339. Line1.Font = Enum.Font.SourceSans
  340. Line1.Text = ""
  341. Line1.TextSize = 14
  342.  
  343. Line2.Name = "Line2"
  344. Line2.Parent = MessageFrame
  345. Line2.BackgroundColor3 = Color3.new(0.333333, 0.666667, 0)
  346. Line2.BorderSizePixel = 0
  347. Line2.Position = UDim2.new(0, 0, 0, 10)
  348. Line2.Size = UDim2.new(0, 400, 0, 40)
  349. Line2.Font = Enum.Font.SourceSansSemibold
  350. Line2.Text = " Energy"
  351. Line2.TextColor3 = Color3.new(1, 1, 1)
  352. Line2.TextScaled = true
  353. Line2.TextSize = 14
  354. Line2.TextWrapped = true
  355. Line2.TextXAlignment = Enum.TextXAlignment.Left
  356.  
  357. What.Name = "What"
  358. What.Parent = MessageFrame
  359. What.BackgroundColor3 = Color3.new(1, 1, 1)
  360. What.BackgroundTransparency = 1
  361. What.Position = UDim2.new(0, 0, 0, 50)
  362. What.Size = UDim2.new(0, 400, 0, 45)
  363. What.Font = Enum.Font.SourceSansLight
  364. What.Text = "You have ran Energy by KCROL."
  365. What.TextColor3 = Color3.new(0, 0, 0)
  366. What.TextSize = 36
  367. What.TextWrapped = true
  368.  
  369. Info.Name = "Info"
  370. Info.Parent = MessageFrame
  371. Info.BackgroundColor3 = Color3.new(1, 1, 1)
  372. Info.BackgroundTransparency = 1
  373. Info.Position = UDim2.new(0, 0, 0, 150)
  374. Info.Size = UDim2.new(0, 400, 0, 75)
  375. Info.Font = Enum.Font.SourceSansLight
  376. Info.Text = "To view commands, say ;cmds"
  377. Info.TextColor3 = Color3.new(0, 0, 0)
  378. Info.TextSize = 36
  379. Info.TextWrapped = true
  380.  
  381. Info2.Name = "Info2"
  382. Info2.Parent = MessageFrame
  383. Info2.BackgroundColor3 = Color3.new(1, 1, 1)
  384. Info2.BackgroundTransparency = 1
  385. Info2.Position = UDim2.new(0, 0, 0, 250)
  386. Info2.Size = UDim2.new(0, 400, 0, 75)
  387. Info2.Font = Enum.Font.SourceSansLight
  388. Info2.Text = "When using commands like ;kill or ;god, be sure to type the exact name."
  389. Info2.TextColor3 = Color3.new(0, 0, 0)
  390. Info2.TextScaled = true
  391. Info2.TextSize = 36
  392. Info2.TextWrapped = true
  393.  
  394. Agree.Name = "Agree"
  395. Agree.Parent = MessageFrame
  396. Agree.BackgroundColor3 = Color3.new(0.333333, 0.666667, 0)
  397. Agree.BorderSizePixel = 0
  398. Agree.Position = UDim2.new(0.5, -50, 0, 350)
  399. Agree.Size = UDim2.new(0, 100, 0, 30)
  400. Agree.Font = Enum.Font.SourceSans
  401. Agree.Text = "Got it!"
  402. Agree.TextColor3 = Color3.new(1, 1, 1)
  403. Agree.TextScaled = true
  404. Agree.TextSize = 14
  405. Agree.TextWrapped = true
  406.  
  407. Agree.MouseButton1Click:connect(function()
  408.     MessageToPlr:Destroy()
  409. end)
  410. end
  411.  
  412. function Chat(msg)
  413.     if msg:sub(1,5) == ";cmds" then
  414.         showCmds()
  415.     elseif msg:sub(1,5) == ";god " then
  416.         local plre = game:GetService("Players")[msg:sub(6)]
  417.         if plre then
  418.             if plre.Character then
  419.                 if plre.Character.Humanoid then
  420.                     plre.Character.Humanoid.MaxHealth = math.huge
  421.                 end
  422.             end
  423.         end
  424.     elseif msg:sub(1,6) == ";kill " then
  425.         local plre = game:GetService("Players")[msg:sub(7)]
  426.         if plre then
  427.             if plre.Character then
  428.                 if plre.Character.Humanoid then
  429.                     plre.Character.Humanoid.MaxHealth = 0
  430.                     plre.Character.Humanoid.Health = 0
  431.                 end
  432.             end
  433.         end
  434.     elseif msg:sub(1,4) == ";ff " then
  435.         local plre = game:GetService("Players")[msg:sub(5)]
  436.         if plre then
  437.             if plre.Character then
  438.                 Instance.new('ForceField',plre.Character)
  439.             end
  440.         end
  441.     elseif msg:sub(1,7) == ";admin " then
  442.         local plre = game:GetService("Players")[msg:sub(8)]
  443.         if plre then
  444.             if plre.PlayerGui then
  445.                 TellPlr(plre)
  446.                 script:Clone().Parent = plre.PlayerGui
  447.             end
  448.         end
  449.     elseif msg:sub(1,6) == ";unff " then
  450.         local plre = game:GetService("Players")[msg:sub(7)]
  451.         if plre then
  452.             if plre.Character then
  453.                 for i,v in pairs(plre.Character:GetChildren()) do
  454.                     if v:IsA("ForceField") then
  455.                         v:Destroy()
  456.                     end
  457.                 end
  458.             end
  459.         end
  460.     elseif msg:sub(1,7) == ";ungod " then
  461.         local plre = game:GetService("Players")[msg:sub(8)]
  462.         if plre then
  463.             if plre.Character then
  464.                 if plre.Character.Humanoid then
  465.                     plre.Character.Humanoid.MaxHealth = 100
  466.                     plre.Character.Humanoid.Health = 100
  467.                 end
  468.             end
  469.         end
  470.     elseif msg:sub(1,5) == ";msg " then
  471.         local msgtext = msg:sub(6)
  472.         local msg = Instance.new('Message',workspace)
  473.         msg.Text = msgtext
  474.         wait(5)
  475.         msg:Destroy()
  476.     elseif msg:sub(1,8) == ";rmadmin" then
  477.         script:Destroy()
  478.     end
  479. end
  480.  
  481. TellPlre(plr)
  482. plr.Chatted:connect(Chat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement