You need 6 IV stones(if you don’t already have a 6IV ditto) and a destiny knot.
Breed the pokemon with your 6IV ditto with one of them holding destiny knot. And the other holding ever stone if your want to pass down desired nature. Breed till you get one with at least 3 good IVs, then swap out the non-ditto parent with this off spring. Repeat till you obtain desired number of IVs.
It’s not luck, destiny knot guarantees the baby Pokémon inheriting 5 different IVs from both of its parents combined. Breeding guide.
Edit: For IV stones, you can grind with either pickup, rock smash or pokepon. Alternatively, you can also try trading for them.