$execute if entity @a[tag=treadmill.active$(id),dx=0] run scoreboard players set @s treadmill.forgiveframes 0
$execute if score @a[tag=treadmill.active$(id),limit=1] treadmill.ready matches 0 run function ws:misc/gym/treadmilltimecalculation {id:$(id)}
$execute if entity @a[tag=treadmill.active$(id),scores={treadmill.ready=..-1}] run item replace entity @s container.0 with stone[minecraft:custom_model_data=1008]
$execute as @a[tag=treadmill.active$(id),dx=0,scores={treadmill.ready=..-1}] positioned as @s positioned ^ ^ ^-0.25 rotated as @s run tp @s ~ ~ ~
$execute as @a[tag=treadmill.active$(id),dx=0,scores={treadmill.level=5..,treadmill.ready=..-1}] positioned as @s positioned ^ ^ ^-0.1 rotated as @s run tp @s ~ ~ ~
$execute as @a[tag=treadmill.active$(id),dx=0,scores={treadmill.level=10..,treadmill.ready=..-1}] positioned as @s positioned ^ ^ ^-0.1 rotated as @s run tp @s ~ ~ ~
$execute as @a[tag=treadmill.active$(id),dx=0,scores={treadmill.level=15..,treadmill.ready=..-1}] positioned as @s positioned ^ ^ ^-0.1 rotated as @s run tp @s ~ ~ ~