item replace entity @s[scores={nails=2..}] weapon.mainhand with crossbow[custom_name='{"translate":"darknet.nailgun","italic":false}',unbreakable={},custom_model_data=1000,custom_data={nailgun:1},charged_projectiles=[{id:"minecraft:arrow",count:1,components:{"minecraft:custom_name":'{"translate":"gun.nail","italic":false}'}}]] 1
item replace entity @s[scores={nails=1}] weapon.mainhand with crossbow[custom_name='{"translate":"darknet.nailgun","italic":false}',unbreakable={},custom_model_data=1000,custom_data={nailgun:1},charged_projectiles=[{id:"minecraft:arrow",count:1,components:{"minecraft:custom_name":'{"translate":"gun.nail","italic":false}'}}]] 1
item replace entity @s[scores={nails=..0}] weapon.mainhand with crossbow[custom_name='{"translate":"darknet.nailgun","italic":false}',unbreakable={},custom_model_data=1000,custom_data={nailgun:1}] 1
scoreboard players set @s[scores={nails=..0}] nails 0
title @s actionbar [{"score":{"name":"@s","objective":"nails"},"color":"aqua","bold":false,"font":"minecraft:digits"}]