put something like gametime = millisecs() a the start of the code
then put in the main loop:
if millisecs() - gametime = 300000 then end
then it'll quit the game instantly as soon it's been running five minutes.
then put in the main loop:
if millisecs() - gametime = 300000 then end
then it'll quit the game instantly as soon it's been running five minutes.