local U=true local N=true function dmg(U)script.Parent.Humanoid:TakeDamage(U.damage.Value)script.Parent.Humanoid.Died:connect(function()if not script.Parent.Humanoid:FindFirstChild("\099\114\101\097\116\111\114")then if U:FindFirstChild("\099\114\101\097\116\111\114")then if(U:WaitForChild("\099\114\101\097\116\111\114",1)).Value:FindFirstChild("\108\101\097\100\101\114\115\116\097\116\115")then((U:WaitForChild("\099\114\101\097\116\111\114",1)):Clone()).Parent=script.Parent.Humanoid end end end end)end;(script.Parent:WaitForChild("\072\117\109\097\110\111\105\100",1)).Touched:connect(function(u,M)local G=game.Players:GetPlayerFromCharacter(script.Parent)if u.Name=="\067\097\110\110\111\110 \083\104\111\116"then if U==true then U=false if(u:WaitForChild("\099\114\101\097\116\111\114",1)).Value~=G then if script.Parent.Humanoid.Health~=0 then if(G:WaitForChild("\065\110\116\105\084\101\097\109\075\105\108\108",1)).Value==true then if G.TeamColor~=(u:WaitForChild("\099\114\101\097\116\111\114",1)).Value.TeamColor then dmg(u)end else dmg(u)end end end wait(.033333333333333)U=true end elseif u.Name=="\080\101\108\108\101\116"then if N==true then U=false if(u:WaitForChild("\099\114\101\097\116\111\114",1)).Value~=G then if script.Parent.Humanoid.Health~=0 then if(G:WaitForChild("\065\110\116\105\084\101\097\109\075\105\108\108",1)).Value==true then if G.TeamColor~=(u:WaitForChild("\099\114\101\097\116\111\114",1)).Value.TeamColor then dmg(u)end else dmg(u)end end end wait(.2)U=true end end end)


local ds2=true
local dp2=true

function dmg(Part)
	script.Parent.Humanoid:TakeDamage(Part.damage.Value)
	script.Parent.Humanoid.Died:connect(function()
		if not script.Parent.Humanoid:FindFirstChild("creator") then
			if Part:FindFirstChild("creator") then
				if Part:WaitForChild("creator",1).Value:FindFirstChild("leaderstats") then
					Part:WaitForChild("creator",1):Clone().Parent=script.Parent.Humanoid
				end
			end
		end
	end)
end

script.Parent:WaitForChild("Humanoid",1).Touched:connect(function(Part,Limb)
	local player=game.Players:GetPlayerFromCharacter(script.Parent)
	if Part.Name=="Cannon Shot" then
		if ds2==true then
			ds2=false
			if Part:WaitForChild("creator",1).Value~=player then
				if script.Parent.Humanoid.Health~=0 then
					if player:WaitForChild("AntiTeamKill",1).Value==true then
						if player.TeamColor~=Part:WaitForChild("creator",1).Value.TeamColor then
							dmg(Part)
						end
					else
						dmg(Part)
					end
				end
			end
			wait(1/30)
			ds2=true
		end
	elseif Part.Name=="Pellet" then
		if dp2==true then
			ds2=false
			if Part:WaitForChild("creator",1).Value~=player then
				if script.Parent.Humanoid.Health~=0 then
					if player:WaitForChild("AntiTeamKill",1).Value==true then
						if player.TeamColor~=Part:WaitForChild("creator",1).Value.TeamColor then
							dmg(Part)
						end
					else
						dmg(Part)
					end
				end
			end
			wait(.2)
			ds2=true
		end
	end
end)
