Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "test"
- remoteId = 2
- rednet.open("top")
- local status = false
- redstone.setOutput("front",false)
- while true do
- id, message = rednet.receive()
- if id == remoteId and message == password then
- if status == false then
- status = true
- redstone.setOutput("front",true)
- elseif status == true then
- status = false
- redstone.setOutput("front",false)
- end
- elseif id == remoteId and message == "ping" then
- sleep(.1)
- rednet.send(remoteId,status)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement