In general, I have a variable keep track if I have hooked the script and only do so if I haven't.
For example:
Lua Code:
local function OnScript(self)
-- Do Stuff
end
local Hooked={};
hooksecurefunc(SomeFrameMixin,"SomeMethod",function(self)
if not Hooked[self] then
self:HookScript("ScriptType",OnScript);
Hooked[self]=true;
end
end);
PS: I don't see a reason to not use
:HookScript() when you're essentially reinventing it anyway.