Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome to Joe's House!")
- print("What's the secret password?")
- --Sub Computer
- rednet.open("back")
- rednet.broadcast("door")
- while true do
- id, msg = rednet.receive()
- if msg == "controller" then
- controller = id
- break
- end
- end
- while true do
- input = read("*")
- rednet.send(id, input)
- while true do
- id, msg = rednet.receive()
- if id == controller then
- if msg == "open" then
- redstone.setOutput("right", true)
- sleep(5)
- redstone.setOutput("right", false)
- end
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement