Skip to content

Leveler

Level and Experience class.

Library API

Leveler.new

LevelerObject Leveler.new(number PointsToStartWith = 0)

Returns a Leveler Object.

Leveler API

Leveler:Award

self Leveler:Award(number Points = 1)

Awards Points to Leveler, recalculating its Fields.

Fields:

Field Description Type
Total Total Exp number
Lvl Current level number
Exp Current Exp within level number
Next Total Exp required to advance from this level to the next level number
Percent Decimal progress to next level number

Run this little demo and you will learn everything you need to know.

local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Resources")).LoadLibrary
local Leveler = require("Leveler")

local Kills = Leveler.new()
table.foreach(Kills, print)
print()

Kills:Award()
table.foreach(Kills, print)
print()

Kills:Award(6)
table.foreach(Kills, print)