Detecting broken tools
I figured out how to detect breaks but how do I execute commands at the person that broke the item
Continue to help postexecute as @a[scores={iron_pickaxe_break=1..}] if items entity @s weapon.mainhand iron_pickaxe[custom_model_data={strings:["bottle_broken"]}] run function esta:broken_bottle_break scoreboard players reset @a iron_pickaxe_break
in function "broken_bottle_break" I am trying to get it to run these commands at the player who's item broke position
playsound minecraft:block.glass.break master @s ~ ~ ~ 1.1 0.6 particle block{block_state:"minecraft:green_stained_glass_pane"} ~ ~1 ~ 0 0 0 0 20 normal
Can anyone help?