Hi. I made you an example. If you like it, just replace the sprite of the pigeon with yours.
In this example I make the character flip and rotate once he has reached at certain height. If the character touches the ceiling platform, it will change his gravity from "100" to "-100". So basically negative gravity. If he jumps back down and touches the bottom, he will go back to normal gravity.
Important thing to note is that the character has been rotated to the right by 90 degrees. In order to do so, double click your character and window appears. In the menu at the top click on the rotate 90-right button. I did that so that he would make a flip and land on his feet.
The other important thing is that he has to touch the ceiling or the floor to trigger the gravity/anti-gravity. I have tried to make it change midair but he just gets stuck in limbo. Maybe you will find a way to modify the intensity at which the character jumps. That way you could press jump and he just jumps or you hold jump and he flips around and binds to the ceiling. I couldn't figure out how to do it. This is the first time I ever did anything platformer related. LOL.
I hope this helps. If you need more help, feel free to ask and like this comment if it helps or whatever. I need some points.