Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- --- Created by yannb.
- --- DateTime: 22/10/2021 02:36
- ---
- local interface = peripheral.wrap("back")
- local clearing = interface.canvas()
- clearing.clear()
- local canvas = interface.canvas()
- local group = canvas.addGroup({0, 0})
- local text = group.addText({ 5, 5 }, "KPW OS BOOTING / 0%")
- local rect = group.addRectangle(0, 0, 100, 100, 0xFF34e8eb)
- local progress = 0
- local chat = peripheral.wrap("back")
- local answer = ""
- rednet.open("right")
- local afk = false
- local width, height = canvas.getSize()
- local rec_alpha = 100
- rect.setSize(20, 25)
- rect.setAlpha(100)
- text.setScale(2)
- while progress < 100 do
- progress = progress + 1
- rect.setSize(50 + progress * 2, 25)
- text.setText("KPW OS BOOTING / " .. progress .. "%")
- sleep(0.01)
- end
- while rec_alpha > 0 do
- rec_alpha = rec_alpha - 2
- text.setAlpha(rec_alpha)
- rect.setAlpha(rec_alpha)
- sleep(0.01)
- end
- rect.setSize(200, 200)
- rect.setPosition(width / 2 - 100, height / 2 - 100)
- text.setText("KPW")
- text.setPosition(width / 2 - 85, height / 2 - 40)
- text.setScale(10)
- while rec_alpha < 180 do
- rec_alpha = rec_alpha + 2
- text.setAlpha(rec_alpha)
- rect.setAlpha(rec_alpha)
- sleep(0.01)
- end
- while rec_alpha > 0 do
- rec_alpha = rec_alpha - 2
- text.setAlpha(rec_alpha)
- rect.setAlpha(rec_alpha)
- sleep(0.01)
- end
- while true do
- local _, player, message, uuid = os.pullEvent("chat_message")
- senderID, answer, distance = os.pullEvent("rednet_message")
- if message:find("[Yy][aä]nn") and afk then
- chat.say("Bin grad nüsch da, schreib mir auf dc dann seh ichs")
- elseif uuid == "cc05c242-fc7b-4813-b568-3f0fe94e9b18" and message:find("afk") then
- if not afk then
- afk = true
- else
- afk = false
- end
- end
- chat.say(answer)
- rednet.send(2, message)
- end
- rednet.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement