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
the exploiter can simply fire that event, and that loop won't yeld the code as line 7 would already be loaded
Wait when i test it in game i dont get kicked while the while loop is running
and is there any way for me to simulate an attack on my own system?