Alright, I know the ending is probably a little confusing, so this is how it worked...
Zim threw a rubber piggy into the past and replaced Dib with it. Dib was therefore pushed into another area, under the shock net by coincidence. Anyways, originally, when Dib had died, Kael had brought Gir down and hooked him up. When they left, the house had started braying the silly "blood detected" thing. After a long time it released Gir, who remembered, and raced off to find Zim.
Now, the way Zim fixed it, the piggy replaced Dib. But, when the piggy fell, instead of releasing Gir, it just restarted and wouldn't have released him for a long time. So, Zim probably would have died. IF Dib hadn't gone downstairs and released Gir.
It's a kind of a paradox thing that I don't think I got past well, so I added this... Hope this clears it up for you.
More things coming for my other stories-- I just kinda completely forgot about this website XD Anyways, I don't get much, so if you liked this, please R&R, and if you didn't, R&R and tell me how to fix it up. Thankyou~
