public static function loadScript($name, $path = null, $returnContents = true)
    {
        //  Already read, return script
        if (null !== ($script = array_get(static::$libraries, $name))) {
            return $returnContents ? file_get_contents($script) : $script;
        }

        $script = ltrim($script, ' /');

        //  Spin through paths and look for the script
        foreach (static::$libraryPaths as $libPath) {
            $check = $libPath . '/' . $script;

            if (is_file($check) && is_readable($check)) {
                array_set(static::$libraries, $name, $check);

                return $returnContents ? file_get_contents($check) : $check;
            }
        }

        if ($path) {
            if (is_file($path) && is_readable($path)) {
                array_set(static::$libraries, $name, $path);

                return $returnContents ? file_get_contents($path) : $path;
            }
        }

        return false;
    }