What are you asking for? Do you need a way to keep track of how many bricks someone has or do you need a way to calculate a rank or?
Essentially, how much of this can you put together yourself? Making this and pasting it here wouldn't be a challenge for most who help people out in Mod. Help, but if we just give you the entire solution you will learn nothing from it.