When it comes to your writing, you may be tempted to translate some story that's not your own into a script. Before you start writing, you need to keep in mind the audience.
The biggest problem with an established story is that it has a reputation, and that fans of the material want it to live up to that reputation. This can be good and bad, and you need to decide if that reputation is something you can deal with. Take a close look at “The Golden Compass”: When Phillip Pullman originally wrote the book, he wanted a book that would attack the Catholic Church (“undermine” was the word used). It's hard to read the “His Dark Materials” (even the title is evocative of anti-church sentiment) and not realize that the writer is anti-Christian; the Magestrium is obviously a stand-in for the Catholic Church and any dogmatic types are automatically bad guys. It also has everyone assigned a “daemon” that represents them, and the worst villains are those that seek to rend the daemons from their owners (in other words, dogma rips imagination and willpower from its adherents).
But, when it was made into a screenplay, a problem developed: In order to keep its fanbase, it needed to keep its atheist values, but atheist movies don't play well to an American audience. Thus, the message had to be toned down, but the atheist message is so intrinsic to the story that it ended up killing the movie. (Did you follow that?) What could have been a new franchise ended up flopping because the production company realized that it couldn't market a $180M picture about atheism to a Catholic audience; it's a gorgeous movie, but it has no heart. It needed to be done for no more than $75M, but that wouldn't have done justice to the story.
On the other hand, someone that paid attention to the audience is X-Men 3, written by Simon Kinberg and Zak Penn. Although a lot of drastic changes were made to the X-Men that ticked a lot of people off (such as the origin of Phoenix, the death of Cyclops, and more-than-cosmetic changes done to a lot of characters), those changes were accepted because the story itself was still strong and there was some great character development. Better yet, a lot of characters were given their trademark moments and sayings (such as the fastball special, X-Men vs. Sentinels, and Beast's “Oh my stars and garters!”). Because the changes made to the X-Men made sense, and the spirit of the original (that of an oppressed group in a world that is trying to stop them) remained, people were willing to trust that they would be entertained, overlook some major mistakes, and so it was a profitable movie.
Obviously, don't worry about making the adaptation match the original completely; compromises will need to be made and you should have no problems making them as the material calls for it. Just remember that you need to find a new fanbase while at the same time making the current one happy. If you can't do that, you will tick off the old base while forcing potential fans to shy away trying to figure out what you did wrong. But, if you can bear in mind the needs of the old fans with the new material, you will make everyone satisfied with your changes, and your product will be successful!