execute store result score n_items items_generic run clear @s wooden_sword{name:"broken_crystal_sword"}
execute unless score n_items items_generic matches 0 run function items:weapon/crystal_sword/regen_recursive

playsound custom.crystal_sword.regen ambient @s ~ ~ ~ 1 1
