FML/Controls/Control.php
public function addScriptText($scriptText, $label = ScriptLabel::MOUSECLICK)
    {
        $customText = new ControlScript($this, $scriptText, $label);
        $this->addScriptFeature($customText);
        return $this;
    }
public function addScriptText($scriptText, $label = ScriptLabel::MOUSECLICK)
    {
        $customText = new ControlScript($this, $scriptText, $label);
        $this->addScriptFeature($customText);
        return $this;
    }
public function addScriptText ( $ scriptText , $ label = ScriptLabel :: MOUSECLICK ) { $ customText = new ControlScript ( $ this , $ scriptText , $ label ) ; $ this -> addScriptFeature ( $ customText ) ; return $ this ; }
Add a custom Control Script text part

@api
@param string $scriptText Script text
@param string $label      (optional) Script label name
@return static
Add a custom Control Script text part