mouse.KeyDown:connect(function(p)p=string.lower(p)if p=="\097"then a=true elseif p=="\100"then d=true elseif p=="\119"then w=true rwd.Throttle=gear*ignition rwd.Torque=tq lwd.Throttle=gear*ignition lwd.Torque=ftq rrwd.Throttle=gear*ignition rrwd.Torque=ftq carSeat.Throttle=0 carSeat.Torque=0 cc.Value=false if gear==1 then rwd.MaxSpeed=249*ignition lwd.MaxSpeed=249*ignition rrwd.MaxSpeed=249*ignition elseif gear==0 then rwd.MaxSpeed=0 lwd.MaxSpeed=0 rrwd.MaxSpeed=0 elseif gear==-1 then rwd.MaxSpeed=25*ignition lwd.MaxSpeed=25*ignition rrwd.MaxSpeed=25*ignition end elseif p=="\115"then s=true carSeat.Throttle=0 carSeat.Torque=0 rwd.Throttle=-1 rwd.Torque=brk lwd.Throttle=-1 lwd.Torque=brk rrwd.Throttle=-1 rrwd.Torque=brk rwd.MaxSpeed=0 lwd.MaxSpeed=0 rrwd.MaxSpeed=0 cc.Value=false lightOn=true tailLights.A.Transparency=0 tailLights.A.Material="\078\101\111\110"tailLights.A.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")tailLights.B.Transparency=0 tailLights.B.Material="\078\101\111\110"tailLights.B.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Transparency=0 carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Material="\078\101\111\110"carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.BrickColor=BrickColor.new("\082\101\097\108\108\121 \114\101\100")tailLights.E.Lights.Enabled=true if ignition==0 then ignition=1 carSeat.Startup:Play()carSeat.Parent.Runners.A.Material="\078\101\111\110"carSeat.Parent.Runners.B.Material="\078\101\111\110"carSeat.Parent.Runners.C.Material="\078\101\111\110"carSeat.Parent.Runners.D.Material="\078\101\111\110"carSeat.Parent.Runners.E.Material="\078\101\111\110"carSeat.Parent.Runners.F.Material="\078\101\111\110"carSeat.Parent.Runners.G.Material="\078\101\111\110"carSeat.Parent.Runners.H.Material="\078\101\111\110"carSeat.Parent.Runners.I.Material="\078\101\111\110"carSeat.Parent.Runners.J.Material="\078\101\111\110"carSeat.Parent.Runners.K.Material="\078\101\111\110"carSeat.Parent.Runners.L.Material="\078\101\111\110"carSeat.Parent.Runners.M.Material="\078\101\111\110"carSeat.Parent.Runners.N.Material="\078\101\111\110"carSeat.Parent.Runners.O.Disp.Enabled=true carSeat.Parent.Runners.P.Disp.Enabled=true if carSeat.Parent.Parent.DoorLD.Door.SS2.Motor.DesiredAngle<0 then carSeat.Parent.Parent.DoorLD.Door.SS2.Motor.DesiredAngle=0 wait(.58)carSeat.Parent.Parent.DoorLD.Door.Handle.DoorClose:Play()end end elseif p=="\114"then if gear<1 then gear=gear+1 end elseif p=="\102"then if gear>-1 then gear=gear-1 end elseif p=="\109"then if carSeat.SingleMode.Value==true then if carSeat.Damage.Value==false then limitButton.Text="\068\097\109\097\103\101 \070\088 \101\110\097\098\108\101\100"carSeat.Parent.DE.JB.A.Disabled=false carSeat.Parent.DE.JB.B.Disabled=false carSeat.Parent.DE.JB2.A.Disabled=false carSeat.Parent.DE.JB2.B.Disabled=false carSeat.Damage.Value=true wait(3)limitButton.Text=""else carSeat.Damage.Value=false limitButton.Text="\068\097\109\097\103\101 \070\088 \100\105\115\097\098\108\101\100"carSeat.Parent.DE.JB.A.Disabled=true carSeat.Parent.DE.JB.B.Disabled=true carSeat.Parent.DE.JB2.A.Disabled=true carSeat.Parent.DE.JB2.B.Disabled=true wait(3)limitButton.Text=""end else limitButton.Text="\068\097\109\097\103\101 \082\069\083\084\082\073\067\084\069\068"carSeat.Parent.DE.JB.A.Disabled=true carSeat.Parent.DE.JB.B.Disabled=true carSeat.Parent.DE.JB2.A.Disabled=true carSeat.Parent.DE.JB2.B.Disabled=true end elseif p=="\106"then if carSeat.Lights.Value==false then limitButton.Text="\076\105\103\104\116\115 \111\110"carSeat.Lights.Value=true carSeat.Parent.Headlights.A.Lights.Enabled=true carSeat.Parent.Headlights.A.Braking.Enabled=true carSeat.Parent.Headlights.B.Lights.Enabled=true carSeat.Parent.Headlights.B.Braking.Enabled=true carSeat.Parent.Headlights.C.Material="\078\101\111\110"carSeat.Parent.Headlights.D.Material="\078\101\111\110"carSeat.Parent.Headlights.E.Material="\078\101\111\110"carSeat.Parent.Parent.Trunk.TL.Material="\078\101\111\110"tailLights.E.Light2.Enabled=true wait(3)limitButton.Text=""else carSeat.Lights.Value=false limitButton.Text="\076\105\103\104\116\115 \111\102\102"carSeat.Parent.Headlights.A.Lights.Enabled=false carSeat.Parent.Headlights.A.Braking.Enabled=false carSeat.Parent.Headlights.B.Lights.Enabled=false carSeat.Parent.Headlights.B.Braking.Enabled=false carSeat.Parent.Headlights.C.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"carSeat.Parent.Headlights.D.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"carSeat.Parent.Headlights.E.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"carSeat.Parent.Parent.Trunk.TL.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"tailLights.E.Light2.Enabled=false wait(3)limitButton.Text=""end elseif p=="\112"then if carSeat.Deployed.Value==false then limitButton.Text="\083\112\111\105\108\101\114 \100\101\112\108\111\121\101\100"carSeat.Parent.Parent.Trunk.One.WH2.Motor.DesiredAngle=.06 carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.DesiredAngle=.4 carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.MaxVelocity=.02 carSeat.Deployed.Value=true wait(3)limitButton.Text=""else carSeat.Deployed.Value=false limitButton.Text="\083\112\111\105\108\101\114 \114\101\116\114\097\099\116\101\100"carSeat.Parent.Parent.Trunk.One.WH2.Motor.DesiredAngle=0 carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.DesiredAngle=0 carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.MaxVelocity=-0.05 wait(3)limitButton.Text=""end elseif p=="\098"then if windows==false then winfob.Visible=true windows=true else windows=false winfob.Visible=false end elseif p=="\113"then q=true if not leftin then leftin=true for p,f in pairs(carSeat.Parent:GetChildren())do coroutine.resume(coroutine.create(function()if f.Name=="\076\101\102\116\073\110\100\105\099\097\116\111\114"then while leftin do(script.Parent:WaitForChild("\084\105\099\107\084\111\099\107")).Pitch=1 script.Parent.TickTock:Play()f.PointLight.Enabled=false f.BillboardGui.Enabled=false limitButton.Parent.Left.Visible=false wait(.35)script.Parent.TickTock.Pitch=.8 script.Parent.TickTock:Play()f.BillboardGui.Enabled=true f.PointLight.Enabled=true limitButton.Parent.Left.Visible=true wait(.35)end f.PointLight.Enabled=false f.BillboardGui.Enabled=false limitButton.Parent.Left.Visible=false end end))end else leftin=false end elseif p=="\101"then e=true if not rightin then rightin=true for p,f in pairs(carSeat.Parent:GetChildren())do coroutine.resume(coroutine.create(function()if f.Name=="\082\105\103\104\116\073\110\100\105\099\097\116\111\114"then while rightin do(script.Parent:WaitForChild("\084\105\099\107\084\111\099\107")).Pitch=1 script.Parent.TickTock:Play()f.PointLight.Enabled=false f.BillboardGui.Enabled=false limitButton.Parent.Right.Visible=false wait(.35)script.Parent.TickTock.Pitch=.8 script.Parent.TickTock:Play()f.BillboardGui.Enabled=true f.PointLight.Enabled=true limitButton.Parent.Right.Visible=true wait(.35)end f.PointLight.Enabled=false f.BillboardGui.Enabled=false limitButton.Parent.Right.Visible=false end end))end else rightin=false end end end)mouse.KeyUp:connect(function(p)p=string.lower(p)if p=="\097"then print("\097 \117\112")if d==false then m.DesiredAngle=0 n.DesiredAngle=m.DesiredAngle end elseif p=="\100"then print("\100 \117\112")if a==false then m.DesiredAngle=0 n.DesiredAngle=m.DesiredAngle end end a=false d=false end)mouse.KeyUp:connect(function(p)p=string.lower(p)if p=="\119"or p=="\115"then rwd.Throttle=0 rwd.Torque=0 lwd.Throttle=0 lwd.Torque=0 rrwd.Throttle=0 rrwd.Torque=0 carSeat.Throttle=0 lightOn=false carSeat.Torque=cst tailLights.A.Transparency=.7 tailLights.A.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"tailLights.A.BrickColor=BrickColor.new("\071\104\111\115\116 \103\114\101\121")tailLights.B.Transparency=.7 tailLights.B.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"tailLights.B.BrickColor=BrickColor.new("\071\104\111\115\116 \103\114\101\121")carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Transparency=.7 carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Material="\083\109\111\111\116\104\080\108\097\115\116\105\099"carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.BrickColor=BrickColor.new("\071\104\111\115\116 \103\114\101\121")tailLights.E.Lights.Enabled=false end end)

 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = gear*ignition
				rwd.Torque = tq
				lwd.Throttle = gear*ignition
				lwd.Torque = ftq
				rrwd.Throttle = gear*ignition
				rrwd.Torque = ftq
                carSeat.Throttle = 0
                carSeat.Torque = 0
				cc.Value = false
				if gear == 1 then
					rwd.MaxSpeed = 249*ignition
					lwd.MaxSpeed = 249*ignition
					rrwd.MaxSpeed = 249*ignition
				elseif gear == 0 then
					rwd.MaxSpeed = 0
					lwd.MaxSpeed = 0
					rrwd.MaxSpeed = 0
				elseif gear == -1 then
					rwd.MaxSpeed = 25*ignition
					lwd.MaxSpeed = 25*ignition
					rrwd.MaxSpeed = 25*ignition
				end
                elseif key == "s" then
                s = true    
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 0
				lwd.MaxSpeed = 0
				rrwd.MaxSpeed = 0
				cc.Value = false
				lightOn = true
				
				tailLights.A.Transparency = 0
				tailLights.A.Material = "Neon"
				tailLights.A.BrickColor = BrickColor.new("Really red")
				
				tailLights.B.Transparency = 0
				tailLights.B.Material = "Neon"
				tailLights.B.BrickColor = BrickColor.new("Really red")
				
				carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Transparency = 0
				carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Material = "Neon"
				carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.BrickColor = BrickColor.new("Really red")
				
				tailLights.E.Lights.Enabled = true
				if ignition == 0 then
					ignition = 1
					carSeat.Startup:Play()
					carSeat.Parent.Runners.A.Material = "Neon"
					carSeat.Parent.Runners.B.Material = "Neon"
					carSeat.Parent.Runners.C.Material = "Neon"
					carSeat.Parent.Runners.D.Material = "Neon"
					carSeat.Parent.Runners.E.Material = "Neon"
					carSeat.Parent.Runners.F.Material = "Neon"
					carSeat.Parent.Runners.G.Material = "Neon"
					carSeat.Parent.Runners.H.Material = "Neon"
					carSeat.Parent.Runners.I.Material = "Neon"
					carSeat.Parent.Runners.J.Material = "Neon"
					carSeat.Parent.Runners.K.Material = "Neon"
					carSeat.Parent.Runners.L.Material = "Neon"
					carSeat.Parent.Runners.M.Material = "Neon"
					carSeat.Parent.Runners.N.Material = "Neon"
					carSeat.Parent.Runners.O.Disp.Enabled = true
					carSeat.Parent.Runners.P.Disp.Enabled = true
					if carSeat.Parent.Parent.DoorLD.Door.SS2.Motor.DesiredAngle < 0 then
						carSeat.Parent.Parent.DoorLD.Door.SS2.Motor.DesiredAngle = 0
						wait(0.58)
						carSeat.Parent.Parent.DoorLD.Door.Handle.DoorClose:Play()
					end
				end
                elseif key == "r" then --Gear selector
					if gear < 1 then
						gear = gear + 1
					end
                elseif key == "f" then
					if gear > -1 then
						gear = gear - 1
					end
				
				--// Car controls
				elseif key == "m" then --JOINTBREAKERS!!!!!
					if carSeat.SingleMode.Value == true then
					 if carSeat.Damage.Value == false then 
					  limitButton.Text = "Damage FX enabled"
					  carSeat.Parent.DE.JB.A.Disabled = false
					  carSeat.Parent.DE.JB.B.Disabled = false
					  carSeat.Parent.DE.JB2.A.Disabled = false
					  carSeat.Parent.DE.JB2.B.Disabled = false
					  carSeat.Damage.Value = true
					  wait(3)
					  limitButton.Text = ""
					 else carSeat.Damage.Value = false
					 limitButton.Text = "Damage FX disabled"
					  carSeat.Parent.DE.JB.A.Disabled = true
					  carSeat.Parent.DE.JB.B.Disabled = true
					  carSeat.Parent.DE.JB2.A.Disabled = true
					  carSeat.Parent.DE.JB2.B.Disabled = true
					  wait(3)
					  limitButton.Text = ""
					 end
					else
					  limitButton.Text = "Damage RESTRICTED"
					  carSeat.Parent.DE.JB.A.Disabled = true
					  carSeat.Parent.DE.JB.B.Disabled = true
					  carSeat.Parent.DE.JB2.A.Disabled = true
					  carSeat.Parent.DE.JB2.B.Disabled = true
				end
                elseif key == "j" then --Headlights
				 if carSeat.Lights.Value == false then 
				  limitButton.Text = "Lights on"
				  carSeat.Lights.Value = true
				
				  carSeat.Parent.Headlights.A.Lights.Enabled = true --A and B
				  carSeat.Parent.Headlights.A.Braking.Enabled = true
				  carSeat.Parent.Headlights.B.Lights.Enabled = true
				  carSeat.Parent.Headlights.B.Braking.Enabled = true
				
				  carSeat.Parent.Headlights.C.Material = "Neon" --Neons (Body)
				  carSeat.Parent.Headlights.D.Material = "Neon"
				  carSeat.Parent.Headlights.E.Material = "Neon"
				  carSeat.Parent.Parent.Trunk.TL.Material = "Neon" --Neons (Trunk)
				
				  tailLights.E.Light2.Enabled = true
				
				  wait(3)
				  limitButton.Text = ""
				 else carSeat.Lights.Value = false
				  limitButton.Text = "Lights off"
				
				  carSeat.Parent.Headlights.A.Lights.Enabled = false --A and B
				  carSeat.Parent.Headlights.A.Braking.Enabled = false
				  carSeat.Parent.Headlights.B.Lights.Enabled = false
				  carSeat.Parent.Headlights.B.Braking.Enabled = false
				
				  carSeat.Parent.Headlights.C.Material = "SmoothPlastic" --Neons (Body)
				  carSeat.Parent.Headlights.D.Material = "SmoothPlastic"
				  carSeat.Parent.Headlights.E.Material = "SmoothPlastic"
				  carSeat.Parent.Parent.Trunk.TL.Material = "SmoothPlastic" --Neons (Trunk)
				
				  tailLights.E.Light2.Enabled = false
				  wait(3)
				  limitButton.Text = ""
				 end
				elseif key == "p" then --Spoiler
				 if carSeat.Deployed.Value == false then 
				  limitButton.Text = "Spoiler deployed"
				  carSeat.Parent.Parent.Trunk.One.WH2.Motor.DesiredAngle = 0.06
				  carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.DesiredAngle = 0.4
				  carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.MaxVelocity = 0.02
				  carSeat.Deployed.Value = true
				  wait(3)
				  limitButton.Text = ""
				 else carSeat.Deployed.Value = false
				 limitButton.Text = "Spoiler retracted"
				  carSeat.Parent.Parent.Trunk.One.WH2.Motor.DesiredAngle = 0
				  carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.DesiredAngle = 0
				  carSeat.Parent.Parent.SpoilerSys.Two.WH3.Motor.MaxVelocity = -0.05
				  wait(3)
				  limitButton.Text = ""
				 end
				elseif key == "b" then --Window controls
				 if windows == false then 
					winfob.Visible = true
					windows = true
				 else windows = false
					winfob.Visible = false
				 end

				--// Indicators
				elseif key == "q" then
					q = true
					if not leftin then
						leftin = true
						for i,v in pairs(carSeat.Parent:GetChildren()) do
							coroutine.resume(coroutine.create(function()
								if v.Name == "LeftIndicator" then
									while leftin do
										script.Parent:WaitForChild("TickTock").Pitch = 1
										script.Parent.TickTock:Play()
										v.PointLight.Enabled = false
										v.BillboardGui.Enabled = false
										limitButton.Parent.Left.Visible = false
										wait(0.35)
										script.Parent.TickTock.Pitch = .8
										script.Parent.TickTock:Play()
										v.BillboardGui.Enabled = true
										v.PointLight.Enabled = true
										limitButton.Parent.Left.Visible = true
										wait(0.35)
									end
									v.PointLight.Enabled = false
									v.BillboardGui.Enabled = false
									limitButton.Parent.Left.Visible = false
								end
							end))
						end
					else
						leftin = false
					end
				elseif key == "e" then
					e = true
					if not rightin then
						rightin = true
						for i,v in pairs(carSeat.Parent:GetChildren()) do
							coroutine.resume(coroutine.create(function()
								if v.Name == "RightIndicator" then
									while rightin do
										script.Parent:WaitForChild("TickTock").Pitch = 1
										script.Parent.TickTock:Play()
										v.PointLight.Enabled = false
										v.BillboardGui.Enabled = false
										limitButton.Parent.Right.Visible = false
										wait(0.35)
										script.Parent.TickTock.Pitch = .8
										script.Parent.TickTock:Play()
										v.BillboardGui.Enabled = true
										v.PointLight.Enabled = true
										limitButton.Parent.Right.Visible = true
										wait(0.35)
									end
									v.PointLight.Enabled = false
									v.BillboardGui.Enabled = false
									limitButton.Parent.Right.Visible = false
								end
							end))
						end
					else
						rightin = false
					    end
					end
				end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
		lightOn = false
		carSeat.Torque = cst
		tailLights.A.Transparency = 0.7
		tailLights.A.Material = "SmoothPlastic"
		tailLights.A.BrickColor = BrickColor.new("Ghost grey")
		
		tailLights.B.Transparency = 0.7
		tailLights.B.Material = "SmoothPlastic"
		tailLights.B.BrickColor = BrickColor.new("Ghost grey")
		
		carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Transparency = 0.7
		carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.Material = "SmoothPlastic"
		carSeat.Parent.Parent.SpoilerSys.Spoiler.BL.BrickColor = BrickColor.new("Ghost grey")
		
		tailLights.E.Lights.Enabled = false 
        end
end)   