Skip to content

Client API

Everything here lives in CoreClientAPI and runs from a client LocalScript:

local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin")
local ClientAPI = require(hd.Core.ClientAPI)

Prompts

prompt Shared

ClientAPI.prompt(promptType: PromptType, text: string, options: PromptOptions?): PromptHandle

Same as in Server API's prompt except without the player arg:

ClientAPI.prompt("success", "Quest complete!", {duration = 5})

Info

getSetting Shared

ClientAPI.getSetting(settingName: string, player: Player?): any

Returns the value of a game setting, like ClientAPI.getSetting("Prefix"). Pass the local player to also apply their You Settings, so you get the exact value they experience. Only the local player's You Settings are available on the client.


getVersion Shared

ClientAPI.getVersion(): string

The running HD Admin version, like "v2.0.0".


Panel

getAppIcon Client

ClientAPI.getAppIcon(): Icon

Returns HD Admin's topbar icon, a TopbarPlus Icon, so you can restyle, move or hide it with the full TopbarPlus API.

local icon = ClientAPI.getAppIcon()
icon:align("Right")

openProfile Client

ClientAPI.openProfile(userId: number)

Opens a user's profile popup, like selecting them on the Moderation page.


openPage Client

ClientAPI.openPage(pageName: string)

Opens the panel straight onto the given page, for example:

ClientAPI.openPage("Commands")


openPanel Client

ClientAPI.openPanel()

Opens the HD Admin panel for the local player, as if they'd selected the topbar icon.


closePanel Client

ClientAPI.closePanel()

Closes the panel if it's open.


isPanelOpen Client

ClientAPI.isPanelOpen(): boolean