local z=_Tune.FWheelDensity local T=_Tune.RWheelDensity local P=_WHEELTUNE.FFrictionWeight local E=_WHEELTUNE.RFrictionWeight local K=_WHEELTUNE.FElasticity local o=_WHEELTUNE.RElasticity local f=_WHEELTUNE.FElastWeight local x=_WHEELTUNE.RElastWeight if not workspace:PGSIsEnabled()then z=_Tune.FWLgcyDensity T=_Tune.RWLgcyDensity P=_WHEELTUNE.FLgcyFrWeight E=_WHEELTUNE.FLgcyFrWeight K=_WHEELTUNE.FLgcyElasticity o=_WHEELTUNE.RLgcyElasticity f=_WHEELTUNE.FLgcyElWeight x=_WHEELTUNE.RLgcyElWeight end local c={}for N,O in pairs(car.Wheels:GetChildren())do local y={}y.wheel=O local L y.x=0 if O.Name=="\070\076"or O.Name=="\070\082"or O.Name=="\070"then L=(12-math.abs(_Tune.FCamber))/15 y.x=z y.BaseHeat=_WHEELTUNE.FTargetFriction-_WHEELTUNE.FMinFriction y.WearSpeed=_WHEELTUNE.FWearSpeed y.fWeight=P y.elast=K y.eWeight=f else L=(12-math.abs(_Tune.RCamber))/15 y.x=T y.BaseHeat=_WHEELTUNE.RTargetFriction-_WHEELTUNE.RMinFriction y.WearSpeed=_WHEELTUNE.RWearSpeed y.fWeight=E y.elast=o y.eWeight=x end y.Heat=y.BaseHeat y.stress=0 table.insert(c,y)end

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
