Rayquaza works a bit different than the rest, since it uses ExtremeSpeed. You'll have a 25% chance Rayquaza uses ExtremeSpeed as first move, which makes it impossible to check HP with Staraptor. But fear not! Here is the solution!
When aiming for +Speed nature:
Sableye @ Air Balloon
Level: 100
Nature: Jolly
Ability: Prankster
IV: 31 Hp | 31 Spe
EV: 44 Hp | 88 Spe
Stats at 100: 252 Hp | 173 Spe
Moves: Pain Split
Smeargle
Level: 100
Nature: Sassy
IV: 31 | 31 | 31 | xx | 31 | 00
EV: 252 Hp | 96 Atk | 160 Spe
Stats at 100: 314 | 100 | 106 | xx | 138 | 175
Moves: Spore | Swords Dance | False Swipe | Recover
How to capture Rayquaza:
Fainted sync in front. Sableye at second spot. When you enter the battle, you can check the Spe IV right away. If Sableye's Air Balloon message goes first, reset. If Rayquaza's Air Lock Ability goes first, 31IV in Spe and +Spe nature confirmed. When you've confirmed the Spe stat, we can check the HP. If this lvl 70 Rayquaza has 31IV in HP, it will have 248 HP. Use Pain Split. Sableye has 252 HP, so the average HP is (248 + 252 = 500, 500/2=250) 250. If you have LESS than 250 HP after Pain Split, reset. If you have 250 HP after Pain Split, confirmed 31IV in HP. Now switch to Smeargle and keep using Spore to get it down to 1HP.