Advertisement
Yorbo

Untitled

Oct 21st, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 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 clearing = interface.canvas()
  8. clearing.clear()
  9. local canvas = interface.canvas()
  10. local group = canvas.addGroup({0, 0})
  11. local text = group.addText({ 5, 5 }, "KPW OS BOOTING / 0%")
  12. local rect = group.addRectangle(0, 0, 100, 100, 0xFF34e8eb)
  13. local progress = 0
  14. local chat = peripheral.wrap("back")
  15.  
  16. local afk = false
  17. local width, height = canvas.getSize()
  18. local rec_alpha = 100
  19.  
  20. rect.setSize(20, 25)
  21. rect.setAlpha(100)
  22. text.setScale(2)
  23.  
  24. while progress < 100 do
  25. progress = progress + 1
  26. rect.setSize(50 + progress * 2, 25)
  27. text.setText("KPW OS BOOTING / " .. progress .. "%")
  28. sleep(0.03)
  29. end
  30.  
  31. while rec_alpha > 0 do
  32. rec_alpha = rec_alpha - 2
  33. text.setAlpha(rec_alpha)
  34. rect.setAlpha(rec_alpha)
  35. sleep(0.03)
  36. end
  37.  
  38. rect.setSize(200, 200)
  39. rect.setPosition(width / 2 - 100, height / 2 - 100)
  40. text.setText("KPW")
  41. text.setPosition(width / 2 - 90, height / 2 - 70)
  42. text.setScale(10)
  43.  
  44. while rec_alpha < 100 do
  45. rec_alpha = rec_alpha + 2
  46. text.setAlpha(rec_alpha)
  47. rect.setAlpha(rec_alpha)
  48. sleep(0.02)
  49. end
  50. while rec_alpha > 0 do
  51. rec_alpha = rec_alpha - 2
  52. text.setAlpha(rec_alpha)
  53. rect.setAlpha(rec_alpha)
  54. sleep(0.02)
  55. end
  56.  
  57.  
  58.  
  59. while true do
  60. local _, player, message, uuid = os.pullEvent("chat_message")
  61.  
  62. if message:find("[Yy][aä]nn") and afk then
  63. chat.say("Bin grad nüsch da, schreib mir auf dc dann seh ichs")
  64. elseif uuid == "cc05c242-fc7b-4813-b568-3f0fe94e9b18" and message:find("afk") then
  65. if not afk then
  66. afk = true
  67. else
  68. afk = false
  69. end
  70. end
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement