Help Make This Script More Efficient

I recently finished an Ai Script that allows a npc to follow any humanoid and also use pathfinding service when needed. It also has the ability to wander and use a weapon if chosen to do so. While this is great, there is an issue. Each npc that uses this code has an activity percentage of 1 - 1.5% (found from script performance.) And seeing that my game so far uses 8 of them, it has a possibility to slow the server down.

Feel free to import this model to test and give feedback as well on how to make this more resource friendly. Thanks.
AI Dummy - MonkeyIncorporated