I'm trying to make a bedwars and I need help

To make an Iron/gold generator I need to make it so a counter gives you the amount displayed on the counter. In other words, the number displayed on the counter makes it so you get THAT amount of the item.

I don’t know how to do that, but instead you could just put an item spawner.

Well ima have to make it passive instead of having to collect it manually

The counter can update PropertyA, and you can make a block for the Item Granter that will grant PropertyA Cash, or whatever it is.