Advertisement
appollon41

Untitled

Mar 25th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2.  
  3. function detect()
  4. event, side, x,y = os.pullEvent("monitor_touch")
  5.  
  6. affichage(colors.red)
  7.  
  8. rs.setBundledOutput("top",8192)
  9. os.sleep(3.7)
  10. rs.setBundledOutput("top",0)
  11. rs.setBundledOutput("top",34)
  12. os.sleep(3.7)
  13. rs.setBundledOutput("top",0)
  14. rs.setBundledOutput("top",1)
  15.  
  16. affichage(colors.green)
  17. end
  18.  
  19. function affichage(color)
  20. mon.setBackgroundColor(color)
  21. mon.clear()
  22. end
  23.  
  24. while true do
  25. detect()
  26. os.sleep(0.1)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement