I am not sure if anyone had encounter this before, but i am quite confuse with what I can do right now, please advice me on my rights

I was hired under 'X' private company as a graphic designer, however, I was being told that the 'X' private company aint doing well in their business after my first month working under 'X'. So the 'X' boss asked if im interested in another full time job in 'T' company, as that company will pay me the same rate as 'X'.
I accpected that offer as the 'X' boss promised to pay me my salary after they had receive the money from their client, meanwhile what i need to do is to work under 'T' company so at least from the next month onwards I will have a stable income. From then on, 'X' boss actually drag on the pay day, which he claims that their client have not yet pay them for the design work, therefore they have not enough money to pay me my salary.
They had then drag on for my pay for around 5 months, and eventually told me that the 'X' company had actually closed down, therefore there are

After that I realised my bosses are employees of company 'T' as manager and co-worker, and that is when I understand the reason why I can get hired from company 'T' at such a short period of time.
Company 'X' have busniess on going with company 'T' as well, meaning company 'T' hires and pay company 'X' for design work. Is this even legal?
And it was just today, that I've found out this company 'X' is still having on going busniess, their website is still activate, and I saw the copyright stated '2008-2011'. So I guess the company had not closed down yet.
I will like to know if i got the rights to claim back my salary?
