scoreboard objectives add mg43_ammo dummy

scoreboard players add @s mg43_ammo 1

execute @s[scores={mg43_ammo=150},hasitem={item=hd:mg-43,location=slot.weapon.mainhand}] ~~~ replaceitem entity @s slot.weapon.mainhand 0 hd:mg-43_empty 1 0