Put another condition in your animations that go something like this
When W key is pressed
If gamepaused =/= true
Set animation to "jump"
Just add in a check to see if the game is paused. Jm sure there's a better more efficient way to do it but that's how i do mine.