SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local sText = "plug walk!" -- You can change the text
  2. local sSide = "top" -- you can change the side of the monitor
  3.  
  4. local function printCenter(mon, txt)
  5.   local w, h = mon.getSize()
  6.   local x = math.floor((w / 2) - (#txt / 2))
  7.   local y = math.floor((h / 2))
  8.   mon.setCursorPos(x, y)
  9.   mon.write("plug walk!")
  10.   sleep(.2)
  11.   mon.setTextColor(red)
  12.   sleep(.2)
  13.   mon.setTextColor(magenta)
  14.   sleep(.2)
  15.   mon.setTextColor(red)
  16.   sleep(.2)
  17.   mon.setTextColor(magenta)
  18.   sleep(.2)
  19.   mon.setTextColor(red)
  20.   sleep(.2)
  21.   mon.setTextColor(magenta)
  22.   sleep(.2)
  23.   mon.setTextColor(red)
  24.   sleep(.2)
  25.   mon.setTextColor(magenta)
  26.   sleep(.2)
  27. end
  28.  
  29. local monitor = peripheral.wrap(sSide)
  30. printCenter(monitor, sText)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top