Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script that defends your game from virus?

Asked by 6 years ago

I am making a plugin that defends your game and in the GUI there is three TextBoxes: One, Two and Three. These TextBoxes scan whatever you put in there. Then there is a button named Scan, and Scan has the core script. The core script does not seem to work. I am making this because I have two viruses.

Here is the code:

script.Parent.MouseButton1Down:connect(function()
    local Text1 = script.Parent.Parent.One.Text
    local Text2 = script.Parent.Parent.Two.Text
    local Text3 = script.Parent.Parent.Three.Text
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
    local find1 = game.Text1:FindFirstChild()
    if find1.ClassName == HingeConstraint then
        find1:Remove()
    else
        local rename = find1.ClassName
        find1.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find2 = game.Text2:FindFirstChild()
    if find2.ClassName == HingeConstraint then
        find2:Remove()
    else
        local rename = find2.ClassName
        find2.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
                          local find3 = game.Text3:FindFirstChild()
    if find3.ClassName == HingeConstraint then
        find3:Remove()
    else
        local rename = find3.ClassName
        find3.Name = rename
    end
end)


0
Instead of running the same code over and over why don't you do local childnum = #Text1:GetChildren if childnum > 0 then for i , v in ipairs(Text1:GetChildren(0) do run your code here end justoboy13 153 — 6y
0
That is confusing, I have no idea what you mean. Diamo_YT 68 — 6y
0
:Remove() is deprecated, use :Destroy() instead theCJarmy7 1293 — 6y
0
just use filter enabling xDD or ask stylis studio :3 greatneil80 2647 — 6y

Answer this question