Making an object rotate with a platform & slopes too

Alright, so i’ve been having this idea lately, i’m planning on making a platform engine, and i though it’d be cool to have platforms with their own gravity and such, where you rotate as it rotates and all.

and another little idea is that when i walk around on a certain platform, i’d rotate as the floor is sloped.

I haven’t messed with the code yet, though i have some sort of idea…

Anyway, do you have an idea of what i should do to do this, or maybe flash some samples my way?