scoreboard players set @s KyuDummy 0
execute as @s run execute at @s run execute at @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:golden_apple",Count:1b}},limit=8] run scoreboard players add @s KyuDummy 1
execute at @s[scores={KyuDummy=8..},nbt=!{Item:{tag:{kyuabsorbmodule:1b}}}] run function zzzzdonotuse:modifyarmor/modules/addabsorptionmodule

scoreboard players set @s KyuDummy 0
execute as @s run execute at @s run execute at @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:netherite_ingot",Count:1b}},limit=3] run scoreboard players add @s KyuDummy 1
execute at @s[scores={KyuDummy=3..},nbt=!{Item:{tag:{kyuonearmormodule:1b}}}] run function zzzzdonotuse:modifyarmor/modules/addonearmormodule

scoreboard players set @s KyuDummy 0
execute as @s run execute at @s run execute at @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:netherite_block",Count:1b}},limit=2] run scoreboard players add @s KyuDummy 1
execute at @s[scores={KyuDummy=2..},nbt=!{Item:{tag:{kyuthreearmormodule:1b}}}] run function zzzzdonotuse:modifyarmor/modules/addthreearmormodule


scoreboard players set @s KyuDummy 0
execute as @s run execute at @s run execute at @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:iron_block",Count:1b}},limit=1] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:ghast_tear",Count:1b}},limit=2] run scoreboard players add @s KyuDummy 1
execute at @s[scores={KyuDummy=3..},nbt=!{Item:{tag:{kyuiframemodule:1b}}}] run function zzzzdonotuse:modifyarmor/modules/addiframemodule
