Help making a Server side input system

Im trying to make a combat game using server side scripts, i know that the user input service is only for local but im trying to be able to use events to make inputs server side as well to be able to preform attacks.

A Issue i have came across is that i found a script able to achive one time button attacks but not holdable attacks (such as blocking) using a get strong for keycode.

Local script:


UIS.InputBegan:Connect(function(Input , IsTyping) 
	if not IsTyping then
		script.Parent.KeyBindEvent:FireServer(UIS:GetStringForKeyCode(Input.KeyCode))
	end
end)

Serverside Script:

script.Parent.Parent.UniversalScripts.KeyBindEvent.OnServerEvent:Connect(function(plr, key)
	if key == "E" and blah == false and blah == false and blah == 1 then
		Mode = 2

a issue with this is that when trying to make a block system or a holdable attack the script will up right break making it so if you hold block and press anything on the keyboard it cancels it (such as left or right click to look around) i have been asking my friends if theres a better way of making a local to server side input script but i found thing

Summery: I want to be able to have a updated version of a local script to server side script input system that can handle one time press attacks and holdable attacks such as blocking

instead of only the sending the inputs that the player is pressing to the server. You could send all of the inputs that the server need to check as simple booleans possible in a table this would allow the server to check if the player is still holding an attack or if they just pressed that button by a simple check if the boolean corresponding to the desired key is true for at less 2 events then you know they held it else they just tapped the key.

on a side note I wouldn’t recommend this approach of sending player input to the server because this causes a lot of perceived lag

i have literally 0 clue why right click would cancel something like e ability. but like @PIXELBYPIX said you can handle input kinda like this, by storing tables on server with values like “blockingActive”

client press “b” → server sees if its ok → server agrees, stores your blockState and updates it to all clients

im pretty sure LoL does something like this