Use variable as currency in shop

In my game there's a shop in a casino. I'd like that shop scene to use a custom variable as the currency instead of gold.
(The variable is "casino points" and you get them winning at minigames).
I also need a way to make this triggerable via switch, so that I can turn it on only inside this shop event.

Do you know any scripts that could do this?
in the simples form you don't need any script at all - just store the current gold value in another variable and make the gold from your variable when entering the casino, and change it back when leaving.

or make it the shop event only by making the change before the shop processing in that event, and change it back after the shop processing.
Not exactly what you're looking for but this is probably better anyways:
Direct link:

Certain shops will use certain currencies. So you can make a "casino point" currency and set the casino to only use that currency.

With this method you can also view the casino points from the menu.
in the simples form you don't need any script at all - just store the current gold value in another variable and make the gold from your variable when entering the casino, and change it back when leaving.

or make it the shop event only by making the change before the shop processing in that event, and change it back after the shop processing.
I don't know why I didn't think about this! The only "issue" was changing the currency name, but I changed it via script using a branch.
Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/use-variable-as-currency-in-shop.145517/