execute as @s[scores={svm_ep.fighting_style_creator_slot=1}] run scoreboard players operation @s svm_ep.numbers = @s svm_ep.style_ability1
execute as @s[scores={svm_ep.fighting_style_creator_slot=2}] run scoreboard players operation @s svm_ep.numbers = @s svm_ep.style_ability2
execute as @s[scores={svm_ep.fighting_style_creator_slot=3}] run scoreboard players operation @s svm_ep.numbers = @s svm_ep.style_ability3


scoreboard players operation %INPUT svm_ep.style_ability = @s svm_ep.numbers
scoreboard players operation %MOVEMENT_TYPE svm_ep.style_ability = @s svm_ep.numbers
scoreboard players operation %SLASH_TYPE svm_ep.style_ability = @s svm_ep.numbers
scoreboard players operation %SPEED_TYPE svm_ep.style_ability = @s svm_ep.numbers

scoreboard players operation %MOVEMENT_TYPE svm_ep.style_ability /= %100 svm_ep.numbers
scoreboard players operation %SLASH_TYPE svm_ep.style_ability %= %100 svm_ep.numbers
scoreboard players operation %SPEED_TYPE svm_ep.style_ability %= %10 svm_ep.numbers
scoreboard players operation %SLASH_TYPE svm_ep.style_ability /= %10 svm_ep.numbers


execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_movement:1b}}}]}] unless score %MOVEMENT_TYPE svm_ep.style_ability matches 1 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_movement:2b}}}]}] unless score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_movement:3b}}}]}] unless score %MOVEMENT_TYPE svm_ep.style_ability matches 3 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_movement:4b}}}]}] unless score %MOVEMENT_TYPE svm_ep.style_ability matches 4 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_movement:5b}}}]}] unless score %MOVEMENT_TYPE svm_ep.style_ability matches 5 run tag @s add create

execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_slash:1b}}}]}] unless score %SLASH_TYPE svm_ep.style_ability matches 1 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_slash:2b}}}]}] unless score %SLASH_TYPE svm_ep.style_ability matches 2 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_slash:3b}}}]}] unless score %SLASH_TYPE svm_ep.style_ability matches 3 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_slash:4b}}}]}] unless score %SLASH_TYPE svm_ep.style_ability matches 4 run tag @s add create

execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_charge:1b}}}]}] unless score %SPEED_TYPE svm_ep.style_ability matches 1 run tag @s add create
execute as @s[nbt={Inventory:[{Slot:-106b,components:{"minecraft:custom_data":{svm_ep.sword_ability_charge:2b}}}]}] unless score %SPEED_TYPE svm_ep.style_ability matches 2 run tag @s add create

execute as @s[tag=!create] run tellraw @s [{"text":"| Seems tha","color":"gray"},{"text":"t you alre","color":"#C1C1C1"},{"text":"ady p","color":"#DEDEDE"},{"text":"o","color":"#F2F2F2"},{"text":"sse","color":"white"},{"text":"ss ","color":"#F2F2F2"},{"text":"this at s","color":"#DEDEDE"},{"text":"elected sl","color":"#C1C1C1"},{"text":"ot","color":"gray"}]
execute at @s[tag=!create] run playsound minecraft:block.note_block.didgeridoo master @s ~ ~ ~ 1 0.75
execute as @s[tag=create] run function svm_ep:fighting_style/sword/creator/create
function svm_ep:player/swap_hand_items