function pickupsentry(_, activator, caller)
	activator:SetAttributeValue("deploy time increased", 0.5)
	if activator.m_iTeamNum == caller.m_iTeamNum then
		return
	end
	--print("teamnum check passed")
	if caller.m_iClassname ~= "obj_sentrygun" then
		return
	end
	if caller.m_bMiniBuilding == 1 or caller.m_bDisposableBuilding == 1 then
		return
	end
	--print("sentry check passed")
	if caller.m_iHighestUpgradeLevel == 1 then
		activator:SetCustomModelWithClassAnimations("models/player/scout.mdl")
		activator:GiveItem("gscout cosmetic")
		activator:AcceptInput("addoutput", "renderfx 5")
		activator:GiveItem("carried sentry")
		activator:GiveiTem("level 1 sentry cosmetic")
		caller:Kill()
	end
	if caller.m_iHighestUpgradeLevel == 2 then
		activator:SetCustomModelWithClassAnimations("models/player/scout.mdl")
		activator:GiveItem("gscout cosmetic")
		activator:AcceptInput("addoutput", "renderfx 5")
		activator:GiveItem("carried sentry")
		activator:GiveiTem("level 2 sentry cosmetic")
		caller:Kill()
	end
	if caller.m_iHighestUpgradeLevel == 3 then
		activator:SetCustomModelWithClassAnimations("models/player/scout.mdl")
		activator:GiveItem("gscout cosmetic")
		activator:AcceptInput("addoutput", "renderfx 5")
		activator:GiveItem("carried sentry")
		activator:GiveiTem("level 3 sentry cosmetic")
		caller:Kill()
	end
end