An example of how you could code an inventory. The limit of the inventory is 3 but can be set by changing the variable. You can click an item in the inventory to remove it.