Plot
In 1999, best friends Eli and Danny discuss plans for New Year's Eve. Eli has a crush on his classmate Laura, and Danny encourages him to kiss her at midnight. They join Laura and her friends Trevor, Madison, and Raleigh at a party held by Soccer Chris, who is also interested in Laura. At midnight, Eli watches in dismay as Chris and Laura kiss until the power suddenly goes out.
As a student is found dead with a piece of a fan lodged in his head, a toy car moves on its own and kills Trevor by burning his face with a hairspray can and lighter. The terrified partygoers realize that all electrical devices have become autonomous and hostile. They attempt to leave, but many are gruesomely killed. In the ensuing chaos, a VCR smashes Madison's head with a VHS tape, Chris' head is melted by a microwave, and a Tamagotchi drills through Raleigh's head. Eli, Danny, and Laura escape with juvenile delinquents Farkas, CJ, and Ash, but Danny is fatally impaled by a blade and Farkas dies when he hits the ground while attempting to be cool on his skates.
The group go to an old mill without electricity, while the machines kill several residents throughout the town. They also find VHS store clerk Garrett and Laura's ex-boyfriend Jonas, and learn the threat is a collective consciousness of all electronic devices worldwide planning to enslave humanity. Laura successfully creates a kill code to shut down the algorithm, now dubbing itself the "Amalgamation", but a computer attacks her. Eli douses it in water, shutting it down. The group is then cornered by the Amalgamation, who is using electronics to make itself bigger. Garrett tries to fend it off, but is decapitated. The group hide in a portable toilet and ride it down a hill. They take refuge in the VHS store and meet musician Fred Durst, whom they encourage to join.
The group arrives at the local high school where, they learn, the machines are due to a new Internet connection installed. They sneak inside and discover the townspeople have been reduced to mindless slaves by brain-implanted chips. CJ sacrifices himself to save Fred from a machine while the group learn the Amalgamation has now grown to a monstrous size and is forcing people inside it, converting them to the aforementioned slaves. Fred, Ash, and Jonas distract the machines guarding the townspeople to let Laura make her way into the Amalgamation, but it electrocutes her. Eli arrives in time to save Laura and attempts to insert the kill code himself, but fails to do so as the Amalgamation keeps electrocuting and taunting them. Eli then uses a condom Danny had given him earlier and wraps it around Laura's hand like a protective glove. While Fred, Ash, and Jonas continue distracting the machines, Eli and Laura successfully insert the kill code, shutting down the algorithm worldwide and destroying the Amalgamation. Eli shares a kiss with Laura and they reunite with the surviving townspeople as dawn breaks.
Five years later in 2005, a now college-aged Eli, Laura, and Ash visit their friends' graves. As they leave the cemetery, Ash's new iPod starts to glitch, revealing that the algorithm has not been fully destroyed.