Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1.  
  2. local time = os.time()
  3.  
  4. while true do
  5.  
  6. time = os.time()
  7.  
  8. rs.setOutput("back",false)
  9. rs.setOutput("left",false)
  10. rs.setOutput("front",false)
  11. rs.setOutput("right",false)
  12.  
  13.  
  14. if time > 0 then <-- midnight
  15. if time < 3 then
  16. rs.setOutput("back",true)
  17.  
  18. end
  19. end
  20.  
  21. if time > 3 then
  22. if time < 6 then
  23.  
  24. rs.setOutput("right",true)
  25. end
  26. end
  27.  
  28. if time > 6 then
  29. if time < 9 then
  30.  
  31. rs.setOutput("front",true)
  32. end
  33. end
  34.  
  35. if time > 9 then -- sunrise
  36. if time < 12 then
  37.  
  38. rs.setOutput("left",true)
  39. end
  40. end
  41.  
  42.  
  43.  
  44. sleep(1)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement