local G=script.Parent local h=script.Parent.Parent local F=0 G.OnServerEvent:connect(function(G,e)if e.ToggleLight then if h.Body.Light.on.Value==true then h.Body.Light.on.Value=false else h.Body.Light.on.Value=true end elseif e.EnableBrakes then h.Body.Brakes.on.Value=true elseif e.DisableBrakes then h.Body.Brakes.on.Value=false elseif e.ToggleLeftBlink then if h.Body.Left.on.Value==true or h.Body.Right.on.Value==true then h.Body.Left.on.Value=false h.Body.Right.on.Value=false else h.Body.Left.on.Value=true end elseif e.ToggleRightBlink then if h.Body.Right.on.Value==true or h.Body.Left.on.Value==true then h.Body.Right.on.Value=false h.Body.Left.on.Value=false else h.Body.Right.on.Value=true end elseif e.ReverseOn then h.Body.Reverse.on.Value=true elseif e.ReverseOff then h.Body.Reverse.on.Value=false elseif e.ToggleStandlicht then if F==0 then F=1 h.Body.Headlight.on.Value=true elseif F==1 then F=2 h.Body.Highlight.on.Value=true else F=0 h.Body.Headlight.on.Value=false h.Body.Highlight.on.Value=false end elseif e.ToggleHazards then if h.Body.Left.on.Value==true or h.Body.Right.on.Value==true then h.Body.Left.on.Value=false h.Body.Right.on.Value=false else h.Body.Left.on.Value=true h.Body.Right.on.Value=true 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 or car.Body.Right.on.Value == true then
			car.Body.Left.on.Value = false
			car.Body.Right.on.Value = false
		else
			car.Body.Left.on.Value = true
		end
	elseif data["ToggleRightBlink"] then
		if car.Body.Right.on.Value == true or car.Body.Left.on.Value == true then
			car.Body.Right.on.Value = false
			car.Body.Left.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 = 1
			car.Body.Headlight.on.Value = true
		elseif LichtNum == 1 then
			LichtNum = 2
			car.Body.Highlight.on.Value = true
		else
			LichtNum = 0
			car.Body.Headlight.on.Value = false
			car.Body.Highlight.on.Value = false
		end
	elseif data["ToggleHazards"] then
		if car.Body.Left.on.Value == true or car.Body.Right.on.Value == true then
			car.Body.Left.on.Value = false
			car.Body.Right.on.Value = false
		else
			car.Body.Left.on.Value = true
			car.Body.Right.on.Value = true
		end
	end
end)
