GUI Hieght

Is there a way to Have a GUI Text that tells you how high you are? Like for example my game has a place so that when you reach a certain height that you HAVE to jump. Can you guys lead me in a direction of what I need. Thanks!

pseudocode

void OnGUI()
{
    GUI.Label(new Rect(5,5,100,100), transform.y + " units from zero");
}