Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rs.setOutput('right', true)
- rs.setOutput('bottom', true)
- rednet.open('back')
- local function openDoor()
- rs.setOutput('right', false)
- rs.setOutput('bottom', false)
- sleep(3)
- rs.setOutput('right', true)
- rs.setOutput('bottom', true)
- end
- while true do
- local e,id,msg,dist = os.pullEvent()
- if(e=='rednet_message') then
- local data = textutils.unserialize(msg)
- if data and data.username and data.password then
- if data.username == 'Soho' and data.password == 'Django' then
- openDoor()
- end
- end
- elseif(e=='redstone') then
- if rs.getInput('front') then
- openDoor()
- end
- end
- end
Add Comment
Please, Sign In to add comment