Lua calculations are faster than the GetDistanceBetweenCoords native no need to keep the loop running at 5 ms while the player is not near a shop ...