ThatGravyBoat

Untitled

Aug 12th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. local monitor = peripheral.find("monitor")
  2.  
  3. function drawText(x, y, text, color)
  4. monitor.setCursorPos(x, y)
  5. if color then
  6. monitor.setBackgroundColor(color)
  7. end
  8. monitor.write(text)
  9. end
  10.  
  11. monitor.setBackgroundColor(colors.black)
  12. monitor.clear()
  13.  
  14. local loading = 0
  15.  
  16. while true do
  17. drawText(20, 13, "Loading...")
  18. for x = 1, loading do
  19. drawText(15 + x, 15, " ", colors.white)
  20. end
  21. loading = loading + 1
  22. if loading > 21 then
  23. loading = 0
  24. end
  25. os.sleep(0.8)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment