I thought of a AI turret that would use a number of scripts in which it would upon sensing the player through use of pressure plates, pop up out of the ground, turn to the general area of where the player is, and the player would die (don't think making a beam would be possible). Here's a youtube video of a simple AI script that uses a pressure plate and kills the player. Video The idea that I had in mind was that there would at least be 4 plates at the minimum, definitely more if you wanted the turret to look at the player more, and upon the turret would turn some number of degrees to face the player, then the same number back to its original position and go back into the ground. If you do happen to make it, let me know below.
If there is a way for it to work then you could make a beam using an invisible light. It wouldn't hurt the player itself, but it would be a nice aesthetic touch. Good luck making this idea work. I'd love to see it on a map