Only allow user to instantiate game object when he has a certain amount of points(money)

Hi All :slight_smile: I was wondering I am making a tycoon game and I have a simple scoring script so that when ever I click on the coin it adds money.I also have two GUI buttons for my buildings which generate the coins over time. Is there a way that a user can only click on the building GUI button and instantiate the building when he has enough points?

Yes.

GUI.enabled = money > buildingCost;
if(GUI.button(some Rect, "build a building"))
{
    // make the building.
}