This is a The SpongeBob Chronicles episode.
Gary starts liking Squidward, crawling into his house. But SpongeBob feels replaced, and forgets all about Gary. He goes to the junkyard and finds a wild, stray snail he names Terry. Gary starts to see what happens, and feels like he's SpongeBob's pet. He goes back to SpongeBob, leaving Squidward in tears.
In the future......
- Terry becomes a famous TV star. He doesn't even mention anything about SpongeBob.
- Squidward liked Gary so much, he tried to buy another snail, but the price was expensive.
- SpongeBob and Gary are still best buddies!