scoreboard players add @s treadmill.forgiveframes 1
execute unless score @s treadmill.forgiveframes matches 10.. run return 0
$scoreboard players set @e[tag=treadmill.timer,tag=id$(id),limit=1,sort=nearest] treadmill.timer -1
$execute as @e[tag=treadmill.active$(id)] at @s run function ws:misc/gym/treadmillfailplayer
$tag @e[tag=treadmill.active$(id)] remove treadmill.active$(id)
item replace entity @s container.0 with stone[minecraft:custom_model_data=1007]
$execute unless entity @e[type=interaction,tag=treadmill.activator,tag=id$(id)] at @s align y run summon interaction ~ ~ ~ {Tags:["treadmill.activator","id$(id)"],height:2.0f,width:2.0f}
$execute at @e[type=interaction,tag=treadmill.activator,tag=id$(id)] unless entity @e[tag=treadmill.rmb,tag=id$(id)] run summon minecraft:text_display ~ ~1.8 ~ {Tags:["treadmill.rmb",id$(id)],Rotation:[-90f,0f],text:'{"translate":"treadmill.rmb"}',background:0}
scoreboard players reset @s treadmill.level
scoreboard players set @s treadmill.forgiveframes 0