Available since Version 1.27.
Gets the amount of coins the player currently has.
Syntax
GetCoins( [level] )Arguments
- level (integer): The level to get the coin count for.
- Optional, defaults to 1.
- By default, all levels share a coin count, however, the Per Level Coin Count hack may be in use which can make this return different values depending on the level.
Return Values
- (integer | nil): The amount of coins the player currently has in the specified level or
nilif unavailable.
Examples
local Coins = GetCoins()
if Coins == 69 then
print("Nice.")
elseif Coins == 73 then
print("LMAOOOO")
end