Change the pivot of an object in script.

I want to change the pivot of an object in my script; I do not want create a new empty game object and then parent it to my old object.
You may wonder why, the reason is because I am using some custom GUI, and I am making it rotate with some other custom functions, my problem is the pivot for my text (which are game objects) is in the top left corner.

I just need to change the pivot to my text width/2, height/2, I just do not know how to change the pivot.

You would have to parent it to a new GameObject. Unless it is a GUIText, then you can play with offsets and alignment.