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