The Scottish Greens secured the secondary free lunches pilot in exchange for backing the Scottish Budget.