Strange as it may seem, the tale of the Pied Piper of Hamelin (in which a piper goes into a German town and lures away all of the children- a poetic version of the story by Robert Browning can be found here) is generally thought to have some basis in truth. Some historians think that the town might have been a victim of a serial killer, or a plague which targeted children, but the most common theory is that the children were willingly led away by a man who wanted them to settle in the East of Germany. It is even possible that the "children" aren't actual children at all, but just people of all ages from the town who decided to move away from their overcrowded homes and settle in an underpopulated area of Eastern Europe. As illiterate peasants in a world with no phones or even a reliable postal service, people at the time would have had no communication with those they left behind, so it's difficult to say for certain where they went. However, whatever the truth, it almost certainly didn't involve a man magically luring rats out of the city- that bit got added a lot later, presumably after the residents of the town had forgotten what really happened.