local Y=script.Parent local i=script.Parent.Parent local U=0 Y.OnServerEvent:connect(function(Y,D)if D.ToggleLight then if i.Body.Light.on.Value==true then i.Body.Light.on.Value=false else i.Body.Light.on.Value=true end elseif D.EnableBrakes then i.Body.Brakes.on.Value=true elseif D.DisableBrakes then i.Body.Brakes.on.Value=false elseif D.ToggleLeftBlink then if i.Body.Left.on.Value==true then i.Body.Left.on.Value=false else i.Body.Left.on.Value=true end elseif D.ToggleRightBlink then if i.Body.Right.on.Value==true then i.Body.Right.on.Value=false else i.Body.Right.on.Value=true end elseif D.ReverseOn then i.Body.Reverse.on.Value=true elseif D.ReverseOff then i.Body.Reverse.on.Value=false elseif D.ToggleStandlicht then if U==0 then U=2 i.Body.Headlight.on.Value=true elseif U==1 then U=2 i.Body.Headlight.on.Value=true elseif U==2 then U=3 i.Body.Highlight.on.Value=true elseif U==3 then U=1 i.Body.Highlight.on.Value=false i.Body.Headlight.on.Value=false end elseif D.ToggleHeadlight then if i.Body.Headlight.on.Value==false then i.Body.Headlight.on.Value=true else i.Body.Headlight.on.Value=false end elseif D.ToggleHighbeam then if i.Body.Highlight.on.Value==false then i.Body.Highlight.on.Value=true elseif i.Body.Highlight.on.Value==true then i.Body.Highlight.on.Value=false end elseif D.ToggleHazards then if i.Body.Hazards.on.Value==false then i.Body.Hazards.on.Value=true elseif i.Body.Hazards.on.Value==true then i.Body.Hazards.on.Value=false end end end)
-- Testing AC FE support

local event = script.Parent
local car = script.Parent.Parent
local LichtNum = 0

event.OnServerEvent:connect(function(player, data)
	if data["ToggleLight"] then
		if car.Body.Light.on.Value == true then
			car.Body.Light.on.Value = false
		else
			car.Body.Light.on.Value = true
		end
	elseif data["EnableBrakes"] then
		car.Body.Brakes.on.Value = true
	elseif data["DisableBrakes"] then
		car.Body.Brakes.on.Value = false
	elseif data["ToggleLeftBlink"] then
		if car.Body.Left.on.Value == true then
			car.Body.Left.on.Value = false
		else
			car.Body.Left.on.Value = true
		end
	elseif data["ToggleRightBlink"] then
		if car.Body.Right.on.Value == true then
			car.Body.Right.on.Value = false
		else
			car.Body.Right.on.Value = true
		end
	elseif data["ReverseOn"] then
		car.Body.Reverse.on.Value = true
	elseif data["ReverseOff"] then
		car.Body.Reverse.on.Value = false
	elseif data["ToggleStandlicht"] then
		if LichtNum == 0 then
			LichtNum = 2
			car.Body.Headlight.on.Value = true
		elseif LichtNum == 1 then
			LichtNum = 2
			car.Body.Headlight.on.Value = true
		elseif LichtNum == 2 then
			LichtNum = 3
			car.Body.Highlight.on.Value = true
		elseif LichtNum == 3 then
			LichtNum = 1
			car.Body.Highlight.on.Value = false
			car.Body.Headlight.on.Value = false
		end
	elseif data["ToggleHeadlight"] then
		if car.Body.Headlight.on.Value == false then
			car.Body.Headlight.on.Value = true
		else
			car.Body.Headlight.on.Value = false
		end
	elseif data["ToggleHighbeam"] then
		if car.Body.Highlight.on.Value == false then
			car.Body.Highlight.on.Value = true
		elseif car.Body.Highlight.on.Value == true then
			car.Body.Highlight.on.Value = false
		end
	elseif data["ToggleHazards"] then
		if car.Body.Hazards.on.Value == false then
			car.Body.Hazards.on.Value = true
		elseif car.Body.Hazards.on.Value == true then
			car.Body.Hazards.on.Value = false
		end
	end
end)
