LeaderstatsPlus
Download | Github | Documentation
LS+ makes it simpler to make the leaderstats folder and its values. Creating a value is as simple as:
lsplus.add("int", "Cash", plr)
Functions
.init()
The init function creates the leaderstats folder in the player.
Args
- plr - Must be the player object in
game.Players
.
Examples
local lsplus = require(game.ReplicatedStorage.lsplus)
game.Players.PlayerAdded:Connect(function(plr)
lsplus.init(plr)
end)
.add()
The add function adds a value to the leaderstats folder using the args provided by you.
Args (in order)
- type - Can be “string” or “int”, must be a string.
- name - The name of the value, must be a string.
- plr - The player object in
game.Players
.
Examples
local lsplus = require(game.ReplicatedStorage.lsplus)
game.Players.PlayerAdded:Connect(function(plr)
lsplus.add("int", "Cash", plr)
end)
.edit()
The edit function edits a value based on what args are passed.
Args
- name - The name of the value, must be a string.
- val - The value will be changed to this, must be the same as the type of the val.
- plr - The player object in
game.Players
.
Examples
local lsplus = require(game.ReplicatedStorage.lsplus)
game.Players.PlayerAdded:Connect(function(plr)
lsplus.edit("Cash", 100, plr)
end)
LS+ is still in an early beta and there may be errors. If you find any, please open an issue on github.