Get a book. I got Beginning Lua Programing it hardly has anything to do with gmod lua but it will show you how to be a good coder. However any basic programing book for c or some other non oo language should be able to show you the basics of programing. The basic things you need to know are Functions, Loops, Arrays, Recursion, input/output, and Conditions. This is for all programing languages. If you get that down then the gmod wiki is you best friend. Always use it to look up functions when you code scrips for gmod.