Introduction of GLeaderboard
Have you ever wanted to create leaderboards? Have you found it difficult and failed in the attempt? Well today I bring you the solution!
GLeaderboard is an interactive and customizable module that will allow you to create your own Leaderboard 100% customizable to the saved data. You will be able to interact with the interface design of the board, and in addition, it will make sure that your data is safely preserved in a 2x2 sorted database.
How to use Leaderboard?
GLeaderboard was created for users who are new to the world of Roblox experiences creation, allowing the creation of leaderboards to be as simple and intuitive as possible.
STEP : Creating your board
To create your first Leaderboard you must use the GLeaderboard.Createboard()
method.
local GLeaderboard = require(7048780231) -- Module requiremenet.
local MyBoard = GLeaderboard.new(
PointsLeaderboard_Part, -- Part Instance
PointsOrderedDataStoreName, -- OrderedDataStore name (DataStoreService:GetOrderedDataStore(THIS_IS_THE_NAME))
"Points", -- Stats value to evalue.
0, -- Minimum stat value required to appear on the board.
10) -- Maximum items to show.
MyBoard:UpdateBoardDisplay() -- Making the initial update on player's stats.
STEP : Updating your board
while task.wait(UPDATE_TIME: number) do
MyBoard:UpdateBoardDisplay()
end
Be aware that Roblox has quota request limits on usage of DatastoreService. More info on wiki.
Step : Customizing your Leaderboard
MyBoard:SetPropertyOf(ItemToChange: "TopBar" | "Title" | "TitleStroke" | "ScrollBar", PropertyToChange: any item property, ValueToSet: any value)
Check out the type of elements below, be sure to put the correct property name of element’s (capital letters, etc).
Currently, due to a testing issue and considering that customization is a new extension, you can only customize the following features:
ELEMENT | TYPE |
---|---|
TopBar | ImageLabel |
TopLine | Frame |
Title | TextLabel |
ScrollBar | ScrollingFrame |
TitleStroke | UIStroke |
An example in code of how you could customize your board would be the following:
local MyBoard = GLeaderboard.new(
PointsLeaderboard_Part, -- Part Instance
PointsOrderedDataStoreName, -- OrderedDataStore name (DataStoreService:GetOrderedDataStore(THIS_IS_THE_NAME))
"Points", -- Stats value to evalue.
0, -- Minimum stat value required to appear on the board.
10) -- Maximum items to show.
MyBoard:SetPropertyOf("TopBar", "ImageColor3", Color3.fromRGB(232, 116, 0))
MyBoard:SetPropertyOf("TopLine", "BackgroundColor3", Color3.fromRGB(147, 74, 0))
MyBoard:SetPropertyOf("Title", "TextColor3", Color3.fromRGB(147, 74, 0))
MyBoard:SetPropertyOf("ScrollBar", "ScrollBarImageColor3", Color3.fromRGB(232, 116, 0))
MyBoard:SetPropertyOf("TitleStroke", "Thickness", 5)
Useful Links
- Module Id:
7048780231
(you should userequire(7048780231)
).
I hope this is useful to you! I’ll leave my development portafolio, I have open comissions.