Advertisement
Shue

cctweaked_sign

May 7th, 2021
1,118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. side = "monitor_0"
  2. term.write("Display Text: ")
  3. text = "Welcome to ShueCo.!"
  4. textColor = 0
  5. scrollSpeed = 0.3
  6. term.write("Program running... CTLR+T to Terminate.")
  7.  
  8. function makeScrollingText(side,text,tc,speed)
  9.     mon = peripheral.wrap(side)
  10.     w,h = mon.getSize()
  11.     x = w
  12.     tc = string.rep(tc,#text)
  13.     mon.setTextScale(5)
  14.     mon.clear()
  15.     while true do
  16.         mon.setCursorPos(x,1)
  17.         mon.blit(text,tc,string.rep("f",#text))
  18.         x = x-1
  19.         if x < (#text - (#text * 2)) then
  20.             x = w
  21.         end
  22.         sleep(speed+0)
  23.         mon.clear()
  24.     end
  25. end
  26.  
  27. makeScrollingText(side,text,textColor,scrollSpeed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement