Checking boolean state using raycast

How i can check if boolean is false on a script that is on a gameobject that my raycast is pointing at? So I want to get boolean state using raycast. Raycast because I want to select exactly the right object because I have many of those same objects in the scene and I cant check boolean from all of them of just random one.

function Update () {
var hit:RaycastHit;
var ray:Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray,hit, 1000)) {
if(Boolean is false in a script that my raycast is pointing at){ //<-------------------------
Debug.Log("Select target");

Any idea? I hope you got the idea, I give more info if needed.

scripts are added to gameobjects as components…
if you want to access another script you can use GetComponent.

if your gameobject script is blabla.js and it has a var called boolBla (in c# it has to be public, not sure about JS) then: