(function(){ var stopDancing; var danceInterval = 5000; var NoDanceZone = function(){ }; NoDanceZone.prototype = { preload: function(entityID) { }, enterEntity: function() { if (MyAvatar.isFlying()) { MyAvatar.restoreAnimation(); }; stopDancing = Script.setInterval(function(){ if (MyAvatar.isFlying()){ MyAvatar.restoreAnimation(); } }, danceInterval); }, leaveEntity: function(){ Script.clearInterval(stopDancing); } }; return new NoDanceZone(); });