script.Parent:WaitForChild("\086\097\108\117\101\115")local Z=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local e=script.Parent.Car.Value local Q=e.Body.Lights local I=e.Body.TK local f=script.Parent.Values local Y=f.Brake local W=f.Gear local z=f.Brake.Value local P=Q.RunL local U=Q.RunR local D=I.RLeft local M=I.RRight local o=Q.Brake local G=I.Brake local E=Q.B local h=Q.L local L=Q.L2 local R=Q.HB local C=I.RB local O=I.Reverse local k=false local g=false local N=false local a=false local S=false local X=false local s=false local J=false function DealWithInput(Z,Q)if Q then return end if Z.KeyCode==Enum.KeyCode.S or Z.KeyCode==Enum.KeyCode.Down then if Z.UserInputState==Enum.UserInputState.Begin then J=true o.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")o.Material=Enum.Material.Neon G.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")G.Material=Enum.Material.Neon elseif Z.UserInputState==Enum.UserInputState.End then J=false o.BrickColor=BrickColor.new("\067\114\105\109\115\111\110")o.Material=Enum.Material.SmoothPlastic G.BrickColor=BrickColor.new("\067\114\105\109\115\111\110")G.Material=Enum.Material.SmoothPlastic end elseif Z.KeyCode==Enum.KeyCode.Z then if Z.UserInputState==Enum.UserInputState.Begin then if N then return end k=not k g=false if s then repeat wait()until not s end while k do P.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")P.Material=Enum.Material.Neon D.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")D.Material=Enum.Material.Neon e.DriveSeat.Indicator.Value=true e.DriveSeat.LI.Value=true wait(.33333333333333)P.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")P.Material=Enum.Material.SmoothPlastic e.DriveSeat.Indicator.Value=false e.DriveSeat.LI.Value=false if not S then D.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")D.Material=Enum.Material.SmoothPlastic else D.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")D.Material=Enum.Material.SmoothPlastic end wait(.33333333333333)if not k then P.Material=Enum.Material.SmoothPlastic P.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")end end end elseif Z.KeyCode==Enum.KeyCode.X then if Z.UserInputState==Enum.UserInputState.Begin then if N==false then N=true k=true g=true else N=false k=false g=false end if N then k=false g=false end if s then repeat wait()until not s end while N do P.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")P.Material=Enum.Material.Neon U.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")U.Material=Enum.Material.Neon D.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")D.Material=Enum.Material.Neon M.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")M.Material=Enum.Material.Neon e.DriveSeat.Indicator.Value=true e.DriveSeat.LI.Value=true e.DriveSeat.RI.Value=true wait(.33333333333333)P.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")P.Material=Enum.Material.SmoothPlastic U.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")U.Material=Enum.Material.SmoothPlastic D.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")D.Material=Enum.Material.SmoothPlastic M.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")M.Material=Enum.Material.SmoothPlastic e.DriveSeat.Indicator.Value=false e.DriveSeat.LI.Value=false e.DriveSeat.RI.Value=false wait(.33333333333333)if not N then P.Material=Enum.Material.SmoothPlastic U.Material=Enum.Material.SmoothPlastic P.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")U.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")end end end elseif Z.KeyCode==Enum.KeyCode.C then if Z.UserInputState==Enum.UserInputState.Begin then if N then return end g=not g k=false if s then repeat wait()until not s end while g do U.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")U.Material=Enum.Material.Neon M.BrickColor=BrickColor.new("\068\101\101\112 \111\114\097\110\103\101")M.Material=Enum.Material.Neon e.DriveSeat.Indicator.Value=true e.DriveSeat.RI.Value=true wait(.33333333333333)U.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")U.Material=Enum.Material.SmoothPlastic e.DriveSeat.Indicator.Value=false e.DriveSeat.RI.Value=false if not S then M.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")M.Material=Enum.Material.SmoothPlastic else M.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")M.Material=Enum.Material.SmoothPlastic end wait(.33333333333333)if not g then U.Material=Enum.Material.SmoothPlastic U.BrickColor=BrickColor.new("\078\101\111\110 \111\114\097\110\103\101")end end end elseif Z.KeyCode==Enum.KeyCode.L and Z.UserInputState==Enum.UserInputState.Begin then if S and not X then X=true elseif S and X then S=false X=false elseif not S then S=true end if X then R.BrickColor=BrickColor.new("\080\101\097\114\108")R.Material=Enum.Material.Neon L.SpotLight.Enabled=true C.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")C.Material=Enum.Material.Neon elseif not X then R.BrickColor=BrickColor.new("\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101")R.Material=Enum.Material.SmoothPlastic L.SpotLight.Enabled=false if not S then C.BrickColor=BrickColor.new("\067\114\105\109\115\111\110")C.Material=Enum.Material.SmoothPlastic elseif not S or X then C.BrickColor=BrickColor.new("\067\114\105\109\115\111\110")C.Material=Enum.Material.SmoothPlastic end end if S then E.BrickColor=BrickColor.new("\080\101\097\114\108")E.Material=Enum.Material.Neon h.SpotLight.Enabled=true C.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")C.Material=Enum.Material.Neon if not X then E.BrickColor=BrickColor.new("\080\101\097\114\108")C.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")C.Material=Enum.Material.Neon else end elseif not S then E.BrickColor=BrickColor.new("\073\110\115\116\105\116\117\116\105\111\110\097\108 \119\104\105\116\101")E.Material=Enum.Material.SmoothPlastic h.SpotLight.Enabled=false if not J then end end end end Z.InputBegan:connect(DealWithInput)Z.InputChanged:connect(DealWithInput)Z.InputEnded:connect(DealWithInput)W.Changed:connect(function()if W.Value==-1 then O.Material=Enum.Material.Neon else O.Material=Enum.Material.SmoothPlastic end end)

script.Parent:WaitForChild("Values")
local is = game:GetService("UserInputService")
local cr = script.Parent.Car.Value
local lt = cr.Body.Lights
local tk = cr.Body.TK
local vl = script.Parent.Values
local GBrake = vl.Brake
local gr = vl.Gear
local bk = vl.Brake.Value
local l1 = lt.RunL
local r1 = lt.RunR
local b1 = tk.RLeft
local b2 = tk.RRight
local b3 = lt.Brake
local b4 = tk.Brake
local lw = lt.B
local lww = lt.L
local lwww = lt.L2
local hi = lt.HB
local rb = tk.RB
local rv = tk.Reverse
local left = false
local right = false
local hazards = false
local reverse = false
local headlt = false
local highlt = false
local relay = false
local brake = false
function DealWithInput(input, processed)
  if processed then
    return
  end
  if input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.Down then
    if input.UserInputState == Enum.UserInputState.Begin then
      brake = true
      b3.BrickColor = BrickColor.new("Really red")
      b3.Material = Enum.Material.Neon
      b4.BrickColor = BrickColor.new("Really red")
      b4.Material = Enum.Material.Neon
    elseif input.UserInputState == Enum.UserInputState.End then
      brake = false
      b3.BrickColor = BrickColor.new("Crimson")
      b3.Material = Enum.Material.SmoothPlastic
      b4.BrickColor = BrickColor.new("Crimson")
      b4.Material = Enum.Material.SmoothPlastic
    end
  elseif input.KeyCode == Enum.KeyCode.Z then
    if input.UserInputState == Enum.UserInputState.Begin then
      if hazards then
        return
      end
      left = not left
      right = false
      if relay then
        repeat
          wait()
        until not relay
      end
      while left do
        l1.BrickColor = BrickColor.new("Deep orange")
        l1.Material = Enum.Material.Neon
        b1.BrickColor = BrickColor.new("Deep orange")
        b1.Material = Enum.Material.Neon
        cr.DriveSeat.Indicator.Value = true
        cr.DriveSeat.LI.Value = true
        wait(0.3333333333333333)
        l1.BrickColor = BrickColor.new("Neon orange")
        l1.Material = Enum.Material.SmoothPlastic
        cr.DriveSeat.Indicator.Value = false
        cr.DriveSeat.LI.Value = false
        if not headlt then
          b1.BrickColor = BrickColor.new("Neon orange")
          b1.Material = Enum.Material.SmoothPlastic
        else
          b1.BrickColor = BrickColor.new("Neon orange")
          b1.Material = Enum.Material.SmoothPlastic
        end
        wait(0.3333333333333333)
        if not left then
          l1.Material = Enum.Material.SmoothPlastic
          l1.BrickColor = BrickColor.new("Neon orange")
        end
      end
    end
  elseif input.KeyCode == Enum.KeyCode.X then
    if input.UserInputState == Enum.UserInputState.Begin then
      if hazards == false then
        hazards = true
        left = true
        right = true
      else
        hazards = false
        left = false
        right = false
      end
      if hazards then
        left = false
        right = false
      end
      if relay then
        repeat
          wait()
        until not relay
      end
      while hazards do
        l1.BrickColor = BrickColor.new("Deep orange")
        l1.Material = Enum.Material.Neon
        r1.BrickColor = BrickColor.new("Deep orange")
        r1.Material = Enum.Material.Neon
        b1.BrickColor = BrickColor.new("Deep orange")
        b1.Material = Enum.Material.Neon
        b2.BrickColor = BrickColor.new("Deep orange")
        b2.Material = Enum.Material.Neon
        cr.DriveSeat.Indicator.Value = true
        cr.DriveSeat.LI.Value = true
        cr.DriveSeat.RI.Value = true
        wait(0.3333333333333333)
        l1.BrickColor = BrickColor.new("Neon orange")
        l1.Material = Enum.Material.SmoothPlastic
        r1.BrickColor = BrickColor.new("Neon orange")
        r1.Material = Enum.Material.SmoothPlastic
        b1.BrickColor = BrickColor.new("Neon orange")
        b1.Material = Enum.Material.SmoothPlastic
        b2.BrickColor = BrickColor.new("Neon orange")
        b2.Material = Enum.Material.SmoothPlastic
        cr.DriveSeat.Indicator.Value = false
        cr.DriveSeat.LI.Value = false
        cr.DriveSeat.RI.Value = false
        wait(0.3333333333333333)
        if not hazards then
          l1.Material = Enum.Material.SmoothPlastic
          r1.Material = Enum.Material.SmoothPlastic
          l1.BrickColor = BrickColor.new("Neon orange")
          r1.BrickColor = BrickColor.new("Neon orange")
        end
      end
    end
  elseif input.KeyCode == Enum.KeyCode.C then
    if input.UserInputState == Enum.UserInputState.Begin then
      if hazards then
        return
      end
      right = not right
      left = false
      if relay then
        repeat
          wait()
        until not relay
      end
      while right do
        r1.BrickColor = BrickColor.new("Deep orange")
        r1.Material = Enum.Material.Neon
        b2.BrickColor = BrickColor.new("Deep orange")
        b2.Material = Enum.Material.Neon
        cr.DriveSeat.Indicator.Value = true
        cr.DriveSeat.RI.Value = true
        wait(0.3333333333333333)
        r1.BrickColor = BrickColor.new("Neon orange")
        r1.Material = Enum.Material.SmoothPlastic
        cr.DriveSeat.Indicator.Value = false
        cr.DriveSeat.RI.Value = false
        if not headlt then
          b2.BrickColor = BrickColor.new("Neon orange")
          b2.Material = Enum.Material.SmoothPlastic
        else
          b2.BrickColor = BrickColor.new("Neon orange")
          b2.Material = Enum.Material.SmoothPlastic
        end
        wait(0.3333333333333333)
        if not right then
          r1.Material = Enum.Material.SmoothPlastic
          r1.BrickColor = BrickColor.new("Neon orange")
        end
      end
    end
  elseif input.KeyCode == Enum.KeyCode.L and input.UserInputState == Enum.UserInputState.Begin then
    if headlt and not highlt then
      highlt = true
    elseif headlt and highlt then
      headlt = false
      highlt = false
    elseif not headlt then
      headlt = true
    end
    if highlt then
      hi.BrickColor = BrickColor.new("Pearl")
      hi.Material = Enum.Material.Neon
      lwww.SpotLight.Enabled = true
      rb.BrickColor = BrickColor.new("Really red")
      rb.Material = Enum.Material.Neon
    elseif not highlt then
      hi.BrickColor = BrickColor.new("Institutional white")
      hi.Material = Enum.Material.SmoothPlastic
      lwww.SpotLight.Enabled = false
      if not headlt then
        rb.BrickColor = BrickColor.new("Crimson")
        rb.Material = Enum.Material.SmoothPlastic
      elseif not headlt or highlt then
        rb.BrickColor = BrickColor.new("Crimson")
        rb.Material = Enum.Material.SmoothPlastic
      end
    end
    if headlt then
      lw.BrickColor = BrickColor.new("Pearl")
      lw.Material = Enum.Material.Neon
      lww.SpotLight.Enabled = true
      rb.BrickColor = BrickColor.new("Really red")
      rb.Material = Enum.Material.Neon
      if not highlt then
        lw.BrickColor = BrickColor.new("Pearl")
        rb.BrickColor = BrickColor.new("Really red")
        rb.Material = Enum.Material.Neon
      else
      end
    elseif not headlt then
      lw.BrickColor = BrickColor.new("Institutional white")
      lw.Material = Enum.Material.SmoothPlastic
      lww.SpotLight.Enabled = false
      if not brake then
      end
    end
  end
end
is.InputBegan:connect(DealWithInput)
is.InputChanged:connect(DealWithInput)
is.InputEnded:connect(DealWithInput)
gr.Changed:connect(function()
  if gr.Value == -1 then
    rv.Material = Enum.Material.Neon
  else
    rv.Material = Enum.Material.SmoothPlastic
  end
end)
