Hello,
You use Touch, Mouse, or keybord ?
However, use variable (named "Sleep" ?), then create function named "Start sleep timer".
On "Start sleep timer" function -> Set Sleep to 0.
Repeat 5 times -> Wait 1 second then add 1 to sleep.
Condition : Sleep = 5 & Trigger Once -> Start your sleep.
On touch, or clicked, ect -- > Call function "Start sleep timer".