Speed up AppleScript I have some very simple applescript's that I run frequently and they seem to sometimes take less then second and sometimes like 2.

Is there an alternative that would be faster?  My guess is no.

tell application "System Events"
    set frontmostProcess to first process where it is frontmost
    delay 0.01
    key code 121
end tell
As I mentioned in my comment, what you're trying to do is a system wide event that you want activated by a keyboard shortcut. These factors combine to reduce the overall response time. 

To help reduce the response time, you could try using a different script to achieve the same thing and test that for a while to see if it runs more efficiently. 

Your current Apple Script (based on what you've linked to in your comment to me) is:

tell application "System Events"
    set frontmostProcess to first process where it is frontmost
    delay 0.01
    key code 121
end tell


Basically the above is designed to have the frontmost app to do a Page Down (key code 121) after a delay of 0.01.

However, you could try this one line code instead:

tell application "System Events" to keystroke (key code 121)


This should achieve the same outcome and be more efficient. You could test it for a while and see if that's what you find. Of course, to page up you would just change the key code from 121 to 116.

However, as I mentioned previously, the fact you need to activate this via a keyboard shortcut will add to the time it takes for the whole thing to run. That is, you need a keyboard shortcut to be registered that then runs an Automator Service that in turn runs the script, so this isn't going to be as efficient as say just using the built-in keyboard shortcut for Page Up and Page Down.

Regardless, you may find that if the script is more efficient that it reduces the response time enough to satisfy you.