Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players:Chat(":h Script made by Timeless, Edited by Puppys9999")
- wait(.2)
- whitelist = {game.Players.LocalPlayer.Name,""} -- put admin names here
- banlist = {} -- put noob names here
- deletepath = game.Players.LocalPlayer.Character:FindFirstChild("Delete")
- deletepath2 = game.Players.LocalPlayer.Backpack:FindFirstChild("Delete")
- slock = false
- function newtag(plr)
- admintag = Instance.new("BoolValue")
- admintag.Parent = game.Players[plr]
- admintag.Value = true
- admintag.Name = "admin"
- print("created admin tag for " .. plr)
- end
- newtag(game.Players.LocalPlayer.Name)
- game.Players.LocalPlayer.ChildRemoved:connect(function(obj)
- if obj.Name == "admin" then
- newtag(game.Players.LocalPlayer.Name)
- end
- end)
- function adminexe(plr,msg)
- if plr:FindFirstChild("admin") then
- local lower = string.lower(msg)
- local len = string.len(lower)
- if string.find(lower,":kick ") then
- local name = string.gsub(lower,":kick ","")
- local player = nil
- names = game.Players:GetChildren()
- for i,v in pairs(names) do
- strlower = string.lower(v.Name)
- sub = string.sub(strlower,1,#name)
- if name == sub then
- player = v
- if player.Name ~= game.Players.LocalPlayer.Name then
- game.Workspace.Delete.delete:FireServer(player)
- game.Players:Chat(":h "..player.Name.." has been kicked")
- end
- end
- end
- end
- end
- if string.find(lower,":ban ") then
- local name = string.gsub(lower,":ban ","")
- local player = nil
- local plrname = nil
- names = game.Players:GetChildren()
- for i,v in pairs(names) do
- strlower = string.lower(v.Name)
- sub = string.sub(strlower,1,#name)
- if name == sub then
- plrname = v.Name
- player = v
- if player.Name ~= game.Players.LocalPlayer.Name then
- table.insert(banlist,(#banlist+1),plrname)
- game.Workspace.Delete.delete:FireServer(player)
- game.Players:Chat(":h "..player.Name.." has been banned")
- end
- end
- end
- end
- end
- if lower == ":slock on" then
- slock = true
- end
- if lower == ":slock off" then
- slock = false
- end
- if string.find(lower,":wl ") then
- local name = string.gsub(lower,":wl ","")
- local player = nil
- local plrname = nil
- if name == "others" then
- for i,v in pairs(game.Players:GetChildren()) do
- if (not v:FindFirstChild("admin")) and v.Name ~= game.Players.LocalPlayer.Name then
- table.insert(whitelist,(#whitelist+1),v.Name)
- newtag(v.Name)
- game.Players:Chat(":h others have been whitelisted")
- v.Chatted:connect(function(msg)
- adminexe(v,msg)
- end)
- end
- end
- else
- names = game.Players:GetChildren()
- for i,v in pairs(names) do
- strlower = string.lower(v.Name)
- sub = string.sub(strlower,1,#name)
- if name == sub then
- newtag(v.Name)
- table.insert(whitelist,(#whitelist+1),v.Name)
- game.Players:Chat(":h "..player.Name.." has been whitelisted")
- v.Chatted:connect(function(msg)
- adminexe(v,msg)
- end)
- end
- end
- end
- end
- if string.find(lower,":unwl ") then
- local name = string.gsub(lower,":unwl ","")
- local player = nil
- local plrname = nil
- local index = nil
- if name == "others" then
- for i,v in pairs(whitelist) do
- for i,v in pairs(banlist) do
- if v ~= game.Players.LocalPlayer.Name then
- table.remove(whitelist,i)
- game.Players:Chat(":h others have been un-whitelisted")
- end
- end
- if game.Workspace:FindFirstChild(v) then
- if v.Name ~= game.Players.LocalPlayer.Name then
- if v:FindFirstChild("admin") then
- v.admin:Destroy()
- end
- end
- end
- end
- else
- names = whitelist
- for i,v in pairs(names) do
- strlower = string.lower(v)
- sub = string.sub(strlower,1,#name)
- if name == sub then
- table.remove(whitelist,i)
- game.Players:Chat(":h "..player.Name.." has been un-whitelisted")
- end
- end
- end
- end
- if lower == ":wls" then
- for i,v in pairs(whitelist) do
- print("Player #" .. i .. " Player: " .. v)
- end
- end
- if string.find(lower,":cmds") then
- print("----------------COMMANDS-------------------")
- print("Selection options: Full Player Name, Abrreviated, Others")
- print('Example: ":ban others"')
- print()
- print(":cmds")
- print(":ban")
- print(":bans -outputs to console (F9)")
- print(":kick")
- print(":wl")
- print(":unwl")
- print(":wls -outputs to console (F9)")
- print()
- print('Executing "kick others/etc." wont kick those whitelisted, but if you single them out it will')
- print('If a user is whitelisted he/she will not be able to see commands on their screen with :cmds,')
- print('and the same goes for :bans and :wls, since the game is filtering enabled, however they will')
- print('be able to use commands if whitelisted')
- print('You can not be unwhitelisted or banned / kicked')
- print("-------------------------------------------")
- end
- end
- end
- game.Players.LocalPlayer.Chatted:connect(function(msg)
- adminexe(game.Players.LocalPlayer,msg)
- end)
- if deletepath then
- game.Players.LocalPlayer.Character.Delete.CanBeDropped = true
- drop = Instance.new("BillboardGui")
- drop.Parent = game.Players.LocalPlayer.PlayerGui
- droplbl = Instance.new("TextLabel")
- droplbl.Parent = drop
- droplbl.Text = "Drop the delete tool to initialize commands"
- droplbl.BackgroundTransparency = 1
- droplbl.TextColor3 = Color3.new(200,0,0)
- droplbl.TextScaled = true
- droplbl.Size = UDim2.new(0,150,0,30)
- droplbl.Position = UDim2.new(0,400,0,400)
- wait(2)
- drop:Destroy()
- end
- if deletepath2 then
- game.Players.LocalPlayer.Backpack.Delete.CanBeDropped = true
- drop = Instance.new("BillboardGui")
- drop.Parent = game.Players.LocalPlayer.PlayerGui
- droplbl = Instance.new("TextLabel")
- droplbl.Parent = drop
- droplbl.Text = "Drop the delete tool to initialize commands"
- droplbl.BackgroundTransparency = 1
- droplbl.TextColor3 = Color3.new(200,0,0)
- droplbl.TextScaled = true
- droplbl.Size = UDim2.new(0,150,0,30)
- droplbl.Position = UDim2.new(0,400,0,400)
- wait(2)
- drop:Destroy()
- end
- game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(tool)
- if tool.Name == "Delete" then
- wait(.1)
- tool.CanBeDropped = true
- drop = Instance.new("BillboardGui")
- drop.Parent = game.Players.LocalPlayer.PlayerGui
- droplbl = Instance.new("TextLabel")
- droplbl.Text = "Drop the delete tool to initialize commands"
- droplbl.BackgroundTransparency = 1
- droplbl.Parent = drop
- droplbl.TextColor3 = Color3.new(200,0,0)
- droplbl.TextScaled = true
- droplbl.Size = UDim2.new(0,150,0,30)
- droplbl.Position = UDim2.new(0,400,0,400)
- wait(2)
- drop:Destroy()
- end
- end)
- function start(plr)
- local found = false
- local banned = false
- for i=1,#whitelist do
- if plr.Name == (whitelist[i]) then
- found = true
- end
- end
- for i=1,#banlist do
- if plr.Name == banlist[i] then
- banned = true
- end
- if banned == true then
- game.Workspace.Delete.delete:FireServer(plr)
- end
- end
- if found == true then
- newtag(plr.Name)
- plr.Chatted:connect(function(msg)
- adminexe(plr,msg)
- end)
- end
- end
- game.Players.PlayerAdded:connect(function(plr)
- start(plr)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement