Alkir what exactly are you looking for ?
Given all of the software (Flarum vs Discourse), database (MySQL vs Postgres) and programming language (PHP vs Ruby) are different, there's probably no copy-pasting possible between them.
However you most certainly can replicate the logic they used to make something that works in a similar way in Flarum. No doubt you can implement rewards in Flarum the exact same way they did in Discourse, just not with the same languages.
Update:
Also if you haven't seen it before, we already have one extension doing something in that general direction (but not as advanced as reward badges) https://discuss.flarum.org/d/5588-gamification-by-reflar