Ok I did it. Here ya go, this new script does not target the monster now:
--Umbral Death Horror
--By Jackmoonward
function c170000145.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c170000145.condition)
e1:SetTarget(c170000145.target)
e1:SetOperation(c170000145.activate)
c:RegisterEffect(e1)
end
function c170000145.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
return tc:GetPreviousControler()==tp and tc:IsSetCard(0x87)
and bc:IsRelateToBattle() and bc:IsControler(1-tp)
end
function c170000145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
if chk==0 then return bc:IsDestructable() end
if bc:IsDestructable() then e:SetLabelObject(bc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
end
function c170000145.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end