Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- print("Active")
- local rsSide = "top"
- local modem = peripheral.wrap("right")
- modem.open(35353)
- while true do
- local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
- if event == "modem_message" then
- if p2 == 35353 and p4 == "access" and p5 < 5 then
- redstone.setOutput(rsSide, true)
- sleep(0.2)
- redstone.setOutput(rsSide, false)
- elseif p2 == 35353 and p4 == "terminate" and p5 <= 3 then
- term.clear()
- term.setCursorPos(1,1)
- print("Terminated")
- return
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement