Guest User

Untitled

a guest
Sep 9th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. rs.setOutput('right', true)
  2. rs.setOutput('bottom', true)
  3. rednet.open('back')
  4.  
  5. local function openDoor()
  6. rs.setOutput('right', false)
  7. rs.setOutput('bottom', false)
  8. sleep(3)
  9. rs.setOutput('right', true)
  10. rs.setOutput('bottom', true)
  11. end
  12.  
  13. while true do
  14. local e,id,msg,dist = os.pullEvent()
  15. if(e=='rednet_message') then
  16. local data = textutils.unserialize(msg)
  17. if data and data.username and data.password then
  18. if data.username == 'Soho' and data.password == 'Django' then
  19. openDoor()
  20. end
  21. end
  22. elseif(e=='redstone') then
  23. if rs.getInput('front') then
  24. openDoor()
  25. end
  26. end
  27. end
Add Comment
Please, Sign In to add comment