# Economy Methods

LazyNPCs includes some player methods for interacting with Impactor. It makes quite the impact on what you can do with NPCs & Molang!

{% hint style="warning" %}
**Hey, make sure you put "impactor:currency"!**

Impactor uses keys to uniquely identify currencies. Generally, the key is in the format "impactor:name", i.e. the default dollars key is "impactor:dollars"
{% endhint %}

### q.player.has\_money(amount: Double, \[currency: String, defaults to primary currency])

This method returns true/false depending on whether the player has that money. Defaults to using the primary impactor currency, but you can also specify the currency key in the second parameter. If you had dollars (standard primary currency) + some premium currency called "roanoketokens", you could check whether the player has 3 Roanoke Tokens by doing:

```
q.player.has_money(3.0, 'impactor:roanoketokens')
```

### q.player.take\_money(amount: Double, \[currency: String, defaults to primary currency])

Returns true/false depending on whether the player had enough money to take, and the transaction went through correctly.&#x20;

### q.player.give\_money(amount: Double, \[currency: String, defaults to primary currency])

Same formatting as above, but deposits money into the player's account. Returns true if the currency was found and deposit worked, false otherwise.

### q.player.balance(\[currency: String, defaults to primary currency])

q.player.balance() would return the primary currencies balance (generally dollars). You can pass in a specific currency, i.e. q.player.balance("impactor:roanoketokens") would return how many Roanoke Tokens they have. Returns 0.0 if the currency key doesn't exist.

{% hint style="warning" %}
**Be careful with Currencies!**

If you include the currency parameter, but spell it wrong (or it isn't defined), these methods will always return false and nothing will happen. This is to avoid accidentally using the wrong currency (i.e. primary). Different currencies have vastly different values on most servers.
{% endhint %}
