execute as @s run function zzzzdonotuse:modifyarmor/checkarmorstatslot
scoreboard players set @s ArmorCheck -100
execute as @s[tag=FoundArmorTag0] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[0].Amount
execute as @s[tag=FoundArmorTag1] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[1].Amount
execute as @s[tag=FoundArmorTag2] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[2].Amount
execute as @s[tag=FoundArmorTag3] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[3].Amount
execute as @s[tag=FoundArmorTag4] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[4].Amount
execute as @s[tag=FoundArmorTag5] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[5].Amount
execute as @s[tag=FoundArmorTag6] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[6].Amount
execute as @s[tag=FoundArmorTag7] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[7].Amount
execute as @s[tag=FoundArmorTag8] run execute store result score @s ArmorCheck run data get entity @s Item.tag.AttributeModifiers[8].Amount
execute as @s[scores={ArmorCheck=-100}] run function zzzzdonotuse:modifyarmor/setmodifiers
#execute as @s[nbt=!{Item:{tag:{diamondnetherarmorkyu:1b}}},nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run function zzzzdonotuse:modifyarmor/setdiamondnetheritetag
execute as @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run function zzzzdonotuse:modifyarmor/setdiamondnetheritetag


execute as @s[nbt={Item:{id:"minecraft:iron_helmet",Count:1b}},nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run data modify entity @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] Item.tag merge value {ironarmorkyu:1b}
execute as @s[nbt={Item:{id:"minecraft:iron_chestplate",Count:1b}},nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run data modify entity @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] Item.tag merge value {ironarmorkyu:1b}
execute as @s[nbt={Item:{id:"minecraft:iron_leggings",Count:1b}},nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run data modify entity @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] Item.tag merge value {ironarmorkyu:1b}
execute as @s[nbt={Item:{id:"minecraft:iron_boots",Count:1b}},nbt=!{Item:{tag:{ironarmorkyu:1b}}}] run data modify entity @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] Item.tag merge value {ironarmorkyu:1b}