#SpellUpdate tag determines whether or not it checks your mainhand for a spell, in order to unlock it and give you text. It is supposed to help prevent text spam if you hold out a spell for multiple seconds.
##this helps a bit with unlocking multiple spells in a row, without spamming text

execute as @s[tag=GlassGen] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:1s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=HasteSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:2s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=SlowFallSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:3s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=ResistSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:4s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=EscapeSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:5s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=LocateSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:6s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=HorseSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:7s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=WeatherSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:8s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=InvisSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:9s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=PortalSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=AnimalSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:11s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=CobbleSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:29s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=ExpSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:30s}]}}}] run tag @s remove SpellUpdate

execute as @s[tag=ImbueSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:7s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=RageSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:8s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=BasicRevSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:9s}]}}}] run tag @s remove SpellUpdate
execute as @s[tag=ResurrectSpell] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:10s}]}}}] run tag @s remove SpellUpdate

execute as @s[tag=HasteUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuhasteupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=SlowfallUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuslowfallupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=ResistUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuresistupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=LadderUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuladderupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=LocatorUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyulocatorupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=HorseUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuhorseupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=InvisUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyuinvisupgrade:1b}}}] run tag @s remove SpellUpdate
execute as @s[tag=FarmUpgrade] run execute as @s[tag=SpellUpdate,nbt=!{SelectedItem:{tag:{kyufarmupgrade:1b}}}] run tag @s remove SpellUpdate















execute as @s[tag=GlassGen] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:1s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=HasteSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:2s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=SlowFallSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:3s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=ResistSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:4s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=EscapeSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:5s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=LocateSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:6s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=HorseSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:7s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=WeatherSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:8s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=InvisSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:9s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=PortalSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=AnimalSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:11s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=CobbleSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:29s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=ExpSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:30s}]}}}] run tag @s add SpellUpdate

execute as @s[tag=ImbueSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:7s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=RageSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:8s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=BasicRevSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:9s}]}}}] run tag @s add SpellUpdate
execute as @s[tag=ResurrectSpell] run execute as @s[nbt={SelectedItem:{id:"minecraft:paper",tag:{HideFlags:1,Enchantments:[{id:"minecraft:unbreaking",lvl:10s}]}}}] run tag @s add SpellUpdate

execute as @s[tag=HasteUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuhasteupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=SlowfallUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuslowfallupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=ResistUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuresistupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=LadderUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuladderupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=LocatorUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyulocatorupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=HorseUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuhorseupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=InvisUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyuinvisupgrade:1b}}}] run tag @s add SpellUpdate
execute as @s[tag=FarmUpgrade] run execute as @s[nbt={SelectedItem:{tag:{kyufarmupgrade:1b}}}] run tag @s add SpellUpdate





