execute if score .portal hud matches 0 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/0"}]
execute if score .portal hud matches 1 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/1"}]
execute if score .portal hud matches 2 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/2"}]
execute if score .portal hud matches 3 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/3"}]
execute if score .portal hud matches 4 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/4"}]
execute if score .portal hud matches 5 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/5"}]
execute if score .portal hud matches 6 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/6"}]
execute if score .portal hud matches 7 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/7"}]
execute if score .portal hud matches 8 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/8"}]
execute if score .portal hud matches 9 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/9"}]
execute if score .portal hud matches 10 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/10"}]
execute if score .portal hud matches 11 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/11"}]
execute if score .portal hud matches 12 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/12"}]
execute if score .portal hud matches 13 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/13"}]
execute if score .portal hud matches 14 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/14"}]
execute if score .portal hud matches 15 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/15"}]
execute if score .portal hud matches 16 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/16"}]
execute if score .portal hud matches 17 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/17"}]
execute if score .portal hud matches 18 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/18"}]
execute if score .portal hud matches 19 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/19"}]
execute if score .portal hud matches 20 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/20"}]
execute if score .portal hud matches 21 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/21"}]
execute if score .portal hud matches 22 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/22"}]
execute if score .portal hud matches 23 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/23"}]
execute if score .portal hud matches 24 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/24"}]
execute if score .portal hud matches 25 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/25"}]
execute if score .portal hud matches 26 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/26"}]
execute if score .portal hud matches 27 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/27"}]
execute if score .portal hud matches 28 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/28"}]
execute if score .portal hud matches 29 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/29"}]
# execute if score .portal hud matches 30 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/30"}]
# execute if score .portal hud matches 31 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/31"}]
# execute if score .portal hud matches 32 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/32"}]
# execute if score .portal hud matches 33 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/33"}]
# execute if score .portal hud matches 34 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/34"}]
# execute if score .portal hud matches 35 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/35"}]
# execute if score .portal hud matches 36 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/36"}]
# execute if score .portal hud matches 37 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/37"}]
# execute if score .portal hud matches 38 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/38"}]
# execute if score .portal hud matches 39 run item replace entity @a armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot: "head", equip_sound: "item.armor.equip_leather", camera_overlay: "minecraft:custom/overlay/portal/39"}]

scoreboard players add .portal hud 1
execute if score .portal hud matches 30 run clear @a
execute if score .portal hud matches ..31 run schedule function main:hub/portal/tick 1t