"In Generation V onward, if a Shedinja has Sturdy (for example, being hit by Worry Seed followed by Skill Swap with something with Sturdy) it can survive any direct attack. However, indirect damage, such as sandstorm, will bypass Sturdy and KO Shedinja."
Source: http://bulbapedia.bulbagarden.net/wiki/Shedinja
Hope I helped :)