My vision is to have a custom made currency in game that players can earn to buy things with it like commands and ranks. I have finished the process of creating the currency. Players are able to pay each other with it. ops, and console are able to run the commands to add/remove the said currency to players balance. My only problem is when players attempt to buy something with the currency in the GUI I have created. They can purchase it as much as they want without any cost of the currency. I want the command/rank that they purchase from the GUI to be able to check if they have the correct amount of currency. Otherwise players are able to use it as if its free.
Example: I have a GUI set up so it acts as a shop for this currency. I want all items in this GUI to have a cost of the currency I have made(This isn't the issue). (This is the issue)But If a player goes to buy an item in this GUI. It requires none of this currency, because of the fact that there is no way to check to players balance of the currency to see if they have enough to make the purchase. With that being said players can purchase anything in this GUI without any of this currency.
I will post the script down below if anyone has any answers or codes I can use to make this possible. Please help me out it would be much appreciated!
Example: I have a GUI set up so it acts as a shop for this currency. I want all items in this GUI to have a cost of the currency I have made(This isn't the issue). (This is the issue)But If a player goes to buy an item in this GUI. It requires none of this currency, because of the fact that there is no way to check to players balance of the currency to see if they have enough to make the purchase. With that being said players can purchase anything in this GUI without any of this currency.
I will post the script down below if anyone has any answers or codes I can use to make this possible. Please help me out it would be much appreciated!