When Mrs. Pummelhorst (the school gym teacher) announces that she will be leaving to undergo gender reassignment surgery and will come back as the shop teacher "Mr. Pummelhorst," Coach Krupt, a substitute, takes her place. Every gym class, he has the students play a game called "Bombardment," which consists of him throwing dodgeballs at the students.
When Bart gets sick of the constant bullying, he fills a ball full of water and sticks it in the freezer overnight. The next day, he throws the frozen ball at Coach Krupt, who ducks; the ball crashes through the window and destroys Willie's shack. When Marge picks up Bart from school and sees Willie is homeless, she offers to let him stay at their house, and he eventually accepts. When there, Lisa has Willie realize that his life could be much better, and she decides to turn him into a proper gentleman. Bart, however, does not believe that she can do it, but Lisa bets that she can in time for the school science fair.
Meanwhile, Homer comes home with his last pair of blue pants ripped and torn after his seat breaks at the go-cart track. As he searches through town for a new pair, he finds no store that sells his favorite type of pants. When he goes to the factory that sells them, the manager tells him that they do not make blue pants anymore due to poor sales. Homer tells him that he will get more customers. He does this by writing "Buy blue pants" on the back of his head. Homer's advertising campaign pays off and soon everyone is wearing blue pants. However, Marge is annoyed when Homer begins putting other advertisements all over his body.
Lisa struggles to teach Willie how to act sophisticated. On the day before the science fair, he is still his same old self, but when he sees how disappointed Lisa is, he suddenly surprises both Bart and Lisa by correctly (and with a 'proper' accent) saying a sentence she gave him. At the science fair the next day, he impresses everyone with his politeness and verbal dexterity under the guise of G.K. Willington Esq. No one actually knows that it is the old groundskeeper until Lisa announces it to everyone. Once again, she wins the science fair, and the bet along with it.
Even though he is respected by everybody, Willie misses his old life and feels out of place working as the maitre d' at a fancy restaurant; unfortunately, both his job and his shack were taken by the music teacher. He explains to Lisa that he wishes to go back to the way things were, and she understands. Soon, he is returned to his restored "crap shack", which Lisa has decorated with a new sign on the inside wall reading "Home Sweet Home." Willie, acting very grateful for the gift, asks to be alone. Lisa understands and promptly exits the shack. Upon her leaving, Willie takes the sign and smashes it on the ground, declaring that he liked his shack "the way it was".