Rex, the village idiot of the town of Huh is excited that the swindler Phineas McGee is back in town. Bree Cormac, the school mistress, does not share his enthusiasm for Phineas’ visit. She implores him to focus on is lessons, but Rex isn’t interested. Phineas arrives and Bree receives him coldly, finally shooting off his hat when he doesn’t remove it. Rex is awed by her skills as a sharpshooter, but Bree can only shake her head and walk away in a huff. Doc Whitmore, hearing the shooting, rushes on to find out what’s going on. Rex assures him it’s nothing to worry about and implores him to settle down while Phineas begins his show. Phineas addresses the audience. He starts to promise fantastic elixirs that cure all kinds of ailments. Doc Whitmore scoffs at this until Cat Ashley, the local madam, arrives at the show. She suggests Doc Whitmore find the Sheriff.
Phineas has something he’d clearly like to discuss with Cat, but she’s incredibly evasive. Fortunately for her, before Phineas can get into the matter, Bree enters. That’s when Doc Whitmore returns with Sheriff Marshall. He’s furious to see Phineas in town again and is full of bluster until he realizes Bree is there. Then he becomes a babbling idiot.
Phineas resumes hawking his goods, much to Rex’s delight and the Sheriff’s dismay. Unfortunately, the Sheriff doesn’t have grounds to arrest him, so Phineas promises more miracle cures. Doc Whitmore hears him going and rebuffs his promises. Phineas counters that Doc Whitmore is just jealous and afraid of the competition. Doc Whitmore is loath to let Phineas continue making fools out of everyone but there’s nothing he can do. Meanwhile, Phineas sells Rex a magical penny whistle that can turn day to night. Bree, angry on Rex’s behalf, drags him off for a science lesson. After she leaves, Phineas points out, quite rightly, that the Sheriff is smitten with her and asks if that’s the reason that he bought a hair tonic last time Phineas was in town. The Sheriff removes his hat, revealing that his hair is green.
Cat Ashley returns, with Rex hiding from Bree behind her skirts. Phineas turns on Cat, demanding payment for the perfumes he’s been supplying for her. Unfortunately, Cat just doesn’t have the money. Phineas threatens to go back on a promise that he made to her years ago. She begs him not to speak of it, but Rex is clueless and Doc Whitmore makes it clear he already knows the secret. Bree returns, looking for Rex, and shoots off Phineas’ hat again. Feeling a little nervous, Phineas scolds her for using her guns so freely and swipes her glasses. This has a domino effect, leading all of the characters quarreling. The Sheriff returns and tries to restore order before he loses his nerve at seeing Bree and runs out. Hoping to create a more romantic atmosphere, Rex offers to play some mood music. He plays his whistle from Phineas, which immediately plunges everyone into darkness. There is a struggle. Shots ring out. When the light is restored, Phineas McGee is dead.
Suspicion immediately falls on Bree. Although she’s a sharpshooter, she’s blind without her glasses and it quickly becomes apparent that she could not possibly have shot Phineas in the dark. She also claims that her gun was taken from her. Doc Whitmore claims arthritis would prevent him from firing a gun. At first, no one believes him. The Sheriff hands him the gun and tries to close his fingers around it. The loud noise of crunching bones convinces everyone that he’s telling the truth.
Rex points out that Cat was awfully upset with Phineas and seemed to owe him a lot of money. Doc Whitmore produces a more promising motive, revealing that she’s Bree’s mother. She and Phineas gave Bree up for adoption so that she could have a better life, free of the shame of her parents. Cat turns this around, admitting that she’s in love with Phineas and could never really do him harm. She starts crying and the Sheriff takes a handkerchief out of his hat to comfort her, revealing his green hair.
Everyone is a bit aghast at the hair, except for Rex who points out that Phineas McGee did that. Bree cites simple revenge as a possible motive, but the Sheriff wasn’t even in the room when the shooting happened. He reveals his soft side, declaring his love for Bree, much to everyone’s relief and delight. Everyone then realizes Rex is the only suspect left. When they question him about it, Rex proudly declares that he was the one who did it. They ask him why and he relates that Phineas McGee was making fools out of all of them. He didn’t like the competition. He willingly goes with the Sheriff, leaving everyone else pretty stunned.