script.Parent.CanCollide=false script.Parent.Anchored=false for t,s in pairs(script.Parent:GetChildren())do if s.ClassName=="\080\097\114\116"or s.ClassName=="\087\101\100\103\101\080\097\114\116"or s.ClassName=="\084\114\117\115\115\080\097\114\116"or s.ClassName=="\067\111\114\110\101\114\087\101\100\103\101\080\097\114\116"or s.ClassName=="\077\101\115\104\080\097\114\116"then s.Anchored=false s.CanCollide=false end end while true do wait()if not sw then fl=fl+floatInc if fl>=maxFloat then sw=true end else fl=fl-floatInc if fl<=-maxFloat then sw=false end end if pet~=nil and(hum~=nil and head~=nil)then if hum.Health>=0 then local t=head.CFrame*CFrame.new(3,-2.5+fl,3)pet.BodyPosition.Position=Vector3.new(t.x,t.y,t.z)pet.BodyGyro.CFrame=head.CFrame*CFrame.new(3,0,-3)else break end end end
------------------------------

script.Parent.CanCollide = false
script.Parent.Anchored = false
for i, v in pairs(script.Parent:GetChildren()) do
	if
		v.ClassName == "Part"
		or v.ClassName == "WedgePart"
		or v.ClassName == "TrussPart"
		or v.ClassName == "CornerWedgePart"
		or v.ClassName == "MeshPart"
	then
		v.Anchored = false
		v.CanCollide = false
	end
end

while true do
	wait()
	if not sw then
		fl = fl + floatInc
		if fl >= maxFloat then
			sw = true
		end
	else
		fl = fl - floatInc
		if fl <= -maxFloat then
			sw = false
		end
	end
	if pet ~= nil and hum ~= nil and head ~= nil then
		if hum.Health >= 0 then
			local cf = head.CFrame * CFrame.new(3, -2.5 + fl, 3)
			pet.BodyPosition.Position = Vector3.new(cf.x, cf.y, cf.z)
			pet.BodyGyro.CFrame = head.CFrame * CFrame.new(3, 0, -3)
		else
			break
		end
	end
end
