Advertisement
Guest User

kick and ban script kohls admin house

a guest
Nov 17th, 2019
11,519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.83 KB | None | 0 0
  1. game.Players:Chat(":h Script made by Timeless, Edited by Puppys9999")
  2. wait(.2)
  3. whitelist = {game.Players.LocalPlayer.Name,""} -- put admin names here
  4. banlist = {} -- put noob names here
  5. deletepath = game.Players.LocalPlayer.Character:FindFirstChild("Delete")
  6. deletepath2 = game.Players.LocalPlayer.Backpack:FindFirstChild("Delete")
  7. slock = false
  8.  
  9. function newtag(plr)
  10. admintag = Instance.new("BoolValue")
  11. admintag.Parent = game.Players[plr]
  12. admintag.Value = true
  13. admintag.Name = "admin"
  14. print("created admin tag for " .. plr)
  15. end
  16.  
  17. newtag(game.Players.LocalPlayer.Name)
  18.  
  19. game.Players.LocalPlayer.ChildRemoved:connect(function(obj)
  20. if obj.Name == "admin" then
  21. newtag(game.Players.LocalPlayer.Name)
  22. end
  23. end)
  24.  
  25. function adminexe(plr,msg)
  26. if plr:FindFirstChild("admin") then
  27.  
  28. local lower = string.lower(msg)
  29. local len = string.len(lower)
  30.  
  31. if string.find(lower,":kick ") then
  32. local name = string.gsub(lower,":kick ","")
  33. local player = nil
  34.  
  35.  
  36.  
  37. names = game.Players:GetChildren()
  38.  
  39. for i,v in pairs(names) do
  40. strlower = string.lower(v.Name)
  41. sub = string.sub(strlower,1,#name)
  42.  
  43. if name == sub then
  44. player = v
  45. if player.Name ~= game.Players.LocalPlayer.Name then
  46. game.Workspace.Delete.delete:FireServer(player)
  47.  
  48. game.Players:Chat(":h "..player.Name.." has been kicked")
  49. end
  50. end
  51. end
  52. end
  53. end
  54.  
  55. if string.find(lower,":ban ") then
  56. local name = string.gsub(lower,":ban ","")
  57. local player = nil
  58. local plrname = nil
  59.  
  60.  
  61.  
  62. names = game.Players:GetChildren()
  63.  
  64. for i,v in pairs(names) do
  65. strlower = string.lower(v.Name)
  66. sub = string.sub(strlower,1,#name)
  67.  
  68. if name == sub then
  69. plrname = v.Name
  70. player = v
  71.  
  72. if player.Name ~= game.Players.LocalPlayer.Name then
  73. table.insert(banlist,(#banlist+1),plrname)
  74. game.Workspace.Delete.delete:FireServer(player)
  75.  
  76. game.Players:Chat(":h "..player.Name.." has been banned")
  77. end
  78. end
  79.  
  80. end
  81.  
  82.  
  83. end
  84. end
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. if lower == ":slock on" then
  97. slock = true
  98. end
  99.  
  100. if lower == ":slock off" then
  101. slock = false
  102. end
  103.  
  104. if string.find(lower,":wl ") then
  105. local name = string.gsub(lower,":wl ","")
  106. local player = nil
  107. local plrname = nil
  108.  
  109. if name == "others" then
  110. for i,v in pairs(game.Players:GetChildren()) do
  111. if (not v:FindFirstChild("admin")) and v.Name ~= game.Players.LocalPlayer.Name then
  112. table.insert(whitelist,(#whitelist+1),v.Name)
  113. newtag(v.Name)
  114. game.Players:Chat(":h others have been whitelisted")
  115.  
  116. v.Chatted:connect(function(msg)
  117. adminexe(v,msg)
  118. end)
  119. end
  120. end
  121. else
  122.  
  123. names = game.Players:GetChildren()
  124.  
  125. for i,v in pairs(names) do
  126. strlower = string.lower(v.Name)
  127. sub = string.sub(strlower,1,#name)
  128.  
  129. if name == sub then
  130. newtag(v.Name)
  131. table.insert(whitelist,(#whitelist+1),v.Name)
  132. game.Players:Chat(":h "..player.Name.." has been whitelisted")
  133.  
  134. v.Chatted:connect(function(msg)
  135. adminexe(v,msg)
  136. end)
  137. end
  138. end
  139. end
  140. end
  141.  
  142. if string.find(lower,":unwl ") then
  143. local name = string.gsub(lower,":unwl ","")
  144. local player = nil
  145. local plrname = nil
  146. local index = nil
  147.  
  148. if name == "others" then
  149. for i,v in pairs(whitelist) do
  150. for i,v in pairs(banlist) do
  151. if v ~= game.Players.LocalPlayer.Name then
  152. table.remove(whitelist,i)
  153.  
  154. game.Players:Chat(":h others have been un-whitelisted")
  155. end
  156. end
  157.  
  158. if game.Workspace:FindFirstChild(v) then
  159.  
  160. if v.Name ~= game.Players.LocalPlayer.Name then
  161. if v:FindFirstChild("admin") then
  162. v.admin:Destroy()
  163. end
  164. end
  165. end
  166. end
  167. else
  168. names = whitelist
  169.  
  170. for i,v in pairs(names) do
  171. strlower = string.lower(v)
  172. sub = string.sub(strlower,1,#name)
  173.  
  174. if name == sub then
  175. table.remove(whitelist,i)
  176.  
  177. game.Players:Chat(":h "..player.Name.." has been un-whitelisted")
  178. end
  179. end
  180. end
  181. end
  182.  
  183. if lower == ":wls" then
  184. for i,v in pairs(whitelist) do
  185. print("Player #" .. i .. " Player: " .. v)
  186. end
  187. end
  188.  
  189.  
  190.  
  191.  
  192.  
  193. if string.find(lower,":cmds") then
  194. print("----------------COMMANDS-------------------")
  195. print("Selection options: Full Player Name, Abrreviated, Others")
  196. print('Example: ":ban others"')
  197. print()
  198. print(":cmds")
  199. print(":ban")
  200. print(":bans -outputs to console (F9)")
  201. print(":kick")
  202. print(":wl")
  203. print(":unwl")
  204. print(":wls -outputs to console (F9)")
  205.  
  206. print()
  207. print('Executing "kick others/etc." wont kick those whitelisted, but if you single them out it will')
  208. print('If a user is whitelisted he/she will not be able to see commands on their screen with :cmds,')
  209. print('and the same goes for :bans and :wls, since the game is filtering enabled, however they will')
  210. print('be able to use commands if whitelisted')
  211. print('You can not be unwhitelisted or banned / kicked')
  212. print("-------------------------------------------")
  213.  
  214.  
  215. end
  216. end
  217. end
  218.  
  219. game.Players.LocalPlayer.Chatted:connect(function(msg)
  220. adminexe(game.Players.LocalPlayer,msg)
  221. end)
  222.  
  223. if deletepath then
  224. game.Players.LocalPlayer.Character.Delete.CanBeDropped = true
  225.  
  226. drop = Instance.new("BillboardGui")
  227. drop.Parent = game.Players.LocalPlayer.PlayerGui
  228.  
  229. droplbl = Instance.new("TextLabel")
  230. droplbl.Parent = drop
  231. droplbl.Text = "Drop the delete tool to initialize commands"
  232. droplbl.BackgroundTransparency = 1
  233. droplbl.TextColor3 = Color3.new(200,0,0)
  234. droplbl.TextScaled = true
  235. droplbl.Size = UDim2.new(0,150,0,30)
  236. droplbl.Position = UDim2.new(0,400,0,400)
  237.  
  238. wait(2)
  239.  
  240. drop:Destroy()
  241. end
  242.  
  243. if deletepath2 then
  244. game.Players.LocalPlayer.Backpack.Delete.CanBeDropped = true
  245.  
  246. drop = Instance.new("BillboardGui")
  247. drop.Parent = game.Players.LocalPlayer.PlayerGui
  248.  
  249. droplbl = Instance.new("TextLabel")
  250. droplbl.Parent = drop
  251. droplbl.Text = "Drop the delete tool to initialize commands"
  252. droplbl.BackgroundTransparency = 1
  253. droplbl.TextColor3 = Color3.new(200,0,0)
  254. droplbl.TextScaled = true
  255. droplbl.Size = UDim2.new(0,150,0,30)
  256. droplbl.Position = UDim2.new(0,400,0,400)
  257.  
  258. wait(2)
  259.  
  260. drop:Destroy()
  261. end
  262.  
  263. game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(tool)
  264. if tool.Name == "Delete" then
  265. wait(.1)
  266. tool.CanBeDropped = true
  267.  
  268. drop = Instance.new("BillboardGui")
  269. drop.Parent = game.Players.LocalPlayer.PlayerGui
  270.  
  271. droplbl = Instance.new("TextLabel")
  272. droplbl.Text = "Drop the delete tool to initialize commands"
  273. droplbl.BackgroundTransparency = 1
  274. droplbl.Parent = drop
  275. droplbl.TextColor3 = Color3.new(200,0,0)
  276. droplbl.TextScaled = true
  277. droplbl.Size = UDim2.new(0,150,0,30)
  278. droplbl.Position = UDim2.new(0,400,0,400)
  279.  
  280. wait(2)
  281.  
  282. drop:Destroy()
  283. end
  284. end)
  285.  
  286. function start(plr)
  287.  
  288. local found = false
  289. local banned = false
  290.  
  291. for i=1,#whitelist do
  292. if plr.Name == (whitelist[i]) then
  293. found = true
  294. end
  295. end
  296.  
  297. for i=1,#banlist do
  298. if plr.Name == banlist[i] then
  299. banned = true
  300. end
  301.  
  302. if banned == true then
  303. game.Workspace.Delete.delete:FireServer(plr)
  304. end
  305. end
  306.  
  307. if found == true then
  308. newtag(plr.Name)
  309. plr.Chatted:connect(function(msg)
  310. adminexe(plr,msg)
  311. end)
  312. end
  313. end
  314. game.Players.PlayerAdded:connect(function(plr)
  315. start(plr)
  316. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement