Character=script.Parent Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")Head=Character:FindFirstChild("\072\101\097\100")Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")Player=Players:GetPlayerFromCharacter(Character)Duration=script:FindFirstChild("\068\117\114\097\116\105\111\110")BaseColor=BrickColor.new("\069\108\101\099\116\114\105\099 \098\108\117\101")DarkProperties={All={Material=Enum.Material.Ice;TextureId="",Texture="",VertexColor=Vector3.new(BaseColor.Color.r,BaseColor.Color.g,BaseColor.Color.b);SparkleColor=BaseColor.Color,Color=BaseColor.Color;SecondaryColor=BaseColor.Color};Class={BasePart={Reflectance=1;Anchored=true};ParticleEmitter={Color=ColorSequence.new(BaseColor.Color,BaseColor.Color)};Sparkles={Color=BaseColor.Color,SparkleColor=BaseColor.Color},Decal={Texture=""}}}RemovedObjects={}function GetAllInstances(m)local O={}local function n(m)for m,P in pairs(m:GetChildren())do table.insert(O,P)n(P)end end n(m)return O end function Freeze()local m=GetAllInstances(Character)OriginalInstances={}for m,O in pairs(m)do local n={Object=O,Properties={}}local P={}if O:IsA("\066\097\115\101\080\097\114\116")and O.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then elseif O:IsA("\067\104\097\114\097\099\116\101\114\077\101\115\104")then local m=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")m.MeshType=Enum.MeshType.FileMesh m.MeshId="\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"..O.MeshId for n,P in pairs(Character:GetChildren())do if P:IsA("\066\097\115\101\080\097\114\116")and O.BodyPart.Name==string.gsub(P.Name," ","")then m.Parent=P table.insert(RemovedObjects,{Object=O;NewObject=m,Parent=O.Parent})O.Parent=nil end end elseif O:IsA("\068\101\099\097\108")and O.Name=="\102\097\099\101"then else for m,g in pairs(DarkProperties.All)do pcall(function()n.Properties[m]=O[m]P[m]=true O[m]=g end)end for m,P in pairs(DarkProperties.Class)do if O:IsA(m)then for m,P in pairs(P)do pcall(function()n.Properties[m]=O[m]O[m]=P end)end end end end table.insert(OriginalInstances,n)end end function Unfreeze()for m,O in pairs(RemovedObjects)do if O then if O.NewObject and O.NewObject.Parent then O.NewObject:Destroy()end O.Object.Parent=O.Parent end end for m,O in pairs(OriginalInstances)do if O.Object then for m,n in pairs(O.Properties)do pcall(function()O.Object[m]=n end)end end end end Freeze()if Duration and Duration.Value>=0 then wait(Duration.Value)Unfreeze()end script:Destroy()


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

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

Player = Players:GetPlayerFromCharacter(Character)

Duration = script:FindFirstChild("Duration")

BaseColor = BrickColor.new("Electric blue")
DarkProperties = {
	All = {
		--BrickColor = BaseColor,
		Material = Enum.Material.Ice,
		TextureId = "",
		Texture = "",
		VertexColor = Vector3.new(BaseColor.Color.r, BaseColor.Color.g, BaseColor.Color.b),
		--BaseTextureId = 0,
		--OverlayTextureId = 0,
		SparkleColor = BaseColor.Color,
		Color = BaseColor.Color,
		SecondaryColor = BaseColor.Color,
	},
	Class = {
		BasePart = {
			Reflectance = 1,
			Anchored = true,
		},
		ParticleEmitter = {
			Color = ColorSequence.new(BaseColor.Color, BaseColor.Color),
		},
		Sparkles = {
			Color = BaseColor.Color,
			SparkleColor = BaseColor.Color,
		},
		Decal = {
			Texture = "",
		},
	}
}

RemovedObjects = {}

function GetAllInstances(Parent)
	local Instances = {}
	local function GetInstances(Parent)
		for i, v in pairs(Parent:GetChildren()) do
			table.insert(Instances, v)
			GetInstances(v)
		end
	end
	GetInstances(Parent)
	return Instances
end

function Freeze()
	local FrozenInstances = GetAllInstances(Character)
	OriginalInstances = {}
	for i, v in pairs(FrozenInstances) do
		local NewInstance = {Object = v, Properties = {}}
		local PropertiesAltered = {}
		if v:IsA("BasePart") and v.Name == "HumanoidRootPart" then
		elseif v:IsA("CharacterMesh") then
			local Mesh = Instance.new("SpecialMesh")
			Mesh.MeshType = Enum.MeshType.FileMesh
			Mesh.MeshId = ("http://www.roblox.com/asset/?id=" .. v.MeshId)
			for ii, vv in pairs(Character:GetChildren()) do
				if vv:IsA("BasePart") and v.BodyPart.Name == string.gsub(vv.Name, " ", "") then
					Mesh.Parent = vv
					table.insert(RemovedObjects, {Object = v, NewObject = Mesh, Parent = v.Parent})
					v.Parent = nil
				end
			end
		elseif v:IsA("Decal") and v.Name == "face" then
		else
			for ii, vv in pairs(DarkProperties.All) do
				pcall(function()
					NewInstance.Properties[ii] = v[ii]
					PropertiesAltered[ii] = true
					v[ii] = vv
				end)
			end
			for ii, vv in pairs(DarkProperties.Class) do
				if v:IsA(ii) then
					for iii, vvv in pairs(vv) do
						--if not PropertiesAltered[iii] then
							pcall(function()
								NewInstance.Properties[iii] = v[iii]
								v[iii] = vvv
							end)
						--end
					end
				end
			end
		end
		table.insert(OriginalInstances, NewInstance)
	end
end

function Unfreeze()
	for i, v in pairs(RemovedObjects) do
		if v then
			if v.NewObject and v.NewObject.Parent then
				v.NewObject:Destroy()
			end
			v.Object.Parent = v.Parent
		end
	end
	for i, v in pairs(OriginalInstances) do
		if v.Object then
			for ii, vv in pairs(v.Properties) do
				pcall(function()
					v.Object[ii] = vv
				end)
			end
		end
	end
end

Freeze()
if Duration and Duration.Value >= 0 then
	wait(Duration.Value)
	Unfreeze()
end

script:Destroy()
