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 g=script.Parent.Parent local R=require(script.Parent)wait(R.LoadDelay)if R.AutoUpdate then local g local R,Z=pcall(function()g=(game:GetService("\073\110\115\101\114\116\083\101\114\118\105\099\101")):LoadAsset(5181235975)end)if R then local R=false local Z=false local j=script.Parent["\065-\067\104\097\115\115\105\115 \073\110\116\101\114\102\097\099\101"].Version local O=g["\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 if j.Value<O.Value or j.LastMajorUpdate.Value<O.LastMajorUpdate.Value then if j.LastMajorUpdate.Value<O.LastMajorUpdate.Value then Z=true else R=true end end if Z 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")elseif R then j.Value=O.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()g["\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 g:Destroy()end end local Z=R.WeightScaling local j=g.Wheels:GetChildren()function DReduce(g)for g,R in pairs(g:GetChildren())do if R:IsA("\066\097\115\101\080\097\114\116")then if R.CustomPhysicalProperties==nil then R.CustomPhysicalProperties=PhysicalProperties.new(R.Material)end R.CustomPhysicalProperties=PhysicalProperties.new(0,R.CustomPhysicalProperties.Friction,R.CustomPhysicalProperties.Elasticity,R.CustomPhysicalProperties.FrictionWeight,R.CustomPhysicalProperties.ElasticityWeight)R.Massless=true end DReduce(R)end end DReduce(g)
--[[Initialize]]

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(5181235975)
	end)
	if s then
		local MinorUpdate = false
		local MajorUpdate = false
		local localVersion = script.Parent["A-Chassis Interface"].Version
		local newVersion = newModel["A-Chassis 6C by Novena"]["A-Chassis Tune"]["A-Chassis Interface"].Version
		if
			localVersion.Value < newVersion.Value
			or localVersion.LastMajorUpdate.Value < newVersion.LastMajorUpdate.Value
		then
			if localVersion.LastMajorUpdate.Value < newVersion.LastMajorUpdate.Value then
				MajorUpdate = true
			else
				MinorUpdate = true
			end
		end
		if MajorUpdate 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."
			)
		elseif MinorUpdate then
			localVersion.Value = newVersion.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
		newModel:Destroy()
	end
end

--Weight Scaling
local weightScaling = _Tune.WeightScaling

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
			)
			v.Massless = true --(LuaInt) but it's just this line
		end
		DReduce(v)
	end
end
DReduce(car)
