ThatGravyBoat

Untitled

Aug 12th, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local monitor = peripheral.find("monitor")
  2. local chars = {
  3. "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=",
  4. "~", "!", "@", "#", "$", "%", "^", "&", "*", "?", ":", "_", "+"
  5. }
  6. local random_colors = {
  7. colors.red, colors.blue, colors.lime, colors.green
  8. }
  9.  
  10. function drawText(x, y, text, color)
  11. monitor.setCursorPos(x, y)
  12. monitor.setBackgroundColor(color)
  13. monitor.write(text)
  14. end
  15.  
  16. while true do
  17. for x = 1, 51 do
  18. for y = 1, 19 do
  19. drawText(x, y, chars[math.random(1, #chars)], random_colors[math.random(1, #random_colors)])
  20. end
  21. end
  22. os.sleep(1/24)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment