That's happened to me a couple of times, but the person I was trading with actually forgot to put that it was hacked in the trade. My advice, not many people will take legit Pokemon, so I would find someone with an extra game that they dont play on but has some legendaries, ask to trade to there game, and once you do they can just release the pokemon. That's how I got rid of my bad egg. Don't worry, this problem will be solved in X-Y
"You may not be the smartest crayon in the box. But hey. At least your in the box."-Caleb Reynolds