System Preferences

I having trouble learning this whole scripting language. What I am trying to do is activate systems preferences and set the brightness setting to 100%. But whenever I try and script it I get nothing but errors. Can anyone help me?

Thanks