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!