Advertisement
vbp

Untitled

vbp
Aug 22nd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local sText = "plug walk!" -- You can change the text
  2. local sSide = "top" -- you can change the side of the monitor
  3.  
  4. local function printCenter(mon, txt)
  5. local w, h = mon.getSize()
  6. local x = math.floor((w / 2) - (#txt / 2))
  7. local y = math.floor((h / 2))
  8. mon.setCursorPos(x, y)
  9. mon.write("plug walk!")
  10. sleep(.72)
  11. mon.setTextColor(colors.red)
  12. sleep(.72)
  13. mon.setTextColor(colors.magenta)
  14. sleep(.72)
  15. mon.setTextColor(colors.red)
  16. sleep(.72)
  17. mon.setTextColor(colors.magenta)
  18. sleep(.72)
  19. mon.setTextColor(colors.red)
  20. sleep(.72)
  21. mon.setTextColor(colors.magenta)
  22. sleep(.72)
  23. mon.setTextColor(colors.red)
  24. sleep(.72)
  25. mon.setTextColor(colors.magenta)
  26. sleep(.72)
  27. mon.clear()
  28. end
  29.  
  30. local monitor = peripheral.wrap(sSide)
  31. printCenter(monitor, sText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement