Here's a code for stamina
From memory. Not tested.
Make the run button add the tag #run to the toon.
Make the toon have a character tag
Run button code.
Run button rules
When a touch begins
If variable $stamina is greater than 0
Tell actors with the tag #character
Add tag #run
Rule 2: when a touch ends
Tell actors with the tag #character
Remove tag #run
Repeat every 0.0167 seconds
If variable $stamina is equal or less than 0
Remove tag #run
Modify dynamic motion property to (base toon speed)
Toon rules
Repeat every 0.0167 seconds
If this has tag #run
Repeat every 0.25 seconds
Modify variable $stamina to -1 (relative)
Modify dynamic motion property speed to (insert a number)