aregrubb

inforscreedn

Dec 22nd, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. mon = peripheral.wrap("back") -- get monitor
  2.  
  3. aX,aY = mon.getSize()
  4.  
  5. mon.setTextScale(2)
  6. mon.setTextColor(colors.orange)
  7. mon.setBackgroundColor(colors.black)
  8. mon.clear()
  9.  
  10. sign = ("  Mad Scientist's")
  11. centerText = ((aX/2) - (string.len(sign)/2))+2
  12. -- mon.setCursorPos(centerText,1)
  13. mon.setCursorPos(1,1)
  14. mon.write(sign)
  15.  
  16.  
  17. showText = "24/0 Hours Open! Open! Open! Open! Always Open!"
  18.  
  19. txtM = aX + 1
  20.  
  21. while true do
  22.     mon.setCursorPos(txtM,2)
  23.     mon.clearLine()
  24.     mon.setTextColor(colors.green)
  25.     mon.write(showText)
  26.     check =  -1 * string.len(showText)
  27.    
  28.     if txtM < check then
  29.         txtM = aX + 1
  30.     else
  31.         txtM = txtM - 1
  32.     end    
  33.    
  34.     os.sleep(0.3)
  35. end
  36.  
Add Comment
Please, Sign In to add comment