You have separate animations for up, down, right, left.
Create a global variable called PlayerShipDir.
Create a series of conditions:
PlayerShip is playing Up, then set PlayerShipDir to "Up"
PlayerShip is playing Down, then set PlayerShipDir to "Down"
PlayerShip is playing Left, then set PlayerShipDir to "Left"
PlayerShip is playing Right, then set PlayerShipDir to "Right"
Then make a sub-event below when space is pressed.
PlayerShipDir = "Up" then set bullet angle of motion to 270
PlayerShipDir = "Down" then set bullet angle of motion to 90
PlayerShipDir = "Left" then set bullet angle of motion to 180
PlayerShipDir = "Right" then set bullet angle of motion to 0
And you should probably fix the problem of the ship flying backward.