Sordi did write his own scripts. He wrote or co-wrote many of his films, including his most successful ones. He also wrote several plays, which were also successful. Sordi was a talented writer, as well as an actor and director.
The Alberto Sordi Showdown: Test Your Knowledge of the Iconic Italian Actor