local e=script.Parent local Q=script.Parent.Parent.Car.Value local L=script.Parent.StartD local Z=script.Parent.StartChime L.Parent=Q.DriveSeat e.MouseButton1Click:connect(function()if script.Parent.Text=="\069\110\103\105\110\101\058 \079\070\070"then Z:play()wait(1)L:Play()wait(2.7)script.Parent.Parent.IsOn.Value=true e.Text="\069\110\103\105\110\101\058 \079\110"script.Parent.Parent.AC6C_Stock_Gauges:TweenPosition(UDim2.new(0,0,-0.3,0),"\079\117\116","\081\117\097\100",1)wait(3)script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1,-200,1,-100),"\079\117\116","\081\117\097\100",1)script.Parent.Notif:play()L:stop()Z:Stop()wait(3)script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1,0,1,-100),"\079\117\116","\081\117\097\100",1)else script.Parent.Parent.IsOn.Value=false e.Text="\069\110\103\105\110\101\058 \079\070\070"script.Parent.EngineOff:play()end end)
-- Variables (best not to touch these!)
local button = script.Parent
local car = script.Parent.Parent.Car.Value
local sound = script.Parent.StartD
local startsound = script.Parent.StartChime
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Text == "Engine: OFF" then -- If the text says it's off then..
		startsound:play()
		wait(1)
		sound:Play()
		wait(2.7)
		script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"
		script.Parent.Parent.AC6C_Stock_Gauges:TweenPosition(UDim2.new(0, 0, -0.3, 0), "Out", "Quad", 1)

		wait(3)
		script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, -200, 1, -100), "Out", "Quad", 1)
		script.Parent.Notif:play()
		sound:stop()
		startsound:Stop()

		wait(3)
		script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, 0, 1, -100), "Out", "Quad", 1)
	else -- If it's on then when you click the button,
		script.Parent.Parent.IsOn.Value = false -- The car is turned off.

		button.Text = "Engine: OFF"
		script.Parent.EngineOff:play()
	end -- Don't touch this.
end) -- And don't touch this either.
