local g=script.Parent local p=script.Parent.Parent local J=0 g.OnServerEvent:connect(function(g,I)if I.ToggleLight then if p.Body.Light.on.Value==true then p.Body.Light.on.Value=false else p.Body.Light.on.Value=true end elseif I.EnableBrakes then p.Body.Brakes.on.Value=true elseif I.DisableBrakes then p.Body.Brakes.on.Value=false elseif I.ToggleLeftBlink then if p.Body.Left.on.Value==true or p.Body.Right.on.Value==true then p.Body.Left.on.Value=false p.Body.Right.on.Value=false else p.Body.Left.on.Value=true end elseif I.ToggleRightBlink then if p.Body.Right.on.Value==true or p.Body.Left.on.Value==true then p.Body.Right.on.Value=false p.Body.Left.on.Value=false else p.Body.Right.on.Value=true end elseif I.ReverseOn then p.Body.Reverse.on.Value=true elseif I.ReverseOff then p.Body.Reverse.on.Value=false elseif I.ToggleStandlicht then if J==0 then J=1 p.Body.Headlight.on.Value=true elseif J==1 then J=0 p.Body.Headlight.on.Value=false end elseif I.ToggleHazards then if p.Body.Left.on.Value==true or p.Body.Right.on.Value==true then p.Body.Left.on.Value=false p.Body.Right.on.Value=false else p.Body.Left.on.Value=true p.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 = 0
			car.Body.Headlight.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)
