For LAN you dont need to optimize the script cause LAN is much faster than Internet.
But you should keep in mind that when the server dont do all the work you can easily hack the game down. As example you are reloading, but server dont give you bullets. The client of YOU is doing that. Now you can use cheat engine or any other memory hacker tool and chnage the ammo+=1 to like ammo+= 9999 and he have unlimited ammo
If you letting the client scan for enemies the game will be dead.
The client can trick the server and will get unlimited kills in one second.
Please keep this in mind!