As Pakistani you have to go back your home country, please check the requirements to get the initial Non O. Back in Thailand you have to go the route with THB400,000 in bank to get the one year extension.
please advise nationality of said person, please also understand that there is no 30 day tourist visa, I understand you mean visa waiver or visa exemption stamp, but please clarify in order to get correct answer.
except the ones which got bilateral agreement with Thailand ( Laos, Macau, Mongolia, Russia and Vietnam), they get only 7 days when trying to extend the 30 days visa exempt, actually it a denial.