Skip to content

AdminRunner

AdminRunner has many functions and utilities for managing admins.

AR.Bootstrap

Spawns a new admin panel for a given user and creates a welcome notification instructing them on how to open it.

luau
AR.Bootstrap(
    Player: Player,
    RankID: number
)
luau
game.Players.PlayerAdded:Connect(function(Player))
    if Player.Name == "Roblox" then
        AR.Bootstrap(Player, "Administrator")
    end
end)

AR.CanUseApp

Returns a boolean for if a given player or rank can access an app based on its AppID (AppParent or AppParent\SubApp)

luau
AR.CanUseApp(
    Identifier: Player | String<RankName>,
    AppIdentifier: string
)
luau
print(`I... {AR.CanUseApp(game.Player.pyxfluff, "PlayerManagement")} use Player Management!`)
luau
true

AR.PlayerAdded

Used internally as a hook for the Players.PlayerAdded RBXScriptSignal. Can be used to check if players are still admins.

If you are looking to disable double-bootstrap protection, disable DisableBootstrapProtection in Vars.

luau
AR.PlayerAdded(
    Player: Player, 
    ForceAdmin: boolean, 
    IsScan: boolean
)
luau
game.Players.PlayerAdded:Connect(AR.PlayerAdded)
luau
{
    false,
    "This person is already an admin and by default cannot be bootstrapped twice. Change this in the configuration module."
}
luau
{
    true,
    "Done"
}

AR.Removing

Cleans up after an admin after they leave. Also meant to be a script hook internally.

luau
AR.Removing(Player: Player)
luau
game.Players.PlayerRemoving:Connect(AR.Removing)

AR.Scan

Runs PlayerAdded on every person in your game. If you would like everybody to have super admin no matter what, make ForceAdmin = true.

luau
AR.Scan(
    ForceAdmin: boolean
)
luau
game:GetService("MessagingService").MessageReceived:Connect(Message, Data)
    if Message == "ScanForAdmins" then
        AR.Scan(false)
    end
end)

AR.Ranks.New

Creates a new admin rank with the provided data.

luau
AR.Ranks.New(Data: {
    AdmRankVersion = 3,
    
    Name: string,
    Protected: boolean,
    Members: {
        {
            ID: number,
            MemberType: "Group" | "User",
            GroupRank: number?
        }
    },

    Apps: {
        SuperAdmin: boolean?,
        ...any
    },

    CreationReason: string,
    ActingUser: number,
    
    Color: string,

    IsEdit: boolean?,
    Overwrite: boolean?
})
luau
Admins.Ranks.New({
    AdmRankVersion = 3,
    
    Name = "Administrator",
    Protected = true,
    Members = {
        {
            ID = Owner.ID,
            MemberType = (Owner.MemberType) :: "Group" | "User",
            GroupRank = 255
        }
    },

    Apps = {
        SuperAdmin = true
    },

    CreationReason = "Added by System for first-time setup.",
    ActingUser = 1,
    
    Color = "23ff74"
})
luau
{
    false,
    "Apps was missing in provided table"
}
luau
{
    true,
    "Success in 0.073472s!"
}

AR.Ranks.GetAll

Starts multiple threads to get all ranks in the RankIndex.

luau
AR.Ranks.GetAll()
luau
print(AR.Ranks.GetAll())
luau
{
    {
        Protected = true,
        Modified = 1748057698,
        Members = {
            {
                ID = 133017837,
                MemberType = "User",
                GroupRank = 255
            }
        },
        CreationReason = "Added by System for first-time setup.",
        Modifications = {
            {
                ActingAdmin = 1,
                Actions = { "created this rank" },
                Reason = "Created this from the rank editor."
            }
        },
        Name = "Administrator",
        AdmRankVersion = 3,
        Apps = {
            SuperAdmin = true
        },
        CreatorID = 1,
        RankID = 1,
        Color = "23ff74"
    }
}

AR.Socket

Used as an internal MessagingService wrapper.

WARNING

You shouldn't be using this generally, it is useful for internal Administer code but not outside of it

luau
AR.Socket(
    Message: {
        Data: { Message, Content }
    }
)