πŸ₯‡UIService

Service for creating in-game UI.

Functions

createProgressBar(maxProgress: number): ProgressBar

Creates a progress bar with the given maximum progress value. By default, progress bars are displayed globally, but the list of players who are able to view the progress bar can be configured.

Example usage:

local diamondBar = UIService.createProgressBar(10)
diamondBar:setColor(Color3.fromRGB(0, 179, 179))

local emeraldBar = UIService.createProgressBar(15)
emeraldBar:setColor(Color3.fromRGB(80, 200, 120))

Events.InventoryItemAdded(function(event)
    if (event.item == ItemType.DIAMOND) then
        diamondBar:add(event.amount)
    end    
    if (event.item == ItemType.EMERALD) then
        emeraldBar:add(event.amount)
    end
end)

createLeaderboard(): Leaderboard

Creates a Leaderboard that is displayed for all players. A custom game can only have one leaderboard at any given time. Leaderboards can have entries of Players, Teams, or strings.

Example usage of a Leaderboard that displays strings:

createTextLabel(text: string, position: Vector3): TextLabel

Creates a TextLabel that is displayed in-world.

Example usage:

Last updated