Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Equip your sword or Play Hallow Combat - Execute this:
- local Player = game.Players.LocalPlayer
- local Connections = {}
- local function MakeConnection(Mob)
- if not Connections[Mob] and Mob:FindFirstChildOfClass("Humanoid") then
- local tbl = game.Players:GetPlayers()
- for i,v in pairs(tbl) do
- if Mob == v.Character then
- return
- end
- end
- Connections[Mob] = Mob.Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
- for i = 1, 20 do
- Mob.Humanoid.Health = 0
- end
- end)
- end
- end
- for i,v in pairs(workspace:GetDescendants()) do
- local Hum = v:FindFirstChild("Humanoid")
- if Hum then
- MakeConnection(v)
- end
- end
- workspace.DescendantAdded:Connect(function(Child)
- local Hum = Child:FindFirstChild("Humanoid") or Child:WaitForChild("Humanoid", 10)
- if Hum then
- MakeConnection(Child)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement