IHATEMICROWAVEOVEN

type advantages 2

Nov 21st, 2021 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. function DamageService:RegisterDamage(Handler, Target, Damage, AttackType)
  2. if Damage < 0 then return false end
  3. if DamageService:CanDamage(Handler, Target) then
  4. if Target:IsA'Player' then
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. Target.Character.Humanoid:TakeDamage(math.ceil(Damage * AttackType[STATS.GetStat(Target, "Type") + 1] * AttackType[STATS.GetStat(Target, "Type2") + 1]))
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. else
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. local t1
  38. local t2
  39. if Target:FindFirstChild("Type") then t1 = Target.Type elseif Target:FindFirstChild("Type1") then t1 = Target.Type1 else t1 = 1 end
  40. if Target:FindFirstChild("Type2") then t2 = Target.Type2 else t2 = 1 end
  41. Target.Character.Humanoid:TakeDamage(math.ceil(Damage * t1 * t2))
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. end
  53. return true
  54. end
  55. return false
  56. end
Add Comment
Please, Sign In to add comment