Advertisement
l3uz

[v.1.0] Roblox Anti-Virus Script! (quarantine)

Mar 26th, 2019
789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.31 KB | None | 0 0
  1.                   --Ultimate quarantine! | [v.1.1] (maybe update in the future)
  2.                   --Remake by l3uz.
  3.                   --Changelog     |||       v1.0      |||   Created script.
  4.                   --              |||       v1.1      |||   Added 4 viruses to remove.
  5.  
  6. ------------------------------------------------
  7. Print_Scan_Results = true                       --Prints the results of each scan in the output window.
  8. ------------------------------------------------
  9. Quarantine_Instead_of_Delete = true    --Quarantines all malicious objects into the Lighting Directory for you to view, after making all hidden objects visable.
  10. ------------------------------------------------
  11.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 --that's script
  12. --i added 17 viruses to remove.
  13.  
  14. q = Instance.new("Model")
  15. q.Name = "Quarantine"
  16. classes = {"Fire", "AutoJoint", "BackpackItem", "Feature", "Script", "Glue", "HtmlWindow", "JointInstance", "LocalBackpack", "LocalBackpackItem", "MotorFeature", "Mouse", "Rotate", "RotateP", "RotateV", "Snap", "StockSound", "VelocityMotor", "Weld", "Geometry", "Timer","ChangeHistoryService"}
  17. names = {"inFECtion", "LOLWUT? LOLHOO? LOLYOU! Got hacked", "Vaccine", "SnapReducer", "Snap-Reducer", "Anti-Lag", "Anti Lag", "AntiLag", "Wildfire", "AntiVirus", "Anti-Virus", "Anti Virus", "4D Being", "No samurai plzzz", "OHAI", "VIRUS", "Vaccine", "Infected","LOLNO", "Script.. or is it", "Script... or is it", "d���������������������������������", "virus script", "virUs", "viRUS", "VirUs", "virus... virus... LEET VIRUS!!!", "Instant Crash Script", "instant crash script", "The Ultimate Script by 4nothing4", "Deadly Pingu Virus", "MLGify [virus]", "FREE VIRUS", "a virus", "��", "DO NOT PUT THIS IN YOUR PLACE - IT IS DANGEROUS", "1", "11", "111"} --Add the name of the infection you have here.
  18. hidden = Instance.new("StringValue")
  19. file = {}
  20.  
  21. function Start()
  22.     workspace = game.Workspace:GetChildren()
  23.     qu = q:GetChildren()
  24.     index = {}
  25.     virus = 0
  26.  
  27.     function Scan(object)
  28.         for i = 1,#object do
  29.             inside = object[i]:GetChildren()
  30.             if Malicious(object[i]) then
  31.                 virus = virus+1
  32.                 Name(object[i])
  33.                 Quarantine(object[i])
  34.             else
  35.                 if #inside > 0 then
  36.                     Scan(inside)
  37.                 end
  38.             end
  39.         end
  40.     end
  41.  
  42.     function Malicious(class)
  43.         for x = 1, #classes do
  44.             if class.className == classes[x] and #(class:GetChildren()) > 0 then return true end
  45.         end
  46.         for x = 1, #names do
  47.             if string.lower(class.Name) == string.lower(names[x]) then return true end
  48.         end
  49.         return false
  50.     end
  51.  
  52.     function Hidden(class)
  53.         for x = 1, #classes do
  54.             if class.className == classes[x] then return true end
  55.         end
  56.         return false
  57.     end
  58.  
  59.     function Name(malware)
  60.         cur = malware
  61.         file[1] = "."..cur.Name
  62.         while cur.Parent.Name ~= "Workspace" do
  63.             cur = cur.Parent
  64.             file[#file+1] = "."..cur.Name
  65.         end
  66.         inde = "game.Workspace"
  67.         for j = 1, #file do
  68.             inde = inde..file[#file+1-j]
  69.         end
  70.         file = {}
  71.         inde = inde.."  ("..malware.className.." Class)"
  72.         index[#index+1] = inde
  73.         malware.Parent = q
  74.     end
  75.  
  76.     function Quarantine(malware)
  77.         if malware ~= nil then
  78.             contain = malware:GetChildren()
  79.             if Hidden(malware) then
  80.                 h = hidden:clone()
  81.                 h.Name = malware.Name
  82.                 h.Value = "Original Class: "..malware.className
  83.                 h.Parent = malware.Parent
  84.                 for j = 1, #contain do
  85.                     contain[j].Parent = h
  86.                 end
  87.                 malware:remove()
  88.                 malware = h
  89.             end
  90.             contain = malware:GetChildren()
  91.             for j = 1, #contain do
  92.                 Quarantine(contain[j])
  93.             end
  94.         end
  95.     end
  96.  
  97.     Scan(workspace)
  98.  
  99.     if virus > 0 and Quarantine_Instead_of_Delete then
  100.         q.Parent = game.Lighting
  101.     end
  102.  
  103.     if virus > 0 and Print_Scan_Results then
  104.         print("--------------------")
  105.         print("Scan Results:")
  106.         print("Potentially malicious objects were found in the following locations:")
  107.         for i = 1, #index do
  108.             print(" -- "..index[i])
  109.         end
  110.         if Quarantine_Instead_of_Delete then
  111.             print("These objects have been quarantined to the Lighting Directory.")
  112.         else
  113.             print("These objects have been removed.")
  114.         end
  115.         print("--------------------")
  116.         Start()
  117.         wait()
  118.         Start()
  119.     end
  120. end
  121.  
  122. Start()
  123. game.Workspace.ChildAdded:connect(Start)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement