Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. sleeptime = 30
  2. input = "right"
  3. output = "left"
  4.  
  5. counter = sleeptime
  6. mon = peripheral.wrap("top")
  7. mon.setTextScale(1)
  8. mon.clear()
  9.  
  10. while true do
  11. if redstone.getInput(input) then
  12. counter = sleeptime
  13. while counter > 0 do
  14. mon.clear()
  15. mon.setCursorPos(1,3)
  16. mon.write(string.format("%2d", counter))
  17. sleep(1)
  18. counter = counter - 1
  19. end
  20. mon.clear()
  21. redstone.setOutput(output, true)
  22. sleep(0.2)
  23. redstone.setOutput(output, false)
  24. end
  25. sleep(0.5)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement