for P1 use arrow keys and z or m to make it easier to 2 player for P2 use wad keys and n or e to make it easier to 2 player and also press the green flag to reset it if one of the players hp gets to zero you lose it works better to tap repeatably than to hold a key down so the other players key doesn't override it
if you want to make something like this then pls look up a tutorial it helped me a lot (Gemini ai and YT)