Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I change ReplicatedStorage name randomly in loop?

To prevent some exploiters, I know you can change ReplicatedStorage name to random letters in a loop so players cannot change things from it. I have done this with workspace by doing:

function RandomVariable(f)
		local g = ""
		for h = 1, f do
			g = g .. string.char(math.random(97, 122))
		end
		return g
end

while true do
	wait(0.25)
	workspace.Name = RandomVariable(10)
end

And it works, but not for ReplicatedStorage.

game.ReplicatedStorage.Name = RandomVariable(10)

It doesn't work because it will not be named ReplicatedStorage anymore, so it will change it only one time. Can somebody please help if you know a way to do this?

1 comment

0

You can get any service regardless of namechanges simply by doing game:GetService(). This is a waste of time, if you're trying to hide assets, don't, because you can't unless you don't intend on using them.

1 answer

Lol, you can always have a variable denoting ReplicatedStorage.

function RandomVariable(f)
        local g = ""
        for h = 1, f do
            g = g .. string.char(math.random(97, 122))
        end
        return g
end

while true do
    wait(0.25)
    workspace.Name = RandomVariable(10)
end

This works because workspace itself is the workspace, like a variable

local Rep = game.ReplicatedStorage -- now that we have this, let's put it into action
function RandomVariable(f)
        local g = ""
        for h = 1, f do
            g = g .. string.char(math.random(97, 122))
        end
        return g
end

while true do
    wait(0.25)
    Rep.Name = RandomVariable(10)
end

Being honest, this code is heavily useless, first of all, if the exploiter has access to the dex, they can simply bypass it by doing this:

local Rep = game.ReplicatedStorage
function RandomVariable(f)
	local g = ""
	for h = 1, f do
		g = g .. string.char(math.random(97, 122))
	end
	return g
end
spawn(function() -- lazy
	while true do
		wait(0.25)
		Rep.Name = RandomVariable(10)
	end
end)
wait(5)
print(game:GetService("ReplicatedStorage").Name)

Second, not many exploiters know what they are doing. Thus, this is a major waste of time. Result

This discussion is preserved as it was. New answers, comments, and votes are closed.