function onTouched(u)if u.Parent==nil then return end humanoid=u.Parent:findFirstChild("\072\117\109\097\110\111\105\100")if ball.Name=="\073\099\105\099\108\101"then for u=1,3,1 do local V=Instance.new("\080\097\114\116")V.Name="\083\104\097\114\100"V.Shape=1 V.formFactor=2 V.Size=Vector3.new(1,.4,1)V.BrickColor=BrickColor.new(blues[math.random(#blues)])V.Material=Enum.Material.Ice local j=Vector3.new(math.random(-1,1),math.random(0,1),math.random(-1,1))V.Velocity=50*j V.CFrame=CFrame.new(ball.Position+j,j)local w=script:clone()w.Disabled=false w.Parent=V V.Parent=game.Workspace local L=ball:findFirstChild("\099\114\101\097\116\111\114")if L~=nil then local u=L:clone()u.Parent=V end debris:AddItem(V,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 connection:disconnect()end end function tagHumanoid(u)local V=ball:findFirstChild("\099\114\101\097\116\111\114")if V~=nil then local j=V:clone()j.Parent=u end end function untagHumanoid(u)if u~=nil then local V=u:findFirstChild("\099\114\101\097\116\111\114")if V~=nil then V.Parent=nil end end end connection=ball.Touched:connect(onTouched)wait(8)

function onTouched(hit)
	if hit.Parent == nil then return end
	humanoid = hit.Parent:findFirstChild("Humanoid")
	if(ball.Name=="Icicle") then
		-- make a splat
		for i=1,3 do
			local s = Instance.new("Part")
			s.Name = "Shard"
			s.Shape = 1 -- block
			s.formFactor = 2 -- plate
			s.Size = Vector3.new(1,.4,1)
			s.BrickColor = BrickColor.new(blues[math.random(#blues)])
			s.Material = Enum.Material.Ice
			local v = Vector3.new(math.random(-1,1), math.random(0,1), math.random(-1,1))
			s.Velocity = 50 * v
			s.CFrame = CFrame.new(ball.Position + v, v)
			local new_script = script: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)  ---NICK I THINK THIS IS IT

			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)