Delaying Physics Calculations (Friction)

Hello,
I am currently trying to create a BunnyHop-Script for my game. When the player lands, he should have 2 frames time to press the Jump-Button without getting any friction, meaning he can keep his velocity that way without slowing down, causing him to spam the Jump-Button. How would I approach that? Any help is greatly appreciated :wink:

somethiing like this should do it, mat is a physical material with the friction desired.

IEnumerator Test()
{
    float dynamicFriction = mat.dynamicFriction;
    float staticFriction = mat.staticFriction;

    mat.dynamicFriction = 0;
    mat.staticFriction = 0;

    yield return new WaitForSeconds(2);//2 seconds

    mat.dynamicFriction = dynamicFriction;
    mat.staticFriction = staticFriction;
}