if gameobject is active?

is there a script to check if an object is active or inactive?

something like

if ( gamaeObject =active) { then blah blah blah; }

As of Unity 4.0 gameObject.active is obsolete and is replaced by gameObject.activeSelf

Source:
http://docs.unity3d.com/Documentation/Manual/UpgradeGuide3540.html

if (gameObject.active)

You can use “GameObject.activeSelf”: The local active state of this GameObject.
Link: Unity - Scripting API: GameObject.activeSelf

if(GameObject.activeSelf)
{
	print("GameObject is Active");
}