I somehow have to do something like this:
Thanks for help.
Code:
on inventory click: #example inventory event
cancel event
set {_count} to 0
loop 5 times:
add slot {_count} of event-inventory to {example::*}
add 1 to {_count}
on inventory right click: #example inventory event, event isn't necessary here
loop {example::*}:
#here, I want to check if player has enough items and take those items like "remove loop-value from player's inventory" or smh like that. How do I define amount of items in loop-value?