local g=_Tune.FWheelDensity local N=_Tune.RWheelDensity local f=_WHEELTUNE.FFrictionWeight local j=_WHEELTUNE.RFrictionWeight local P=_WHEELTUNE.FElasticity local r=_WHEELTUNE.RElasticity local T=_WHEELTUNE.FElastWeight local w=_WHEELTUNE.RElastWeight if not workspace:PGSIsEnabled()then g=_Tune.FWLgcyDensity N=_Tune.RWLgcyDensity f=_WHEELTUNE.FLgcyFrWeight j=_WHEELTUNE.FLgcyFrWeight P=_WHEELTUNE.FLgcyElasticity r=_WHEELTUNE.RLgcyElasticity T=_WHEELTUNE.FLgcyElWeight w=_WHEELTUNE.RLgcyElWeight end local z={}for h,c in pairs(car.Wheels:GetChildren())do local v={}v.wheel=c local o v.x=0 if c.Name=="\070\076"or c.Name=="\070\082"or c.Name=="\070"then o=(12-math.abs(_Tune.FCamber))/15 v.x=g v.BaseHeat=_WHEELTUNE.FTargetFriction-_WHEELTUNE.FMinFriction v.WearSpeed=_WHEELTUNE.FWearSpeed v.fWeight=f v.elast=P v.eWeight=T else o=(12-math.abs(_Tune.RCamber))/15 v.x=N v.BaseHeat=_WHEELTUNE.RTargetFriction-_WHEELTUNE.RMinFriction v.WearSpeed=_WHEELTUNE.RWearSpeed v.fWeight=j v.elast=r v.eWeight=w end v.Heat=v.BaseHeat v.stress=0 table.insert(z,v)end
--Wheels Array
local fDensity = _Tune.FWheelDensity
local rDensity = _Tune.RWheelDensity
local fFwght = _WHEELTUNE.FFrictionWeight
local rFwght = _WHEELTUNE.RFrictionWeight
local fElast = _WHEELTUNE.FElasticity
local rElast = _WHEELTUNE.RElasticity
local fEwght = _WHEELTUNE.FElastWeight
local rEwght = _WHEELTUNE.RElastWeight
if not workspace:PGSIsEnabled() then
	fDensity = _Tune.FWLgcyDensity
	rDensity = _Tune.RWLgcyDensity
	fFwght = _WHEELTUNE.FLgcyFrWeight
	rFwght = _WHEELTUNE.FLgcyFrWeight
	fElast = _WHEELTUNE.FLgcyElasticity
	rElast = _WHEELTUNE.RLgcyElasticity
	fEwght = _WHEELTUNE.FLgcyElWeight
	rEwght = _WHEELTUNE.RLgcyElWeight
end
local Wheels = {}
for i, v in pairs(car.Wheels:GetChildren()) do
	local w = {}
	w.wheel = v
	local ca
	w.x = 0
	if v.Name == "FL" or v.Name == "FR" or v.Name == "F" then
		ca = (12 - math.abs(_Tune.FCamber)) / 15
		w.x = fDensity
		w.BaseHeat = _WHEELTUNE.FTargetFriction - _WHEELTUNE.FMinFriction
		w.WearSpeed = _WHEELTUNE.FWearSpeed
		w.fWeight = fFwght
		w.elast = fElast
		w.eWeight = fEwght
	else
		ca = (12 - math.abs(_Tune.RCamber)) / 15
		w.x = rDensity
		w.BaseHeat = _WHEELTUNE.RTargetFriction - _WHEELTUNE.RMinFriction
		w.WearSpeed = _WHEELTUNE.RWearSpeed
		w.fWeight = rFwght
		w.elast = rElast
		w.eWeight = rEwght
	end
	--if car:FindFirstChild("WearData")~=nil then
	--	w.Heat = math.min(w.BaseHeat,car.WearData[v.Name].Value+(((tick()-car.WearData.STime.Value)*_WHEELTUNE.RegenSpeed*15/10000)))
	--else
	w.Heat = w.BaseHeat
	--end
	w.stress = 0
	table.insert(Wheels, w)
end
