Advertisement
ReDestroyDeR

cb.lua

Oct 7th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local component = require("component")
  2. local chatbox = component.chat
  3. local ss = require("term")
  4. local text = require("text")
  5.  
  6. print("Write your name: ")
  7. local n = ss.read()
  8. local n = text.trim(n)
  9. chatbox.setName(n)
  10.  
  11. while true do
  12.  
  13.     function output()
  14.         local v = ss.read()
  15.         local v = text.trim(v)
  16.         chatbox.say(v)
  17.     end
  18.    
  19.     output()
  20.  
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement