Alien (originally titled Star Beast) was the original script treatment for Alien, written by Dan O'Bannon and Ronald Shusett after Shusett suggested that O'Bannon use one of his other film ideas, about gremlins infiltrating a B-17 bomber during World War II, and set it on the spaceship as the second half of the story. The working title of the project was Star Beast, but O'Bannon disliked this and changed it to Alien after noting the number of times that the word appeared in the script. He and Shusett liked the new title's simplicity and its double meaning as both a noun and adjective.
In writing the script, O'Bannon drew inspiration from many previous works of science fiction and horror. He later stated that "I didn't steal Alien from anybody. I stole it from everybody!" The Thing from Another World (1951) inspired the idea of professional men being pursued by a deadly alien creature through a claustrophobic environment. Forbidden Planet (1956) gave O'Bannon the idea of a ship being warned not to land, and then the crew being killed one by one by a mysterious creature when they defy the warning. Planet of the Vampires (1965) contains a scene in which the heroes discover a giant alien skeleton; this influenced the Nostromo crew's discovery of the alien creature in the derelict spacecraft. O'Bannon has also noted the influence of "Junkyard" (1953), a short story by Clifford D. Simak in which a crew lands on an asteroid and discovers a chamber full of eggs. He has also cited as influences Strange Relations by Philip José Farmer (1960), which covers alien reproduction, and various EC Comics horror titles carrying stories in which monsters eat their way out of people.
With roughly eighty-five percent of the plot completed, Shusett and O'Bannon presented their initial script to several studios, pitching it as "Jaws in space." They were on the verge of signing a deal with Roger Corman's studio when a friend offered to find them a better deal and passed the script on to Gordon Carroll, David Giler, and Walter Hill, who had formed a production company called Brandywine with ties to 20th Century Fox. O'Bannon and Shusett signed a deal with Brandywine, but Hill and Giler were not satisfied with the script and made numerous rewrites and revisions to it. This caused tension with O'Bannon and Shusett, since Hill and Giler had very little experience with science fiction and according to Shusett: "They weren't good at making it better, or in fact at not making it even worse." O'Bannon believed that they were attempting to justify taking his name off of the script and claiming it as their own.
Several elements of the original script made it to the final version of the film, such as Shusett's idea that one of the crew members could be implanted with an alien embryo. Hill and Giler added some substantial elements to the story, however, including the android character Ash which O'Bannon felt was an unnecessary subplot, but which Shusett later described as "one of the best things in the movie...That whole idea and scenario was theirs." In total Hill and Giler went through eight different drafts of the script, mostly concentrating on the Ash subplot but also making the dialogue more natural and trimming some sequences set on the alien planetoid.