Advertisement
Guest User

msg

a guest
Sep 16th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local component = require("component")
  2. local term = require("term")
  3. local chatBox = component.chat
  4. local gpu = component.gpu
  5. --Настроечки
  6. chatBox.setDistance(100)
  7.  
  8. --Задаем имя
  9. gpu.setForeground(0x00FFFF)
  10. print("Welcome to ChatBox! Please enter your name")
  11. name = term.read()
  12. chatBox.setName("§6" .. name)
  13.  
  14. gpu.setForeground(0xFFFF00)
  15. print("Good. Now you can chat.")
  16.  
  17. while true do
  18. msg = term.read()
  19. chatBox.say("§9" .. msg)
  20.  
  21.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement