Advertisement
Yorbo

KPW Ai first test

Oct 21st, 2021
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. ---
  2. --- Created by yannb.
  3. --- DateTime: 22/10/2021 02:36
  4. ---
  5.  
  6. local interface = peripheral.wrap("back")
  7. local canvas = interface.canvas()
  8. local text = canvas.addText({ x = 5, y = 5 }, "KPW OS BOOTING / 0%")
  9. local rect = canvas.addRectangle(0, 0, 100, 100, 0xFF34e8eb)
  10. local progress = 0
  11. local chat = peripheral.wrap("back")
  12. local afk = false
  13.  
  14. rect.setSize(250, 30)
  15. rect.setAlpha(100)
  16. text.setScale(3)
  17.  
  18. while true do
  19.     progress = progress + 1
  20.     text.setText("KPW OS BOOTING / " .. progress .. "%")
  21.     sleep(0.1)
  22. end
  23.  
  24. while true do
  25.     local _, player, message, uuid = os.pullEvent("chat_message")
  26.  
  27.     if message:find("[Yy][aรค]nn") and afk then
  28.         chat.say("Yann ist gerade AFK, hier ist le Bot der antwortet")
  29.         chat.say(player)
  30.     elseif uuid == "cc05c242-fc7b-4813-b568-3f0fe94e9b18" and message:find("afk") then
  31.         afk = true
  32.     end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement