//in script1
public boolean toggle
//in script2
if(getComponent<script1>().toggle)
{
}
If they are not on the same GameObject:
//in script1
public boolean toggle
//in script2
//Set this to the other script in the Unity Editor
public script1 otherScript
//...
if(otherScript.toggle)
{
}