Ray, Chris O'Dowd, recently fired from his job as a theme park guide, spends the evening with his friends Pete and Toby at the cinema and later at a pub. There, they write a satirical "Letter to Hollywood" critiquing bad films, using a page from Toby’s notebook. Ray encounters a woman named Cassie, Anna Faris, who claims to be a time traveler working to fix time leaks. She warns him about Editors, operatives from the future who erase artists at their peak to preserve cultural standards. Ray believes the encounter is a prank arranged by his friends.
Soon after, Pete experiences a bizarre vision of a massacre at the pub, including a bearded version of himself. The group discovers a time leak in the men's restroom, which allows them to travel 30 minutes into the past and encounter earlier versions of themselves. Cassie returns, stating she has spent six months repairing the leak, but anomalies continue to occur. They enter a post-apocalyptic version of the pub, and Pete briefly disappears into the time leak, returning disheveled and traumatized. The group attempts to avoid paradoxes caused by interacting with their past selves. During a themed party at the pub, they meet Millie, another time traveler who claims to be Cassie's mentor but is later revealed to be an Editor sent to kill them at their moment of greatest potential.
Believing the Letter to Hollywood may be responsible for their future fame, Ray, Pete, and Toby consider destroying it to prevent Millie’s interference. Millie incapacitates Cassie and offers to make them legends in exchange for the paper, but they refuse. A confrontation ensues, and Millie appears to kill everyone in the pub. An earlier version of Pete enters, witnesses the aftermath, and flees. A severely injured Ray spills beer on the paper, rendering it illegible. This act triggers a reset of the timeline, returning the trio to their original state at the pub, with full memories of the events, but with the paper destroyed. As they leave, believing the situation resolved, Cassie reappears through a portal, now claiming she and Ray have been in a relationship in an alternate timeline. She warns of widespread time leaks and urges them to help save the world within fourteen hours. The group agrees to follow her into a parallel universe.
In mid- and post-credits scenes, multiple versions of Pete and Toby appear, suggesting ongoing complications from the time travel events.