Hey hey hey! It's me PeskyJoltik! So, as you can see, the title of the thread is " MASTER BALL GLITCH ", so this only works on Pokemon Light Platinum. I'm sharing this for you guys who are having a difficult time capturing Legendary Pokemons,so all you have to do is read and have your game!
STEPS on how to get MASTER BALLS!

Step 1 - Go to Darkbreath City! ( I dont know if its Darkbreath City or something, just go to where you defeated the last gym in the Zhery Region )

Step 2 - Buy a lot of Max Repels! ( Optional )

Step 3 - Go to Team Steam's Headquarters!

Step 4 - Get the Master Ball in the left room! ( If you already got the master ball, never mind going to the left room )

Step 5 -Go to the right room!

Step 6 - Go to the last room where you encountered the 2 girl admins of Team Steam and Leader Percy and Leader Kratos!

Step 7 - Go down and you can see on the bottom left corner, there's a small tree on a pot.

Step 8 - Go above the small tree!

Step 9 - You can notice that there's a tile between the small tree and you!

Step 10 - Go to your inventory, the one where you can find Pokedex, your bag and some stuff.

Step 11 - Press Left,Right,Down or Up on the move button of your GBA.

Step 12 - Press A on the tile between you and the small tree, and you'll receive a master ball!
Keep Doing this to get enough Master Balls to catch Legendaries!
Well I Hope I Helped!
And have a nice day playing Pokemon Light Platinum!
Good Bye Mi Amigos!