ONLY do shower needs, DO NOT do hungry, thirsty, school, bed, hot springs, or camping, and then you should hatch a legendary!
The cool part is hatch a LEGENDARY out of a CRACKED EGG :o It doesn't 100% work though, I'll say it works 67% If it didn't work, don't be sad, just try again!