It sounds really like 害矣 in Hokkien.
If you learn it literally,
害(hāi) means something is really worse, you're in a big trouble, or whatever may cause you to be punished or do something you're unwilling to do.
矣(ah) means an action is done, something is finished or a sentence is ended.
In lots of situations, people may write 矣 as 啊 or 阿 because the way to pronounce 啊 and 阿 in Mandarin is "ah".
The reason I consider it a word from Hokkien is that Minnan, a region in Chinese Mainland, used to be very crowded. Half of it is hills or mountains, which is not good for planting rice. Thus, in the Ming and Qing dynasty, a bunch of people decided to leave there for Southeast Asia or Taiwan. They also spread this language to these places.
Examples:
害矣,我袂記愛寫功課矣!
hāi--ah, guá bē kì ài siá kong-khò--ah!
Damn! I forgot to do my homework!
害矣害矣,彼叢樹欲倒矣!
hāi--ah hāi--ah, hit tsâng tshiū beh tó--ah!
Oh no, that tree is falling down!