directed by Josh Schwartz. On August 8, 2011, he joined Road to Nardo, a film that would have been Scot Armstrong's directorial debut. On December 12, 2011, he joined Jay Roach's The Campaign, starring Will Ferrell and Zach Galifianakis. On July 23, 2012, Middleditch joined the cast of the comedy film Someone Marry Barry, directed and written by Rob Pearlstein and produced by Barry Josephson. On August 23, 2012, he appeared in The Offices final season episode "The Farm". He had a role in the 2013 comedy fantasy film The Brass Teapot, directed by Ramaa Mosley, and played a police officer in the 2013 CBS Films coming-of-age comedy film The Kings of Summer. On January 30, 2013, Middleditch joined HBO's comedy pilot Silicon Valley playing Richard Hendricks. He has said that the pilot was written with him specifically in mind as the lead (the character was originally named Thomas Pickering; the latter being his mother's maiden name). This was a result of a "random" audio sketch he once made for a stand-up routine which he would later animate himself and pitched to several people, including Mike Judge's production partners John Altschuler and Dave Krinsky, who would later create the show. For his work on the show, Middleditch has garnered four Satellite Awards nominations and a win in 2019, and two Critics' Choice Television Award nominations. In 2016, Middleditch earned his first Primetime Emmy Award nomination for Outstanding Lead Actor in a Comedy Series for his performance in the show. On April 23, 2013, he was added to the cast of the comedy film Search Party, playing Nardo, who travels to Mexico to win his fiancé back, starring alongside one of his Silicon Valley alumni, T.J. Miller. Middleditch made a small cameo appearance in the 2013 film The Wolf of Wall Street as a broker who is fired for cleaning his fish bowl during office hours. He has played as a hipster thief in the You're The Worst episode "Sunday Funday". On The Pete Holmes Show, he played Nightcrawler and Gambit from the X-Men and Vega and Ken from Street Fighter II. On October 16, 2013, it was announced that the Disney XD-produced animated series Penn Zero: Part-Time Hero would star Middleditch as the titular multiverse-hopping hero. The series premiered in late 2014. In 2015, he co-starred in the films The Final Girls and The Bronze. Also in 2015, he began