After Buffy's death in "The Gift", Willow repairs and reprograms the Buffybot to impersonate her, to keep the demon world unaware – for as long as possible – that the Slayer no longer defends Sunnydale. The Buffybot's original programming occasionally resurfaces, which both pains and irritates Spike. The impersonation also ensures that Dawn, lacking a legal guardian in Sunnydale with both Buffy and their mother dead, can stay in town with the Scooby Gang, and the group can continue to use the Summers home as their base. In "Bargaining", one vampire discovers the secret when fighting with it; when he reveals this to a demon biker gang, they invade and sack Sunnydale. The demons destroy the Buffybot by tearing it limb from limb with motorcycles. Before "dying", the Buffybot reveals to Dawn that the real Buffy has returned from the dead.