execute unless data entity @s interaction run return 0
execute on target if items entity @s container.* minecraft:barrel[minecraft:custom_data~{box:1}] run return 0 
execute on target if items entity @s weapon.offhand minecraft:barrel[minecraft:custom_data~{box:1}] run return 0 
execute on target run give @s[team=gruzchik] barrel[max_stack_size=1,custom_name='{"italic":false,"translate":"loader.box"}',lore=['{"italic":false,"translate":"loader.box.lore","color":"gray"}'],custom_data={box:1}] 1