Sadly, your video isn’t loading for me!
On the client, I think you’re doing most things right, except for that you don’t want to send the stunned value through a remote event. Not only can an exploiter change this value on the client as they wish, which would completely make your checks on the server useless, they can fire remote events on their own and could simply put “true” where you put sprinting. Instead, only send the input along with the remote event as that is the only thing that the client should be able to change freely.
The client can’t be trusted by the server AT ALL, therefore, passing on values such as sprinting and stunned through a remote event isn’t a good idea. Instead retrieve the stunned value on the server and check if its true or false there.
This, on the server, would therefore be useless and is easily exploited:
As for the server script, you seem to have misunderstood something:
Movement is handled entirely on the client, so the walk speed doesn’t need to be replicated to the server to do something. So the server doesn’t know what the client has set walk speed to, at the most, they know the velocity of the character and can check if that aligns with the player, but you’d want to do this in your anit-cheat system, not here.
What this remote event is used for is to tell the server when the client changes the walk speed, from where the server then runs its own checks, and sets the walk speed to what it thinks its right. This doesn’t prevent the client from changing its walk speed as the server can’t change what the client has put it to, but now the server knows what their walk speed is.
From here, you want to build a server sided anti cheat, which checks if the velocity and walk speed align. If they don’t align within a certain threshold, the player will then be punished.
This means that the lines in which you check if the walk speed >= what its supposed to be, are useless.
Building a robust anti cheat requires deep knowledge of client to server communication and replication, therefore I recommend you read into it or maybe even search for an open-source option, although that might cause issues with your system as these anti-cheats are not built to fit your specific use case.