Also, If you just want the code without the comments, here it is
public class Script1 : MonoBehaviour { public float CoolVariable = 1; }
public Script1 Script1; Debug.Log(Script1.CoolVariable)