This project has a couple necessary scripts, and I will outline them here.
followPlayer.cs
This is the main script for this project. This script handles the specific details of the Cowboy AI, like keeping trach of what phase he is currently in, how much health he has, if he is currently vulnerable, all of his sound effects, his raycasts performed for shooting, and his tracking of the player.
BossPhaseUI.cs
This was just meant to update the UI representing the cowboy's phases.
safeFromCowboy.cs
This one just creates safe zones from the cowboy where he will refuse to shoot the player, like inside of trick or treater's houses.