Belzebub

/bin/fake_chat.lua

Dec 7th, 2021
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. -- требуется компьютер с чатбоксом или планшет с улучшением чат
  2.  
  3. local chat = require("component").chat
  4. chat.setName("§6L§8")
  5. require("term").clear()
  6.  
  7. local name
  8. local argStr = table.concat({...}, " ")
  9. if #argStr > 0 then
  10.     name = argStr
  11. else
  12.     print("Введите ник:")
  13.     name = io.read()
  14. end
  15.  
  16. while true do
  17.   io.write("> ")
  18.   local msg = io.read()
  19.   if msg then
  20.     chat.say("§7"..name..': §q' .. msg)
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment