Here's my buyscript: BUYSCRIPT
"exec buyscript.cfg" goes in autoexec.cfg
Then you can bind keys to buy guns. I mainly use the bottom aliases and bind keys to +gun1, +gun2, +smg1, etc...
What's nice about this is you don't need a separate script for T and CT. For example, +gun1 buys an ak or colt, depending on team.
There's a lot of extra verbage in there, don't let it confuse ya.