script.Parent:WaitForChild("\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101")script.Parent:WaitForChild("\080\108\117\103\105\110\115")script.Parent:WaitForChild("\082\069\065\068\077\069")local A=script.Parent.Parent local S=require(script.Parent)wait(S.LoadDelay)if S.AutoUpdate then local A local S,x=pcall(function()A=(game:GetService("\073\110\115\101\114\116\083\101\114\118\105\099\101")):LoadAsset(2615493582)end)if S then if script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version.Value<A["\065-\067\104\097\115\115\105\115 \054\067 \098\121 \078\111\118\101\110\097"]["\065-\067\104\097\115\115\105\115 \084\117\110\101"]["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version.Value then if A["\065-\067\104\097\115\115\105\115 \054\067 \098\121 \078\111\118\101\110\097"]["\065-\067\104\097\115\115\105\115 \084\117\110\101"]["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version.MajorUpdate.Value then print("\091\065\067\054\067\093\058 \067\104\097\115\115\105\115 \117\112\100\097\116\101\033\n\065 \109\097\106\111\114 \117\112\100\097\116\101 \116\111 \065-\067\104\097\115\115\105\115 \054\067 \104\097\115 \098\101\101\110 \102\111\117\110\100\046\n\084\104\101 \099\104\097\110\103\101\115 \099\097\110\110\111\116 \098\101 \112\111\114\116\101\100 \100\117\101 \116\111 \116\104\101 \117\112\100\097\116\101\046\n\089\111\117 \097\114\101 \097\100\118\105\115\101\100 \116\111 \117\112\100\097\116\101 \121\111\117\114 \099\104\097\115\115\105\115 \065\083\065\080\046")else script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version.Value=A["\065-\067\104\097\115\115\105\115 \054\067 \098\121 \078\111\118\101\110\097"]["\065-\067\104\097\115\115\105\115 \084\117\110\101"]["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version.Value print("\091\065\067\054\067\093\058 \068\114\105\118\101 \115\099\114\105\112\116 \117\112\100\097\116\101\033\n\065\110 \117\112\100\097\116\101 \116\111 \065-\067\104\097\115\115\105\115\' \068\114\105\118\101 \115\099\114\105\112\116 \104\097\115 \098\101\101\110 \102\111\117\110\100\046\n\084\104\101 \117\112\100\097\116\101\100 \115\099\114\105\112\116 \119\105\108\108 \116\097\107\101 \101\102\102\101\099\116 \110\101\120\116 \116\105\109\101 \121\111\117 \103\101\116 \105\110\046\n\089\111\117 \097\114\101 \097\100\118\105\115\101\100 \116\111 \117\112\100\097\116\101 \121\111\117\114 \099\104\097\115\115\105\115 \115\111\111\110\046")script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Drive:Destroy()A["\065-\067\104\097\115\115\105\115 \054\067 \098\121 \078\111\118\101\110\097"]["\065-\067\104\097\115\115\105\115 \084\117\110\101"]["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Drive.Parent=script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"]end end A:Destroy()end end local x=S.WeightScaling if not workspace:PGSIsEnabled()then x=S.LegacyScaling end local v=A.Wheels:GetChildren()function DReduce(A)for A,S in pairs(A:GetChildren())do if S:IsA("\066\097\115\101\080\097\114\116")then if S.CustomPhysicalProperties==nil then S.CustomPhysicalProperties=PhysicalProperties.new(S.Material)end S.CustomPhysicalProperties=PhysicalProperties.new(0,S.CustomPhysicalProperties.Friction,S.CustomPhysicalProperties.Elasticity,S.CustomPhysicalProperties.FrictionWeight,S.CustomPhysicalProperties.ElasticityWeight)end DReduce(S)end end DReduce(A)


	script.Parent:WaitForChild("A-Chassis Interface")
	script.Parent:WaitForChild("Plugins")
	script.Parent:WaitForChild("README")
	
	local car=script.Parent.Parent
	local _Tune=require(script.Parent)
	
	wait(_Tune.LoadDelay)
	
	--Update Checker
	
	if _Tune.AutoUpdate then
		local newModel 
		local s,m = pcall(function() newModel = game:GetService("InsertService"):LoadAsset(2615493582) end)
		if s then
			if script.Parent["A-Chassis Interface"].Version.Value < newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.Value then
				if newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.MajorUpdate.Value then
					print("[AC6C]: Chassis update!"
						.."\nA major update to A-Chassis 6C has been found."
						.."\nThe changes cannot be ported due to the update."
						.."\nYou are advised to update your chassis ASAP.")
				else
					script.Parent["A-Chassis Interface"].Version.Value = newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version.Value
					print("[AC6C]: Drive script update!"
						.."\nAn update to A-Chassis' Drive script has been found."
						.."\nThe updated script will take effect next time you get in."
						.."\nYou are advised to update your chassis soon.")
					script.Parent["A-Chassis Interface"].Drive:Destroy()
					newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Drive.Parent = script.Parent["A-Chassis Interface"]
				end
			end
			newModel:Destroy()
		end
	end
	
	--Weight Scaling
	local weightScaling = _Tune.WeightScaling
	if not workspace:PGSIsEnabled() then
		weightScaling = _Tune.LegacyScaling
	end

	local Drive=car.Wheels:GetChildren()
	
	--Remove Existing Mass
	function DReduce(p)
		for i,v in pairs(p:GetChildren())do
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				v.CustomPhysicalProperties = PhysicalProperties.new(
					0,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
			DReduce(v)
		end
	end
	DReduce(car)


