@Mutiara ****
your plan B should consist returning to your home country before your stay permit expires (!!) and give birth to the child there. Moreover so because giving birth to your child in Thailand does not grant you any advantages. When the baby is a bit older, you could apply for the correct visa for yourself at the Thai embassy or consulate (sadly there is no more consulate in Denpessar so you would need to apply via the Jakarta embassy). I suggest you check out the multi-entry 6-months Tourist Visa and check if you can fulfill the requirements. One can get almost 9 months out of this visa. Your child could enter visa-exempt together with you (given it has a citizenship and passport of Bali/Indonesia). There are no alternatives, as you cannot border bounce consecutively - you will definitely be denied entry at some point after a handful of visa-exempt entries, no matter what your boyfriend is doing in Thailand and no matter what your intentions are. The naked truth is: They - these intentions - just don't count, they bear no weight to your visa situation