Might I suggest a version 4:
Spell Resistance (+X)
Anytime a creature is subject to magical effects that generate a saving throw, roll a d20 roll, +the magic resistance bonus (DC 15).
On a success, the spell fails to affect the monster, and the monster becomes immune to that spell. On a failure, the spell works as normal, and no further magic resistance rolls are needed against that magic effect. Both of these effects last for 1 hour.
(and can always add in this clause to for certain monsters).
Spells higher than level Y are not subject to spell resistance