execute unless entity @s[scores={svm_ep.check_click=1..}] run scoreboard players set @s svm_ep.selected_style_ability 0

scoreboard players operation %cooldown1 svm_ep.numbers = @s svm_ep.style_ability1_delay
execute as @s[scores={svm_ep.selected_style_ability=2}] run scoreboard players operation %cooldown1 svm_ep.numbers = @s svm_ep.style_ability2_delay
execute as @s[scores={svm_ep.selected_style_ability=3}] run scoreboard players operation %cooldown1 svm_ep.numbers = @s svm_ep.style_ability3_delay

function svm_ep:power/delay

title @s times 0 2 4
title @s title ["",{"text":"| ","color":"gray"},{"text":"- ","color":"red"},{"text":"+","color":"#FF2A2C"},{"text":" -","color":"red"},{"text":" |","color":"gray"}]
title @s subtitle ["",{"text":"| ","color":"#989898"},{"text":"Form","color":"#86D2DC"},{"text":":","color":"gray"},{"text":" ","color":"#989898"},{"score":{"name":"@s","objective":"svm_ep.selected_style_ability"},"bold":true,"color":"white"},{"text":" - ","color":"#989898"},{"score":{"name":"%cooldown1","objective":"svm_ep.numbers"},"color":"red"},{"text":".","color":"red"},{"score":{"name":"%cooldown2","objective":"svm_ep.numbers"},"color":"red"},{"text":" | ","color":"#989898"}]

execute as @s[scores={svm_ep.fighting_style=1}] unless entity @s[nbt={SelectedItem:{components:{"minecraft:custom_data":{svm_ep.katana:1b}}}}] run scoreboard players set @s svm_ep.selected_style_ability 0
execute as @s[scores={svm_ep.fighting_style=3}] unless entity @s[nbt={SelectedItem:{components:{"minecraft:custom_data":{svm_ep.gauntlet:1b}}}}] run scoreboard players set @s svm_ep.selected_style_ability 0
title @s[scores={svm_ep.selected_style_ability=0}] title {"text":" ","color":"gray"}
title @s[scores={svm_ep.selected_style_ability=0}] subtitle {"text":" ","color":"gray"}