Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Admin Script")
- local adminList = {"seadoke20", "Telamon", "Builderman", "tarabyte", "Jeditkacheff", "HotThoth", "stickmasterluke", "ROBLOX", "Player", "QuantumSama"}
- adminList["Seadoke20"] = true
- adminList["Telamon"] = true
- adminList["stickmasterluke"] = true
- adminList["tarabyte"] = true
- adminList["ROBLOX"] = true
- local banList = {}
- local commands = {"ban", "kick", "noobs"}
- function rockOn(msg, player)
- if msg and player then
- print(msg)
- local delimiter = string.find(msg, "/")
- if delimiter then
- local command = string.sub(msg, 1, delimiter - 1)
- if game.Workspace:FindFirstChild("Debug") then
- game.Workspace.Debug.Value = command
- end
- local stringLength = string.len(msg)
- if command == "kick" then
- local playerName = string.sub(msg, delimiter + 1, stringLength)
- if game.Workspace:FindFirstChild("Debug") then
- game.Workspace.Debug.Value = playerName
- end
- local playerNameLength = string.len(playerName)
- local players = game.Players:GetChildren()
- for i = 1, #players do
- if string.lower(string.sub(players[i].Name, 1, playerNameLength)) == playerName and players[i] ~= player then
- players[i]:Remove()
- end
- end
- elseif command == "ban" then
- local playerName = string.sub(msg, delimiter + 1, stringLength)
- local playerNameLength = string.len(playerName)
- local players = game.Players:GetChildren()
- for i = 1, #players do
- if string.lower(string.sub(players[i].Name, 1, playerNameLength)) == playerName then
- table.insert(banList, player.Name)
- players[i]:Remove()
- end
- end
- elseif command == "noobs" then
- local players = game.Players:GetChildren()
- for i = 1, #players do
- -- This is tricky
- if players[i] and players[i]:FindFirstChild("leaderstats") then
- local stats = players[i].leaderstats
- if stats:FindFirstChild("Score") then
- if stats.Score.Value == 0 and not adminList[players[i].Name] then
- players[i]:Remove()
- end
- end
- end
- end
- end
- end
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- print(player)
- for i = 1, #banList do
- if string.lower(banList[i]) == string.lower(player.Name) then
- player:Remove()
- end
- end
- for i = 1, #adminList do
- if string.lower(adminList[i]) == string.lower(player.Name) then
- print("Found Admin")
- player.Chatted:connect(function(msg) rockOn(msg, player) end)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement