#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

particle minecraft:dust 0 1 0 1 ~ 107.8 ~ 0.1 0 0.1 0 1

#Click detect
execute if entity @e[tag=option-,distance=..1,nbt=!{ArmorItems:[{},{},{},{id:"minecraft:birch_planks"}]}] run scoreboard players set @s time 100
execute if entity @e[tag=option+,distance=..1,nbt=!{ArmorItems:[{},{},{},{id:"minecraft:birch_planks"}]}] run scoreboard players set @s time 101

item replace entity @e[tag=option_change,limit=2,sort=nearest,distance=..1] armor.head with minecraft:birch_planks{display:{Name:'{"text":""}'}}