Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- run = 0
- function listen()
- while true do
- if run = 0 then
- print "Press any key to continue"
- os.pullEvent("key")
- run = 1
- end
- else if run = 1 then
- print "Press any key to pause after current cycle"
- os.pullEvent("key")
- run = 0
- end
- end
- end
- function main_loop()
- while run = 1 do
- --do your other stuff in here
- end
- end
- --end of file run everything
- parrallel.waitForAll(listen, main_loop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement