scoreboard players set @s[nbt={Item:{id:"minecraft:iron_helmet"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] ArmorStuff 300
execute at @s if entity @s[distance=..11,nbt={Item:{id:"minecraft:iron_helmet"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..10] ["",{"text":"Your iron helmet has been upgraded!","color":"aqua","italic":true}]
scoreboard players set @s[nbt={Item:{id:"minecraft:iron_chestplate"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] ArmorStuff 700
execute at @s if entity @s[distance=..11,nbt={Item:{id:"minecraft:iron_chestplate"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..10] ["",{"text":"Your iron chestplate has been upgraded!","color":"aqua","italic":true}]
scoreboard players set @s[nbt={Item:{id:"minecraft:iron_leggings"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] ArmorStuff 600
execute at @s if entity @s[distance=..11,nbt={Item:{id:"minecraft:iron_leggings"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..10] ["",{"text":"Your iron leggings have been upgraded!","color":"aqua","italic":true}]
scoreboard players set @s[nbt={Item:{id:"minecraft:iron_boots"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] ArmorStuff 300
execute at @s if entity @s[distance=..11,nbt={Item:{id:"minecraft:iron_boots"}},nbt=!{Item:{tag:{upgradedironarmor:1b}}}] run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..10] ["",{"text":"Your iron boots have been upgraded!","color":"aqua","italic":true}]
execute at @s if entity @s[distance=..11,type=item,nbt={Item:{tag:{upgradedironarmor:1b}}},tag=!UpgradedIronText] run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..10] ["",{"text":"Your iron armor cannot be upgraded further!","color":"gray","italic":true}]
execute at @s run tag @e[distance=..11,nbt={Item:{tag:{upgradedironarmor:1b}}}] add UpgradedIronText
data modify entity @s[nbt=!{Item:{tag:{upgradedironarmor:1b}}}] Item.tag merge value {upgradedironarmor:1b}
data modify entity @s[nbt=!{Item:{tag:{ironarmorkyu:1b}}}] Item.tag merge value {ironarmorkyu:1b}