Advertisement
Guest User

startup

a guest
Apr 3rd, 2020
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local tText = {
  2. "  Mining World",
  3. "Please protect using",
  4. "GriefDefender!"
  5. }
  6. local sSide = "bottom"
  7.  
  8. local function printCenter(mon, t)
  9.   local w, h = mon.getSize()
  10.   local y = math.floor((h / 2) - (#t / 2)) - 1
  11.   for i, line in ipairs(t) do
  12.         local x = math.floor((w / 2) - (#line / 2))
  13.         --mon.setTextScale(1)
  14.         mon.setCursorPos(x, y + i)
  15.         mon.write(line)
  16.   end
  17. end
  18.  
  19. printCenter(peripheral.wrap(sSide), tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement