Rotate and pivot

I have a cube that I want to rotate differently each time changing its pivot. I have look on the internet and I have seen some examples (mainly the “famous” SetPivot.cs script). Using this script, when I make the first rotation about the pivot axis selected does well, but then if I change the pivot the cube changes its position, so it doesn’t be useful for what I want.

Any idea?

Thank you

I assume you mean this one? : http://wiki.unity3d.com/index.php?title=SetPivot and you are running into “known limitation” no. 2?

Yes, it is that script and that limitation