Sad but true fact: you have a better chance of finding a masterball on the GTS than you do winning the lotto. You'd be surprised how many people are so desperate that they give their Pokémon a Masterball to hold in the hopes that people will jump at the chance to trade for it. If you can find those and trade for it, it's as simple as that