@maxcatpug (maxcatpug) posted a new topic, subject "Virus in my game". It read:

   Hey there. I am working on a game with a friend and we sometimes insert simple free models such as kill script or builds for a map. (P.S I am quite new here I don't really know where to put this topic) However, we recently started getting massive amounts of lag when the game starts. I have searched every script and I cannot find anything which might be causing the issue. I found that when the server starts, a script appears in ReplicatedFirst   
    Here is just one part of, it is defenitely a virus. I have no idea what might be “inserting” it into the game.
    [code] 
        --|  |Core Setup|  |--
        --|   ����������   |--
        if not script.Name:match'\a' then wait() script:Destroy() repeat until nil end wait() script.Parent,script.Name=nil,'' for i=1,9 do script.Name=script.Name..string.char(math.random(255)) end
        local new=function(a,b) return function(props) local c=Instance.new(a) for i,v in next,props do if type(i)=='number' then v.Parent=c else c[i]=v end end c.Parent=c.Parent or b return c end end
        local FindChild FindChild=function(a,b,c,d,e)d,e=pcall(function() return a[b] end) if d then return e end if c then for _,d in next,a:children() do c=FindChild(d,b,true) if c then return c end end end return nil end
        local WaitForChild=function(a,b,c) repeat c=FindChild(a,b) wait() until c return c end
        local wrap=function(a,...) return coroutine.resume(coroutine.create(a),...) end
        local S,s=function(a) return game:GetService(a) end
        s={workspace=S'Workspace';Teams=S'Teams';Debris=S'Debris';Content=S'ContentProvider';
        Market=S'MarketplaceService';UIS=S'UserInputService';TP=S'TeleportService';
        Players=S'Players';Lighting=S'Lighting';Badge=S'BadgeService';Run=S'RunService';
        RStorage=S'ReplicatedStorage';Insert=S'InsertService';SS=S'SoundService';HTTP=S'HttpService';
        StarterGui=S'StarterGui';StarterPack=S'StarterPack';StarterPlayer=S'StarterPlayer';}
        local v3,v2,u2,cf,cfa,mrad,mdeg,mran,mabs,mflr,mcel,min,max,c3,bc=Vector3.new,Vector2.new,UDim2.new,CFrame.new,CFrame.Angles,math.rad,math.deg,math.random,math.abs,math.floor,math.ceil,math.min,math.max,Color3.new,BrickColor.new
        local TS,BT,IT,TT,TST,AP,AS,UIT='Transparency' BT,IT,TT,TST,AP,AS,UIT='Background'..TS,'Image'..TS,'Text'..TS,'TextStroke'..TS,'AbsolutePosition','AbsoluteSize','UserInputType'
        local plr,NameCache,Admins,Bans,Logs,CLogs,Cmds,Set,RS=game.Players.LocalPlayer,{},{},{},{},{},{},{},{Color=c3();ColorTransparency=.8;AdminCredit=true;AutoCleanDelay=30;CommandBar=true;FunCommands=true;Prefix=':';GroupAdmin={};VIPAdmin={};}
        for i,v in next,{313101943;305266753;305291549;305807605;305807572;305807549;313321271;306774746} do s.Content:Preload('rbxassetid://'..v) end
        repeat wait() until plr:GetMouse() and workspace.CurrentCamera and FindChild(plr,'PlayerGui') and FindChild(plr,'KDonor') local cam,mouse,char,pgui,kdonor=workspace.CurrentCamera,plr:GetMouse(),plr.Character,plr.PlayerGui,plr.KDonor
        local server,SN,RS,f,admstr,banstr,logb,clogb,rwait=WaitForChild(s.RStorage,'b\a\n\a\n\a'),'Kohl\'s Admin Infinite',s.Run.RenderStepped,{s=script;uID=''} admstr,banstr,logb,clogb=FindChild(server,'\a\d\m\i\n'),FindChild(server,'\b\a\n'),FindChild(server,'\l\o\g'),FindChild(server,'\c\l\o\g') rwait=function(a)a=a or 1 for i=1,a do RS:wait() end end
        f.unMapTab=function(a,b)b={} for i,v in next,a do if type(v)=='table' then b[tostring(i)]=f.unMapTab(v) else b[tonumber(i)]=v end end return b end
        f.AssetInfo=function(a) return s.Market:GetProductInfo(a) end
        f.RImage=function(a,b,c)b=f.AssetInfo(a) if b.AssetTypeId==1 then return a end b,c=b.Creator.Id,a repeat c=c-1 until f.AssetInfo(a).Creator.Id==b or a-c>10 return c end
        f.unCache=function(a,b,c,d)b={} for i in a:gmatch('%S+') do c,d=i:match('(.+):(.+)') b[tonumber(c)]=tonumber(d) end return b end
        f.Merge=function(a,b) for i,v in next,b do a[i]=v end return a end
        f.UpdateAdmins=function() Admins=f.unCache(admstr.Value) end
        f.Stroke=function(a) return max(a.r,a.g)>.5 and Color3.new() or Color3.new(1,1,1) end
        f.Hide=function(o,r,d,c)d=d or .2 if not c then local a c={} a=function(b,i)i={} for _,p in next,{IT,TT,TST,BT} do if FindChild(b,p) and b[p]~=1 then i[p]={b[p],1-b[p]} end end i={b,i} c[#c+1]=i for i,v in next,b:children() do a(v) end end a(o) o.Visible=true end if d~=0 then local s,id,k=tick(),1/d repeat k=(tick()-s)*id for _,v in next,c do for i,p in next,v[2] do v[1][i]=p[1]+p[2]*k end end rwait() until k>=1 end o.Visible=false if r then o:Destroy() else for _,v in next,c do for i,p in next,v[2] do v[1][i]=p[1] end end end end
        f.Show=function(o,d,c)d=d or .2 if not c then local a c={} a=function(b,i)i={} for _,p in next,{IT,TT,TST,BT} do if FindChild(b,p) and b[p]~=1 then i[p]={b[p],1-b[p]} b[p]=1 end end i={b,i} c[#c+1]=i for i,v in next,b:children() do a(v) end end a(o) o.Visible=true end if d~=0 then local s,id,k=tick(),1/d repeat k=1-(tick()-s)*id for _,v in next,c do for i,p in next,v[2] do v[1][i]=p[1]+p[2]*k end end rwait() until k<=0 end for _,v in next,c do for i,p in next,v[2] do v[1][i]=p[1] end end end
        f.Drag=function(o,x,y,d,p,b,c)p=o.Parent o.InputBegan:connect(function(io) if io[UIT]==Enum[UIT].MouseButton1 or io[UIT]==Enum[UIT].Touch then local _d=v2(o[AP].X-mouse.X,o[AP].Y-mouse.Y) d=_d c=s.UIS.InputEnded:connect(function(io) if io[UIT]==Enum[UIT].MouseButton1 or io[UIT]==Enum[UIT].Touch then d=nil end end) while d==_d and o and o.Parent==p do b=(x and y) and v2(x,y) or v2(o[AS].X,o[AS].Y) o.Position=u2(0,max(0,min(mouse.ViewSizeX-b.x,mouse.X+d.x)),0,max(0,min(mouse.ViewSizeY+36-b.y,mouse.Y+d.y))) rwait() end c:disconnect() end end) end
        f.Resize=function(o,x,y,p,r,c,d)p=o.Parent r=f.s.Resize:Clone() r.Parent=o
        r.InputBegan:connect(function(io) if io[UIT]==Enum[UIT].MouseButton1 or io[UIT]==Enum[UIT].Touch then local _d={x=mouse.X;y=mouse.Y;s=o.AbsoluteSize,m=v2(mouse.ViewSizeX-o.AbsolutePosition.X,mouse.ViewSizeY-o.AbsolutePosition.Y)} d=_d c=s.UIS.InputEnded:connect(function(io) if io[UIT]==Enum[UIT].MouseButton1 or io[UIT]==Enum[UIT].Touch then d=nil end end) while d==_d and o and o.Parent==p do o.Size=u2(0,min(d.m.X,max(x or 20,d.s.X+(mouse.X-d.x))),0,min(d.m.Y,max(y or 20,d.s.Y+(mouse.Y-d.y)))) rwait() end c:disconnect() end end)
        end```
    [/code]

So @LuaBearyGood (LuaBearyGood) replied

    Do you need to know what its inserted, these scripts are deliberately obscurificated so you don't know what they are doing, just get rid of it lol.
    
    As for finding other viruses I recommend getting RoDeffender or something to help you hunt them down.

After which, @maxcatpug (maxcatpug) added

    But it spawns in the game every time a server starts, as I said. It is not there in studio.

So @LuaBearyGood (LuaBearyGood) replied

    Then it is most likely a plugin, or being cloned in via another virus script.

So @EpicCheatCodes (Epic) replied

    Free models with hidden scripts are likely the root of your problem. Search within everything, and delete anything that is not written by you.

To which @maxcatpug (maxcatpug) replied

    That's what I did, but I couldn't find the issue but thanks anyway

To which @LuaBearyGood (LuaBearyGood) replied

    Get RoDeffender, delete all your viruses then try running the game and see what happens.

Then @maxcatpug (maxcatpug) said

    Just installed it, it said 0 viruses removed

After which, @LuaBearyGood (LuaBearyGood) added

    In that case check your plugins for anything malicious.

@PeetaMlark (Peeta) replied

    Have you found what has the virus yet, i had this issue once and ended up having to restart my buid. I stopped using free models then.

@TheeDeathCaster (StormDragon23) replied

    This's the `Client` script that's a part of the module for Kohl's Admin Infinite. Do you have the admin loader in your game? If so, this's where this module's coming from; if not, you could try doing a search for the module's id via ctrl + shift + f and entering `1868400649`.

Then @maxcatpug (maxcatpug) said

    Ohhh I did not know that. In that case, yes, we do have a Kohl's admin. I'm guessing something else is causing the lag then. I also noticed this in ReplicatedStorage. Is it part of the admin too?

So @TheeDeathCaster (StormDragon23) replied

    Yes, that's also part of the admin; it's line 24 of the module where it sets up the RemoteEvent, named `banana`, and sets up the `admin`, `ban`, `log`, and `clog`.

Then @maxcatpug (maxcatpug) said

    Ohh alright, thanks. I'll try to find out what might be causing the lag then.

After which, @Mr_RainBowsYT (Arctis) added

    I recommend using Ro-Defender, it's a roblox plugin that scans for virus and it works for me. But maybe you could also check in the objects of the game by using the search bar in explorer. For example type Script or LocalScript to find scripts and maybe the start of the virus.

After which, @maxcatpug (maxcatpug) added

    Thanks but if you read what I said above, I did both of those things and it didnt help  have a nice day

@Mr_RainBowsYT (Arctis) replied

    Oh sorry! You could check on yt is there is some info (If you haven't )

@blueCoolDude26 (The333Guy) replied

    if i use a free model i first check for any wierd welds or scripts that are unessecary/ anythings that is schetchy, and if thats so i YEET it to the garbage and delete it

So @Beastcraft_Gaming (Beastcraft) replied

    Never use free models for scripts only use it for builds(Just my opinion)


{'source': 'discourse', 'url': 'https://devforum.roblox.com/t/virus-in-my-game/532178', 'title': 'Virus in my game', 'views': 945, 'has_accepted_answer': True, 'word_count': 1805, 'like_count': 8, 'reply_count': 12, 'participant_count': 8, 'posts': 19, 'tags': '', 'author': '@maxcatpug (maxcatpug)', 'participants': '@maxcatpug (maxcatpug), @LuaBearyGood (LuaBearyGood), @EpicCheatCodes (Epic), @PeetaMlark (Peeta), @TheeDeathCaster (StormDragon23), @Mr_RainBowsYT (Arctis), @blueCoolDude26 (The333Guy), @Beastcraft_Gaming (Beastcraft)', 'image_url': ['//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/f/c/c/fcc029431034b2ea1b21625cfab9edd0180f5c2f.png'], 'created_at': '2020-04-19T13:10:18.650Z', 'last_posted_at': '2020-08-24T13:56:33.217Z'}