If you intend for the screenplay to ever go further than your own PC, you'll need to seek permission from the copyright owner, which is likely to cost you money. Permission may be denied for a variety of reasons, e.g. if media rights to the story have already been optioned or sold. Best to check first.
Then again, there are tales of writers who adapted stories or novels without seeking permission first, and whose script so impressed a director or prodco that they not only bought the screenplay but also paid extra to option the rights. (Damned if I can think of any off the top of my head... but I've read the tales. Maybe it's urban myth, or maybe someone can think of examples.)
-Derek