Resignation

I joined a company in 2009 as software developer, Mumbai. I resigned it in 2013. Later, company shifted to Karnataka. And called for work on verbal( no employee ) basis. Last year company asked to settle in Karnataka. I asked for 1 year time to take the decision and my work continued on salary basis. This time company didn't gave joining/appointment/offer letter. My joining/appointment was verbal and only document was the attendance muster and salary slip. This month I resigned the company verbally as I got a job with good salary. Company asked me not to leave and offered the same salary and asked me to show the offer letter of the company where I will be joining. I said I don't have any offer letter. Company started suspecting and asked me prove it and asked to put resignation letter. I replied verbally, as you haven't given me offer/joining/appointment letter so I am not giving you the resignation letter. Company gave me warning of taking legal action against me. I am worried . please help as I never faced such situations.