Making a movie that has basically the same plot as a previous movie with slight changes is a common occurrence.

The thing you have to be wary of with movies is trademark law. Your Star Wars copy can't use the word "Darth Vader", that's trademarked. It can't use Darth Vader's mask, Darth Vader's suit or Darth Vader's breathing either, all trademarked. And with trademark law the bar to pass is basically "would a reasonable but uninformed consumer be at risk of confusing your product for the trademark". LLMs can't launder that for you. You have to make actual changes, like Spaceballs did

Spaceballs is a parody, which is specifically an exception to the rules; it’s called “fair use”. If Spaceballs was not a comedy, it would not be permitted to exist.