<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_lua_script(plugins):
 """ Return script template filled up with plugin javascript data. :rtype: str """

    lua_template = pkg_resources.resource_string('detectem', 'script.lua')
    template = Template(lua_template.decode('utf-8'))

    javascript_data = to_javascript_data(plugins)

    return template.substitute(js_data=json.dumps(javascript_data))