Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("back")
- mon.setTextScale(4.5)
- 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
- function clear()
- for a = 1,10 do
- msg(01,a,16,16," ")
- end
- end
- while true do
- if rs.getInput("top", true) then
- clear()
- msg(03,02,09,16,"Mobfarm")
- msg(11,02,06,16,"OPEN")
- else
- clear()
- msg(02,02,09,16,"Mobfarm")
- msg(10,02,15,16,"CLOSED")
- end
- sleep(10)
- end
Add Comment
Please, Sign In to add comment