impanim= {} local launch = 0 local delay = 1000 function imp_launcher_init(e) SetAnimation(0) impanim[e] = 0 end function imp_launcher_main(e) if impanim[e] == 0 then impanim[e] = 1 SetAnimationFrames(1,116) LoopAnimation(e) end if g_Entity[e]['health'] < 200 and launch == 0 then impanim[e] = 0 StopAnimation(e) -- ActivateIfUsed(e) if GetTimer(e) >= delay then launch = 1 PlaySound(e,1) end else StartTimer(e) end if launch == 1 then CollisionOff(e) StartParticleEmitter(e) MoveUp(e,500) RotateX(e,600) RotateZ(e,400) RotateY(e,300) if x == x then MoveForward(e,1000) end if GetPlayerDistance(e) > 3000 then SetEntityHealth(e,0) CollisionOn(e) StopSound(e,0) StopParticleEmitter(e) end function imp_launcher_exit(e) g_kills = g_kills + 1 g_coins = g_coins + math.random(1 , 5) end end end