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(math.ceil(Damage * AttackType[STATS.GetStat(Target, "Type") + 1] * AttackType[STATS.GetStat(Target, "Type2") + 1]))
- else
- local t1
- local t2
- if Target:FindFirstChild("Type") then t1 = Target.Type elseif Target:FindFirstChild("Type1") then t1 = Target.Type1 else t1 = 1 end
- if Target:FindFirstChild("Type2") then t2 = Target.Type2 else t2 = 1 end
- Target.Character.Humanoid:TakeDamage(math.ceil(Damage * t1 * t2))
- end
- return true
- end
- return false
- end
Add Comment
Please, Sign In to add comment