Given the task definition and input, reply with output. In this task, five ordered key facts are given. All the given facts are expressed in natural language. Your job is to generate a story 100 to 1000 words long, that includes all the facts given as input in their order of appearance while expanding upon them to produce a broader, yet coherent, narrative.

Fact1: SWAT team barges into school library to find student, Fact2: Matt convinces him to change it to eight-hour detention on Saturday, Fact3: Day locks students alone in school 's new library, Fact4: Veronica With begins work limited computer access to school 's databanks, Fact5: General Andrew Winston Clarke was taken over by city of Crestview to build school
A SWAT team barges into a school library to find a student holding an axe and surrounded by savaged bodies, before the film goes back eight hours previously. Six unruly prep school students are forced to serve Saturday detention for eight hours at Crestview Academy, where psychologist Dr. Day conducts psychological testing on the students to examine their personalities and trigger their demeanors, recording each session in the process. When Headmaster Nash gives an expulsion notice to lowincome student Matt Clark, Matt convinces him to change it to an eighthour detention on Saturday. Matt serves the detention with the awkward Tarek Ahmed, the jock Craig Cook, the sly Goth girl Veronica Harmon, the prissy and asthmatic Megan McDurst, and the popular girl Tricia Wilkes. For their detention, Dr. Day takes away their phones, restricts their internet reach, and gives them an assignment to write the schools history. He then locks the students alone in the schools new library, which has had some further remodeling by the janitor, Max, with his addition of Native American portraits and an Apache statue. The students believe the library is haunted. They realize they have mutually dysfunctional family lives, though they have their differences with each other, sparked from prior encounters which have been recorded on camera. Veronica hides Megan's inhaler and frames Tarek, leading to Megan having an asthma attack and dying. With limited computer access to the schools databanks, Veronica begins work on their history project. They learn how land was stolen from an Apache tribe in the 1870s by General Andrew Winston Clarke, which was then taken over by the city of Crestview to build the school. The new library was built on neighboring land that belonged to recently deceased Apache elder Jacob Rainwater. As the students argue onandoff, they discover a vent that allows them to navigate to different rooms that are locked. They learn that Matt has an undisclosed criminal background and become suspicious of him. After Tarek goes missing and they return to the library through the vent, they learn that Tricia's mother is the Governor, Craig's father is a city councilman, and Megans father coowns the former Rainwater property on which Tarek's fathers company built the library, all of whom made an agreement with the school to ensure their spoiled kids would be guaranteed to graduate in exchange for gifting the library. A dark storm rages outside the school, tampering with the lights and electronics inside, increasing the students' fear that there is paranormal activity. Craig falls down the steps in the library and is staked by one of his crutches, dying instantly. Not long after, Tricia admits her mother was the reason why Rainwater lost his house, and Veronica secures evidence on Craig's camera showing that Tricia, Craig, Megan and Tarek had killed Jacob Rainwater at his home to vacate the ownership of the property, leaving no next of kin to take over. Deeply believing in the paranormal, they attempt to contact Jacob's spirit so that Tricia can call a truce, but the spirit rebels and seemingly harms Veronica. The spirit then appears, and Tricia uses a nail gun to commit suicide due to fright. Dr. Day emerges to reveal his alliance with Veronica. The whole time, they masterminded everyones paranormal delusions and emotional outbursts, triggered by psychological inkblots tests, all to sell the story and make money. Killed by Dr. Day for trying to escape through the vent, Tareks dead body is what was used as the ghost. Before Veronica can shoot Matt using the nail gun, Dr. Day abruptly kills her with an axe for poisoning him and causing his diarrhea earlier. Matt is framed for all the murders, as an unexpected booby trap involving the statue severs Dr. Days head, killing him. A SWAT team barges in to find Matt armed with an axe in the middle of the carnage. Matt is subdued, placed in a straitjacket and gagged. Max the janitor arrives, revealing he is related to Jacob Rainwater. In the closing credits, Matt is driven away in an ambulance and Tricias mother, Tarek's father and Craig's father pay off Headmaster Nash in order to clear them of any involvement in the incident.