> For the complete documentation index, see [llms.txt](https://docs.t1ger.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.t1ger.net/resources/t1ger-money-wash/developer/client.md).

# Client

Client-sided exports

## OpenCashCounter

Opens the cash counting machine and waits until the player closes it. It is only a visual: it makes no server calls and decides nothing about money, so your own server code must do and verify the real work after the count.

```lua
local ok, reason = exports["t1ger_moneywash"]:OpenCashCounter(options)
```

**Parameters**

* `options` – `table` – The counter settings:
  * `amount` – `integer` – The whole amount to count, at least 1 (required).
  * `stackCount` – `integer` – The number of piles the amount is split into, from 1 to 10 (default `10`).
  * `autoMoveToRight` – `boolean` – A counted pile moves to the right tray by itself (default `false`).
  * `currency` – `string` – The symbol shown in front of the amounts (default `"$"`).

**Returns**

* `boolean` – `true` if every pile was counted, `false` otherwise.
* `string?` – The reason it failed: `"cancelled"` (the player closed it), `"interrupted"` (the player died or was cuffed, or a resource stopped), `"busy"` (another screen is open) or `"invalid_input"` (bad options).

***

## OpenPortal

Opens the web portal, as if the player used a laptop. The portal closes by itself if the player dies, is cuffed or moves too far away.

```lua
exports["t1ger_moneywash"]:OpenPortal()
```

**Returns**

* Nothing.

***

## GetOwnedBusiness

Returns the business the player owns, from the client's local cache.

```lua
local business = exports["t1ger_moneywash"]:GetOwnedBusiness()
```

**Returns**

* `table?` – The player's business, or `nil` if they own none. It has:
  * `id` – `integer` – The business ID.
  * `type` – `string` – The business type, for example `"coffee_shop"`.
  * `locationId` – `integer` – The ID of the business's location.

***

## GetPlayerReputation

Returns the player's reputation points and the title of their current level.

```lua
local reputation = exports["t1ger_moneywash"]:GetPlayerReputation()
```

**Returns**

* `table` – The player's reputation:
  * `points` – `integer` – The player's total reputation points.
  * `level` – `string` – The title of the player's current level (for example `"Registered"`).
