What Was Scout's Part in the Pageant?

In the novel "To Kill a Mockingbird" by Harper Lee, Scout was assigned to be the ham in the school pageant. Scout had trouble getting the costume on and off without help. She wore it home as Jem walked her home from the pageant; she was embarrassed that she arrived on stage late and hid in her costume on the way home.

Because Scout was wearing the costume, and they left the school after almost everyone else had gone home, they were alone walking home. This gives Bob Ewell the opportunity to attack them. Boo Radley steps in and saves the two kids from Bob Ewell, killing him. He carries Jem home, saving his life.