local a=script.Parent local w=script.Parent.Parent local j=0 a.OnServerEvent:connect(function(a,O)if O.ToggleLight then if w.Body.Light.on.Value==true then w.Body.Light.on.Value=false else w.Body.Light.on.Value=true end elseif O.EnableBrakes then w.Body.Brakes.on.Value=true elseif O.DisableBrakes then w.Body.Brakes.on.Value=false elseif O.ToggleLeftBlink then if w.Body.Left.on.Value==true then w.Body.Left.on.Value=false else w.Body.Left.on.Value=true end elseif O.ToggleRightBlink then if w.Body.Right.on.Value==true then w.Body.Right.on.Value=false else w.Body.Right.on.Value=true end elseif O.ReverseOn then w.Body.Reverse.on.Value=true elseif O.ReverseOff then w.Body.Reverse.on.Value=false elseif O.ToggleStandlicht then if j==0 then j=2 w.Body.Headlight.on.Value=true elseif j==1 then j=2 w.Body.Headlight.on.Value=true elseif j==2 then j=3 w.Body.Highlight.on.Value=true elseif j==3 then j=1 w.Body.Highlight.on.Value=false w.Body.Headlight.on.Value=false end elseif O.ToggleHazards then if w.Body.Hazards.on.Value==false then w.Body.Hazards.on.Value=true elseif w.Body.Hazards.on.Value==true then w.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["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)
