Rapper Lil Durk is praising his legal team for helping him avoid prison time.

The Chicago rhymer, whose real name is Durk Banks, pleaded guilty to one felony count of aggravated unlawful use of a weapon and one count of felony possession of a firearm, according to MyFoxChicago.

He'll now be on probation for 18 months and have to complete 50 hours of community service, but the Def Jam artist says he's fine with that. He also took time to shout out his lawyer.

"I'll take probation any day," he wrote on Instagram. "I don't smoke or drink anyway."

The judge in the case sentenced the 21-year-old rapper to 18 days in jail, but gave him credit for time served.

The case stems from Lil Durk's arrest in June 2013 when he was caught with an unregistered firearm. He was quickly apprehended and charged, with just one month of parole left from a 2012 case he was involved in.

It's safe to assume that Durk, his family and his record label hopes he stays out of trouble in the foreseeable future.

More From TheBoombox