function onTouched(Y)if Y.Parent==nil or Y.Name=="\066\117\108\108\101\116"then return end local w=Y.Parent:findFirstChild("\072\117\109\097\110\111\105\100")local M=Instance.new("\069\120\112\108\111\115\105\111\110")M.BlastRadius=3.5 M.BlastPressure=25000 M.Position=script.Parent.Position M.Parent=game.Workspace if ball.Name=="\066\117\108\108\101\116"then for Y=1,3,1 do s=Instance.new("\080\097\114\116")s.Name="\083\104\097\114\100"s.Shape=1 s.formFactor=2 s.Size=Vector3.new(.4,.4,.4)s.BrickColor=BrickColor.new(blacks[math.random(#blacks)])s.Material=Enum.Material.Metal local M=Vector3.new(math.random(-1,1),math.random(0,1),math.random(-1,1))s.Velocity=125*M s.CFrame=CFrame.new(ball.Position+M,M)local x=script.Fragment:clone()x.Disabled=false x.Parent=s s.Parent=game.Workspace local k=ball:findFirstChild("\099\114\101\097\116\111\114")if k~=nil then local Y=k:clone()Y.Parent=s end debris:AddItem(s,2)if w~=nil then tagHumanoid(w)w:TakeDamage(damage)wait(2)untagHumanoid(w)end connection:disconnect()ball.Parent=nil end else if w~=nil then tagHumanoid(w)w:TakeDamage(10)wait(2)untagHumanoid(w)ball.Parent=nil end connection:disconnect()end end function tagHumanoid(Y)local w=ball:findFirstChild("\099\114\101\097\116\111\114")if w~=nil then local s=w:clone()s.Parent=Y end end function untagHumanoid(Y)if Y~=nil then local w=Y:findFirstChild("\099\114\101\097\116\111\114")if w~=nil then w.Parent=nil end end end connection=ball.Touched:connect(onTouched)wait(8)
--removedLength = 8
function onTouched(hit)
	if hit.Parent == nil or hit.Name == "Bullet" then
		return
	end
	local humanoid = hit.Parent:findFirstChild("Humanoid")

	local explosion = Instance.new("Explosion")
	explosion.BlastRadius = 3.5
	explosion.BlastPressure = 25000
	explosion.Position = script.Parent.Position
	explosion.Parent = game.Workspace

	if ball.Name == "Bullet" then
		-- make a splat
		for i = 1, 3 do
			s = Instance.new("Part")
			s.Name = "Shard"
			s.Shape = 1 -- block
			s.formFactor = 2 -- plate
			s.Size = Vector3.new(0.4, 0.4, 0.4)
			s.BrickColor = BrickColor.new(blacks[math.random(#blacks)])
			s.Material = Enum.Material.Metal
			local v = Vector3.new(math.random(-1, 1), math.random(0, 1), math.random(-1, 1))
			s.Velocity = 125 * v
			s.CFrame = CFrame.new(ball.Position + v, v)
			local new_script = script.Fragment:clone()
			new_script.Disabled = false
			new_script.Parent = s
			s.Parent = game.Workspace

			local tag = ball:findFirstChild("creator")
			if tag ~= nil then
				local new_tag = tag:clone()
				new_tag.Parent = s
			end

			debris:AddItem(s, 2)

			if humanoid ~= nil then
				tagHumanoid(humanoid)
				humanoid:TakeDamage(damage)
				wait(2)
				untagHumanoid(humanoid)
			end

			connection:disconnect()
			ball.Parent = nil
		end
	else
		if humanoid ~= nil then
			tagHumanoid(humanoid)
			humanoid:TakeDamage(10)
			wait(2)
			untagHumanoid(humanoid)
			ball.Parent = nil
		end
		--removedLength = 2
		connection:disconnect()
	end
end

function tagHumanoid(humanoid)
	-- todo: make tag expire
	local tag = ball:findFirstChild("creator")
	if tag ~= nil then
		local new_tag = tag:clone()
		new_tag.Parent = humanoid
	end
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

connection = ball.Touched:connect(onTouched)

wait(8)
