execute as @s[predicate=main:movement/left,predicate=!main:movement/right] run scoreboard players remove @s dps 1
execute as @s[predicate=main:movement/right,predicate =!main:movement/left] run scoreboard players add @s dps 1
execute as @s[predicate=!main:movement/right,predicate =!main:movement/left] run scoreboard players set @s dps 5
execute as @s[predicate=main:movement/right,predicate =main:movement/left] run scoreboard players set @s dps 5

execute if score @s dps matches 10.. run scoreboard players set @s dps 10
execute if score @s dps matches ..0 run scoreboard players set @s dps 0

execute store result storage velocity temp int 1 run scoreboard players get @s dps
execute store result storage velocity direction float 0.1 run scoreboard players get @s dps

execute unless score .temp dps = @s dps run function main:mechanics/effects/tilt/particle with storage velocity