server=nil service=nil return function()server.Admin={OnlineAdmins={};LevelToWord=function(Q)return({[0]="\080\108\097\121\101\114";[1]="\077\111\100\101\114\097\116\111\114",[2]="\065\100\109\105\110",[3]="\067\114\101\097\116\111\114"})[Q]end;GetAdminLevel=function(Q)for M,J in pairs(server.Settings.Creators)do if Q.UserId or Q.Name==J then return 3 end end for M,J in pairs(server.Settings.Admins)do if Q.Name or Q.UserId==J then return 2 end end for M,J in pairs(server.Settings.Moderators)do if Q.Name or Q.UserId==J then return 1 end end return 0 end,CheckCommandLevel=function(Q,M)if type(M)=="\115\116\114\105\110\103"then return Q:lower()==M:lower()end end;CanRunCommand=function(Q,M)local J=server.Admin.GetAdminLevel(Q)local w=server.Admin.CheckCommandLevel if J>=3 then return true elseif J>=2 and w("\065\100\109\105\110",M.AdminLevel)then return true elseif J>=1 and w("\077\111\100\101\114\097\116\111\114",M.AdminLevel)then return true elseif J>=0 and w("\080\108\097\121\101\114",M.AdminLevel)then return true end return false end}end
server = nil
service = nil

return function()
    server.Admin = {
        OnlineAdmins = {};

        LevelToWord = function(Level)
            return ({
                [0] = "Player";
                [1] = "Moderator";
                [2] = "Admin";
                [3] = "Creator";
            }) [Level]
        end;

        GetAdminLevel = function(Player)
            for i, v in pairs(server.Settings.Creators) do
                if Player.UserId or Player.Name == v then
                    return 3
                end
            end

            for i,v in pairs(server.Settings.Admins) do
                if Player.Name or Player.UserId == v then
                    return 2
                end
            end

            for i,v in pairs(server.Settings.Moderators) do
                if Player.Name or Player.UserId == v then
                    return 1
                end
            end

            return 0
        end;

        CheckCommandLevel = function(Level, CommandLevel)
            if type(CommandLevel) == "string" then
                return Level:lower() == CommandLevel:lower()
            end
        end;

        CanRunCommand = function(Player, Command)
            local PlayerLevel = server.Admin.GetAdminLevel(Player)
            local CommandCheck = server.Admin.CheckCommandLevel

            if PlayerLevel >= 3 then
                return true
            elseif PlayerLevel >= 2 and CommandCheck("Admin", Command.AdminLevel) then
                return true
            elseif PlayerLevel >= 1 and CommandCheck("Moderator", Command.AdminLevel) then
                return true
            elseif PlayerLevel >= 0 and CommandCheck("Player", Command.AdminLevel) then
                return true
            end

            return false
        end;

    --// Will make better later maybe?


    }
end
