EasyLB - A fast and easy way to create leaderboards!

EasyLB - A fast and easy way to create leaderboards!

Hello everyone, my name is South, and today, i’m presenting EasyLb!

EasyLb is a quick and easy module for creating leaderboards!

How to install:
Simply click this link and open it in studio, and that’s pretty much it!

Here is a sample script: (note: you have to create a variable for your leaderboard)

local module = require(game.ServerScriptService.EasyLB)

game.Players.PlayerAdded:Connect(function(player)
   local lb = module:Create(player)
   lb:AddValue("NumberValue", "Cash")
   lb:SetValue("Cash", 5)
end)
API
:Create(player : player)

Creates a leaderboard

:AddValue(typeofvalue : string, name : string)

Adds a value

:SetValue(name : string, value : ?)

Set’s a value’s value

DataStore capability is in production, and will hopefully be released in the next update.

4 Likes

Currently it’s rather a useless model because it neither brings something new or makes something better. There are many datastore/leaderboard modules such as ProfileService and DataStore2. However great job, it’s great practice to create even simple modules. Keep it up!

1 Like

Thanks for your feedback!

The reason I created this module was for new players who just needed to make a simple leaderboard, and instead of having messy code, they could just use my module and use some functions

Also, the links you provided were about DataStores and (as far as i’m aware) not leaderboards.

2 Likes

Keep going!

Summary

This text will be hidden

2 Likes

Your model is currently not for sale, please make it for sale.

When you add data saving I believe this will help many new developers. Keep up the good work.

Done, thanks for the reminder!

Hm…Why does DevForum feel like a Ghost Town? And thanks!

1 Like

This looks really cool! I feel like it needs datastore functionality. I was thinking maybe that could be done something like this?

local module = require(game.ServerScriptService.EasyLB)

game.Players.PlayerAdded:Connect(function(player)

   --You would need a way of loading the data so I was thinking something like this:

   local CashData = lb:GetData(player, "Cash") -- First peram is the player, second is the value you wanna get.
   local XpData = lb:GetData(player, "XP")

   local lb = module:Create(player)
   lb:AddValue("NumberValue", "Cash")
   lb:AddValue("NumberValue", "XP")
   lb:SetValue("Cash", CashData or 5) --Set to stored data and if no data exists set it to a default 
   lb:SetValue("XP", XpData or 0)
end)

game.Players.PlayerRemoving:Connect(function()
   module:SaveStats(player {"Cash", "XP"})
   --This can prob be changed a bit but I was thinking that it could work like this.
   --Like it has two parameters, first one being the player to save it too,
   --and the second is a table of stats you want to save. 
end

This can be changed up however you would like. But overall I think this is a great idea to help those who don’t have much or any experience with Datastores and leaderstats. I personaly don’t so I feel like if you were to add a datastore feature I would most deffinitly use this. Like what @shr2mp said I recommend using either ProfileService or DataStore2.