ElijahCrafter

Custom Mod Monitor Test

Nov 29th, 2025 (edited)
135
0
Never
11
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.82 KB | Source Code | 0 0
  1. -- ===========================================
  2. -- AUTO-SCALING MONITOR DEMO
  3. -- ===========================================
  4. -- This script shows how to use the canvas API
  5. -- that automatically scales to your GPU tier!
  6. --
  7. -- You draw using PERCENTAGES (0-100), and the
  8. -- monitor handles the rest. Higher tier GPUs
  9. -- show more detail, but it looks the same!
  10. -- ===========================================
  11.  
  12. -- Find the monitor
  13. local monitor = peripheral.find("monitor")
  14. if not monitor then
  15.     print("No monitor found!")
  16.     print("Connect a monitor with a cable.")
  17.     return
  18. end
  19.  
  20. -- Debug: Check what resolution APIs report
  21. print("=== Debug Info ===")
  22. local maxW, maxH = monitor.getMaxResolution()
  23. print("getMaxResolution: " .. maxW .. "x" .. maxH)
  24. local curW, curH = monitor.getResolution()
  25. print("getResolution (before): " .. curW .. "x" .. curH)
  26.  
  27. -- Try using setResolution directly instead of canvas.setup
  28. print("Setting resolution to max...")
  29. local success = monitor.setResolution(maxW, maxH)
  30. print("setResolution result: " .. tostring(success))
  31.  
  32. local newW, newH = monitor.getResolution()
  33. print("getResolution (after): " .. newW .. "x" .. newH)
  34.  
  35. -- Get the canvas API from the monitor
  36. local canvas = monitor.canvas
  37.  
  38. -- Use the resolution we set
  39. local w, h = newW, newH
  40. print("")
  41. print("Drawing at: " .. w .. "x" .. h)
  42.  
  43. -- ===========================================
  44. -- DRAW A SCENE USING PERCENTAGES
  45. -- ===========================================
  46.  
  47. -- Clear the screen
  48. canvas.clear(colors.black)
  49.  
  50. -- Sky (top 45% of screen)
  51. canvas.rect(0, 0, 100, 45, colors.lightBlue)
  52.  
  53. -- Sun (circle at 80% from left, 15% from top)
  54. canvas.circle(80, 15, 8, colors.yellow)
  55.  
  56. -- Ground (from 45% down to bottom)
  57. canvas.rect(0, 45, 100, 55, colors.green)
  58.  
  59. -- House body (at 15% from left, 40% from top)
  60. canvas.rect(15, 40, 25, 35, colors.brown)
  61.  
  62. -- Roof (layered rectangles to make triangle shape)
  63. canvas.rect(10, 32, 35, 3, colors.red)
  64. canvas.rect(12, 35, 31, 3, colors.red)
  65. canvas.rect(14, 38, 27, 2, colors.red)
  66.  
  67. -- Door
  68. canvas.rect(23, 55, 8, 20, colors.orange)
  69.  
  70. -- Window
  71. canvas.rect(18, 48, 6, 10, colors.lightBlue)
  72.  
  73. -- Tree trunk
  74. canvas.rect(70, 55, 5, 30, colors.brown)
  75.  
  76. -- Tree leaves (circle)
  77. canvas.circle(72, 45, 12, colors.lime)
  78.  
  79. -- Title bar at top
  80. canvas.rect(0, 0, 100, 8, colors.black)
  81.  
  82. -- Show resolution in title
  83. local title = "GPU: " .. w .. "x" .. h
  84. canvas.centerText(3, title, colors.white, colors.black)
  85.  
  86. -- ===========================================
  87. -- PRINT INFO TO COMPUTER TERMINAL
  88. -- ===========================================
  89. print("")
  90. print("=== Auto-Scaling Demo ===")
  91. print("Look at your monitor!")
  92. print("Resolution: " .. w .. "x" .. h)
  93. print("")
  94. print("Press Enter to exit...")
  95. read()
  96.  
  97. -- Reset monitor
  98. monitor.resetResolution()
  99. monitor.clear()
  100. print("Done!")
  101.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Ilzildi
    12 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment