-- Shifter

if INVERTED == false then INVERTED = 1 else INVERTED = -1 end
Values.Gear.Changed:connect(function()
	local Gear = Values.Gear.Value
	local Shift = "Down"
	if Gear > Val then Shift = "Up" end
	Val = Gear
	
	script.Shift:Play()
	if FE then
		handler:FireServer("Shifter",Shift,MOT,ANGLE,INVERTED,SHIFT_TIME)
	else
		if Shift == "Up" then
			MOT.DesiredAngle = math.rad(ANGLE)*INVERTED
			wait(SHIFT_TIME)
			MOT.DesiredAngle = 0
		else
			MOT.DesiredAngle = -math.rad(ANGLE)*INVERTED
			wait(SHIFT_TIME)
			MOT.DesiredAngle = 0
		end
	end
end)
