9551

Untitled

Jun 20th, 2021 (edited)
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. local function frame(monitor,pos1,pos2,length,height,color1,color3,thicc)
  2.     local m = peripheral.wrap(monitor)
  3.     m.setBackgroundColor(colors[color1])
  4.     fill(monitor, pos1 - 1, pos2 - height, length, height * 2)
  5.     m.setBackgroundColor(oldcol)
  6.     xm = m.getBackgroundColor()
  7.     xb = m.getTextColor()
  8.     m.setTextColor(xm)
  9.     m.setBackgroundColor(xb)
  10.     m.setCursorPos(pos1 - 1, pos2 - height)
  11.     if thicc then
  12.         m.setBackgroundColor(colors[color3])
  13.     end
  14.     if thicc then
  15.         m.write(string.rep("\x83", length + 1)) --\143
  16.         m.setTextColor(xb)
  17.         m.setBackgroundColor(xm)
  18.     else
  19.         m.write("\159" .. string.rep("\143", length - 1)) --\x83
  20.         m.setTextColor(xb)
  21.         m.setBackgroundColor(xm)
  22.         m.write("\144")
  23.     end
  24.     if thicc then
  25.         m.setBackgroundColor(colors[color3])
  26.     end
  27.     m.setCursorPos(pos1 - 1, pos2 + height)
  28.     if thicc then
  29.         m.write(string.rep("\x8c", length + 1)) --\131
  30.     else
  31.         m.write("\130" .. string.rep("\131", length - 1) .. "\129") --\x8c
  32.     end
  33.     for i = 0, (height * 2) - 2 do
  34.         if not thicc then
  35.             m.setTextColor(xm)
  36.             m.setBackgroundColor(xb)
  37.         end
  38.         m.setCursorPos(pos1 - 1, (pos2 + i) - (height) + 1)
  39.         if thicc then
  40.             m.setBackgroundColor(colors[color3])
  41.         end
  42.         m.write("\x95")
  43.         m.setCursorPos((pos1 - 2) + (length + 1), (pos2 + i) - (height) + 1)
  44.         if not thicc then
  45.             m.setTextColor(xb)
  46.             m.setBackgroundColor(xm)
  47.         end
  48.         m.write("\x95")
  49.     end
  50. end
  51.  
Add Comment
Please, Sign In to add comment