Make code shorter/prettier?

Hello!
I have a lot of codes I wrote that work just fine but I think they’re not “optimized” or at least they look like the easy but long way around solving a problem.

Right now I have a slide script, it works, but it’s not “good looking”. Basically, I want a shorter and smarter way to write it. My code is below, I was wondering if there is a way to make it shorter. [cc is a Charactercontrller, Bobbing.camOffset is the cameras localPosition on the y-axis as a child of the player.]

Code is:

    void DoSlide()
    {
        if (cc.height > 1f)
        {
            cc.height -= Time.deltaTime * 2f * slideCrouchSpeed;
        }
        if (cc.center.y > -0.5f)
        {
            cc.center -= new Vector3(0f, 1f, 0f) * Time.deltaTime * slideCrouchSpeed;
        }
        if (Bobbing.camOffset > -0.15f)
        {
            Bobbing.camOffset -= Time.deltaTime * 2f * slideCrouchSpeed;
        }

        if (moveVector.magnitude > 0f) { movementSpeed = slidingSpeedThingy; }
        if (slidingSpeedThingy > walkingSpeed)
        {
            slidingSpeedThingy -= Time.deltaTime * slideSpeedFallOff;
        }
    }
    void StopSlide()
    {
        if (cc.height < 2f)
        {
            cc.height += Time.deltaTime * 2f * slideStandSpeed;
        }
        if (cc.center.y < 0f)
        {
            cc.center += new Vector3(0f, 1f, 0f) * Time.deltaTime * slideStandSpeed;
        }
        if (Bobbing.camOffset < 0.75f)
        {
            Bobbing.camOffset += Time.deltaTime * 2f * slideStandSpeed;
        }

        slidingSpeedThingy = slidingSpeed;
        movementSpeed = walkingSpeed;
    }

Thank you so much!

For shortening you script, instead of using new Vector3(0f, 1f, 0f), you can use Vector3.up, and your if() statements only have one line of code so you can remove the {} brackets.
E.g:

if (cc.height > 1f)
         {
             cc.height -= Time.deltaTime * 2f * slideCrouchSpeed;
         }

change to:

if (cc.height > 1f)
         cc.height -= Time.deltaTime * 2f * slideCrouchSpeed;

For performance optimization, the moveVector.magnitude can be changed to moveVector.sqrMagnitude, I learned this from a tutorial video from Brackeys.
That’s all I can think of.