Advertisement
plytalent

admin gui test

Apr 27th, 2019
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.80 KB | None | 0 0
  1. wait(3)
  2. local plrs = game:GetService("Players")
  3. local Player =plrs:FindFirstChild("plytalent")
  4. local remote = Instance.new("RemoteEvent",script)
  5. --local remote = workspace.RRREEEMMMOOOTTTEEE
  6. remote.Name = "RRREEEMMMOOOTTTEEE"
  7. whitelist = {"plytalent","Christyhi","ozzak1003"}
  8. script.Parent = Player.PlayerGui
  9. stole = "NULL"
  10. remote.OnServerEvent:Connect(function(player,playername,button,death)
  11. if player then
  12. if playername ~= stole then
  13. print(stole.."\n"..playername)
  14. stole = playername
  15. else
  16. stole = stole
  17. end
  18. if button then
  19. if plrs:FindFirstChild(stole) then
  20. target = plrs:FindFirstChild(stole)
  21. if button == "KICK" then
  22. target:Kick("XD")
  23. elseif button == "BAN" then
  24. table.insert(banlist,#banlist+1,target)
  25. elseif button == "KILL" then
  26. target.Character:FindFirstChildOfClass("Humanoid").MaxHealth = 0
  27. target.Character:FindFirstChildOfClass("Humanoid").Health = 0
  28. elseif button == "HEAL" then
  29. target.Character:FindFirstChildOfClass("Humanoid").Health = target.Character:FindFirstChildOfClass("Humanoid").MaxHealth
  30. elseif button == "RESET" then
  31. target:LoadCharacter()
  32. end
  33. end
  34. end
  35. end
  36. end)
  37. banlist ={}
  38.  
  39. Maingui = Instance.new("ScreenGui",Player.PlayerGui)
  40. Mainframe = Instance.new("ScrollingFrame",Maingui)
  41. reset = Instance.new("TextButton",Mainframe)
  42. PLAYERNAME = Instance.new("TextBox",Mainframe)
  43. BAN = Instance.new("TextButton",Mainframe)
  44. KICK = Instance.new("TextButton",Mainframe)
  45. HEAL = Instance.new("TextButton",Mainframe)
  46. KILL = Instance.new("TextButton",Mainframe)
  47.  
  48. Maingui.Name ="Maingui"
  49. Maingui.Enabled = true
  50.  
  51. Mainframe.Active = true
  52. Mainframe.Name = "Mainframe"
  53. Mainframe.Size = UDim2.new(0.243, 0,0.356, 0)
  54. Mainframe.Position = UDim2.new(0, 0,0.311, 0)
  55.  
  56. reset.Name = "RESET"
  57. reset.Text = reset.Name
  58. reset.Size = UDim2.new(0, 319,0, 50)
  59.  
  60. PLAYERNAME.Text = "PLAYER NAME"
  61. PLAYERNAME.Position = UDim2.new(-0.003, 0,0.037, 0)
  62. PLAYERNAME.Size = UDim2.new(0, 319,0, 50)
  63. PLAYERNAME.Name = "PLAYERNAME"
  64.  
  65. BAN.Name = "BAN"
  66. BAN.Text = BAN.Name
  67. BAN.Position = UDim2.new(0.485, 0,0.074, 0)
  68. BAN.Size = UDim2.new(0, 161,0, 50)
  69.  
  70. KICK.Name = "KICK"
  71. KICK.Text = KICK.Name
  72. KICK.Position = UDim2.new(0, 0,0.073, 0)
  73. KICK.Size = UDim2.new(0, 161,0, 50)
  74.  
  75. KILL.Name = "KILL"
  76. KILL.Text = KILL.Name
  77. KILL.Position = UDim2.new(0.479, 0,0.111, 0)
  78. KILL.Size = UDim2.new(0, 161,0, 50)
  79.  
  80. HEAL.Name = "HEAL"
  81. HEAL.Text = HEAL.Name
  82. HEAL.Position = UDim2.new(-0.001, 0,0.111, 0)
  83. HEAL.Size = UDim2.new(0, 161,0, 50)
  84.  
  85. NLS([==[
  86. local qLocalPlayer = game:GetService("Players").LocalPlayer
  87. local remote = script.Parent:FindFirstChild("RRREEEMMMOOOTTTEEE")
  88. --local remote = workspace.RRREEEMMMOOOTTTEEE
  89. local plrgui = game:GetService("Players").plytalent:FindFirstChild("PlayerGui")
  90.  
  91. local RESET = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("RESET")
  92. local BAN = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("BAN")
  93. local KICK = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("KICK")
  94. local KILL = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("KILL")
  95. local HEAL = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("HEAL")
  96.  
  97. repeat
  98. loop = 1
  99. game:GetService("RunService").Heartbeat:wait()
  100. print(loop)
  101. loop = loop + 1
  102. until plrgui ~= nil
  103. SAME = nil
  104. game:GetService("RunService").Heartbeat:connect(function()
  105. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  106. remote:FireServer(plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text)
  107. SAME = plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text
  108. end
  109. end)
  110.  
  111. RESET.MouseButton1Click:Connect(function()
  112. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  113. remote:FireServer(SAME,RESET.Name)
  114. end
  115. end)
  116. BAN.MouseButton1Click:Connect(function()
  117. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  118. remote:FireServer(SAME,BAN.Name)
  119. end
  120. end)
  121. KICK.MouseButton1Click:Connect(function()
  122. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  123. remote:FireServer(SAME,KICK.Name)
  124. end
  125. end)
  126. KILL.MouseButton1Click:Connect(function()
  127. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  128. remote:FireServer(SAME,KILL.Name)
  129. end
  130. end)
  131. HEAL.MouseButton1Click:Connect(function()
  132. if plrgui:FindFirstChild("Maingui"):FindFirstChild("Mainframe"):FindFirstChild("PLAYERNAME").Text ~= nil then
  133. remote:FireServer(SAME,HEAL.Name)
  134. end
  135. end)
  136. ]==],owner.Character)
  137.  
  138. plrs:FindFirstChild("plytalent").Chatted:connect(function(message)
  139. Mes = message
  140. if Mes then
  141. if string.sub(Mes,1,7) == "parent/" then
  142. script.Parent = string.sub(Mes,8)
  143. end
  144. if string.sub(Mes,1,5) == "heal/" then
  145. print("Heal Command")
  146. if plrs:FindFirstChild(string.sub(Mes,6)) then
  147. target = plrs:FindFirstChild(string.sub(Mes,6))
  148. target.Character:FindFirstChildOfClass("Humanoid").Health = target.Character:FindFirstChildOfClass("Humanoid").MaxHealth
  149. print("Healed")
  150. end
  151. end
  152. if string.sub(Mes,1,5) =="kill/" then
  153. if plrs:FindFirstChild(string.sub(Mes,6)) then
  154. target = plrs:FindFirstChild(string.sub(Mes,6))
  155. target.Character:FindFirstChildOfClass("Humanoid").MaxHealth = 0
  156. target.Character:FindFirstChildOfClass("Humanoid").Health = 0
  157. print("killed")
  158. end
  159. end
  160. if string.sub(Mes,1,7) == "reload/" then
  161. if plrs:FindFirstChild(string.sub(Mes,8)) then
  162. plrs:FindFirstChild(string.sub(Mes,8)):LoadCharacter()
  163. tarreload = true
  164. print("reloaded")
  165. end
  166. end
  167. if string.sub(Mes,1,5) == "kick/" then
  168. if plrs:FindFirstChild(string.sub(Mes,6)) then
  169. plrs:FindFirstChild(string.sub(Mes,6)):Kick("NOTHING")
  170. print("KICKED")
  171. print("KICK WORK")
  172. end
  173. end
  174. if string.sub(Mes,1,4) == "ban/" then
  175. if plrs:FindFirstChild(string.sub(Mes,5)) then
  176. plrs:FindFirstChild(string.sub(Mes,6)):Kick("NOTHING")
  177. print("KICKED")
  178. table.insert(banlist,#banlist+1,string.sub(Mes,5))
  179. end
  180. end
  181. if string.sub(Mes,1,6) == "unban/" then
  182. for i , v in pairs(banlist) do
  183. numb = 0
  184. if string.sub(Mes,7) == banlist[numb]then
  185. table.insert(banlist,numb,"")
  186. end
  187. numb = numb + 1
  188. end
  189. end
  190. end
  191. end)
  192. game:GetService("RunService").Heartbeat:connect(function()
  193. game:GetService("RunService").Heartbeat:wait()
  194. for i ,v in pairs(plrs:GetPlayers()) do
  195. game:GetService("RunService").Heartbeat:wait()
  196. if v.Name == banlist[i] then
  197. print("FOUNDED")
  198. plrs:FindFirstChild(v.Name):Kick("NOTHING")
  199. end
  200. end
  201. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement