Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("left")
- local state = 0
- local color = {"black"=0x000000, "blue"=0x0000CC}
- function text()
- m.clear()
- m.addText(1,1, "This is your commander",color.black)
- m.addText(1,10, "I'll give you updates and stuff here", 0x000000)
- m.addText(1,20, "Type $$clear to clear the screen", 0x000000)
- end
- text()
- while true do
- e, p1, p2, p3 = os.pullEvent()
- if e == "chat_command" then
- if p1 == "clear" then
- m.clear()
- elseif p1 == "update" then
- text()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement