#data modify entity @s Item set value {id:"minecraft:paper",Count:1b,tag:{Enchantments:[{id:"minecraft:lure",lvl:8s}],HideFlags:1,display:{Name:"{\"text\":\"Torn Spell Page: Clear Weather \"}",Lore:["\"Unlocks a spell when held.\""]}}}
#/execute as @e[distance=..11,type=item,tag=!SetMiddleItem,nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:1s}]}}}] run say a
#{id:"minecraft:lure",lvl:30s}


scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:2s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makehasteupgrade

scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:3s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makeslowfallupgrade


scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:4s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makeresistanceupgrade


scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:5s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makeescapeladderupgrade


scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:6s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makeeclocatorupgrade

scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:7s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makehorseupgrade

scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:9s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makeinvisupgrade

scoreboard players set @s KyuDummy 0
execute as @s[nbt={Item:{id:"minecraft:paper",tag:{Enchantments:[{id:"minecraft:lure",lvl:11s}]}}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s run execute at @e[limit=8,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_ingot",Count:1b}}] run scoreboard players add @s KyuDummy 1
execute as @s run execute at @s[scores={KyuDummy=9..}] run function zzzzdonotuse:modifyarmor/spells/makefarmupgrade