Spoilers here. Highlight the below transparent text to see it.
OH MY GOD THE PURPLE GUY DIED.
HE WAS BEING CHASED BY A (un)DEAD KID AND HE HID IN SPRINGTRAP.
THE SPRINGLOCK CAME UNDONE WHEN HE WAS IN THERE.
OH GOD HE WENT EVERYWHERE.
Anyway, that was the bad ending, so there's multiple endings.
Oh, and the hallucinations are called the phantom animatronics.
Spooky.