for z,p in pairs(DROPS:GetChildren())do HandleDrop(p)end local z=0 RunService.Stepped:connect(function(p,R)z=z+R for p,R in pairs(drops)do local W=p.Position-CAMERA.CFrame.p if math.abs(W.X)<UPDATE_RANGE and(math.abs(W.Y)<UPDATE_RANGE and math.abs(W.Z)<UPDATE_RANGE)then local W=z+(p.Position.X+p.Position.Z)*.2 local s=(CFrame.new(p.Position)*CFrame.new(0,math.sin(W)*.2,0))*CFrame.Angles(0,W/4,0)for z,p in pairs(R.Parts)do p.Part.CFrame=s*p.Offset local R=p.Part.Position-CAMERA.CFrame.p p.Outline.CFrame=p.Part.CFrame+(R.Unit*OUTLINE_WIDTH)*2 end end end end)
-- initiate

for _, drop in pairs(DROPS:GetChildren()) do
	HandleDrop(drop)
end

local t = 0

RunService.Stepped:connect(function(_, deltaTime)
	t = t + deltaTime
	for drop, dropInfo in pairs(drops) do
		local offset = drop.Position - CAMERA.CFrame.p

		if
			math.abs(offset.X) < UPDATE_RANGE
			and math.abs(offset.Y) < UPDATE_RANGE
			and math.abs(offset.Z) < UPDATE_RANGE
		then
			local localT = t + (drop.Position.X + drop.Position.Z) * 0.2
			local cframe = CFrame.new(drop.Position)
				* CFrame.new(0, math.sin(localT) * 0.2, 0)
				* CFrame.Angles(0, localT / 4, 0)

			for _, info in pairs(dropInfo.Parts) do
				info.Part.CFrame = cframe * info.Offset
				local offset = info.Part.Position - CAMERA.CFrame.p
				info.Outline.CFrame = info.Part.CFrame + offset.Unit * OUTLINE_WIDTH * 2
			end
		end
	end
end)
