The music of the Star Wars franchise is composed and produced in conjunction with the development of the feature films, television series, and other merchandise within the epic space opera franchise created by George Lucas. The music for the primary feature films (which serves as the basis for the rest of the related media) was written by John Williams.

Answer this question based on the passage: who wrote the musical score for star wars? OK. Let's think. My stream of consciousness:
To answer the above question, the relevant sentence is: The music for the primary feature films (which serves as the basis for the rest of the related media) was written by John Williams. The answer is John Williams.