Magnetic Boots Script

Drag onto third person controller character, tag the terrain as
"Terrain"