I’m sure it would but we’re not really a ‘write it for you’ site.
What have you tried?
If you have trouble getting a function to work then we’re more than happy to help you with it but it’s generally a good idea in these situations to make some effort at working it out for yourself.
Of course someone here might write something for you for free but if you want to learn..that won’t help you much.
If you don’t want to learn…hire someone.