There is a flarum import script. I doubt that it supports badges. Don’t know about passwords. I do know that it doesn’t support database table name prefixes.
You can find it in scripts/import_scripts. It works the same as the others so you can use other import script guides as a model.