For everyone who loves fixing codes

Hi !
I’m making a simple 2D side-scrolling game (Mario Bros style), there are two characters who have 3 lives and a gun each and then it’s about shooting each other.
I’m having problems with my code, when I control one character it affects the second (and sometimes the sounds don’t react as they should). I’ve tried several things but now I’m stuck. So here I am offering you a screenshot of all my code, if anyone wants to take a look and tell me what’s wrong.
For everyone who loves fixing codes !
Thank you so much !