How to write own score_mode function?

Hello,
Can you give me some ideas on how to write my own score_mode function.

Thanks you very much !