Back at the Barnyard - Season 2 - Eps 6: Udderado
The animals turn the barnyard into a Wild West theme park to raise the Farmer's bail money (who got arrested because of Otis wearing a viking helmet and mooning a cop) and decide to hire an actor to play the bandit. Instead of an actor, unfortunately, a real bandit shows up to pillage the town. So Pig comes to Otis' rescue with unicorns from the unicorn theme park to stop the bandit from attacking the barnyard.
About Back at the Barnyard

Title: Back at the Barnyard
First Air Date: 2007-09-29
Last Air Date: 2011-11-12
Status: Ended
Rating: 6.892/10 (from 125 votes)
Language: EN
Seasons: 3
Total Episodes: 97
Network: Nickelodeon
Genres: Animation, Comedy, Kids
Production Companies: O Entertainment
Synopsis
What do farm animals really do when the humans aren't looking? Just ask Otis, a carefree "party cow" who inherited the job of keeping the barn... and it's residents... in order. But instead of responsibility, Otis is driven by an insatiable need for fun, fun, fun. Along with his barnyard friends Pip, Pig and Freddy, Otis will stop at nothing in his pursuit of a good time... which usually means a few close calls with humans and other threats to what really goes on behind closed barndoors.
Cast

Chris Hardwick
Otis

Leigh-Allyn Baker
Abby

Jeffrey Garcia
Pip

Tino Insana
Pig

Cam Clarke
Freddy

Rob Paulsen
Peck

Dom Irrera
Duke

Wanda Sykes
Bessy

Maria Bamford
Nora Beady

Fred Tatasciore
Farmer Buyer