Guest User

break3

a guest
Mar 20th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. function cycle ()
  2.   while true do
  3.     turtle.place()
  4.     turtle.dig()
  5.   end
  6. end
  7.  
  8. function stahp ()
  9.   while true do
  10.     evt,button=os.pullEvent()
  11.     if evt=="key" then
  12.       print("Key pressed: "..button)
  13.       break
  14.     end
  15.   end
  16. end
  17.  
  18. term.clear()
  19. term.setCursorPos(1,1)
  20. print("Breaking Blocks")
  21. print("Press any key to terminate...")
  22. parallel.waitForAny(cycle,stahp)
Advertisement
Add Comment
Please, Sign In to add comment