I need advice about an attack script

It’s logical you script the input / attack commands on the client for the most optimal experience. So you just hit MouseButton1 and you do an attack and theres a small cooldown before the next attack. No lag, no remotes, all good and the player are slashing away at mobs.

Issue: what if exploiters can bypass this small cooldown and have this insane minecraft kill aura (1000 attacks per second)? And uses only 1 of the 5 combochain attacks (spin attack) that hits all enemies nearby (or even all enemies on the map)?

Maybe the client should request attacks commands to the server, so the server can do sanity checks and play attacks for the client. But that isn’t optimal experience due to latency, amiright?

I need an opinion how to write an non-exploitable attack script.

use Os.clock to determine the cooldown exploiters shouldnt be able to bypass it

1 Like

Furthermore, don’t place the cooldown functions in localscripts, handle them on the server.