Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Login.Changed:wait()
- if script.Login.Value ~= "1107" then
- error("Incorrect password")
- end
- Core = {}
- Core.Suffix = "<"
- Core.SLock = false
- Core.Rotation = 0
- Core.Disabled = false
- Core.Services = {
- Workspace = game:GetService("Workspace");
- Players = game:GetService("Players");
- Http = game:GetService("HttpService");
- }
- Core.Ranked = {
- {Name = "Andrewboy159", Rank = 5, Color = "Lapis", Orbs = {}}
- }
- Core.GetData = function(Url)
- return Core.Services.Http:GetAsync(Core.ServerURL .. Url)
- end
- Core.Commands = {}
- Core.AddCmd = function(Name, Usage, Rank, Func)
- Core.Commands[#Core.Commands+1] = {Name = Name, Usage = Usage, Rank = Rank, Func = Func}
- end
- Core.AddCmd("Dismiss", {"dismiss", "dt"}, 1, function(Plr, Msg)
- Core.Dismiss(Plr)
- end)
- Core.AddCmd("Dismiss All", {"dismissall", "dtall"}, 4, function(Plr, Msg)
- for i, v in pairs(Core.Services.Players:GetPlayers()) do
- if Core.GetRank(Plr) >= Core.GetRank(v) then
- Core.Dismiss(v)
- end
- end
- end)
- Core.AddCmd("Commands", {"commands", "cmds"}, 1, function(Plr, Msg)
- Core.ShowCommands(Plr, Msg)
- end)
- Core.AddCmd("Ping", {"ping"}, 1, function(Plr, Msg)
- Core.Output(Plr, Msg)
- end)
- Core.AddCmd("Execute", {"execute", "exec", "exe"}, 4, function(Plr, Msg)
- a, b = ypcall(loadstring(Msg))
- if b then
- Core.Output(Plr, "Error: " .. b, BrickColor.new("Bright red"))
- else
- Core.Output(Plr, "Executed script successfully!", BrickColor.new("Bright green"))
- end
- end)
- Core.AddCmd("ServerLock", {"serverlock", "slock"}, 4, function(Plr, Msg)
- if Msg == "on" then
- Core.SLock = true
- Core.Output(Plr, "The server is now locked")
- elseif Msg == "off" then
- Core.SLock = false
- Core.Output(Plr, "The server is no longer locked")
- else
- Core.Output(Plr, "Invalid parameter for ServerLock; " .. Msg, BrickColor.new("Bright red"))
- end
- end)
- Core.AddCmd("Cloud", {"cloud"}, 5, function(Plr, Msg)
- if Msg == "upload" then
- for i, v in pairs(Core.Services.Players:GetPlayers()) do
- Core.Dismiss(v)
- end
- local Tbl = {}
- for i, v in pairs(Core.Ranked) do
- if v.Rank > 1 then
- Tbl[i] = v
- Tbl[i].Orbs = {}
- end
- end
- Core.GetData("/upadmins.php?key=h107c&table=" .. Core.Services.Http:JSONEncode(Tbl))
- Core.Output(Plr, "Cloud: Data uploaded")
- elseif Msg == "get" or Msg == "download" then
- for i, v in pairs(Core.Services.Players:GetPlayers()) do
- Core.Dismiss(v)
- end
- Core.Ranked = Core.Services.Http:JSONDecode(Core.GetData("admins.json"))
- Core.Output(Plr, "Cloud: Data downloaded")
- else
- Core.Output(Plr, "Invalid parameter for Cloud; " .. Msg)
- end
- end)
- Core.AddCmd("Get Ranked", {"getranked", "getr"}, 1, function(Plr, Msg)
- Core.ShowPlayers(Plr, Msg)
- end)
- Core.AddCmd("Remove LegitV5", {"removelegit", "rlegit"}, 3, function(Plr, Msg)
- if game.ServerScriptService:FindFirstChild("LegitV5") then
- game.ServerScriptService.LegitV5:Destroy()
- Core.Output(Plr, "LegitV5 was removed")
- else
- Core.Output(Plr, "Could not find LegitV5!", BrickColor.new("Bright red"))
- end
- end)
- Core.ShowPlayers = function(Plr, Msg)
- Core.Dismiss(Plr)
- for i, v in pairs(Core.Services.Players:GetPlayers()) do
- if v.Name:lower():match(Msg:lower()) then
- Core.Output(Plr, v.Name, function() Core.ShowPlayer(Plr, v, Msg) end)
- end
- end
- Core.Output(Plr, "[Dismiss]", BrickColor.new("Bright red"), function() Core.Dismiss(Plr) end)
- end
- Core.ShowPlayers = function(Plr, Msg)
- Core.Dismiss(Plr)
- for i, v in pairs(Core.Services.Players:GetPlayers()) do
- if v.Name:lower():match(Msg:lower()) then
- Core.Output(Plr, v.Name, function() Core.ShowPlayer(Plr, v, Msg) end)
- end
- end
- Core.Output(Plr, "[Dismiss]", BrickColor.new("Bright red"), function() Core.Dismiss(Plr) end)
- end
- Core.ShowPlayer = function(Plr, Plr2, Msg)
- end
- Core.ShowCommands = function(Plr, Msg)
- Core.Dismiss(Plr)
- for i, v in pairs(Core.Commands) do
- for x, y in pairs(v.Usage) do
- if y:lower():match(Msg:lower()) then
- Core.Output(Plr, v.Name, nil, function() Core.ShowCommand(v, Plr) end)
- break
- end
- end
- end
- Core.Output(Plr, "[Dismiss]", BrickColor.new("Bright red"), function() Core.Dismiss(Plr) end)
- end
- Core.ShowCommand = function(Cmd, Plr)
- Core.Dismiss(Plr)
- Core.Output(Plr, "Name: " .. Cmd.Name, nil, function() end)
- Core.Output(Plr, "Usage: " .. table.concat(Cmd.Usage, ", "), nil, function() end)
- Core.Output(Plr, "Rank: " .. Cmd.Rank, nil, function() end)
- if Core.GetRank(Plr) >= Cmd.Rank then
- Core.Output(Plr, "You can use this command", BrickColor.new("Bright green"), function() end)
- else
- Core.Output(Plr, "You can't use this command", BrickColor.new("Bright red"), function() end)
- end
- Core.Output(Plr, "[Back]", BrickColor.new("Bright violet"), function() Core.ShowCommands(Plr, "") end)
- Core.Output(Plr, "[Dismiss]", BrickColor.new("Bright red"), function() Core.Dismiss(Plr) end)
- end
- Core.GetPlayer = function(Plr)
- if type(Plr) == "table" then
- return game.Players:FindFirstChild(Plr.Name)
- else
- for i, v in pairs(Core.Ranked) do
- if v.Name == Plr.Name then
- return v
- end
- end
- end
- end
- Core.GetRank = function(Plr)
- for i, v in pairs(Core.Ranked) do
- if v.Name == Plr.Name then
- return v.Rank
- end
- end
- end
- Core.GetColor = function(Plr)
- for i, v in pairs(Core.Ranked) do
- if v.Name == Plr.Name then
- return v.Color
- end
- end
- end
- Core.SetRank = function(Plr, Rank)
- if type(Plr) == "table" then
- Plr.Rank = Rank
- else
- local P = Core.GetPlayer(Plr)
- if P then
- P.Rank = 1
- return
- end
- --Ran when no one is found only!
- Core.Ranked[#Core.Ranked+1] = {Name = Plr.Name, Rank = 1, Color = "Bright green", Orbs = {}}
- end
- end
- game:GetService("RunService").Heartbeat:connect(function()
- if not Core.Disabled then
- Core.Rotation = Core.Rotation - 1
- for i, v in pairs(Core.Ranked) do
- local Player = Core.GetPlayer(v)
- if Player then
- if Player.Character then
- if Player.Character:FindFirstChild("Torso") then
- for i = 1, #Orbs do
- local Rad = 4 + (#Orbs * 0.9)
- local Tor = Character.Torso
- local z = math.cos((i / #Orbs - (0.3 / #Orbs) + Core.Rotation/10000 * 2) * math.pi * 2) * Rad
- local x = math.sin((i / #Orbs - (0.3 / #Orbs) + Core.Rotation/10000 * 2) * math.pi * 2) * Rad
- local y = 0
- local Rot = Vector3.new(x, y, z) + Tor.Position
- local orbp = Orbs[i].Position
- local c = (Rot * 0.10 + orbp * 0.9)
- Orbs[i].CFrame = CFrame.new(c, Tor.Position)
- Orbs[i].Rotation = Vector3.new(Core.Rotation, 0, Core.Rotation)
- end
- end
- end
- end
- end
- end
- end)
- Core.Output = function(Player, Text, Color, Func)
- local PlayerTable = Core.GetPlayer(Player)
- local P = Instance.new("Part", Core.Services.Workspace.Terrain)
- P.FormFactor = "Custom"
- P.Anchored = true
- --P.Material = "Neon"
- P.CanCollide = false
- P.Size = Vector3.new(2, 2, 2)
- P.TopSurface = 0
- P.BottomSurface = 0
- P.BrickColor = Color or BrickColor.new(Core.GetColor(Player))
- P.Transparency = 0.35
- if Player.Character then
- if Player.Character:FindFirstChild("Torso") then
- P.CFrame = Player.Character.Torso.CFrame
- end
- end
- local Bil = Instance.new("BillboardGui", P)
- Bil.Size = UDim2.new(9, 0, 1.25, 0)
- Bil.StudsOffset = Vector3.new(0, 3.2, 0)
- Bil.Adornee = P
- local Txt = Instance.new("TextLabel", Bil)
- Txt.Size = UDim2.new(1, 0, 1, 0)
- Txt.BackgroundTransparency = 1
- Txt.Text = Text
- Txt.FontSize = "Size14"
- Txt.BorderSizePixel = 2
- Txt.Font = "Legacy"
- Txt.TextStrokeTransparency = 0.75
- Txt.TextColor3 = P.BrickColor.Color
- local Light = Instance.new("PointLight", P)
- Light.Color = P.Color
- local S = Instance.new("SelectionBox", P)
- S.Adornee = P
- S.Color = P.BrickColor
- S.Transparency = 0.35
- S.LineThickness = 0.03
- local C = Instance.new("ClickDetector", P)
- C.MaxActivationDistance = 1/0
- C.MouseClick:connect(function(Who)
- if Who == Player then
- if Func then
- Func()
- else
- P:Destroy()
- for i, v in pairs(PlayerTable.Orbs) do
- if v == P then
- table.remove(PlayerTable.Orbs, i)
- end
- end
- end
- end
- end)
- PlayerTable.Orbs[#PlayerTable.Orbs+1] = P
- end
- Core.Connect = function(Plr)
- if Core.GetRank(Plr) == nil then
- Core.SetRank(Plr, 1)
- end
- Core.Output(Plr, "PatOrbs V1.0", nil)
- Core.Output(Plr, "MetaAuth State: Off", nil)
- Core.Output(Plr, "You are rank: " .. Core.GetRank(Plr), nil)
- Core.Output(Plr, "Suffix: " .. Core.Suffix, nil)
- Plr.Chatted:connect(function(Msg)
- for i, v in pairs(Core.Commands) do
- for x, y in pairs(v.Usage) do
- if Msg:sub(1, #y+1) == y .. Core.Suffix then
- if Core.GetRank(Plr) >= v.Rank then
- v.Func(Plr, Msg:sub(#y+2))
- return
- else
- Core.Output(Plr, "You're not allowed to execute that command!", BrickColor.new("Bright red"))
- end
- end
- end
- end
- end)
- end
- Core.Dismiss = function(Plr)
- for i, v in pairs(Core.GetPlayer(Plr).Orbs) do
- v:Destroy()
- Core.GetPlayer(Plr).Orbs = {}
- end
- end
- Core.Services.Players.PlayerAdded:connect(function(Plr)
- if Core.SLock then
- if Core.GetRank(Plr) < 2 then
- Plr:Kick("This server is locked")
- end
- end
- Core.Connect(Plr)
- end)
- Core.Services.Players.PlayerRemoving:connect(function(Plr)
- Core.Dismiss(Plr)
- end)
- for i, v in pairs(game.Players:GetPlayers()) do
- Core.Connect(v)
- end
Advertisement
Add Comment
Please, Sign In to add comment