How to use editable to add gold on verse

I want to count gold on fortnite for deathrun map how to I use editable so I can link verse code to gold coins

In order to get someones gold in their inventory you can use the “Conditional Button Device”
so

@editable GoldCounter : conditional_button_device = conditional_button_device{}

and to get the gold you will need to

YourFunc(Agent:agent):void=
       TotalGold:=GoldCounter.GetItemCount(Agent,0)