Advertisement
infiniteblock

Untitled

Jun 17th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. rednet.open("top")
  2.  
  3.  
  4. while true do
  5.   print( "Press E to do something." )
  6.  
  7.   local event, key = os.pullEvent( "key" ) -- limit os.pullEvent to the 'key' event
  8.  
  9.   if key == keys.e then -- if the key pressed was 'e'
  10.     print( "You pressed [E]. Exiting program..." )
  11.     break
  12.   end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement