Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gColors = {}
- gColors.red = 0xff3333
- gColors.blue = 0x7dd2e4
- gColors.yellow = 0xffff4d
- gColors.green = 0x4dff4d
- gColors.gray = 0xe0e0e0
- gColors.textGray = 0x818181
- gColors.text = 0x5a5a5a
- gColors.rain = 0x2e679f
- gColors.white = 0xffffff
- gColors.black = 0x000000
- glass = peripheral.wrap("left")
- glass.clear()
- glass.addText(5, 20, "Initialising...", gColors.blue)
- print("Initialising...")
- os.sleep(2)
- print("READY")
- glass.clear()
- while true do
- e, c, p = os.pullEvent("chat_command")
- if c == "sync" then
- print("Sync Request")
- print("Sync Failed")
- elseif c == "clear" then
- print("Clear Request")
- glass.clear()
- print("Clear Successfully")
- else
- print(c)
- ln1 = string.sub(c, 0, 25)
- ln2 = string.sub(c, 26, 50)
- ln3 = string.sub(c, 51, 75)
- ln4 = string.sub(c, 76, 100)
- ln5 = string.sub(c, 101, 125)
- glass.clear()
- glass.addText(2, 20, p, gColors.red)
- glass.addText(2, 30, ln1, gColors.blue)
- glass.addText(2, 40, ln2, gColors.blue)
- glass.addText(2, 50, ln3, gColors.blue)
- glass.addText(2, 60, ln4, gColors.blue)
- glass.addText(2, 70, ln5, gColors.blue)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment