Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- line1 = "Crafting and"
- line2 = "storage area"
- color = "blue"
- m = peripheral.wrap("back")
- sx,sy = m.getSize()
- sx = sx + 1
- sy = sy + 1
- col = { ["white"]=1, ["orange"]=2, ["magenta"]=4, ["lightblue"]=8, ["yellow"]=16, ["lime"]=32, ["pink"]=64, ["gray"]=128, ["lightgray"]=256, ["cyan"]=512, ["purple"]=1024, ["blue"]=2048, ["brown"]=4096, ["green"]=8192, ["red"]=16384, ["black"]=32768 }
- function swritecenter(str,y,color)
- m.setCursorPos((sx/2-#str/2),y)
- m.setTextColor(col[color])
- m.write(str)
- end
- m.clear()
- m.setTextScale(2)
- swritecenter(line1,1,color)
- swritecenter(line2,2,color)
Advertisement
Add Comment
Please, Sign In to add comment