Okay first of all, I'm going to remind you of the smashlloyd principle.
Be careful of not doing too much damage. If I just order Earthquake*3 on your current order set (not even doing anything to counteract Dig), I do 26 damage and you do 33.75. While you outdamage, Krabby can absolutely put on much more hurt than that against Drilbur. Also, you should go Dive A3 for two reasons. First, Dive does more than double the damage that Bubble Beam does. Krabby should NEVER EVER EVER use special moves when it has 5 Atk and 0 SpA, EN cost be damned. Also, if you're going to use Agility to make yourself faster you should be abusing Dive as much as possible because it does a ton of damage and severely limits my options.
And now you get to learn more about substitutions! First of all, if you don't state otherwise, substitutions will prioritize themselves based on the order you write them in. Also, if you ever have a substitution saying "do something AX", all other substitutions with a pushback clause need to have "and push back actions and substitutions". Otherwise I get to do this:
Iron Defense ~ Earthquake ~ Dig