Character=script.Parent Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")BaseUrl="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061"Functions=require(script:WaitForChild("\070\117\110\099\116\105\111\110\115"))DeathEffect=script:FindFirstChild("\068\101\097\116\104\069\102\102\101\099\116")Creator=script:FindFirstChild("\067\114\101\097\116\111\114")DisplayParts={}Rate=.016666666666667 function IsTeamMate(i,c)return i and(c and(not i.Neutral and(not c.Neutral and i.TeamColor==c.TeamColor)))end function TagHumanoid(i,c)local K=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")K.Name="\099\114\101\097\116\111\114"K.Value=c Debris:AddItem(K,2)K.Parent=i end function UntagHumanoid(i)for i,c in pairs(i:GetChildren())do if c:IsA("\079\098\106\101\099\116\086\097\108\117\101")and c.Name=="\099\114\101\097\116\111\114"then c:Destroy()end end end function DestroyScript()Debris:AddItem(script,.5)return end if not Humanoid then DestroyScript()return end Player=Players:GetPlayerFromCharacter(Character)for i=1,5,1 do if Player then Humanoid:UnequipTools()else for i,c in pairs(Character:GetChildren())do if c:IsA("\084\111\111\108")then c:Destroy()end end end local c=Functions.Redesign(Character)for i,c in pairs(c)do c=c.Object if c:IsA("\066\097\115\101\080\097\114\116")then if c.Transparency<1 then table.insert(DisplayParts,c)end elseif c:IsA("\068\101\099\097\108")or c:IsA("\084\101\120\116\117\114\101")then if c.Transparency<1 then table.insert(DisplayParts,c)end end end local K=false UntagHumanoid(Humanoid)if Creator and(Creator.Value and(Creator.Value.Parent and Creator.Value:IsA("\080\108\097\121\101\114")))then if not Player or not IsTeamMate(Creator.Value,Player)then TagHumanoid(Humanoid,Creator.Value)else K=true end end if not K then Humanoid:TakeDamage(8)if Humanoid.Health<=0 and DeathEffect then local i=DeathEffect:Clone()i.Disabled=false i.Parent=Character end end if Humanoid.Health>0 then local i=2 local K=.95 for c=1,(1-Functions.DarkProperties.All.Transparency)*(K*i),1 do for c,J in pairs(DisplayParts)do if J and J.Parent then J.Transparency=J.Transparency+K/i end end wait(Rate)end wait(.5)for c=1,(1-Functions.DarkProperties.All.Transparency)*(K*i),1 do for c,J in pairs(DisplayParts)do if J and J.Parent then J.Transparency=J.Transparency-K/i end end wait(Rate)end for i,c in pairs(c)do local K=c.Object for i,c in pairs(c.FakeObjects)do if c and c.Parent then c:Destroy()end end pcall(function()for i,c in pairs(c.Properties)do pcall(function()K[i]=c end)end K.Parent=c.Parent end)end wait(.5)end end DestroyScript()


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

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

BaseUrl = "http://www.roblox.com/asset/?id="

Functions = require(script:WaitForChild("Functions"))
DeathEffect = script:FindFirstChild("DeathEffect")

Creator = script:FindFirstChild("Creator")

DisplayParts = {}

Rate = (1 / 60)

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 = Instance.new("ObjectValue")
	Creator_Tag.Name = "creator"
	Creator_Tag.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

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

if not Humanoid then
	DestroyScript()
	return
end

Player = Players:GetPlayerFromCharacter(Character)

for i = 1, 5 do
	if Player then
		Humanoid:UnequipTools()
	else
		for i, v in pairs(Character:GetChildren()) do
			if v:IsA("Tool") then
				v:Destroy()
			end
		end
	end
	
	local Objects = Functions.Redesign(Character)
	
	for i, v in pairs(Objects) do
		v = v.Object
		if v:IsA("BasePart") then
			if v.Transparency < 1 then
				table.insert(DisplayParts, v)
			end
		elseif v:IsA("Decal") or v:IsA("Texture") then
			if v.Transparency < 1 then
				table.insert(DisplayParts, v)
			end
		end
	end
	local SameTeam = false
	UntagHumanoid(Humanoid)
	if Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player") then
		if not Player or not IsTeamMate(Creator.Value, Player) then
			TagHumanoid(Humanoid, Creator.Value)
		else
			SameTeam = true
		end
	end
	if not SameTeam then
		Humanoid:TakeDamage(8)
		if Humanoid.Health <= 0 and DeathEffect then
			local DeathEffectScript = DeathEffect:Clone()
			DeathEffectScript.Disabled = false
			DeathEffectScript.Parent = Character
		end
	end
	if Humanoid.Health > 0 then
		--wait(0.1)
		--Delay(0.1, (function()
			local FadeRate = 2
			local FadeAmount = 0.95
			for i = 1, ((1 - Functions.DarkProperties.All.Transparency) * (FadeAmount * FadeRate)) do
				for ii, vv in pairs(DisplayParts) do
					if vv and vv.Parent then
						vv.Transparency = (vv.Transparency + (FadeAmount / FadeRate))
					end
				end
				wait(Rate)
			end
			wait(0.5)
			for i = 1, ((1 - Functions.DarkProperties.All.Transparency) * (FadeAmount * FadeRate)) do
				for ii, vv in pairs(DisplayParts) do
					if vv and vv.Parent then
						vv.Transparency = (vv.Transparency - (FadeAmount / FadeRate))
					end
				end
				wait(Rate)
			end	
			for i, v in pairs(Objects) do
				local Object = v.Object
				for ii, vv in pairs(v.FakeObjects) do
					if vv and vv.Parent then
						vv:Destroy()
					end
				end
				pcall(function()
					for ii, vv in pairs(v.Properties) do
						pcall(function()
							Object[ii] = vv
						end)
					end
					Object.Parent = v.Parent
				end)
			end
		--end))
		wait(0.5)
	end
end

DestroyScript()
