"Hc Admin" is a horribly bad and generic title. Please, consider using a proper one for your thread before posting.
Also, "not working" is a meaningless statement giving us no insight whatsoever. The odds that receiving help by behaving this way are slim. You may want to read How to ask for help. if you want people to help you faster.
In order to change the server action key from F4 to F2 you must check the specific line of code where it does a conditional check when the player presses the specific key. Something like this:
1
if (action == 3) then
Note that
action
parameter can have different names. As per the serveraction documentation 3 is reserved for F4, while 2 is for F3 and 1 for F2. In your case, just change the value to 1.