Question About Profile Service

Today I decided I would try out profile service, I have one question, are the examples in this api tutorial module scripts?
I hear they would be used as module scripts, but these scripts use local functions

First of all, you can use local functions in module scripts (and they will work as long as you call them, obviously.) and no these are not module scripts. The ProfileService itself is a module but you can use ProfileService on both module and server scripts.