ROMVoid

Untitled

Jan 22nd, 2021
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. local inputSide = "bottom"
  2. local passThroughSide = "top"
  3. local monitorSide = "left"
  4. local onMessage = "Laboratory active"
  5. local offmessage = "Laboratory inactive"
  6.  
  7. local mon = peripheral.wrap(monitorSide)
  8. if not mon then
  9. error("no monitor on expected side: "..monitorSide)
  10. end
  11. local event
  12. mon.setCursorBlink(false)
  13. while true do
  14. event = { os.pullEvent("redstone")}
  15. mon.clear()
  16. mon.setCursorPos(1,1)
  17. if redstone.getInput(inputSide) then
  18. mon.write(onMessage)
  19. redstone.setOutput(passThroughSide,true)
  20. else
  21. mon.write(offMessage)
  22. redstone.setOutput(passThroughSide,false)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment