This is pretty simple, and at the same time a little tricky
because you are working with the NPC AI -- therefor you would need to
know what ((and where)) to put a line of code in there.
Each Scarey JUMPY dude AI could then know it's distance from the player,
and when close enough - viola, it's looks can kill!
add to AI script
if GetPlayerDistance( e ) < 413 then
// Run Scare code //
or in other words, show the image, play the sound and then--
wait for input then kill player.
Look further into the script forums for the technique details,
Found a thread that someone created a type of jumpscare in;
https://forum.game-guru.com/thread/207801?page=7#msg2516046
Here are some global.lua functions to get you started--
LookAtPlayer(e)
LoadImages(str,v)
SetImagePosition(x,y)
ShowImage(i)
PlaySound(e,v)
if g_KeyPressE = 1
HurtPlayer(e,v)