Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local isAdmin = {
- ["thomasthong"] = true,
- ["X8311"] = true,
- [""] = true,
- }
- local isBanned = {
- ["JumbledMiguel813"] = true,
- ["AceOfEternal123"] = true,
- ["nickales1757"] = true,
- ["airsamer"] = true,
- ["name1"] = true,
- ["name1"] = true,
- ["name1"] = true,
- ["name1"] = true,
- }
- local Modifier = "/"
- --- ACTUAL STUFF --
- script.Name = "Reaper_Admin"
- coroutine.yield()
- workspace.Reaper_Admin.Parent = nil
- local me = game:GetService("Players")[getfenv()["owner"].Name]
- local char = workspace:findFirstChild(me.Name)
- -- PLAYER CHATTED --
- function playerChatted(player, msg)
- if isAdmin[player.Name] then
- local Command = "fullclean" .. Modifier
- if string.find(msg:lower(), Command:lower()) ~= nil then
- upInFlames(game)
- resetStats()
- for _,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- wait(0.1)
- end
- end
- local Command = "kick" .. Modifier
- if string.lower(msg:sub(1,Command:len())) == Command then
- local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
- for i,v in pairs(players) do
- if isAdmin[v.Name] then
- table.remove(players, i)
- end
- end
- removeFromGame(players)
- end
- local Command = "kill" .. Modifier
- if string.lower(msg:sub(1,Command:len())) == Command then
- local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
- for _,target in pairs(players) do
- target.Character:BreakJoints()
- end
- end
- local Command = "ban" .. Modifier
- if string.lower(msg:sub(1,Command:len())) == Command then
- local players, mod = returnPlayers(msg:sub(Command:len() + 1):lower(), player)
- for i,v in pairs(players) do
- if isAdmin[v.Name] then
- table.remove(players, i)
- warn("Cannot ban " .. v.Name .. ", he's an admin :)")
- else
- isBanned[v.Name] = true
- warn(v.Name .. " is now banned")
- end
- end
- removeFromGame(players)
- end
- end
- end
- function removeFromGame(inputPlayerTable)
- local tempTable = {}
- for _,player in pairs(inputPlayerTable) do
- if not isAdmin[player.Name] then
- table.insert(tempTable, player)
- print("|Reaper_Admin|: Executing ['" .. player.Name .. "']")
- else
- print("|Reaper_Admin|: Can't Execute ['" .. player.Name .. "'] |: Admins Can't Be Executed")
- end
- end
- local tempcode = game:GetService("TeleportService"):ReserveServer(game.PlaceId)
- game:GetService("TeleportService"):TeleportToPrivateServer(game.PlaceId,tempcode,tempTable)
- end
- function returnPlayers(name, player)
- local exportingPlayers = {}
- local actionPlayers = {}
- local divider = ","
- local currentName = ""
- local mod = ""
- local checkModLocation = name:len()
- name = name:lower()
- if string.find(name, "-") ~= nil then
- checkModLocation = string.find(name, "-")
- mod = name:sub(checkModLocation + 1)
- name = name:sub(1,(checkModLocation-1))
- end
- if string.find(name, "nonadmin") then
- for _,target in pairs(game:GetService("Players"):GetPlayers()) do
- if not isAdmin[target.Name] then
- table.insert(exportingPlayers, target)
- end
- end
- elseif string.find(name, "admin") then
- for _,target in pairs(game:GetService("Players"):GetPlayers()) do
- if isAdmin[target.Name] then
- table.insert(exportingPlayers, target)
- end
- end
- elseif string.find(name, "other") then
- for _,target in pairs(game:GetService("Players"):GetPlayers()) do
- if target.Name ~= player.Name then
- table.insert(exportingPlayers, target)
- end
- end
- elseif string.find(name, "all") then
- for _,target in pairs(game:GetService("Players"):GetPlayers()) do
- table.insert(exportingPlayers, target)
- end
- else
- for i = 1, string.len(name)+1 do
- if name:sub(i,i) ~= divider and name:sub(i,i) ~= " " and name:sub(i,i) ~= "-" then
- currentName = currentName .. name:sub(i,i)
- else
- if currentName ~= "" then
- table.insert(actionPlayers, currentName:lower())
- currentName = ""
- end
- end
- if i == string.len(name)+1 then
- if currentName ~= "" then
- table.insert(actionPlayers, currentName:lower())
- currentName = ""
- end
- end
- end
- for _,target in pairs(game:GetService("Players"):GetPlayers()) do
- for i,v in pairs(actionPlayers) do
- if v == "me" then
- table.insert(exportingPlayers, player)
- elseif string.find(target.Name:lower(), v) ~= nil then
- table.insert(exportingPlayers, target)
- end
- end
- end
- end
- if name == "" or name == " " then
- exportingPlayers = game:GetService("Players"):GetPlayers()
- end
- --print(mod)
- return exportingPlayers, mod
- end
- function resetStats() --a lot of stuff
- workspace.Terrain:Clear()
- workspace.Gravity = 196.2
- workspace.Name = "Workspace"
- game:GetService("Lighting").Name = "Lighting"
- game:GetService("Lighting").TimeOfDay = 14
- game:GetService("Lighting").Ambient = Color3.new(0,0,0)
- game:GetService("Lighting").Brightness = 1
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(0,0,0)
- game:GetService("Lighting").ColorShift_Top = Color3.new(0,0,0)
- game:GetService("Lighting").OutdoorAmbient = Color3.fromRGB(127, 127, 127)
- game:GetService("Lighting").GeographicLatitude = 41.733
- game:GetService("Lighting").FogStart = 0
- game:GetService("Lighting").FogEnd = 100000
- for i,v in pairs(game:GetService("Lighting"):GetChildren()) do
- pcall(function()
- v:Remove()
- end)
- end
- game:GetService("Players").Name = "Players"
- local b = Instance.new("Part", workspace)
- b.Name = "Base"
- b.Anchored = true
- b.Size = Vector3.new(700, -0.5, 700)
- b.CFrame = CFrame.new(0, 0.7, 0)
- b.Material = "Grass"
- b.BrickColor = BrickColor.new("Bright green")
- end
- function upInFlames(location)
- for _,place in pairs(location:GetChildren()) do
- pcall(function()
- if place ~= game:GetService("StarterPlayer") then
- pcall(function()
- place:Remove()
- end)
- pcall(function()
- upInFlames(place)
- end)
- end
- end)
- end
- end
- -- INSTANT STUFF --
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v.Chatted:connect(function(msg)
- playerChatted(v, msg)
- end)
- if isBanned[v.Name] then
- removeFromGame({v})
- warn(v.Name .. " is on the banlist and has been removed")
- end
- end
- -- ALWAYS STUFF
- game:GetService("Players").PlayerAdded:connect(function(player)
- player.Chatted:connect(function(msg)
- playerChatted(player, msg)
- end)
- wait(0.5)
- if isBanned[player.Name] then
- warn(player.Name .. " is not allowed to join: BANNED")
- removeFromGame({player})
- end
- end)
- game:GetService("RunService").Stepped:connect(function()
- pcall(function()
- local char = workspace:findFirstChild(me.Name)
- if char:findFirstChild("SethOrb") then
- pcall(function()
- char:findFirstChild("SethOrb").bodypos.Position = char.Torso.Position + Vector3.new(2,3,2)
- end)
- else
- createOrb()
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement