scrambling
Scrambling is the act of trying to get out of a difficult or dangerous situation by doing anything that you can. When there's a scramble for the ball at the park, everybody is trying to get their hands on it.
The players were scrambling to get away from the flames.
The students were scrambling to get out of the classroom in time.