Advertisement
Guest User

penis

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. mon = peripheral.wrap("monitor_1")
  2. rednet.open("top")
  3.  
  4. while true do
  5. mon.setBackgroundColor(colors.black)
  6. mon.clear()
  7. mon.setTextColor(colors.black)
  8. mon.setCursorPos(1,3)
  9. mon.write("=======")
  10.  
  11. mon.setTextScale(1)
  12. mon.setBackgroundColor(colors.pink)
  13. mon.setCursorPOS(1,1)
  14. mon.write(" ")
  15. mon.setCursorPos(1,2)
  16. mon.write(" Ouvert")
  17. mon.setBackgroundColor(colors.red)
  18. mon.setCursorPos(1,4)
  19. mon.write(" Fermé ")
  20. mon.setCursorPOS(1,5)
  21. mon.write(" ")
  22.  
  23. event, monid, x, y = os.pullEvent("monitor_touch")
  24.  
  25. redstone.setOutput("right", false)
  26. redstone.setOutput("left", false)
  27.  
  28. print (y)
  29.  
  30. if event == "monitor_touch" and y => 3 then
  31. redstone.setOutput("right", false)
  32. redstone.setOutput("left", false)
  33. rednet.broadcast("locking")
  34. end
  35.  
  36.  
  37. if y =< 3 then
  38. redstone.setOutput("right", true)
  39. redstone.setOutput("left", true)
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement