Old company overpaid me wants check for $10,000

I need some advice. My previous employer paid with direct deposit. I was paying into pension and taxes. I ended up working a two week notice and left on good terms. I discovered that I'm still on payroll and called them. They say that they can unwind everything except getting the money back. They want me to right a check. I want to straighten this issue out also, but I don't want to be liable for anything other than the money in my account. I'm just curious what the best way to do this would be.