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?
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