Advertisement
jimgreeno

Untitled

Sep 16th, 2017
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 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
  22.  
  23. 1 + local component = require("component")
  24.  
  25. 2  local term = require("term")
  26.  
  27. 3  local chatBox = component.chat
  28.  
  29. 4  local gpu = component.gpu
  30.  
  31. 5  --Настроечки
  32.  
  33. 6  chatBox.setDistance(100)
  34.  
  35. 7  
  36.  
  37. 8  --Задаем имя
  38.  
  39. 9  gpu.setForeground(0x00FFFF)
  40.  
  41. 10  print("Welcome to ChatBox! Please enter your name")
  42.  
  43. 11  name = term.read()
  44.  
  45. 12  chatBox.setName("§6" .. name)
  46.  
  47. 13  
  48.  
  49. 14  gpu.setForeground(0xFFFF00)
  50.  
  51. 15  print("Good. Now you can chat.")
  52.  
  53. 16  
  54.  
  55. 17  while true do
  56.  
  57. 18  msg = term.read()
  58.  
  59. 19  chatBox.say("§9" .. msg)
  60.  
  61. 20  
  62.  
  63. 21      end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement