Frequently with service businesses, a Price is set, based on current Revenue or Profit, but the payments are made on the basis of continued Revenue/Profit streams, because of the uncertainty that the business will continue to grow without the current ownership. Payments are made over several years, and the Price can be lowered during that time, if the business level erodes.
In your case, doing something similar might work; however, because of your unique situation, you would formulate an incentive package, so that if you grow the business during your time as mentor, you share in that growth. You can either set percentages of Revenue/Profit growth as commissions or bonuses for yourself; or you can set a basic Price, but with an alternative Pricing if certain levels of growth are achieved. There are any number of ways to do it. But keep in mind that, if you take a Salary or Bonus, an adjustment must be made in the Price in some way, to accomodate the lowered Profitability to the new Owner.
For example - and this is a simplified example - suppose you had $250k in Cash Flow, and based on that, you legitimately could demand a $750k Price, because the industry norm was 3 times Cash Flow. (I told you this would be simple!) If you take a $100k Salary from the new Owner, the Cash Flow is reduced to $150k. At 3 times Cash Flow, the Buyer will want to negotiate a Price of $450k, using the same pricing strategy that was used before.
Depending upon how you set things up and how confident you are, you may wish to only work off of a set Price, and a heavy percentage of Revenue/Profit growth. That gives you maximum Price now, without sacrificing the Cash Flow that will come back to haunt you.
Lots of negotiating, on this one. But it is a start.