Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("right")
- function drawVertText(x, y, text, background, foreground)
- local newY = y;
- monitor.setCursorPos(x, newY)
- monitor.setBackgroundColor(background)
- monitor.setTextColor(foreground)
- for i = 1, string.len(text), 1 do
- monitor.write(text:sub(i,i))
- newY = newY + 1
- monitor.setCursorPos(x, newY)
- end
- end
- function main()
- while (true) do
- if (monitor == nil) then
- monitor = peripheral.wrap("right")
- end
- if (monitor ~= nil) then
- monitor.setBackgroundColor(colours.grey)
- monitor.clear()
- drawVertText(1, 1, "Machines", colours.grey, colours.white)
- drawVertText(5, 1, "Trees", colours.grey, colours.white)
- drawVertText(9, 1, "PAs", colours.grey, colours.white)
- end
- os.sleep(5)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement