I have work permit which I got in Japan
You don't have a work permit; work permits are not issued in Japan. Your work permit will be issued in Warsaw, by the labour office here. Work permits can only be issued to people who are in Poland legally. What you got in Japan was a residency permit, which was granted on the basis of a promise of a work permit issued by the labour office in Warsaw. The work permit is technically issued to your boss (and paid for by him); you can't actually apply for a work permit for yourself (unless you have your own company, but that's a whole different kettle of fish).
is this useable?
Useable for what exactly?
It turns out,the restraunt has'nt been opened yet,my salary never get paid,because "the restraunt is not open,he can't afford my salary"
You need to talk to him and explain that his business problems are his business problems. You are not going to get a share of the profits, so you aren't going to accept a share of the losses. If he doesn't have the money now, you can discuss deferral of payment of some of the debt but you need some money now and you want all of the money eventually.
He is Japanese,so first I will talk him that I want to leave his project.
I'd very much suggest that you tell him you
want to stay in the project but you
need to get paid; if you can't get paid by him, you will need to find somebody who will pay you.
Do you think it is possible,I get paid,and leave from him?
Possible. I wouldn't fancy your chances though. From the sounds of it he is having problems, so by the time you have taken him to court and won, he might have just pulled the plug and walked away from the company. A settlement is very much in your interests.
If I agree work permit,I could be sued?
No. He has broken the (unwritten, apparently) contract, so you are no longer bound by it.