Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script Made By Nev5678 --
- -- Nev568's RoCleaner [Version 2.1] --
- local
- Settings
- ={ --[[
- Ro Cleaner is fully created by CryX. If anyone else claims to be the original creator of it, they are lying.
- And they will not give you any wanted updates.
- Ro Cleaner is a Anti "Lag & Virus" script. It will only run once, to reduce the amount of lag created. But it
- runs connections that will keep the place clean at all times. I recommend you not to mess with anything
- inside it, other than the Settings.
- Ro Cleaner has been tested on several computers at various places of Roblox. And the results were great
- all the time. So it actually works!
- Updates [
- There were a glitch when checking wether any joints
- weren't connecting to any parts, and if they were anchored.
- This is now fixed.
- Updates ]
- Settings Information [
- All Settings
- * None of the settings are caps sensitive. So "on" will work just as "On" will work.
- * The setting names should be quite self explanatory, but here's a list anyways...
- Print_Results
- * This setting will print all scan results, such as how many objects were scanned, how many
- seconds it took to scan, etc...
- Scanning_Rate
- * Adjust this setting to how fast you want Ro Cleaner to clean your place. It will automatically
- be kept over 30 though. Because the average Roblox Fps is 30.
- * The total scanning time will not be completely accuracte. Because the lowest amount of time
- that is possible to wait with roblox's wait() function, is ( 1 / Fps ). So a random number is
- generated within certain parameters to try to get it as accuracte as possible. :-)
- Services_To_Scan
- * Basically just set "On" those services you want to scan. And set "Off" those services you
- don't want to scan. That's pretty much it. O_ó
- Quarantine_Instead_Of_Delete
- * Quarantine malicious scripts instead of permanently removing them. Mainly so you can take a
- look at them. What you do with them afterwards is none of my business.
- Remove_Models_Without_Descendants
- * Removes all models without any children ( Descendants ).
- * "Status" inside every character's Humanoid will automatically be excused
- * If you need empty models for something, turn this setting off, NAO!
- Settings Information ]
- S E T T I N G S
- ---------------------------------------------------------------------------------------------------------------------
- Name Value Syntax ]]
- ["Print_Results" ] = "Off" ,--[[ On / Off ]]
- ["Scanning_Rate" ] = 550 ,--[[ Integer Number ]]
- ["Services_To_Scan" ] = { --[[ ------------------------ ]]
- ["Workspace" ] = "On" ,--[[ On / Off ]]
- ["Players" ] = "On" ,--[[ On / Off ]]
- ["StarterGui" ] = "On" ,--[[ On / Off ]]
- ["StarterPack" ] = "On" },--[[ On / Off ]]
- ["Collect_Garbage_On_New_Scan" ] = "On" ,--[[ On / Off ]]
- ["Remove_Models_Without_Descendants" ] = "On" }--[[ On / Off ]]
- ---------------------------------------------------------------------------------------------------------------------
- -- Setup & Tagging --
- local Title = string.gsub((script.Name .. " » "), "V", "Version")
- local Parts = {"Part", "Seat", "SkateboardPlatform", "TrussPart", "VehicleSeat", "WedgePart"}
- local PartSurfaces = {"Back", "Bottom", "Front", "Left", "Right", "Top"}
- local Joints = {"Glue", "Rotate", "RotateP", "RotateV", "Snap", "Weld"}
- 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"}
- local Quarantine = Instance.new("Model")
- Quarantine.Name = "Quarantine"
- Quarantine.Parent = game.Lighting
- -- Setting Setup --
- local Print_Results = string.lower(tostring(Settings["Print_Results"]))
- local Scanning_Rate = tonumber(Settings["Scanning_Rate"])
- local Scan_Workspace = string.lower(tostring(Settings["Services_To_Scan"]["Workspace"]))
- local Scan_Players = string.lower(tostring(Settings["Services_To_Scan"]["Players"]))
- local Scan_PlayerGui = string.lower(tostring(Settings["Services_To_Scan"]["PlayerGui"]))
- local Scan_StarterPack = string.lower(tostring(Settings["Services_To_Scan"]["StarterPack"]))
- local Quarantine_Instead_Of_Delete = string.lower(tostring(Settings["Quarantine_Instead_Of_Delete"]))
- local Remove_Models_Without_Descendants = string.lower(tostring(Settings["Remove_Models_Without_Descendants"]))
- if Print_Results ~= "on" and "off" then Print_Results = "off" end
- if Scanning_Rate == nil then Scanning_Rate = 250 end
- if Scanning_Rate < 30 then Scanning_Rate = 30 end
- if Scan_Workspace ~= "on" and "off" then Scan_Workspace = "on" end
- if Scan_Players ~= "on" and "off" then Scan_Players = "off" end
- if Scan_StarterGui ~= "on" and "off" then Scan_StarterGui = "off" end
- if Scan_StarterPack ~= "on" and "off" then Scan_StarterPack = "off" end
- if Quarantine_Instead_Of_Delete ~= "on" and "off" then Quarantine_Instead_Of_Delete = "off" end
- if Remove_Models_Without_Descendants ~= "on" and "off" then Remove_Models_Without_Descendants = "off" end
- function Clean(Object)
- if Object == nil then return end
- if Object.Parent == nil then return end
- if Object == script then return end
- local Message = ""
- for _, Joint in pairs(Joints) do
- if Object.className == Joint then
- if not Object.Part0 and not Object.Part1 then
- Message = Joint .. " not connecting to any parts."
- else
- if Object.Part0.Anchored and Object.Part1.Anchored then
- Message = Joint .. " connecting to Anchored parts."
- end
- end
- end
- end
- if Object.className == "Model" then
- if Remove_Models_Without_Descendants == "on" then
- if #Object:GetChildren() == 0 then
- if not game.Players:GetPlayerFromCharacter(Object.Parent.Parent) then
- Message = "Model without any descendants"
- end
- end
- end
- end
- for _, Part in pairs(Parts) do
- if Object.className == Part then
- if Object.Anchored then
- if Object.Material ~= Enum.Material.Plastic then
- for _, Surface in pairs(PartSurfaces) do
- if Object[Surface .. "Surface"] ~= Enum.SurfaceType.Smooth then
- Object[Surface .. "Surface"] = Enum.SurfaceType.Smooth
- if Print_Results == "on" then print(Title .. Object:GetFullName() .. "." .. Surface .. "Surface" .. " | Unnecessary Object Removed | Reason: Decal not uploading") end
- end
- end
- end
- end
- end
- end
- if string.find(Object.className, "Script") then
- for a = 1, string.len(Object.Name) do
- b = ""
- for c = a, ( a + 9 ) do
- b = b .. string.sub(string.lower(Object.Name), c, c)
- end
- if string.len(b) == 10 then
- if string.gsub(b, string.sub(b, a, a), "") == "" then
- Message = "Suspicious name ( continous spam of the same character )"
- end
- end
- end
- for _, a in pairs(Suspicious) do
- if string.find(string.lower(Object.Name), string.lower(a)) then
- Message = "Suspicious name ( " .. a .. " )"
- end
- end
- end
- Object.ChildAdded:connect(function(newChild) StartScan(newChild) end)
- ObjectsScanned = ObjectsScanned + 1
- if Message ~= "" then
- local Msg = Title .. Object:GetFullName()
- if string.find(Message, "Suspicious") then
- if Quarantine_Instead_Of_Delete == "on" then
- Object.Disabled = true
- Object.Parent = Quarantine
- ObjectsQuarantine = ObjectsQuarantine + 1
- Msg = Msg .. " | Malicious Script Quarantined | Reason: " .. Message
- else
- Object:Remove()
- ObjectsRemoved = ObjectsRemoved + 1
- Msg = Msg .. " | Malicious Script Removed | Reason: " .. Message
- end
- else
- Object:Remove()
- ObjectsRemoved = ObjectsRemoved + 1
- Msg = Msg .. " | Unnecessary Object Removed | Reason: " .. Message
- end
- if Print_Results == "on" then print(Msg) end
- end
- if math.random(1, (Scanning_Rate/30)) == 1 then wait(1/30) end
- end
- function Scan(Path)
- for _, Child in pairs(Path:GetChildren()) do
- Clean(Child)
- if #Child:GetChildren() > 0 then Scan(Child) end
- end
- end
- function StartScan(Path)
- if Print_Results == "on" then
- print("------------------------------------------------------------------------------------------------------------------------------------------------------")
- if Path == nil then
- print(Title .. "Scanning the Services...")
- else
- print(Title .. "Scanning: " .. Path:GetFullName() .. "...")
- end
- print("----------------------------------------------------------------------------------------------------")
- end
- ObjectsScanned = 0
- ObjectsRemoved = 0
- ObjectsQuarantined = 0
- local TimeBeforeScan = Workspace.DistributedGameTime
- if Path == nil then
- if Scan_Workspace == "on" then Clean(Workspace) Scan(Workspace) end
- if Scan_Players == "on" then Clean(game.Players) Scan(game.Players) end
- if Scan_StarterGui == "on" then Clean(game.StarterGui) Scan(game.StarterGui) end
- if Scan_StarterPack == "on" then Clean(game.StarterPack) Scan(game.StarterPack) end
- else
- Clean(Path) Scan(Path)
- end
- if Collect_Garbage_On_New_Scan == "on" then collectgarbage("collect") end
- if Print_Results == "on" then
- local Scan_Time = math.floor( ( Workspace.DistributedGameTime - TimeBeforeScan ) * 10^2 + 0.5 ) / 10^2
- print("------------------------------------------------------------------------------------------------------------------------------------------------------")
- print(Title .. "Scan Results:")
- print("----------------------------------------------------------------------------------------------------")
- print(Title .. "Objects Scanned: " .. ObjectsScanned)
- print(Title .. "Objects Removed: " .. ObjectsRemoved)
- print(Title .. "Objects Quarantined: " .. ObjectsQuarantined)
- print(Title .. "Total scan time: " .. Scan_Time .. " seconds")
- print("------------------------------------------------------------------------------------------------------------------------------------------------------")
- end
- end
- StartScan()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement