Auto-translated
I understand what you want. I hope your price is in gold, right? Because I have no idea how to change a resource.
Added after 7 hours 59 minutes
Regarding artifacts. You can create something like a shop. You place the artifacts that will be sold and you need to give each one a name for the script. And create a one-time trigger for each artifact. Which will call a function, in which: a question is asked, do you want to buy ARTIFACT NAME for ARTIFACT PRICE. If the answer is yes, then it checks for the availability of the required amount of the necessary resource, and if successful, the player receives the artifact and the price is deducted. Otherwise, a message is displayed that there is not enough money. Do you understand?
Added after 7 hours 59 minutes
Regarding artifacts. You can create something like a shop. You place the artifacts that will be sold and you need to give each one a name for the script. And create a one-time trigger for each artifact. Which will call a function, in which: a question is asked, do you want to buy ARTIFACT NAME for ARTIFACT PRICE. If the answer is yes, then it checks for the availability of the required amount of the necessary resource, and if successful, the player receives the artifact and the price is deducted. Otherwise, a message is displayed that there is not enough money. Do you understand?