Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
Once per turn, you can either: Target 1 monster you control; equip this card to that target, OR: Unequip this card and Special Summon it. A monster equipped with this card is treated as a Tuner, it gains 500 ATK/DEF, also if the equipped monster would be destroyed by battle or card effect, destroy this card instead.
--トルクチューン・ギア
--Torque Tune Gear
local s,id=GetID()
function s.initial_effect(c)
	aux.AddUnionProcedure(c,nil)
	--add type
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_EQUIP)
	e1:SetCode(EFFECT_ADD_TYPE)
	e1:SetValue(TYPE_TUNER)
	c:RegisterEffect(e1)
	--atkup
	local e2=e1:Clone()
	e2:SetCode(EFFECT_UPDATE_ATTACK)
	e2:SetValue(500)
	c:RegisterEffect(e2)
	--defup
	local e3=e2:Clone()
	e3:SetCode(EFFECT_UPDATE_DEFENSE)
	c:RegisterEffect(e3)
end