Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wrap the monitor
- local mon = peripheral.wrap("monitor_8") -- Change this to your monitor peripheral
- mon.setTextScale(0.5)
- mon.clear()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- local w, h = mon.getSize()
- -- ASCII Art
- local art = {
- " $$$$$$\\ $$\\ $$\\ $$\\ $$\\ $$\\ $$\\ ",
- "$$ __$$\\ \\__|$$ | $$ | \\__| $$ | $$ | ",
- "$$ / $$ |$$$$$$$\\ $$$$$$$\\ $$\\ $$ | $$\\ $$$$$$\\ $$$$$$$\\ $$$$$$$\\ $$$$$$\\ $$\\ $$$$$$$\\ $$ | $$\\ $$$$$$\\ ",
- "$$$$$$$$ |$$ __$$\\ $$ __$$\\ $$ |$$ | $$ |$$ __$$\\ $$ __$$\\ $$ _____|\\_$$ _| $$ |$$ __$$\\ $$ | $$ |\\_$$ _| ",
- "$$ __$$ |$$ | $$ |$$ | $$ |$$ |$$$$$$ / $$$$$$$$ |$$ | $$ | \\$$$$$$\\ $$ | $$ |$$ | $$ |$$$$$$ / $$ | ",
- "$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ _$$< $$ ____|$$ | $$ | \\____$$\\ $$ |$$\\ $$ |$$ | $$ |$$ _$$< $$ |$$\\ ",
- "$$ | $$ |$$ | $$ |$$ | $$ |$$ |$$ | \\$$\\ \\$$$$$$$\\ $$ | $$ | $$$$$$$ | \\$$$$ |$$ |$$ | $$ |$$ | \\$$\\ \\$$$$ |",
- "\\__| \\__|\\__| \\__|\\__| \\__|\\__|\\__| \\__| \\_______|\\__| \\__| \\_______/ \\____/ \\__|\\__| \\__|\\__| \\__| \\____/ ",
- }
- -- Function to center text
- local function centerText(y, text)
- local x = math.floor((w - #text) / 2) + 1
- mon.setCursorPos(x, y)
- mon.write(text)
- end
- -- Display the art
- local startY = math.floor((h - #art) / 2) + 1
- for i, line in ipairs(art) do
- centerText(startY + i - 1, line)
- end
Advertisement
Add Comment
Please, Sign In to add comment