Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("bottom")
- local side = "back"
- local msg1 = "headlightson"
- local msg2 = "headlightsoff"
- while true do
- event, senderID, message, distance = os.pullEvent("rednet_message")
- if senderID == 5 and message == msg1 then
- redstone.setOutput(side, true)
- term.clear()
- print("Lights On")
- end
- if senderID == 5 and message == msg2 then
- redstone.setOutput(side, false)
- print("Lights Off")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement