When Iframes are at 5, you will become gray and intangible. When Iframes are below 5, you will be tangible, and be able to take damage. If you take damage or not, Iframes will go down to zero. If you negate the hit, it will take two seconds before it will charge back up. If you get hit, it will take one second to start charging. (I frames sometimes goes over five, but that does not effect the overall mechanic).
If you would like to use this code, go ahead.