data modify entity @s[nbt={Item:{id:"minecraft:leather_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:2,operation:"add_value"}

data modify entity @s[nbt={Item:{id:"minecraft:chainmail_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:4,operation:"add_value"}

data modify entity @s[nbt={Item:{id:"minecraft:iron_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:5,operation:"add_value"}

data modify entity @s[nbt={Item:{id:"minecraft:golden_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:3,operation:"add_value"}

data modify entity @s[nbt={Item:{id:"minecraft:diamond_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:6,operation:"add_value"}
data modify entity @s[nbt={Item:{id:"minecraft:diamond_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor_toughness",id:"-123321432456189102-73842",amount:2,operation:"add_value"}

data modify entity @s[nbt={Item:{id:"minecraft:netherite_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor",id:"-123321432456189101-73844",amount:6,operation:"add_value"}
data modify entity @s[nbt={Item:{id:"minecraft:netherite_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"armor_toughness",id:"-123321432456189102-73844",amount:3,operation:"add_value"}
data modify entity @s[nbt={Item:{id:"minecraft:netherite_leggings"}}] Item.components."minecraft:attribute_modifiers" append value {slot:"legs",type:"knockback_resistance",id:"-123321432456189103-73844",amount:0.1,operation:"add_value"}