Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- aa = "Access Allow"
- ad = "Access Denied"
- function o()
- e,s,m = os.pullEvent("rednet_message")
- term.write("Computer: #"..s.." Send: '"..m.."'")
- cX,cY = term.getCursorPos()
- term.setCursorPos(1,math.floor(cY+1))
- if a(s) == aa then
- term.setTextColor(colors.green)
- term.write(aa)
- if m == "on" then
- rs.setOutput("top",true)
- elseif m == "off" then
- rs.setOutput("top",false)
- end
- else
- term.setTextColor(colors.red)
- term.write(ad)
- end
- term.setTextColor(colors.white)
- cX,cY = term.getCursorPos()
- term.setCursorPos(1,math.floor(cY+1))
- o()
- end
- function a(s)
- if s == 0 then
- return aa
- else
- return ad
- end
- end
- o()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement