xavierlebel

Untitled

Aug 7th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. local sTime = os.time()
  2. if sTime < 6 and sTime > 0 then
  3. rs.setOutput("back", false )
  4. else
  5. rs.setOutput("back", true)
  6. end
  7.  
  8. while true do
  9. sTime = os.time()
  10. if sTime < 6 and sTime > 0 then
  11. os.setAlarm( 6 )
  12. os.pullEvent("alarm")
  13. rs.setOutput("back", true)
  14.  
  15. elseif sTime > 6 or sTime < 0 then
  16. os.setAlarm( 0 )
  17. os.pullEvent("alarm")
  18. rs.setOutput("back", false )
  19. end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment