local dwarfegglaser = MT_DWARFEGGLASER
local shot = 0
local cooldown = 35
addHook("PlayerThink", function(player)
 if player.mo.skin != "dwarfeggman"
  return
 end
 
 if player.cmd.buttons & BT_ATTACK
  and shot == 0
  P_SpawnPlayerMissile(player.mo, dwarfegglaser)
  S_StartSound(player.mo, sfx_rlaunc)
  shot = 1
  end
  
  if shot == 1
   cooldown = (cooldown - 1)
  end
   if cooldown <= 0
   shot = 0
   cooldown = 35
  end
end)