Just Wait For It...
when green flag clicked set [player x v] to (0) set [player y v] to (0) set [player direction v] to (90) forever clear repeat until <touching [edge v]?> move (10) steps if <touching [wall v]?> then stop [all v] end end end