George Lucas was offered $500,000 by Fox Studios to direct Star Wars, but instead chose to be paid $150,000 in exchange for merchandising rights and the rights to sequels.
With bad merchandising experience in the recent past, and not having much faith in the movie, Fox was happy to agree to both conditions.
Between 1977 and 1978, Star Wars sold $100 million worth of toys. 35 years later and Star Wars themed toys have generated $12 billion in revenue. The lucky toy company was Kenner Products. See link below for the full story.
https://fictupedia.fandom.com/wiki/Kenner_Star_Wars_Toys