addHook("PlayerThink", function(player)
	if player.mo and player.playerstate == PST_LIVE and player.mo.skin == "fang" then
	//if player.costom3hold == nil then
	//player.costom3hold = false
	//end
	if player.weapongun == nil
	player.weapongun = 1
	end
	if not (player.cmd.buttons & BT_CUSTOM2) then
	//player.costom3hold = false
	end
	if (player.cmd.buttons & BT_CUSTOM2) and (player.custom2tic == 1) then
	//player.costom3hold = true
	S_StartSound(player.mo, sfx_mswarp)
	player.weapongun = $ + 1
	P_SpawnThokMobj(player)
	end
		if player.weapongun < 1 then
			player.weapongun = 1
		end
		if player.weapongun == 1 then
			player.revitem = MT_CORK
		end
		if player.weapongun == 2 then
			player.revitem = MT_NAPALM_FLAMES
		end
		if player.weapongun == 3 then
			player.revitem = MT_BOMBGUN
		end
		if player.weapongun == 4 then
			player.revitem = MT_FASTLASER
		end
		if player.weapongun > 4 then
			player.weapongun = 1
		end
	end
end)

hud.add(function(v,player)
	if player.mo and player.mo.skin == "fang" then
		local xpos = hudinfo[HUD_RINGS].x
		local ypos = hudinfo[HUD_RINGS].y
		v.drawString(xpos, ypos + 40, ("WEAPON: " + (player.weapongun) + "/4"), V_PERPLAYER|V_GREENMAP)
	end
end)