VintageRice

[CC][Release] - Scrolling Monitor Text

Aug 2nd, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. aMon = peripheral.wrap("back")
  2. aMon.setTextSale(5)
  3.  
  4. aString = "CC Scrolling Monitor String"
  5. tWidth = (#aString + 1)
  6. tPos, tMax = (aMon.width + tWidth)
  7.  
  8. while true do
  9.     if(tPos == (0 - tWidth)
  10.         tPos = tMax
  11.     end
  12.  
  13.     aMon.clear()
  14.     aMon.setCursorPos(tPos, 1)
  15.     aMon.write(aString)
  16.  
  17.     tPos - tPos - 1
  18.     os.sleep(.15)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment