Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- m = peripheral.find("monitor")
- m.setTextColor(colors.black)
- m.setTextScale(3)
- local function centerText(m, text)
- local x,y = m.getSize()
- local x2,y2 = m.getCursorPos()
- local fg, bg = ""
- m.setCursorPos(math.ceil((x/2)-(text:len()/2)), math.ceil(y/2))
- m.write(text)
- end
- while true do
- for i = 1, 14 do
- centerText(m, tArgs[1], 2^i)
- m.setBackgroundColor(2^i)
- m.clear()
- centerText(m, tArgs[1])
- print("Color: "..m.getBackgroundColor())
- sleep(0.2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement