How can I make shop, skillcheck system with Yarn?

Hello everyone, I’m making a text-based game and I can’t figure out how to do skillchecks/shops, etc.

For example, I want to make a little quest which requires you to have a certain amount of gold in order to complete it.
I have a global/scene/object variable “Gold” = 0.
I have an object that adds 1 gold once you interact with it and an object that starts YARN dialog with 2 options - “pay” and “leave” lets say.

My question is - can I add/subtract/set values of a variables via YARN and in reverse, affect dialogs using variables from Gdevelop?

Thank you in advance!

Take a look at the yarn example project, it demonstrates most functions, including some << commands >> and if conditions.
Yarn also includes a variables system, although I’m not sure it’s shown in the example project. You’ll find these actions in the editor.