When a woman trying to get to Florida for the funeral of a childhood friend killed last week's school shooting couldn't afford to get there, a pair of New York state troopers picked up the $700 plane ticket for her.

NBC News reports that troopers Robert Troy and Thomas Karasinski bought a ticket home for Marjory Stoneman Douglas High School grad Jordana Judson after she broke down in tears at a ticket booth at LaGuardia International Airport on Friday.

"I look up, and the state troopers are standing there, and they're both handing over their credit cards," Judson told NBC News. "I'm telling them that they don't have to do this. This is crazy. They said: 'It's already done. We want you to be home with their families. This is a tough time.'"

Judson, 23, said she decided to try to Parkland the day after the shooting and learning that friend Meadow Pollack -- whose father is from Long Island -- was among the 17 people who were killed.

"As soon as I got out of the car at the airport, I started hysterically crying," she told NBC News.

That's when she said the two troopers approached to ask if she was OK. They led her to a JetBlue ticketing booth and stood with her as she tried to book a flight.

NBC News reports that Judson pleaded for a bereavement discount, and the two troopers handed over their own credit cards when the ticketing agent said she couldn't help.

"It was the right thing to do," Troy told NBC News.

He added that he and Karasinski "both agreed if it was anybody in our family that was trying to get down there that we would do anything that we could to try to help."

Judson made it to Florida to be with the Pollacks and was with the family through Monday.

JetBlue said in a statement to NBC News that it was refunding the cost of the ticket to the officers.