--unfreeze the character

for i = 1, #iceParts do
	local C = iceParts[i]:GetChildren()
    for ii = 1, #C do
        if C[ii].className == "Weld" then
            C[ii]:Destroy()
        end
    end
	local dir = (iceParts[i].Position - iceParts[i].CFrame.p + Vector3.new(0, 1, 0)).unit
	iceParts[i].Velocity = (dir + Vector3.new(math.random() - 0.5, 1, math.random() - 0.5)) * 20
	iceParts[i].RotVelocity = (dir + Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5)) * 10
	local force = Instance.new("BodyForce")
	force.Force = dir * 50 * iceParts[i]:GetMass()
	force.Parent = iceParts[i]
	task.delay(0.25, function() force:Destroy() end)
end

for i, v in pairs(welds) do
	if v then
		v:Destroy()
	end
end

EnableMove()

IceShatter = Instance.new("Sound")
IceShatter.Name = "IceShatter"
IceShatter.SoundId = "rbxassetid://"..shatterSounds[math.random(1, #shatterSounds)]
IceShatter.Parent = Head
IceShatter.PlaybackSpeed = 1
IceShatter.Volume = 1.5
game.Debris:AddItem(IceShatter, 10)
task.delay(0, function() IceShatter:Play() end)
IceShatter.Ended:Connect(function()
	if script then
		script:Destroy()
	end
end)
