def to_script_code(skip_separator_index = 0)
      payload = to_payload
      if p2wpkh?
        payload = Script.to_p2pkh(chunks[1].pushed_data.bth).to_payload
      elsif skip_separator_index > 0
        payload = subscript_codeseparator(skip_separator_index)
      end
      Bitcoin.pack_var_string(payload)
    end
def to_script_code(skip_separator_index = 0)
      payload = to_payload
      if p2wpkh?
        payload = Script.to_p2pkh(chunks[1].pushed_data.bth).to_payload
      elsif skip_separator_index > 0
        payload = subscript_codeseparator(skip_separator_index)
      end
      Bitcoin.pack_var_string(payload)
    end
If this script is witness program, return its script code,
 otherwise returns the self payload. ScriptInterpreter does not use this.