local W=nil for T,X in pairs(misc:GetDescendants())do if X:IsA("\079\098\106\101\099\116\086\097\108\117\101")and X.Name=="\069\078\071\073\078\069\095\080\065\067\075"then W=X.Value end end if W then if W:FindFirstChild("\067\097\109\095\071\101\097\114\115")then local T=W.Cam_Gears for W,T in pairs(T:GetChildren())do if string.sub(T.Name,1,4)=="\071\101\097\114"then MakeWeld(T.W,car.DriveSeat,"\077\111\116\111\114")ModelWeld(T.Parts,T.W)end end end if W:FindFirstChild("\069\110\103\105\110\101\095\083\104\097\107\101")then local T=W.Engine_Shake MakeWeld(T.W,car.DriveSeat,"\077\111\116\111\114")ModelWeld(T.Parts,T.W)end if W:FindFirstChild("\077\097\110\105\102\111\108\100\095\072\101\097\116")then local T=W.Manifold_Heat ModelWeld(T.Parts,car.DriveSeat)end if W:FindFirstChild("\084\104\114\111\116\116\108\101\095\066\111\100\121")then local T=W.Throttle_Body for W,T in pairs(T:GetChildren())do if string.sub(T.Name,1,4)=="\066\111\100\121"then MakeWeld(T.W,car.DriveSeat,"\077\111\116\111\114",.25)ModelWeld(T.Parts,T.W)end end end if W:FindFirstChild("\084\105\109\105\110\103\095\066\101\108\116")then local T=W.Timing_Belt ModelWeld(T.Parts,car.DriveSeat)for W=1,#T.Parts:GetChildren(),1 do for W=1,#T.Parts:GetChildren(),1 do local X=Instance.new("\065\116\116\097\099\104\109\101\110\116",T.Parts["\065"..W])X.Orientation=Vector3.new(90,0,0)end local X=Instance.new("\066\101\097\109",T.Beams)X.Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,0);NumberSequenceKeypoint.new(1,0)})X.Name="\065"..W if T.TextureID.Value~=nil then X.Texture="\114\098\120\097\115\115\101\116\105\100\058\047\047"..T.TextureID.Value end X.TextureSpeed=0 if T.BeltWidth.Value~=nil then X.Width0=T.BeltWidth.Value X.Width1=T.BeltWidth.Value end if W==#T.Parts:GetChildren()then X.Attachment0=T.Parts["\065"..W].Attachment X.Attachment1=T.Parts.A1.Attachment else print("\065"..W+1)X.Attachment0=T.Parts["\065"..W].Attachment X.Attachment1=T.Parts["\065"..W+1].Attachment end end end if W:FindFirstChild("\084\117\114\098\111\099\104\097\114\103\101\114\115")then local T=W.Turbochargers for W,T in pairs(T:GetChildren())do if string.sub(T.Name,1,5)=="\084\117\114\098\111"then MakeWeld(T.W,car.DriveSeat,"\077\111\116\111\114")ModelWeld(T.Parts,T.W)end end end end

local ENG_PCK = nil
for i,v in pairs(misc:GetDescendants()) do
	if v:IsA("ObjectValue") and v.Name == "ENGINE_PACK" then ENG_PCK = v.Value end
end
if ENG_PCK then

	if ENG_PCK:FindFirstChild("Cam_Gears") then
		local CG = ENG_PCK.Cam_Gears
		for i,Gear in pairs(CG:GetChildren()) do
			if string.sub(Gear.Name,1,4) == "Gear" then
				MakeWeld(Gear.W,car.DriveSeat,"Motor")
				ModelWeld(Gear.Parts,Gear.W)
			end
		end
	end

	if ENG_PCK:FindFirstChild("Engine_Shake") then
		local ES = ENG_PCK.Engine_Shake
		MakeWeld(ES.W,car.DriveSeat,"Motor")
		ModelWeld(ES.Parts,ES.W)
	end

	if ENG_PCK:FindFirstChild("Manifold_Heat") then
		local MH = ENG_PCK.Manifold_Heat
		ModelWeld(MH.Parts,car.DriveSeat)
	end

	if ENG_PCK:FindFirstChild("Throttle_Body") then
		local TB = ENG_PCK.Throttle_Body
		for i,Body in pairs(TB:GetChildren()) do
			if string.sub(Body.Name,1,4) == "Body" then
				MakeWeld(Body.W,car.DriveSeat,"Motor",0.25)
				ModelWeld(Body.Parts,Body.W)
			end
		end
	end

	if ENG_PCK:FindFirstChild("Timing_Belt") then
		local TI = ENG_PCK.Timing_Belt
		ModelWeld(TI.Parts,car.DriveSeat)
		for i=1,#TI.Parts:GetChildren() do
			for x=1,#TI.Parts:GetChildren() do
				local Attachment = Instance.new("Attachment",TI.Parts["A"..x])
				Attachment.Orientation = Vector3.new(90,0,0)
			end
			local Beam = Instance.new("Beam",TI.Beams)
			Beam.Transparency = NumberSequence.new{
				NumberSequenceKeypoint.new(0,0),
				NumberSequenceKeypoint.new(1,0)}

			Beam.Name = "A"..i
			if TI.TextureID.Value ~= nil then
				Beam.Texture = "rbxassetid://"..TI.TextureID.Value
			end
			Beam.TextureSpeed = 0
			if TI.BeltWidth.Value ~= nil then
				Beam.Width0 = TI.BeltWidth.Value
				Beam.Width1 = TI.BeltWidth.Value
			end
			if i == #TI.Parts:GetChildren() then
				Beam.Attachment0 = TI.Parts["A"..i].Attachment
				Beam.Attachment1 = TI.Parts["A1"].Attachment
			else
				print("A"..i+1)
				Beam.Attachment0 = TI.Parts["A"..i].Attachment
				Beam.Attachment1 = TI.Parts["A"..i+1].Attachment
			end
		end
	end

	if ENG_PCK:FindFirstChild("Turbochargers") then
		local TC = ENG_PCK.Turbochargers
		for i,Turbo in pairs(TC:GetChildren()) do
			if string.sub(Turbo.Name,1,5) == "Turbo" then
				MakeWeld(Turbo.W,car.DriveSeat,"Motor")
				ModelWeld(Turbo.Parts,Turbo.W)
			end
		end
	end

end
