Advertisement
Guest User

startup

a guest
Apr 18th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. s = peripheral.wrap('top');
  2.  
  3. wasOn = false;
  4.  
  5. while true do
  6.  
  7. if rs.getInput('right') and not wasOn then
  8.     s.speak('Spinning up the reactor...');
  9. end
  10.  
  11. if not rs.getInput('right') and wasOn then    
  12.     s.speak('Disengaging the reactor...');
  13. end
  14.  
  15. wasOn = rs.getInput('right');
  16.  
  17. sleep(1);
  18.  
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement