If you have 51-99 armor you can repare your armor up to 100 by the double price for unit of armor
And then buy helmet
For example: you have 90 armor, you pay 130$ for repair and 350$ for helmet
There is test command, if you want test plugin just delete /**/ and //
15 is your buy time, change it on 66 line if you need