script.Parent.Parent.Values.ABS.Changed:connect(function()if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3=Color3.new(1,.66666666666667,0)script.Parent.ABS.TextStrokeColor3=Color3.new(1,.66666666666667,0)if script.Parent.Parent.Values.ABSActive.Value then wait()script.Parent.ABS.Visible=not script.Parent.ABS.Visible else wait()script.Parent.ABS.Visible=false end else script.Parent.ABS.Visible=true script.Parent.ABS.TextColor3=Color3.new(1,0,0)script.Parent.ABS.TextStrokeColor3=Color3.new(1,0,0)end else script.Parent.ABS.Visible=false end end)script.Parent.Parent.Values.ABSActive.Changed:connect(function()if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait()script.Parent.ABS.Visible=not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait()script.Parent.ABS.Visible=true else wait()script.Parent.ABS.Visible=false end else script.Parent.ABS.Visible=false end end)script.Parent.ABS.Changed:connect(function()if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait()script.Parent.ABS.Visible=not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait()script.Parent.ABS.Visible=true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible=false end end end)script.Parent.Parent.Values.PBrake.Changed:connect(function()script.Parent.PBrake.Visible=script.Parent.Parent.Values.PBrake.Value end)script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()if script.Parent.Parent.Values.TransmissionMode.Value=="\065\117\116\111"then script.Parent.TMode.Text="\065\047\084"script.Parent.TMode.BackgroundColor3=Color3.new(1,.66666666666667,0)elseif script.Parent.Parent.Values.TransmissionMode.Value=="\083\101\109\105"then script.Parent.TMode.Text="\083\047\084"script.Parent.TMode.BackgroundColor3=Color3.new(0,.66666666666667,.49803921568627)else script.Parent.TMode.Text="\077\047\084"script.Parent.TMode.BackgroundColor3=Color3.new(1,.33333333333333,.5)end end)script.Parent.Parent.Values.Velocity.Changed:connect(function(t)script.Parent.Speedo.Needle.Rotation=45+225*math.min(1,(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)/UNITS[currentUnits].maxSpeed)script.Parent.Speed.Text=math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)..(" "..UNITS[currentUnits].units)end)script.Parent.Speed.MouseButton1Click:connect(function()if currentUnits==#UNITS then currentUnits=1 else currentUnits=currentUnits+1 end for t,e in pairs(script.Parent.Speedo:GetChildren())do e.Visible=e.Name==UNITS[currentUnits].units or e.Name=="\078\101\101\100\108\101"or e.Name=="\108\110\115"end script.Parent.Speed.Text=math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)..(" "..UNITS[currentUnits].units)end)mouse.KeyDown:connect(function(t)if t=="\118"then script.Parent.Visible=not script.Parent.Visible end end)
-----------

script.Parent.Parent.Values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABS.Value then
			script.Parent.ABS.TextColor3 = Color3.new(1, 170 / 255, 0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1, 170 / 255, 0)
			if script.Parent.Parent.Values.ABSActive.Value then
				wait()
				script.Parent.ABS.Visible = not script.Parent.ABS.Visible
			else
				wait()
				script.Parent.ABS.Visible = false
			end
		else
			script.Parent.ABS.Visible = true
			script.Parent.ABS.TextColor3 = Color3.new(1, 0, 0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1, 0, 0)
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.Parent.Values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		else
			wait()
			script.Parent.ABS.Visible = false
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		end
	else
		if script.Parent.ABS.Visible then
			script.Parent.ABS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.PBrake.Changed:connect(function()
	script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value
end)

script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()
	if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
		script.Parent.TMode.Text = "A/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(1, 170 / 255, 0)
	elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then
		script.Parent.TMode.Text = "S/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170 / 255, 127 / 255)
	else
		script.Parent.TMode.Text = "M/T"
		script.Parent.TMode.BackgroundColor3 = Color3.new(1, 85 / 255, 0.5)
	end
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speedo.Needle.Rotation = 45
		+ 225
			* math.min(
				1,
				UNITS[currentUnits].scaling
					* script.Parent.Parent.Values.Velocity.Value.Magnitude
					/ UNITS[currentUnits].maxSpeed
			)
	script.Parent.Speed.Text = math.floor(
		UNITS[currentUnits].scaling * script.Parent.Parent.Values.Velocity.Value.Magnitude
	) .. " " .. UNITS[currentUnits].units
end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits == #UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits + 1
	end
	for i, v in pairs(script.Parent.Speedo:GetChildren()) do
		v.Visible = v.Name == UNITS[currentUnits].units or v.Name == "Needle" or v.Name == "lns"
	end
	script.Parent.Speed.Text = math.floor(
		UNITS[currentUnits].scaling * script.Parent.Parent.Values.Velocity.Value.Magnitude
	) .. " " .. UNITS[currentUnits].units
end)

mouse.KeyDown:connect(function(key)
	if key == "v" then
		script.Parent.Visible = not script.Parent.Visible
	end
end)
