Contains spoilers for this episode and earlier episodes.
The survivors turn the protected Mystery Shack into a giant walking machine and attack Bill's fortress. Its defenses hold off the demons while a rescue team frees Ford and the captured townspeople. Ford gathers the people represented by the symbols in an ancient zodiac, hoping their joined hands will defeat Bill. Stan and Ford's unresolved resentment breaks the circle before it can work. Bill captures the adults and pursues Dipper and Mabel, using their lives to force Ford to surrender the knowledge that would let him escape the town's barrier.
With the twins in danger, Stan and Ford secretly exchange clothes. Bill believes that Ford has agreed to let him into his mind, but enters Stanley's instead. Ford fires the memory gun, destroying Bill along with Stan's memories. The supernatural invasion collapses and Gravity Falls returns to normal. Stan no longer recognizes the family he saved, until Mabel's scrapbook and the others' stories begin restoring his recollections. The family brings him back by reminding him of their summer together.
The town celebrates Dipper and Mabel's thirteenth birthday as the end of summer approaches. Ford asks Stan to sail with him and investigate new anomalies, finally renewing the adventure they planned as children. Stan hands management of the Mystery Shack to Soos, who is delighted to become its new Mr. Mystery. The twins say goodbye to their friends and leave for home, with Waddles allowed to come along. Dipper carries Wendy's farewell message and the knowledge that their friends want them back next summer. The bus takes them away from Gravity Falls with their family reunited and their shared adventure finished.

