ThatGravyBoat

Untitled

May 7th, 2021 (edited)
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. local monitor = peripheral.find("monitor")
  2. local surface = dofile("surface")
  3. monitor.setTextScale(0.5)
  4. local w,h = monitor.getSize()
  5. local screen = surface.create(w,h)
  6. local display = surface.load("popcorn.nfp")
  7. screen:drawSurface(display,0,0)
  8. monitor.setPaletteColor(colors.red, 0xd77b28)
  9. monitor.setPaletteColor(colors.green, 0xf29d20)
  10. monitor.setPaletteColor(colors.brown, 0xf3b51f)
  11. monitor.setPaletteColor(colors.blue, 0xf2b51e)
  12. monitor.setPaletteColor(colors.purple, 0xf5b523)
  13. monitor.setPaletteColor(colors.cyan, 0xefb81d)
  14. monitor.setPaletteColor(colors.lightGray, 0xeeba19)
  15. monitor.setPaletteColor(colors.gray, 0xceede4)
  16. monitor.setPaletteColor(colors.pink, 0xa3b2ae)
  17. monitor.setPaletteColor(colors.lime, 0xccdbd6)
  18. monitor.setPaletteColor(colors.yellow, 0xb7c5c1)
  19. monitor.setPaletteColor(colors.lightBlue, 0x97edd4)
  20. monitor.setPaletteColor(colors.magenta, 0x94a29e)
  21. monitor.setPaletteColor(colors.orange, 0xe0dbab)
  22. monitor.setPaletteColor(colors.white, 0xdfcf97)
  23. screen:output(monitor)
  24.  
  25.  
  26. while true do
  27. event, side, xPos, yPos = os.pullEvent("monitor_touch")
  28. if xPos > 2 and xPos < 14 and yPos > 17 and yPos < 24 then
  29. print("test")
  30. rs.setAnalogOutput("back", 15)
  31. sleep(0.5)
  32. rs.setAnalogOutput("back", 0)
  33. end
  34. end
Add Comment
Please, Sign In to add comment