"Terima kasih, selamat tinggal."
Selamat tinggal feels like you won't meet that person anymore in the future. When leaving, better say : "Sampai jumpa" in formal and informal situation.
Even more informal:
"Pergi, ya" -> literal translation: (I am) going, ok/yes. You can use it when you're leaving the house and informing your housemate.
"Dadah / Dah" -> Bye, very casual