HELP! AI Script

Hello, I am working on my game and i need an AI script for mobs. What i mean is if i go close to the mob, the mob starts running(and playing running animation) at me and attack(and playing attack animation). So please if you know how to make this script just copy and paste it so i can use it. Please and Thank You)

If you want someone else to do work for you then I suggest you try the asset store.