Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doorWidth = 3
- rednet.open("top")
- closeSide = "bottom"
- openSide = "left"
- function move(side)
- for c = 1, doorWidth, 1 do
- redstone.setOutput(side, true)
- os.sleep(0.8)
- redstone.setOutput(side, false)
- os.sleep(0.8)
- end
- end
- while true do
- id, message, dist = rednet.receive()
- if message == "open" then
- move(openSide)
- print(message)
- elseif message == "close" then
- move(closeSide)
- print(message)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement