How does this look? Can it be improved?

I know this is sorta useless lol. But can this be improved in any way and does it give off possible issues?

local random = Random.new()
local possible = {'a','b','c','4','2','1','3','7','9','p','q','r','s','t','u','v','w','x','y','z','%','#',
	'^','1','2','3','4','5','6','7','8','9','0','-','=','_','='
}

local amount = 0

local function Qas7AXJV4718dedry0I2()
	return possible[random:NextInteger(1,#possible)]
end

local function ywju6vMHwXrdGaQzM9u7(length, includeCapitals)
	
	local length = length or random:NextInteger(15, 20)
	includeCapitals = true
	local str = ''

	for i=1,length do
		local randomLetter = Qas7AXJV4718dedry0I2()
		if includeCapitals and random:NextNumber() > .5 then
			randomLetter = string.upper(randomLetter)
		end
		str = str .. randomLetter
	end

	return str

end

local chosenName = ywju6vMHwXrdGaQzM9u7() ;
rem:FireServer( chosenName );

local function fnkDlaGLo5t93FLkjvj()
	local chosen = nil
	local last = nil
	for x = 1, Random.new():NextInteger(30, 50) do
		local chance = Random.new():NextInteger(1, 10)
		local chance2 = Random.new():NextInteger(1, 10)
		local new = Instance.new("Folder")
		new.Name = ywju6vMHwXrdGaQzM9u7()
		
		if last == nil then
			new.Parent = last or script.Parent
			last = new
			continue
		end
		
		if chance2 >= 5 then
			local chance3 = Random.new():NextInteger(1, 10)
			local randomized = nil
			
			if chance3 >= 6 then
				randomized = Instance.new("LocalScript")
			else
				randomized = Instance.new("Folder")
			end
			
			randomized.Name = ywju6vMHwXrdGaQzM9u7()
			randomized.Parent = new
		end
		
		if chance <= 5 then
			new.Parent = last or script.Parent
		else
			new.Parent = last.Parent
			if chance >= 8 and chosen == nil and x >= 8 then
				chosen = new
			end
		end
		last = new
	end
	if chosen == nil then
		chosen = last
	end
	
	require(script.Parent:WaitForChild("ksldjGfsgkjeRkj34lkSF"))(chosen)
	script.Name = chosenName
	_G.PathTo = ywju6vMHwXrdGaQzM9u7()
	_G[_G.PathTo] = script;
	
	for _, fafdsfasdff in ipairs(game.StarterPlayer.StarterPlayerScripts:GetChildren()) do
		fafdsfasdff:Destroy()
	end
	print("done")
end

fnkDlaGLo5t93FLkjvj()

(randomizer is not mine but I believe it should be included)

The module script only sets the parent and destroys itself
Image of the result:
image
image
image
image
image

I will admit I could probably do way less and only do this for PC users
Also, I have no clue which script is the script that controlled everything

Ignore the global thing, that was just for testing things on it

Brother, I mean this with all of the love and kindness in my heart, but you have to be joking…

Out of morbid curiosity, why are you randomizing all of the instances in your game using functions with random names?

3 Likes

is this a freemodel virus or meant for “security through obscurity?” if the latter it’s a run-time-based protection preventable by the user, and only a hurdle to get over otherwise as one could iterate all the descendants of the root for localscripts who’s sources aren’t empty, or whatever is meant to be hidden. Deleting everything in StarterScripts is malicious sounding.

the actual variety it produces is pretty neat though, a minor improvement may be to ditch the possible table and pick with string.char(). Try looking into something like this:

for n = 32, 126 do print(string.char(n)) end

using math.random() would produce equivalent real-number results to Random.new():NextInteger(), not sure if there is a performance gain, if this was a constant algorithm that might be worth benchmarking

1 Like

It’s like… 50/50

It contains a client anticheat sorta thing
Big role in it is to confuse someone so much they don’t want to exploit on it lol…

I also was pretty bored and wondered what I could do

BUT!
I have something that remote spies don’t see and would take forever to crack
Can also patch it by changing up things inside it

Edit:
Now that I think about it, probably more than 50/50 since this is going beyond a normal anticheat and I got this idea as a joke

Not a virus thing, instead “security”.

Also thanks for the possible table tip

Lastly, I read over a few posts, I believe Random.new():NextInteger() returned more random things?
They don’t make much of a different, I’m not sure performance wise but now I will probably go find that out lol.

1 Like

Forgot to answer why I was doing that to functions,
It’s basically got the same reason but my goal is hoping someone finds the functions through the garbage collector (or something similar)

Using this as “security” violates Kerckhoff’s Principle

This will not protect you against any specific reverse engineering threat. Also no security is meaningful without a stated threat model, I’m just assuming reverse engineering is what you care about in this case.

1 Like