Advertisement
Yorbo

Minecraft HUD Beta

Oct 21st, 2021
1,158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.76 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.01)
  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.01)
  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 - 85, height / 2 - 40)
  42. text.setScale(10)
  43.  
  44. while rec_alpha < 180 do
  45.     rec_alpha = rec_alpha + 2
  46.     text.setAlpha(rec_alpha)
  47.     rect.setAlpha(rec_alpha)
  48.     sleep(0.01)
  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.01)
  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.  
  72.     rednet.open("right")
  73.     rednet.send(2, message)
  74. end
  75. rednet.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement