There are multiple plugins that can do this for you, but since 87pen said he wants to "Attempt it since I just started making plugins" I'll wait on posting a few plugins that can. Also, 87pen, feel free to ask for help when needed. =P
Hello, I will make this plugin for you. Please add me on Skype if you still need this plugin. My skype is saintxwolf.