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

Is there a way I can change the name of workspace every 5 seconds?

So I am creating an anti-exploit, I want it to also change the name of workspace every 5 seconds to something very random. Could anyone help me out? This is what I have so far: This is in a normal server sided script.

while wait(10) do
	game.Workspace.Name = math.random(-9999999, 99999999999)
end

12 comments

0

I also heard the game Jailbreak made by Badimo uses this from a guy who knows an exploiter.

0

*uses this, I know this because I have a friend which knows another friend which exploits.

1

Changing the name of workspace will not stop exploiters because they can still do game:GetService("Workspace") and other ways

0

Don't use wait() as a condition. Use while true do with the wait inside of the loop.

0

There's a ridiculous amount of proprietary software that uses while wait() do, stop being so petty about that stuff

0

while wait(5) do workspace.Name = "Workspace #"..math.random(-99999,99999) end

1

You do realize.... a hacker could just do for _, v in pairs(game:GetChildren()) do if v:FindFirstChild('greatneil80') then v.part:Destroy() end end

0

@Vulkarin because wait() as a loop's condition is a hack. It abuses the fact that wait returns a number corresponding to the time Roblox yielded the thread for. while wait(10) do is almost like saying while 10.002834 do or however long it yielded, as it is never exact. It hurts readability. How does it even make sense? kthx

0

Changing the name of Workspace can break the game if you have any other scripts accessing Workspace via game.Workspace. 'workspace' is more efficient because it will access workspace without doing game.Workspace and will also access workspace with a different name, you can also do game:GetService("Workspace")

0

This will do nothing. game.Workspace is a property of game and will still work. game["Workspace"] is the same property of game and will still work. workspace will still work. game:GetService("Workspace") will still work. game:FindFirstChildOfClass("Workspace") will still work. This is entirely pointless.

1 answer

The way Jailbreak does it is like this:

while wait(10) do
    game:GetService("Workspace").Name = game:GetService("HttpService"):GenerateGUID(false)
end

Your script would have only worked once - you can't do game.Workspace if the workspace was renamed (because it won't be called Workspace anymore). So, GetService is used, which will return the real workspace.

To note: this is literally like putting a sticky note that says "please don't touch" above a big red button. It's not going to stop an exploiter.

3 comments

0

I like the analogy

0

"Your script would have only worked once - you can't do game.Workspace if the workspace was renamed (because it won't be called Workspace anymore)." Wrong. game has a property called Workspace which is a reference to the Workspace, and properties have precedence over children. Meaning game.Workspace is always the property of the DataModel.

0

You can just use workspace boys.

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