> For the complete documentation index, see [llms.txt](https://docs.ninjutsugames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninjutsugames.com/game-creator-2/loot-locker/replenish-system.md).

# Replenish System

## Initialization

To use this system simply call the **Initialize Replenish Value** instruction.

<figure><img src="/files/ZSQ0zTrVlyUW9jEmINHd" alt=""><figcaption></figcaption></figure>

#### Replenish Key

A key needed to store the value in Player's storage

#### Initial Value

The initial value that will have the Player's storage value

#### Max Value

The maximum value the player can earn with the system

#### Interval

How often this value will be incremented by 1.

#### Auto Collect Offline Earnings

If enabled offline earnings will be auto collected, otherwise an event will be triggered that can be used to do it manually

## Offline Earnings

Offline earnings can be received manually by using a trigger.

<figure><img src="/files/hA0ODLaHkenDh49pLFgf" alt=""><figcaption></figcaption></figure>

Once this trigger is execute the instruction **Collect Offline Earnings** can be used

<figure><img src="/files/vdibzRAeRmQu5Zbn8xsz" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To see this in action you can play the demo scene **9\_ReplenishSystem**
{% endhint %}
