Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. run = 0
  2.  
  3. function listen()
  4. while true do
  5. if run = 0 then
  6. print "Press any key to continue"
  7. os.pullEvent("key")
  8. run = 1
  9. end
  10. else if run = 1 then
  11. print "Press any key to pause after current cycle"
  12. os.pullEvent("key")
  13. run = 0
  14. end
  15. end
  16. end
  17.  
  18. function main_loop()
  19. while run = 1 do
  20. --do your other stuff in here
  21. end
  22. end
  23.  
  24. --end of file run everything
  25. parrallel.waitForAll(listen, main_loop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement