EasyStats - Leaderstats Simplified

easystats
I was thinking about how making leaderboards in your game isn’t as simple as it should be. Though I know it isn’t the most difficult task, I wanted to make it streamlined and easy, for new and experienced developers alike. That’s why I created EasyStats.
With EasyStats, you can create a leaderstat with a single line of code. If you are more experienced, you can reference the leaderstat directly through the plugin to change advanced settings. There’s also a way to do math on number stats, which makes it good for temporary things like Cash. For strings and numbers alike, you can change the value directly. This makes it great for things like Group Ranks too.

Interested? You can find EasyStats here.

Documentation, with all the commands.

"" = string argument
# = number argument
All arguments called player need to be player instances.

EasyStats.new(player,name,value)
Creates a new leaderstat.
player = Name of the player you want the stat in.
"" name = Name of the LeaderStat.
""/# value

EasyStats:ChangeValue(player, value, newName, newValue)
Changes the value of a specified leaderstat.
player = Name of the player the stat changed is in.
"" value = Name of the leaderstat you want changed.
"" newName, newValue = New name and value of leaderstat specified, respectively.

EasyStats.Stat(string player,string value)
Reference to a certain leaderstat.
player = Name of the player the stat referenced is in.
"" value = Name of value referenced

EasyStats:MathValue(player,value,operation,number)
Do math on a number value.
player = Name of the player the stat operated on is in.
"" value = Name of the stat operated on.
"+,-,*,/" operation = Operation performed on value.
# number = Number operated with.

EasyStats:Delete(player,value)
Deletes a value.
player = Name of the player the stat being deleted is in.
"" value = Name of the stat deleted.

Thank you to everyone who uses this. Have fun making leaderboards! :smile:

10 Likes

The thumbnail is broken. I will fix that.

3 Likes

I personally think it would be better if the Player argument was the Player instance

2 Likes

They weren’t easy enough before?

3 Likes

Though I know it isn’t the most difficult task, I wanted to make it streamlined and easy, for new and experienced developers alike.

I described this in the post. Faster is faster.

It is, thank you for letting me know that the docs are wrong. I’ll change it right now. EDIT: Fixed it.

I’ve fixed EasyStats.Stat.

30

1 Like

I guess this is useful for the lazy people out there lol!

Cool plugin though.

1 Like

Huh. I have no idea why the thumbnail won’t work. I’ll need to look into this more.

Does this save the data using datastore?

Not yet. I’m planning that for the future.

1 Like

Lol isn’t doing it without the module easier :huh: