Advertisement
Morok

OpenDoor with Player Detector and RedLogic

Jan 23rd, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. side = "right"
  2. timeout = 2
  3.  
  4. redstone.setOutput(side, false)
  5.  
  6. while 1 do
  7.  
  8. local event, param = os.pullEventRaw()
  9.  
  10. if event == "player" then
  11. if param == "test" then
  12.  
  13. expander = peripheral.wrap(side)
  14. expander.setOutput(1)
  15. sleep(timeout)
  16. expander.setOutput(0)
  17.  
  18. end
  19. end
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement