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!
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.
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.