You can define two image points on the player sprite on both sides, just above the ground level. (Blue line represents Player sprite)
Like those little training wheels on kids' bicycles
Then use these checks on every tick:
System -> Pick Ground by overlapping point (player.ImagePointX(1), player.ImagePointY(1))
...Rotate player 0.5 degrees
System -> Pick Ground by overlapping point (player.ImagePointX(2), player.ImagePointY(2))
...Rotate player -0.5 degrees
You can use lerp or tween for smooth rotation.
To detect ground angle when player is on top of the hill, you need to define two additional image points just below the ground level and perform similar checks for them..
If you are good with math, instead of using 4 image points, you can do lots of overlapping checks around the player to determine ground angle with better precision. Overlapping tests in C2 are fast, even if you are doing a couple of hundreds of them every tick, they should not affect the performance.