A Janesville teen who drove the getaway car in an armed robbery of a Subway sandwich shop was sentenced to jail and probation Thursday in Rock County Court.

Kortae D. Valadez, 19, pleaded guilty to party to armed robbery. He’ll spend 90 days in jail or at home on a monitoring bracelet.

Judge Richard Werner allowed him to travel if he needs to get to school or work. His attorney, Stephen Compton, said he is on track to get his high school diploma this spring from Janesville’s Rock River Charter School.

Valadez is accused of robbing the Subway restaurant at 1929 Center Ave. in Janesville on March 29.

Valadez was 18 at the time. The person accused of holding the gun was Tyler D. Kjell, then 17, of 2531 S. River Road, Janesville.

They made off with about $460. The gun turned out to be a BB gun.

“BB gun or not, this is an extremely dangerous situation because the person who was working, trying to make a living, had no idea whether that was a Glock or a Glock-style BB gun,” Assistant District Attorney Rich Sullivan said.

The criminal complaint says the victim appeared to be extremely upset.

After the robbery, Valadez fled from police down Center Avenue at about 70 mph, police reported.

Valadez has no prior criminal record, and he was treated for an unspecified mental health problem last year, Compton said.

Compton said he has seen a huge change in Valadez and noted one of his teachers has been attending his hearings in support.

If Valadez’s probation is revoked, he would face a prison sentence. The maximum sentence for party to armed robbery is 40 years. Sullivan said that “hammer” hanging over Valadez’s head will keep him focused on doing the right thing and will protect the public.

Werner ordered that as a condition of probation, Valadez get his diploma or high-school equivalency during the coming year.

Kjell is scheduled to be sentenced Jan. 17.