execute as @s[scores={svm_ep.menu=1}] run function svm_ep:menu/generic
execute as @s[scores={svm_ep.menu=2}] run function svm_ep:menu/bind
execute as @s[scores={svm_ep.menu=20..30}] run function svm_ep:menu/bind/bind
execute as @s[scores={svm_ep.menu=3}] run function svm_ep:menu/help
execute as @s[scores={svm_ep.menu=4}] run function svm_ep:menu/help_moves
execute as @s[scores={svm_ep.menu=5}] run function svm_ep:menu/help_items
execute as @s[scores={svm_ep.menu=6}] run function svm_ep:menu/cosmetics
execute as @s[scores={svm_ep.menu=7}] run function svm_ep:menu/blessing
execute as @s[scores={svm_ep.menu=8}] run function svm_ep:menu/talent
execute as @s[scores={svm_ep.menu=9}] run function svm_ep:menu/miracle
execute as @s[scores={svm_ep.menu=10}] run function svm_ep:menu/settings

execute as @s[scores={svm_ep.menu=2..}] at @s run playsound minecraft:ui.loom.select_pattern master @s ~ ~ ~ 2 1
execute as @s[scores={svm_ep.menu=50}] run function svm_ep:menu/moves/phase
execute as @s[scores={svm_ep.menu=51}] run function svm_ep:menu/moves/lightning
execute as @s[scores={svm_ep.menu=52}] run function svm_ep:menu/moves/flora
execute as @s[scores={svm_ep.menu=53}] run function svm_ep:menu/moves/slime
execute as @s[scores={svm_ep.menu=54}] run function svm_ep:menu/moves/explosion
execute as @s[scores={svm_ep.menu=55}] run function svm_ep:menu/moves/ice
execute as @s[scores={svm_ep.menu=56}] run function svm_ep:menu/moves/gravity
execute as @s[scores={svm_ep.menu=57}] run function svm_ep:menu/moves/harpie
execute as @s[scores={svm_ep.menu=58}] run function svm_ep:menu/moves/dimension_traveler
execute as @s[scores={svm_ep.menu=59}] run function svm_ep:menu/moves/fire
execute as @s[scores={svm_ep.menu=60}] run function svm_ep:menu/moves/4fun
execute as @s[scores={svm_ep.menu=61}] run function svm_ep:menu/moves/void

execute as @s[scores={svm_ep.menu=50..99}] run tellraw @s ["",{"text":" ","color":"#F4D5FF","clickEvent":{"action":"run_command","value":"/trigger svm_ep.menu set 10001"},"hoverEvent":{"action":"show_text","contents":"Click to bind to selected slot"}},{"text":"[Unbind Slot]","color":"#F4507C","clickEvent":{"action":"run_command","value":"/trigger svm_ep.menu set 10000"},"hoverEvent":{"action":"show_text","contents":"Click to bind to selected slot"}}]

execute as @s[scores={svm_ep.menu=1000..1999,svm_ep.player_permissions=1..}] run function svm_ep:menu/owner
execute as @s[scores={svm_ep.menu=2000..2999}] run function svm_ep:menu/cosmetics/sword_slash
execute as @s[scores={svm_ep.menu=3000..3999}] run function svm_ep:menu/settings/apply
execute as @s[scores={svm_ep.menu=10000..19999}] run function svm_ep:menu/bind/bind
execute as @s[scores={svm_ep.menu=20000..29999}] run function svm_ep:menu/unlock



scoreboard players reset @s svm_ep.menu
scoreboard players enable @s svm_ep.menu
