How do I make my player remain crouched when an object with a collider is over him?

Please edit your post to use code-tags when posting code rather than a wall of plain text.

Thanks.