SoulofSorrow

Computercraft Monitor Text (einfach)

May 4th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. mon = peripheral.wrap("back") --Screen Side
  2. mon.setTextScale(4)           --Text Size
  3. strtpos = 12                  --Start position on screen
  4. speed = 0.3                   --Scroll Speed (Seconds)
  5. text = "Tower of BEES"    --Displayed Text
  6.  
  7. pos = strtpos
  8. poslimit = 0 - strtpos
  9.  
  10. while true do
  11.  mon.clear()
  12.  mon.setCursorPos(pos, 1)
  13.  mon.write(text)
  14.  sleep(speed)
  15.  if pos == poslimit then
  16.  pos = strtpos
  17.  else
  18.  pos = pos - 1
  19.  end
  20. end
Add Comment
Please, Sign In to add comment