Ladder
A sequence of levels a player climbs by paying, such as upgrade tiers or rebirths. Level 0 is where every player starts; rung n's price is what leaving it costs, so the top rung's price is never paid. The rungs are declared by the script each run; only each player's level is saved.
Fields
Methods
Appends a rung and returns its level, counting from 0. Each price must be zero or more and higher than the rung before. multiplier is free for the script to use, default 1. At most 1000 rungs. returns its level
ladder:count() -> number#How many rungs there are.
Sets the player's level; raises unless 0 <= level < count(). Does not fire onClimb.
The price of a level's rung, or of the player's current one: what climbing from it costs. nil if there is no such rung.
The multiplier of a level's rung, or of the player's current one; 1 if there is no rung.
Whether the player is below the top and balance covers their current rung's price.
Moves the player up one level, first spending the current rung's price from pay. Returns false, changing nothing, at the top or when pay cannot cover the price. without a ledger it is free