execute store result score random itemcount run random value 1..6
execute if score random itemcount matches 1 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:.15,operation:add_multiplied_base}
execute if score random itemcount matches 2 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:.1,operation:add_multiplied_base}
execute if score random itemcount matches 3 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:.05,operation:add_multiplied_base}
execute if score random itemcount matches 4 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:-0.05,operation:add_multiplied_base}
execute if score random itemcount matches 5 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:-0.1,operation:add_multiplied_base}
execute if score random itemcount matches 6 run data modify entity @s Item.components."minecraft:attribute_modifiers" append value {slot:"chest",type:"attack_speed",id:"2222",amount:-0.15,operation:add_multiplied_base}
scoreboard players reset random