local dashed = 0
local cooldown = 75

addHook("PlayerThink", function(player)
 if player.mo.skin != "dwarfeggman"
  return
 end
 
 if player.cmd.buttons & BT_CUSTOM3
  and dashed == 0
    P_SetObjectMomZ(player.mo, -45*FRACUNIT, true)
    P_SpawnThokMobj(player)
    S_StartSound(player.mo, sfx_jump)
    dashed = 1
 end
 
 if dashed == 1
  cooldown = (cooldown - 1)
 end
 if cooldown == 0
  dashed = 0
  cooldown = 75
 end
end)