Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
a4aw -5
6 years ago

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
0
I also heard the game Jailbreak made by Badimo uses this from a guy who knows an exploiter. a4aw -5 — 6y
0
*uses this, I know this because I have a friend which knows another friend which exploits. a4aw -5 — 6y
1
Changing the name of workspace will not stop exploiters because they can still do game:GetService("Workspace") and other ways ShadyShock 77 — 6y
0
Don't use wait() as a condition. Use while true do with the wait inside of the loop. lunatic5 409 — 6y
View all comments (8 more)
0
There's a ridiculous amount of proprietary software that uses while wait() do, stop being so petty about that stuff Vulkarin 581 — 6y
0
while wait(5) do workspace.Name = "Workspace #"..math.random(-99999,99999) end greatneil80 2647 — 6y
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 greatneil80 2647 — 6y
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 User#19524 175 — 6y
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") Starnamics 24 — 6y
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. User#22604 1 — 6y

1 answer

Log in to vote
3
Answered by
shayner32 478 Trusted Moderation Voter
6 years ago
Edited 6 years ago

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.

0
I like the analogy Vulkarin 581 — 6y
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. User#19524 175 — 6y
0
You can just use workspace boys. lunatic5 409 — 6y
Ad

Answer this question