Character=script.Parent Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")Creator=script:FindFirstChild("\067\114\101\097\116\111\114")Damage=script:FindFirstChild("\068\097\109\097\103\101")Duration=script:FindFirstChild("\068\117\114\097\116\105\111\110")Particles=script:FindFirstChild("\080\097\114\116\105\099\108\101\115")Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")RbxUtility=LoadLibrary("\082\098\120\085\116\105\108\105\116\121")Create=RbxUtility.Create Player=Players:GetPlayerFromCharacter(Character)ParticlesUsed={}function DestroyScript()Debris:AddItem(script,.5)script:Destroy()end function IsTeamMate(H,y)return H and(y and(not H.Neutral and(not y.Neutral and H.TeamColor==y.TeamColor)))end function TagHumanoid(H,y)local N=(Create("\079\098\106\101\099\116\086\097\108\117\101"))({Name="\099\114\101\097\116\111\114",Value=y})Debris:AddItem(N,2)N.Parent=H end function UntagHumanoid(H)for H,y in pairs(H:GetChildren())do if y:IsA("\079\098\106\101\099\116\086\097\108\117\101")and y.Name=="\099\114\101\097\116\111\114"then y:Destroy()end end end if not Humanoid or Humanoid.Health==0 or not Creator or not Creator.Value or not Creator.Value.Parent or not Creator.Value:IsA("\080\108\097\121\101\114")or not Damage or not Duration then DestroyScript()return end if Particles then for H,y in pairs(Character:GetChildren())do if y:IsA("\066\097\115\101\080\097\114\116")then local H=Particles:Clone()H.Enabled=true table.insert(ParticlesUsed,H)H.Parent=y end end end DamageRate=Damage.Value/Duration.Value DamageValue=Damage.Value/DamageRate DelayRate=Duration.Value/Damage.Value for H=1,math.ceil(DamageRate),1 do if Creator.Value and(Creator.Value:IsA("\080\108\097\121\101\114")and(Player and IsTeamMate(Creator.Value,Player)))or Humanoid.Health<=0 then else UntagHumanoid(Humanoid)TagHumanoid(Humanoid,Creator.Value)Humanoid:TakeDamage(DamageValue)end wait(DelayRate)end Delay(Duration.Value-2,function()for H,y in pairs(ParticlesUsed)do if y and y.Parent then y.Enabled=false end end end)wait(Duration.Value)DestroyScript()


Character = script.Parent
Humanoid = Character:FindFirstChild("Humanoid")

Creator = script:FindFirstChild("Creator")
Damage = script:FindFirstChild("Damage")
Duration = script:FindFirstChild("Duration")

Particles = script:FindFirstChild("Particles")

Players = game:GetService("Players")
Debris = game:GetService("Debris")

RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create

Player = Players:GetPlayerFromCharacter(Character)

ParticlesUsed = {}

function DestroyScript()
	Debris:AddItem(script, 0.5)
	script:Destroy()
end

function IsTeamMate(Player1, Player2)
	return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
end
	
function TagHumanoid(humanoid, player)
	local Creator_Tag = Create("ObjectValue"){
		Name = "creator",
		Value = player,
	}
	Debris:AddItem(Creator_Tag, 2)
	Creator_Tag.Parent = humanoid
end
	
function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

if not Humanoid or Humanoid.Health == 0 or not Creator or not Creator.Value or not Creator.Value.Parent or not Creator.Value:IsA("Player") or not Damage or not Duration then
	DestroyScript()
	return
end

if Particles then
	for i, v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			local Particle = Particles:Clone()
			Particle.Enabled = true
			table.insert(ParticlesUsed, Particle)
			Particle.Parent = v
		end
	end
end

DamageRate = (Damage.Value / Duration.Value)
DamageValue = (Damage.Value / DamageRate)
DelayRate = (Duration.Value / Damage.Value)
for i = 1, math.ceil(DamageRate) do
	if (Creator.Value and Creator.Value:IsA("Player") and Player and IsTeamMate(Creator.Value, Player)) or Humanoid.Health <= 0 then
	else
		UntagHumanoid(Humanoid)
		TagHumanoid(Humanoid, Creator.Value)
		Humanoid:TakeDamage(DamageValue)
	end
	wait(DelayRate)
end

Delay((Duration.Value - 2), (function()
	for i, v in pairs(ParticlesUsed) do
		if v and v.Parent then
			v.Enabled = false
		end
	end
end))

wait(Duration.Value)

DestroyScript()
