local N=script.Parent local F=script.Parent.Parent local O=0 N.OnServerEvent:connect(function(N,l)if l.ToggleLight then if F.Body.Light.on.Value==true then F.Body.Light.on.Value=false else F.Body.Light.on.Value=true end elseif l.EnableBrakes then F.Body.Brakes.on.Value=true elseif l.DisableBrakes then F.Body.Brakes.on.Value=false elseif l.ToggleLeftBlink then if F.Body.Left.on.Value==true then F.Body.Left.on.Value=false else F.Body.Left.on.Value=true end elseif l.ToggleRightBlink then if F.Body.Right.on.Value==true then F.Body.Right.on.Value=false else F.Body.Right.on.Value=true end elseif l.ReverseOn then F.Body.Reverse.on.Value=true elseif l.ReverseOff then F.Body.Reverse.on.Value=false elseif l.ToggleStandlicht then if O==0 then O=2 F.Body.Headlight.on.Value=true elseif O==1 then O=2 F.Body.Headlight.on.Value=true elseif O==2 then O=3 F.Body.Highlight.on.Value=true elseif O==3 then O=1 F.Body.Highlight.on.Value=false F.Body.Headlight.on.Value=false end elseif l.ToggleHazards then if F.Body.hazards.Value==false then F.Body.hazards.Value=true wait(.35)F.Body.Left.on.Value=false F.Body.Right.on.Value=false wait(.35)F.Body.Left.on.Value=true F.Body.Right.on.Value=true elseif F.Body.hazards.Value==true then F.Body.hazards.Value=false F.Body.Left.on.Value=false F.Body.Right.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.Value == false then
			car.Body.hazards.Value = true
			wait(0.35)
			car.Body.Left.on.Value = false
			car.Body.Right.on.Value = false
			wait(0.35)
			car.Body.Left.on.Value = true
			car.Body.Right.on.Value = true
		elseif car.Body.hazards.Value == true then
			car.Body.hazards.Value = false
			car.Body.Left.on.Value = false
			car.Body.Right.on.Value = false
		end
	end
end)
