xXm0dzXx

Untitled

Sep 8th, 2012
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. local pumping = false;
  2. local option = 1;
  3.  
  4. while true do
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. if pumping then
  8. print("Pumps are currently on.")
  9. else
  10. print("Pumps are currently off.")
  11. end
  12. rs.setOutput("bottom", pumping)
  13.  
  14. if option == 1 then
  15. print("[On]Off")
  16. else
  17. print(" On[Off]")
  18. end
  19.  
  20. local event, key = os.pullEventRaw("key")
  21.  
  22. if key == 203 then
  23. option = 1
  24. elseif key == 205 then
  25. option = 2
  26. elseif key == 28 then
  27. if option == 1 then pumping = true else pumping = false end
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment