Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("back")
- local old = os.pullEvent
- os.pullEvent = os.pullEventRaw
- local splash = {
- "Loading files, maybe...",
- "Why is this taking so long?!",
- "Windows is loading files...",
- "sleep(1)",
- "Loading 42PB of data. Please wait.",
- "Closing handles...",
- "Counting stars in the sky...",
- "Not believing my eyes...",
- "u wnt.. sum loading?",
- "Mining etherum...",
- "Sending files to NSA...",
- "Distributing your credit card information...",
- "Suing everyone...",
- "handle:flushDownToilet()",--stolen from KRapFile :P
- "Waiting for Half-Life 3...",
- "Hacking NSA",
- "Sending NSA data to.. NSA? I guess? Sure, why not.",
- "() { :;};",
- "Executing \"sudo rm -rf --no-preserve-root /*\"",
- "Are you done yet? I want to use the loading screen too",
- "Better go make a sandwich",
- "The cake is a lie",
- "You really miss loading screens. Don't you?",
- "Press CTRL+T. I know you are tired aren't you?",
- "Rahph was here",
- "Rahph, stop messing with my programs.",
- "Don't press the big red button",
- }
- local col
- if m.isColor() then
- col = {
- bg = colors.white,
- toload = colors.gray,
- loaded = colors.green,
- text = colors.lightGray,
- }
- else
- col = {
- bg = colors.white,
- toload = colors.gray,
- loaded = colors.lightGray,
- text = colors.lightGray,
- }
- end
- m.setBackgroundColor(col.bg)
- m.clear()
- m.setCursorPos(1,1)
- local w,h = m.getSize()
- local function writeC(txt)
- _,y = m.getCursorPos()
- m.setCursorPos(math.ceil(w/2)-math.ceil(#txt/2),y)
- write(txt)
- end
- local tottim = 0
- local dead = false
- parallel.waitForAny(function()
- while true do
- for i = 0,3 do
- m.setCursorPos(1,7)
- m.setTextColor(col.text)
- m.setBackgroundColor(col.bg)
- m.clearLine()
- writeC("Loading")
- write(string.rep(".",i))
- sleep(0.5)
- end
- end
- end,function()
- paintutils.drawLine(3,math.ceil(h/2),w-2,math.ceil(h/2),col.toload)
- for i = 0,w-5 do
- paintutils.drawPixel(i+3,math.ceil(h/2),col.loaded)
- local tim = math.random(1,100)/10
- sleep(tim)
- end
- end,function()
- while true do
- sleep(0.1)
- tottim = tottim+0.1
- end
- end,function()
- while true do
- local choice = splash[math.random(1,#splash)]
- m.setCursorPos(1,math.ceil(h/2)+2)
- m.setBackgroundColor(col.bg)
- m.setTextColor(col.text)
- m.clearLine()
- writeC(choice)
- sleep(5)
- end
- end,function()
- while true do
- local ev = os.pullEventRaw("minate")
- if ev == "minate" then
- dead = true
- break
- end
- end
- end)
- os.pullEvent = old
- m.setBackgroundColor(colors.black)
- m.setCursorPos(1,1)
- m.setTextColor(colors.white)
- m.clear()
- if dead then
- print("You gave up at "..tottim.." seconds of loading!")
- else
- print("You survived "..tottim.." seconds of loading!")
- end
- print("")
- print("Created by Ale32bit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement