MZ Make a moving event speed up when you're close?

Hello! I am planning to make a horror game similar to Curse of the Furby (https://gamejolt.com/games/furbygame/248870) but featuring a unique plot and characters. If you were to play that game, you'd notice the possessed Furby moves faster when you get too close. You have to get away by dashing, and if you don't get away, the Furby jumpscares you and you're booted back to the menu.

I'd like a similar type of mechanic in my game, but I can't script diddlysquat. I also looked through the thread and can't find anything for MZ, so I only hope you guys can help! I'm anxious to start this game, so I'll work on the maps for now. Obviously the jumpscare can just be triggered by the "Event Touch" command, so all I really need is a plugin that makes the event move faster when the player is in range, and then return to normal speed once you're out of that range. I'm going for at least seven frames as the perimeter.

Any help at all would be appreciated, thank you!
Hello again!

What if it's done by events combined with this Script command?
JavaScript:
$gameMap.distance($gamePlayer._x,$gamePlayer._y,$gameMap.event(1)._x,$gameMap.event(1)._y)

Example:
Code:
◆If:Script:$gameMap.distance($gamePlayer._x,$gamePlayer._y,$gameMap.event(1)._x,$gameMap.event(1)._y) < 5
  ◆
:Fim
◆
Can you explain what each part of that script means? As I said, I can't really script well so I barely understand it. I'm trying to learn, though...
Sorry, I edited the post.
Sorry, I've never done this in a while. Do I copy and paste that script into the "Script" event command as is? Or do X and Y need to be edited with the proper numbers? I'm not quite there in my JS course.
Create 1 event without graphics that is a parallel process, preferably activated by a Switch.

Then create an event with a graphic of the creature that will follow the player, see its ID and use the command I gave.

The event in parallel process must contain a "Conditional branch" with this command:
You need to place this command in a "Conditional branch" on tab 4 in the Script field.
In place of the number 1, you must enter the event identification number, which is "Furby".
That helps, I'll try it in the morning and hopefully I do it right. I'll let you know how it goes.
Note to mods: Don't lock yet, I might not get it right.
If you have no experience with the engine, the minimum necessary is to follow the step-by-step manual that comes with Rpg Maker. I assume yours is the MV, but is most commands work equally in RMMZ.
if you don't have access see here:
I use MZ right now, not MV. I'll try the steps in the manual tomorrow, since it's almost 10 PM where I live.
EDIT: Okay, I'm about to open MZ and test the new script in my sandbox project. If it works, I'll try it in the main game project, and once I know it's working properly, I'll allow the mods to close this thread.
I'll let you know how it goes and if I need help.
I use MZ right now, not MV. I'll try the steps in the manual tomorrow, since it's almost 10 PM where I live.
EDIT: Okay, I'm about to open MZ and test the new script in my sandbox project. If it works, I'll try it in the main game project, and once I know it's working properly, I'll allow the mods to close this thread.
I'll let you know how it goes and if I need help.
UPDATE: I've added the script in, but for some reason while playtesting, the event doesn't speed up, even when adding in a command to speed up if the script is true. And then when I test the event on its own, it gives me an error:
Screen Shot 2021-11-16 at 5.10.01 PM.png

I followed the directions, what are "x" and "y" supposed to be? And I've looked through the manual for help but nothing seems to help.
Are you sure you did this?
Then create an event with a graphic of the creature that will follow the player, see its ID and use the command I gave.
In place of the number 1, you must enter the event identification number, which is "Furby".
Are you sure you did this?
Event identification number was "2" in my case, since the number is 2. But the event is called EV002... should I put the full name and not the number on the list? I'm so sorry, it's hard to follow directions sometimes--I'm on the Autism spectrum so I need a little more hand holding sometimes.
No problem, I made a video to make it clearer:
Holy cow, I not only got it to work but got quite the jumpscare when the test effect played! Now imagine what will happen when our heroine encounters the evil toy I'm designing... thanks so much!
The mods can close this thread now, it's just what I need!
I'm glad I could help, although I didn't get any "likes" in my answer I assume it's in line with what I needed.
Much appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/make-a-moving-event-speed-up-when-youre-close.142173/