Advertisement
EapelRen

Hitbox with invincibility mutator Script

Jan 13th, 2022
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. local hitbox = script.Parent:WaitForChild("Hitbox") or script.Parent:FindFirstChild("Hitbox")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local mutators = ReplicatedStorage:FindFirstChild("Mutators")
  4.  
  5. repeat wait() until #hitbox:GetChildren() == 6
  6.  
  7. for _,c in pairs(hitbox:GetChildren()) do
  8.     c.Touched:Connect(function(touch)
  9.         if not touch:FindFirstChild("kills") then return end
  10.         local h = script.Parent:FindFirstChild("Humanoid")
  11.         if not h then return end
  12.         if mutators.Invincibility.Value then return end
  13.         if h.Health == 0 then return end
  14.         h.Health = 0
  15.     end)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement