Advertisement
gjgj

Untitled

Jun 12th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.70 KB | None | 0 0
  1. admins = { "ggggjjjjgj" }
  2. banned = { }
  3. players = { }
  4. loopkilled = { }
  5. unloopkilled = { }
  6.  
  7. function si(gui, x,xx,y,yy)
  8. gui.Size = UDim2.new(x,xx,y,yy)
  9. end
  10.  
  11. function po(gui,x,xx,y,yy)
  12. gui.Position = UDim2.new(x,xx,y,yy)
  13. end
  14.  
  15. function Color(r, g, b)
  16. return Color3.new(r/255, g/255, b/255)
  17. end
  18.  
  19. function lpk(pla)
  20. for i,z in pairs(loopkilled) do
  21. while true do
  22. wait(0.01)
  23. if pla.Name == z then
  24. if pla.lpk.Value == true then
  25. pla.Character:BreakJoints()
  26. end
  27. end
  28. end
  29. end
  30. end
  31.  
  32. function findPlayer(name, spea)----Sweet, most admins use person299's. I made this all myself!!!
  33. if string.lower(name) == "all" then
  34. local chars = { }
  35. local c = game.Players:GetChildren()
  36. for i =1,#c do
  37. if c[i].className == "Player" then
  38. table.insert(chars,c[i])
  39. end end
  40. return chars
  41. elseif string.lower(name) == "others" then
  42. local others = { }
  43. local c = game.Players:GetChildren()
  44. for i =1,#c do
  45. if c[i].className == "Player" then
  46. if c[i].Name ~= spea.Name then
  47. table.insert(others,c[i])
  48. end end end
  49. return others
  50. elseif string.lower(name) == "me" then
  51. local me = { }
  52. local c = game.Players:GetChildren()
  53. for i =1,#c do
  54. if c[i].className == "Player" then
  55. if c[i].Name == ""..spea.Name.."" then
  56. table.insert(me,c[i])
  57. end end end
  58. return me
  59. else
  60. local chars = { }
  61. local commalist = { }
  62. local ssn = 0
  63. local lownum = 1
  64. local highestnum = 1
  65. local foundone = false
  66. while true do
  67. ssn = ssn + 1
  68. if string.sub(name,ssn,ssn) == "" then
  69. table.insert(commalist,lownum)
  70. table.insert(commalist,ssn - 1)
  71. highestnum = ssn - 1
  72. break
  73. end
  74. if string.sub(name,ssn,ssn) == "," then
  75. foundone = true
  76. table.insert(commalist,lownum)
  77. table.insert(commalist,ssn)
  78. lownum = ssn + 1
  79. end end
  80. if foundone == true then
  81. for ack=1,#commalist,2 do
  82. local cnum = 0
  83. local char = nil
  84. local c = game.Players:GetChildren()
  85. for i =1,#c do
  86. if c[i].className == "Player" then
  87. if string.find(string.lower(c[i].Name),string.sub(string.lower(name),commalist[ack],commalist[ack + 1] - 1)) == 1 then
  88. char = c[i]
  89. cnum = cnum + 1
  90. end end end
  91. if cnum == 1 then
  92. table.insert(chars,char)
  93. end end
  94. if #chars ~= 0 then
  95. return chars
  96. else
  97. return 0
  98. end
  99. else
  100. local cnum = 0
  101. local char = nil
  102. local c = game.Players:GetChildren()
  103. for i =1,#c do
  104. if c[i].className == "Player" then
  105. if string.find(string.lower(c[i].Name),string.lower(name)) == 1 then
  106. char = {c[i]}
  107. cnum = cnum + 1
  108. end end end
  109. if cnum == 1 then
  110. return char
  111. elseif cnum == 0 then
  112. return 0
  113. elseif cnum > 1 then
  114. return 0
  115. end end end end
  116. function pcmds(pl)
  117. kill = Instance.new("TextButton", bg)
  118. kill.Name = "kill"
  119. kill.Size = UDim2.new(1,0 , 0,20)
  120. kill.Text = "Kill"
  121. kill.BackgroundColor = BrickColor.new(255,255,204)
  122. kill.MouseButton1Down:connect(function()
  123. if pl.Character.Humanoid.MaxHealth ~= "0" then
  124. pl.Character.Humanoid.Health = "0"
  125. else
  126. pl.Character:BreakJoints()
  127. end
  128. end)
  129. kick = Instance.new("TextButton", bg)
  130. kick.Position = UDim2.new(0,0,0,20)
  131. kick.Name = "Kick"
  132. kick.Size = UDim2.new(1,0 , 0,20)
  133. kick.Text = "Kick"
  134. kick.BackgroundColor = BrickColor.new(255,255,204)
  135. kick.MouseButton1Down:connect(function()
  136. pl:Remove()
  137. end)
  138. ban = Instance.new("TextButton", bg)
  139. ban.Position = UDim2.new(0,0,0,40)
  140. ban.Name = "Ban"
  141. ban.Size = UDim2.new(1,0 , 0,20)
  142. ban.Text = "Ban"
  143. ban.BackgroundColor = BrickColor.new(255,255,204)
  144. ban.MouseButton1Down:connect(function()
  145. pl:Remove()
  146. table.insert(banned, pl.Name)
  147. end)
  148. ff = Instance.new("TextButton", bg)
  149. ff.Position = UDim2.new(0,0,0,60)
  150. ff.Name = "ff"
  151. ff.Size = UDim2.new(1,0 , 0,20)
  152. ff.Text = "FF"
  153. ff.BackgroundColor = BrickColor.new(255,255,204)
  154. ff.MouseButton1Down:connect(function()
  155. Instance.new("ForceField", pl.Character)
  156. end)
  157. unff = Instance.new("TextButton", bg)
  158. unff.Position = UDim2.new(0,0,0,80)
  159. unff.Name = "unff"
  160. unff.Size = UDim2.new(1,0 , 0,20)
  161. unff.Text = "UnFF"
  162. unff.BackgroundColor = BrickColor.new(255,255,204)
  163. unff.MouseButton1Down:connect(function()
  164. local dc = pl.Character:GetChildren()
  165. for i = 1,#dc do
  166. if dc[i].ClassName == "ForceField" then
  167. dc[i]:Remove()
  168. end
  169. end
  170. end)
  171. lpkk = Instance.new("TextButton", bg)
  172. lpkk.Position = UDim2.new(0,0,0,100)
  173. lpkk.Name = "loopkill"
  174. lpkk.Size = UDim2.new(1,0 , 0,20)
  175. lpkk.Text = "Loopkill"
  176. lpkk.BackgroundColor = BrickColor.new(255,255,204)
  177. lpkk.MouseButton1Down:connect(function()
  178. table.insert(loopkilled, pl.Name)
  179. if pl:findFirstChild("lpk") then
  180. pl.lpk.Value = true
  181. else
  182. lp = Instance.new("BoolValue")
  183. lp.Parent = p
  184. lp.Name = "lpk"
  185. lp.Value = true
  186. end
  187. lpk(pl)
  188. end)
  189. unlpkk = Instance.new("TextButton", bg)
  190. unlpkk.Position = UDim2.new(0,0,0,120)
  191. unlpkk.Name = "unloopkill"
  192. unlpkk.Size = UDim2.new(1,0 , 0,20)
  193. unlpkk.Text = "UnLoopKill"
  194. unlpkk.BackgroundColor = BrickColor.new(255,255,204)
  195. unlpkk.MouseButton1Down:connect(function()
  196. table.insert(unloopkilled, pl.Name)
  197. pl.lpk.Value = false
  198. end)
  199. end
  200.  
  201. function plr()
  202. plc.Visible = false
  203. g = -1
  204. players = game.Players:GetChildren()
  205. for i=1,#players do
  206. new = Instance.new("TextButton", bg)
  207. new.Name = ""..players[i].Name..""
  208. new.Position = UDim2.new(0,0,0,--[[i * 75]]g * 20 + 40)
  209. g = g + 1
  210. new.Size = UDim2.new(1,0 , 0,20)
  211. new.Text = players[i].Name
  212. new.BackgroundColor = BrickColor.new(255,255,204)
  213. function clickplay()
  214. c = bg:GetChildren()
  215. b = game.Players:GetChildren()
  216. for i = 1, #c do
  217. for i = 1, #b do
  218. if b[i].Name == c[i] then
  219. c[i]:Remove()
  220. end
  221. end
  222. end
  223. new:Remove()
  224. pcmds(players[i])
  225. end
  226. new.MouseButton1Down:connect(clickplay)
  227. end
  228. end
  229.  
  230. function makeadmin()
  231. v = game.Players:GetChildren()
  232. for i = 1, #v do
  233. for z,b in pairs(admins) do
  234. if v[i].Name == b then
  235. ma = Instance.new("ScreenGui")
  236. ma.Name = "AdminGui"
  237. ma.Parent = v[i].PlayerGui
  238. bg = Instance.new("Frame", ma)
  239. si(bg,0.5,0,0.5,0)
  240. bg.Style = "RobloxRound"
  241. plc = Instance.new("TextButton", bg)
  242. plc.Name = "Player Commands"
  243. plc.Text = "Player commands"
  244. plc.TextColor3 = Color(255,255,255)
  245. plc.Style = "RobloxButtonDefault"
  246. si(plc,1,0,0,20)
  247. function plrC()
  248. plr()
  249. end
  250. plc.MouseButton1Down:connect(plrC)
  251. function talk(msg,speak)
  252. if string.sub(string.lower(msg),1,5) == "kill/" then
  253. local player = findPlayer(string.sub(msg,6),v[i])
  254. if player ~= 0 then
  255. for i = 1,#player do
  256. if player[i].Character ~= nil then
  257. local human = player[i].Character:FindFirstChild("Humanoid")
  258. if human ~= nil then
  259. human.Health = 0
  260. end end end end end
  261. end
  262. v[i].Chatted:connect(talk)
  263. end
  264. end
  265. end
  266. end
  267. makeadmin()
  268.  
  269. function onEnter(p)
  270. for i,v in pairs(banned) do
  271. if p.Name == v then
  272. p:Remove()
  273. end
  274. end
  275. for i,x in pairs(admins) do
  276. if p.Name == x then
  277.  
  278. end
  279. end
  280. for i,b in pairs(loopkilled) do
  281. if p.Name == b then
  282. lpk(p)
  283. end
  284. end
  285. print("Someone entered")
  286. table.insert(players,p.Name)
  287. lp = Instance.new("BoolValue")
  288. lp.Parent = p
  289. lp.Name = "lpk"
  290. lp.Value = false
  291. end
  292. game.Players.ChildAdded:connect(onEnter)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement