no idea what u mean by passing, but function is "used" once by script, if it was used by command it would be given name as you wrote to "call" it when needed.
here, function is just getting value if player is playing by built in game activity library and returning value
i think i got it right, if not someone will correct me