DrFair

Puzzle door

May 25th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. redstone.setOutput("back",false)
  2. redstone.setOutput("front",false)
  3.  
  4. function open()
  5. if not redstone.getOutput("front") then
  6. for i=1,3 do
  7. redstone.setOutput("front",true)
  8. os.sleep(0.4)
  9. redstone.setOutput("front",false)
  10. os.sleep(0.4)
  11. end
  12. end
  13. redstone.setOutput("front",true)
  14. end
  15.  
  16. while true do
  17. if redstone.getInput("back") then
  18. redstone.setOutput("back",true)
  19. open()
  20. os.sleep(1000)
  21. else
  22. os.sleep(0.1)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment