Charlie and the Chocolate Factory (musical) returns, and seeing Charlie’s additions, he tells him he’s won, inviting Charlie into his Great Glass Elevator so that he can show him his prize, the chocolate factory. ("Pure Imagination"). They return to Earth where Wonka announces he’s leaving, and that Charlie is now in charge ("A Little Me"). He disappears, but as the Bucket family moves into the factory, Charlie sees the mysterious tramp outside the gates, who is revealed as Wonka. As the Oompa-Loompas and Charlie wave goodbye from the factory windows, Wonka vanishes, singing a reprise of "It Must Be Believed to Be Seen", leaving Charlie to
Willy Wonka & the Chocolate Factory to buy the rights to the book and finance the picture for the purpose of promoting a new Quaker Oats "Wonka Bar". David L. Wolper and Roald Dahl agreed that the film would be a children's musical, and that Dahl himself would write the screenplay. However, Wolper changed the title to "Willy Wonka and the Chocolate Factory". Screenwriter David Seltzer conceived a gimmick exclusively for the film that had Wonka quoting numerous literary sources, such as Arthur O'Shaughnessy's "Ode", Oscar Wilde's "The Importance of Being Earnest", Samuel Taylor Coleridge's "The Rime of the Ancient Mariner" and William Shakespeare's "The Merchant