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

Would my exploitation script work in a published game?[CLOSED]

I would like to know if this script would indeed work. The idea of the script is that unless and until an exploiter comes in and destroys or somehow stops firing the event to a script in server storage, a while wait() loop would stop allowing the server code to go onto the next stage which would be kicking the player.

Server-side code:

game.ReplicatedStorage.Test.OnServerEvent:Connect(function()
	while wait(0.01)do
		print("Wont kick as while loop is running")
	end
end)

game.Players.PlayerAdded:Connect(function(plr)
plr:Kick("You have been kicked for unkown reasons")
end)

Client-side:

while wait(0.01)do
	game.ReplicatedStorage.Test:FireServer(game.Players.LocalPlayer)
end

3 comments

0

the exploiter can simply fire that event, and that loop won't yeld the code as line 7 would already be loaded

0

Wait when i test it in game i dont get kicked while the while loop is running

0

and is there any way for me to simulate an attack on my own system?

1 answer

No (at least, from what I can see). There shouldn't be a way for the player to join since you are running the Kick() function when client connects through PlayerAdded.

Also, I recommend using the RunService.RenderStepped event instead of wait(0.01) as the lowest you can go for wait() is approximately 0.0333 seconds (I'm pretty sure, at least). RenderStepped runs every frame after it has been rendered, so it would be much more efficient.

1 comment

0

But once you start a while wait it wont ever stop so destroying the purpose of the script. But thanks for the advice and tip of using rendered step instead of while wait 

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