Advertisement
advancedev

anti virus

Jan 25th, 2015
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. -- Script Made By Nev5678 --
  2.  
  3. -- Nev568's Ro•Cleaner [Version 2.1] --
  4.  
  5. local
  6. Settings
  7.  
  8. ={ --[[
  9.  
  10. Ro Cleaner is fully created by CryX. If anyone else claims to be the original creator of it, they are lying.
  11. And they will not give you any wanted updates.
  12.  
  13. Ro Cleaner is a Anti "Lag & Virus" script. It will only run once, to reduce the amount of lag created. But it
  14. runs connections that will keep the place clean at all times. I recommend you not to mess with anything
  15. inside it, other than the Settings.
  16.  
  17. Ro Cleaner has been tested on several computers at various places of Roblox. And the results were great
  18. all the time. So it actually works!
  19.  
  20. Updates [
  21. There were a glitch when checking wether any joints
  22. weren't connecting to any parts, and if they were anchored.
  23. This is now fixed.
  24. Updates ]
  25.  
  26. Settings Information [
  27.  
  28. All Settings
  29. * None of the settings are caps sensitive. So "on" will work just as "On" will work.
  30. * The setting names should be quite self explanatory, but here's a list anyways...
  31.  
  32. Print_Results
  33. * This setting will print all scan results, such as how many objects were scanned, how many
  34. seconds it took to scan, etc...
  35.  
  36. Scanning_Rate
  37. * Adjust this setting to how fast you want Ro Cleaner to clean your place. It will automatically
  38. be kept over 30 though. Because the average Roblox Fps is 30.
  39. * The total scanning time will not be completely accuracte. Because the lowest amount of time
  40. that is possible to wait with roblox's wait() function, is ( 1 / Fps ). So a random number is
  41. generated within certain parameters to try to get it as accuracte as possible. :-)
  42.  
  43. Services_To_Scan
  44. * Basically just set "On" those services you want to scan. And set "Off" those services you
  45. don't want to scan. That's pretty much it. O_ó
  46.  
  47. Quarantine_Instead_Of_Delete
  48. * Quarantine malicious scripts instead of permanently removing them. Mainly so you can take a
  49. look at them. What you do with them afterwards is none of my business.
  50.  
  51. Remove_Models_Without_Descendants
  52. * Removes all models without any children ( Descendants ).
  53. * "Status" inside every character's Humanoid will automatically be excused
  54. * If you need empty models for something, turn this setting off, NAO!
  55.  
  56. Settings Information ]
  57.  
  58.  
  59.  
  60. S E T T I N G S
  61.  
  62. ---------------------------------------------------------------------------------------------------------------------
  63. Name Value Syntax ]]
  64. ["Print_Results" ] = "Off" ,--[[ On / Off ]]
  65. ["Scanning_Rate" ] = 550 ,--[[ Integer Number ]]
  66. ["Services_To_Scan" ] = { --[[ ------------------------ ]]
  67. ["Workspace" ] = "On" ,--[[ On / Off ]]
  68. ["Players" ] = "On" ,--[[ On / Off ]]
  69. ["StarterGui" ] = "On" ,--[[ On / Off ]]
  70. ["StarterPack" ] = "On" },--[[ On / Off ]]
  71. ["Collect_Garbage_On_New_Scan" ] = "On" ,--[[ On / Off ]]
  72. ["Remove_Models_Without_Descendants" ] = "On" }--[[ On / Off ]]
  73. ---------------------------------------------------------------------------------------------------------------------
  74.  
  75.  
  76.  
  77.  
  78.  
  79. -- Setup & Tagging --
  80. local Title = string.gsub((script.Name .. " —» "), "V", "Version")
  81. local Parts = {"Part", "Seat", "SkateboardPlatform", "TrussPart", "VehicleSeat", "WedgePart"}
  82. local PartSurfaces = {"Back", "Bottom", "Front", "Left", "Right", "Top"}
  83. local Joints = {"Glue", "Rotate", "RotateP", "RotateV", "Snap", "Weld"}
  84. local Suspicious = {"Anti-Lag", "Anti Lag", "AntiLag", "Anti-Virus", "Anti Virus", "AntiVirus", "H4ck", "H4x", "Infected", "Join Teh Moovment", "Or is it", "ROFL", "Snap-Remover", "Snap Remover", "SnapRemover", "Snap-Reducer", "Snap Reducer", "SnapReducer", "Tazer", "Vaccine", "Vacine", "Your New Lord", "You got owned", "4DBeing", "4D Being", "Guest_Talking_Script"}
  85. local Quarantine = Instance.new("Model")
  86. Quarantine.Name = "Quarantine"
  87. Quarantine.Parent = game.Lighting
  88.  
  89. -- Setting Setup --
  90. local Print_Results = string.lower(tostring(Settings["Print_Results"]))
  91. local Scanning_Rate = tonumber(Settings["Scanning_Rate"])
  92. local Scan_Workspace = string.lower(tostring(Settings["Services_To_Scan"]["Workspace"]))
  93. local Scan_Players = string.lower(tostring(Settings["Services_To_Scan"]["Players"]))
  94. local Scan_PlayerGui = string.lower(tostring(Settings["Services_To_Scan"]["PlayerGui"]))
  95. local Scan_StarterPack = string.lower(tostring(Settings["Services_To_Scan"]["StarterPack"]))
  96. local Quarantine_Instead_Of_Delete = string.lower(tostring(Settings["Quarantine_Instead_Of_Delete"]))
  97. local Remove_Models_Without_Descendants = string.lower(tostring(Settings["Remove_Models_Without_Descendants"]))
  98. if Print_Results ~= "on" and "off" then Print_Results = "off" end
  99. if Scanning_Rate == nil then Scanning_Rate = 250 end
  100. if Scanning_Rate < 30 then Scanning_Rate = 30 end
  101. if Scan_Workspace ~= "on" and "off" then Scan_Workspace = "on" end
  102. if Scan_Players ~= "on" and "off" then Scan_Players = "off" end
  103. if Scan_StarterGui ~= "on" and "off" then Scan_StarterGui = "off" end
  104. if Scan_StarterPack ~= "on" and "off" then Scan_StarterPack = "off" end
  105. if Quarantine_Instead_Of_Delete ~= "on" and "off" then Quarantine_Instead_Of_Delete = "off" end
  106. if Remove_Models_Without_Descendants ~= "on" and "off" then Remove_Models_Without_Descendants = "off" end
  107.  
  108. function Clean(Object)
  109. if Object == nil then return end
  110. if Object.Parent == nil then return end
  111. if Object == script then return end
  112.  
  113. local Message = ""
  114.  
  115. for _, Joint in pairs(Joints) do
  116. if Object.className == Joint then
  117. if not Object.Part0 and not Object.Part1 then
  118. Message = Joint .. " not connecting to any parts."
  119. else
  120. if Object.Part0.Anchored and Object.Part1.Anchored then
  121. Message = Joint .. " connecting to Anchored parts."
  122. end
  123. end
  124. end
  125. end
  126.  
  127. if Object.className == "Model" then
  128. if Remove_Models_Without_Descendants == "on" then
  129. if #Object:GetChildren() == 0 then
  130. if not game.Players:GetPlayerFromCharacter(Object.Parent.Parent) then
  131. Message = "Model without any descendants"
  132. end
  133. end
  134. end
  135. end
  136.  
  137. for _, Part in pairs(Parts) do
  138. if Object.className == Part then
  139. if Object.Anchored then
  140. if Object.Material ~= Enum.Material.Plastic then
  141. for _, Surface in pairs(PartSurfaces) do
  142. if Object[Surface .. "Surface"] ~= Enum.SurfaceType.Smooth then
  143. Object[Surface .. "Surface"] = Enum.SurfaceType.Smooth
  144. if Print_Results == "on" then print(Title .. Object:GetFullName() .. "." .. Surface .. "Surface" .. " | Unnecessary Object Removed | Reason: Decal not uploading") end
  145. end
  146. end
  147. end
  148. end
  149. end
  150. end
  151.  
  152. if string.find(Object.className, "Script") then
  153. for a = 1, string.len(Object.Name) do
  154. b = ""
  155. for c = a, ( a + 9 ) do
  156. b = b .. string.sub(string.lower(Object.Name), c, c)
  157. end
  158. if string.len(b) == 10 then
  159. if string.gsub(b, string.sub(b, a, a), "") == "" then
  160. Message = "Suspicious name ( continous spam of the same character )"
  161. end
  162. end
  163. end
  164. for _, a in pairs(Suspicious) do
  165. if string.find(string.lower(Object.Name), string.lower(a)) then
  166. Message = "Suspicious name ( " .. a .. " )"
  167. end
  168. end
  169. end
  170.  
  171. Object.ChildAdded:connect(function(newChild) StartScan(newChild) end)
  172. ObjectsScanned = ObjectsScanned + 1
  173.  
  174. if Message ~= "" then
  175. local Msg = Title .. Object:GetFullName()
  176. if string.find(Message, "Suspicious") then
  177. if Quarantine_Instead_Of_Delete == "on" then
  178. Object.Disabled = true
  179. Object.Parent = Quarantine
  180. ObjectsQuarantine = ObjectsQuarantine + 1
  181. Msg = Msg .. " | Malicious Script Quarantined | Reason: " .. Message
  182. else
  183. Object:Remove()
  184. ObjectsRemoved = ObjectsRemoved + 1
  185. Msg = Msg .. " | Malicious Script Removed | Reason: " .. Message
  186. end
  187. else
  188. Object:Remove()
  189. ObjectsRemoved = ObjectsRemoved + 1
  190. Msg = Msg .. " | Unnecessary Object Removed | Reason: " .. Message
  191. end
  192. if Print_Results == "on" then print(Msg) end
  193. end
  194.  
  195. if math.random(1, (Scanning_Rate/30)) == 1 then wait(1/30) end
  196. end
  197.  
  198. function Scan(Path)
  199. for _, Child in pairs(Path:GetChildren()) do
  200. Clean(Child)
  201. if #Child:GetChildren() > 0 then Scan(Child) end
  202. end
  203. end
  204.  
  205. function StartScan(Path)
  206. if Print_Results == "on" then
  207. print("------------------------------------------------------------------------------------------------------------------------------------------------------")
  208. if Path == nil then
  209. print(Title .. "Scanning the Services...")
  210. else
  211. print(Title .. "Scanning: " .. Path:GetFullName() .. "...")
  212. end
  213. print("----------------------------------------------------------------------------------------------------")
  214. end
  215. ObjectsScanned = 0
  216. ObjectsRemoved = 0
  217. ObjectsQuarantined = 0
  218. local TimeBeforeScan = Workspace.DistributedGameTime
  219. if Path == nil then
  220. if Scan_Workspace == "on" then Clean(Workspace) Scan(Workspace) end
  221. if Scan_Players == "on" then Clean(game.Players) Scan(game.Players) end
  222. if Scan_StarterGui == "on" then Clean(game.StarterGui) Scan(game.StarterGui) end
  223. if Scan_StarterPack == "on" then Clean(game.StarterPack) Scan(game.StarterPack) end
  224. else
  225. Clean(Path) Scan(Path)
  226. end
  227. if Collect_Garbage_On_New_Scan == "on" then collectgarbage("collect") end
  228. if Print_Results == "on" then
  229. local Scan_Time = math.floor( ( Workspace.DistributedGameTime - TimeBeforeScan ) * 10^2 + 0.5 ) / 10^2
  230. print("------------------------------------------------------------------------------------------------------------------------------------------------------")
  231. print(Title .. "Scan Results:")
  232. print("----------------------------------------------------------------------------------------------------")
  233. print(Title .. "Objects Scanned: " .. ObjectsScanned)
  234. print(Title .. "Objects Removed: " .. ObjectsRemoved)
  235. print(Title .. "Objects Quarantined: " .. ObjectsQuarantined)
  236. print(Title .. "Total scan time: " .. Scan_Time .. " seconds")
  237. print("------------------------------------------------------------------------------------------------------------------------------------------------------")
  238. end
  239. end
  240.  
  241. StartScan()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement