Hello guys, how are you doing?

I would like to ask you for a little helping hand.

Can someone help me with a script that :

When a PK show up the screen, u run to 'x' SQM, and if hes not there anymore after 'z' time, run back to another 'y' sqm.
Thanks!

Renan.