Actually no, I'm pretty sure Bertoluci and co. had the script mostly done before the soundtrack.
It was just that Leone had Morricone complete the score before the filming started - so it could be played to the actors and crew and he could time the scenes correctly (instead of having to do too much post-editing). Any alterations based on the soundtrack would have been relatively minor/adhoc and the overall story and dialogue were generally as they were originally. At least, that's always been my understanding of it - that any changes would have been subtle.
The script is its own entity however you look at it. It's qualities and main narrative drive would 100% remain with a weaker score.
I didn't say that the script was based on the score. I just said the film that Sergio Leone made. All the pacing and rhythms are based on the score. As opposed to the music being placed over the top to fit with the direction.
No, actually after reading my own post above I did say script after all.
I should have just said 'film' or 'shooting script'. My mistake.
I disagree with you however about the narrative drive remaining intact 100%, as I believe that would be down to the subjective choices of the director for the most part and how they want to adapt the script to film.
Otherwise films made by certain directors wouldn't be stylistically distinguishable from films made by other directors.