public void Purchase() { int price = int.Parse(priceText.text); if (Login.user.coins >= price) { Login.user.ChangeCoins(-price); playerCoinsAmount.text = Login.user.coins.ToString(); contractsManager.AddContract(contractAttributes, contractsCount); successfulPurchase.SetActive(true); } else { notEnoughCoins.SetActive(true); } }