MatthewGB

Lua Monitor Sign

Mar 23rd, 2014
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. txt = "Mat Programming Co is AWESOME!"
  2. local pos = 14
  3.  
  4. mon=peripheral.wrap("top")
  5. mon.clear()
  6. color=1
  7. mon.setBackgroundColor(color)
  8. mon.setTextColor(colors.black)
  9. mon.setTextScale(5)
  10.  
  11. while true do
  12.   if pos==-28 then
  13.     pos=14
  14.   end
  15.  
  16.   mon.clear()
  17.   mon.setTextColor(color+color)
  18.   mon.setCursorPos(pos,1)
  19.   mon.write(txt)
  20.   pos=pos-1
  21.  
  22.   os.sleep(0.02)
  23.  
  24.   if (color<16000) then
  25.     color=color+color
  26.   else
  27.     color=1
  28.   end
  29.   mon.setBackgroundColor(color)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment