Kansai-dialect past form of the copula 'や' (equivalent to standard Japanese 'だった'). Used as the past copula in conversational Kansai speech.
彼は昨日まで学生やったけど、もう働き始めたらしい。
He was a student until yesterday, but it seems he has already started working.
あの店、前はここにあったんやった。
That shop used to be here (before).
子どもの頃、よくここで遊んでたんやった。
When I was a child, I used to play here often.