Code Breakdown
🌟 Core Configuration
direction
: Determines the movement direction multiplier.lightRange
: Defines the detection radius of the spotlight.lightMoveSpeed
: Controls how fast the spotlight oscillates.
🎯 Player Detection Function
Checks if the player’s position is within the light’s detection radius.
🚨 Police Alert System
Ensures police are not spam-notified by enforcing a cooldown period.
Last updated