Pokemon Sun and Moon in no time. In fact, this is the most legit and fastest way to get IV Dittos in the game.
1) Catch Munchlax in route 1 or use Munchlax from the mystery gift. Use a heartscale to make it relearn Recycle at the Pokemon League pokemon center. Go to the move deleter in Hau'oli City Pokemon Center to delete all other moves.
2) Catch a Hypno from the Poni Plains (use Pokedex to see the exact area). Use a heartscale to make it relearn Switcheroo if it does not have it. Equip a Leppa Berry to it. (I forgot where I got my Leppa Berry but i used Pelago to multiply it)
3) Get one or more high leveled pokemon with false swipe and a strong move with high PP. (I used my Decudieye)
4) Buy some balls (I used Timer balls) and Adrenaline Orbs from the Pokemon Center. Make sure you have Leppa Berries to refresh your False Swipe user.
1) Go to Route 10 (Hokulani Observatory) and go south. Go to the first patch of grass you see and start looking for pokemon till you find a Ditto. (Or use the Pokedex to see where Dittos spawn)
2) When you encounter a ditto, switch out your pokemon to Munchlax so it transforms into it.
3) Switch out the turn after ditto transforms into Munclax to your Hypno and use Switcheroo. The ditto will now only have Recycle and a Leppa Berry.
4) Switch to your False Swipe user and False swipe the ditto to 1HP
5) Use the Adrenaline Orb.
6) Use False swipe on the original Ditto if no help comes to the ditto, otherwise, faint the new dittos he calls. (use Leppa Berries when you are running low on PP)
7) Chain till you are satisfied!
I chained till about 40+ dittos and caught a 4IV ditto (HP,Atk,Sp Atk, Speed).
Hope this helps someone, happy chaining!!