JS, get child

I have an empty which has objects inside and I want to know how to get a child of the empty via name, and the script is inside the empty.

You can find a child transform by name with transform.Find:

var weapon: Transform = transform.Find("Weapon");

var parent:GameObject = ;

for(var child:Transform in parent.transform)
{
	if(child.name == "XYZ")
	{
		print("You Found ME!");
            var myScript:SCRIPNAME = child.GetComponent("SCRIPTNAME");
	}
}