You are on page 1of 1

local Knit = require(game:GetService("ReplicatedStorage").Packages.

knit) -- // get
the knit module
local Nuke = Knit.GetController("NukeController") -- // get the nuke controller

local AttackHook do -- // initialize the hook variable so we can return it later in


the script
AttackHook = hookfunction(Nuke.Attack, function(Self, Target, ...) -- // hook
the attack function
-- // the "Target" is just a bunch of info on the current target as a table
rawset(Target, "nextAttackCritical", true) -- // make "nextAttackCritical"
true, and bypass the __newindex metamethod using rawset just in case they decide to
make the "Target" readonly

return AttackHook(Self, Target, ...) -- // return & call the function with
the newly edited nextAttackCritical value
end)
end

You might also like