Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function DamageService:RegisterDamage(Handler, Target, Damage, AttackType)
- if Damage < 0 then return false end
- if DamageService:CanDamage(Handler, Target) then
- if Target:IsA'Player' then
- Target.Character.Humanoid:TakeDamage(Damage)
- --Target.Character.Humanoid.Health = Target.Character.Humanoid.Health - Damage
- else
- Target.Humanoid:TakeDamage(Damage)
- -- this is the new part
- if Target:FindFirstChild("Targets") then
- require(Target.Targets).Offender(Handler.Name)
- end
- -- end of new part
- end
- return true
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement