Adapted script API.