public void buy(item i, bool buy) { bool okay = inv.AddMoney(-i.cost); if (!okay) { speechBubble.text = "get some money!"; return; } speechBubble.text = thx[Random.Range(0, thx.Length)]; bool ok = inv.AddToSlots(items.instance.GetIndex(i)); if (!ok) { inv.AddMoney(i.cost); speechBubble.text = "your inventory is full you stupid piece of shit"; } }