Trigger function key using AppleScript
if you are trying to set the volume in AppleScript a correct syntax would be as the following, no need to force button presses :

tell application "System Events"
set volume 4
end tell


Now as you can see its a forced process. If you want more flexibility like determining where the users volume is currently at or set it to increment increase/decrease by 1, yes it's possible, but a little more code heavy than i can manage right now (i'm typing from my iPhone) 

However, 

If at possible, and your end goal wouldn't be affected by using Automator. I would use Automator if I was you, it has built in functions like this with easy drag and drop motives. 'Set Computer Volume is one of them'. But thats an alternative, I just emulated that with the code above.