Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("top")
- mon.setTextScale(1)
- mon.setBackgroundColor(256)
- mon.setCursorPos(1,1)
- mon.clear()
- function calc_color(color)
- return math.pow(2, color - 1)
- end
- function msg(gap, line, color, groundb, text)
- mon.setBackgroundColor(calc_color(groundb))
- mon.setCursorPos(gap,line)
- mon.setTextColor(calc_color(color))
- text = mon.write(text)
- end
- msg(01,01,01,08," Springfield ")
- msg(01,02,01,08,"Nuclear Power")
- msg(01,03,01,08," Plant ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement