Jon Lovitz will star in the unscripted comedy pilot, Bad Judge for NBC.

The show is a spoof on daytime courtroom shows, but Lovitz will preside over actual cases, meting out "justice" as he sees fit, notes Variety.

Josh Lieb is serving as executive producer; Jon Lovitz will produce Bad Judge.