The first version of the script was written in June 1997 during a trip for the project Cine Mambembe, which screens Brazilian films around the country in places where the people cannot pay for or do not have access to movie theaters. The trip and the screenings helped Bolognesi to write the screenplay as he "learned that the slightest loss of attention could be mortal and irreversible." The script needed to be rewritten five times in two years as it was analyzed by Bodanzky and other collaborators. Because of costs, producers suggested the removal of several parts that helped Bolognesi make the film flow faster. Another important group of critics were five teenagers who suggested making Neto a graffiti writer, for example. Lastly and most fundamental was Carrano's approval a few months before the start of filming.