Introducing Ezstatz, a basic Leaderstats module for beginner developers

Ezstatz, a basic Leaderstats module for beginner developers


Hello beginner developers! Have you been wanting to add a Leaderstats system to your game, but find it too complicated?

Well, i have something to show you!

Introducing Ezstatz!

With Ezstats, you’ll be able to create leaderboards at ease with just a few functions! The functions are, but are not limited to:

createLeaderstatsObject(player) Creates a Leaderstats folder inside the player parameter
createValue(player, name, valType) Creates a value inside of the player’s leaderstats folder with the provided valType (Can be either an integer value or a string value)

Ezstatz comes with 5+ functions to help you with creating your leaderstats scripts!

If you wanna see more of the functions the module contains, or if you’d like to learn how to setup and use the module, you can view the documentation page for the module here.

Sample Script

Simple Leaderboard script with data saving functionality

local Ezstatz = require(workspace:WaitForChild("Ezstatz"))

game.Players.PlayerAdded:Connect(function(plr)
	local leaderstats = Ezstatz:createLeaderstatsObject(plr)
	local cash = Ezstatz:createValue(plr, "Cash", "int")
	local success, data = pcall(function()
		return Ezstatz:getData(plr)
	end)
	if success then
		if data then
			Ezstatz:set(plr, "Cash", data.Cash)
		else
			Ezstatz:set(plr, "Cash", 15)
		end
	else
		warn("Something went wrong:", data)
	end
	while task.wait(2) do
		Ezstatz:incrementValue(plr, "Cash", 20)
	end
end)

game.Players.PlayerRemoving:Connect(function(plr)
	local success, message = pcall(function()
		Ezstatz:saveData(plr)
	end)
	if success then
		print("Saved")
	else
		warn("Something went wrong:", message)
	end
end)

Polls

Would you recommend the module to beginner developers?
  • Yes
  • Maybe
  • No (Explain why in the replies)

0 voters


Links

Documentation | Creator Marketplace


And with all of that out of the way, I hope you guys find a use with the module, and happy scripting!

Positive feedback is optional but much appreciated.

4 Likes

Will this let me save player stats using datastore? Because I’m not very knowledgeable on Luau, so there’s that.

1 Like

Does it support saving? Do some of these functions return the new object that was created in order to maybe do custom stuff with them? Just wondering, can’t access studio right now.

Saving player stats is possible. You can use the Ezstatz:saveData() method.

Documentation for the function can be found here.

If you’re also looking for how to get player data, you can use Ezstatz:getData(). Documention for the method can also be found here.

Yes, the module supports saving, as stated above.

And yes, for example, the createLeaderstatsObject(player) method creates a Leaderstats folder into the specified player and returns it.

1 Like

love it! sometimes im just really lazy to write the same script over and over, so this saves me some time, thank u