Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cb = peripheral.wrap("left")
- sm = peripheral.wrap("right")
- sp = peripheral.wrap("back")
- mon = peripheral.wrap("top")
- a = {"","","","","","","","","","","","","","","","","","","","","","","","","",""}
- x = 0
- local function display()
- mon.clear()
- for i = 1 , 26 do
- mon.setCursorPos(1,i)
- mon.write(a[i])
- end
- end
- local function move(message)
- for i = 2, 26 do
- a[i-1] = a[i]
- end
- a[26] = message
- end
- while rs.getInput("bottom", true) do
- e,player,message = os.pullEvent("chat")
- print(e)
- sp.speak(message)
- sm.send("smarthelmet",player..": "..message, 10000000)
- if x == 26 then
- move(player..": "..message)
- else
- x = x + 1
- end
- a[x] = player..": "..message
- display()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement