function Engine.new(Q)local z={}setmetatable(z,Engine)z.Speeder=Q z.Main=Q.main z.Mass=Q.mass local Y=Instance.new("\065\116\116\097\099\104\109\101\110\116")Y.Parent=Q.main z.Thruster=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")z.Thruster.Name="\084\104\114\117\115\116\101\114"z.Thruster.Parent=Q.main z.Steering=Instance.new("\066\111\100\121\071\121\114\111")z.Steering.Name="\083\116\101\101\114\105\110\103"z.Steering.Parent=Q.main z._settings=Q._settings z._SPEED=z._settings.DefaultSpeed z._BOOSTSPEED=z._settings.BoostSpeed z._PITCH=(3.5*z._settings.Steering)*(math.pi/180)z._YAW=(-4*z._settings.Steering)*(math.pi/180)z._ROLL=(2*z._settings.Steering)*(math.pi/180)EngineRate=IIRFilter(.005)StartSound:Play()local J J=StartSound.Ended:Connect(function()MotorSound:Play()J:Disconnect()end)return z end
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================
function Engine.new(speeder)
	local newEngine = {}
	setmetatable(newEngine, Engine)

	newEngine.Speeder = speeder
	newEngine.Main = speeder.main
	newEngine.Mass = speeder.mass

	-- Attachment
	local attachment = Instance.new("Attachment")
	attachment.Parent = speeder.main

	-- Thruster (foward/backward)
	newEngine.Thruster = Instance.new("BodyVelocity")
	newEngine.Thruster.Name = "Thruster"
	newEngine.Thruster.Parent = speeder.main

	-- Gyro (steering)
	newEngine.Steering = Instance.new("BodyGyro")
	newEngine.Steering.Name = "Steering"
	newEngine.Steering.Parent = speeder.main

	newEngine._settings = speeder._settings

	-- Set settings
	newEngine._SPEED = newEngine._settings.DefaultSpeed
	newEngine._BOOSTSPEED = newEngine._settings.BoostSpeed
	newEngine._PITCH = (3.5 * newEngine._settings.Steering) * (math.pi / 180)
	newEngine._YAW = (-4 * newEngine._settings.Steering) * (math.pi / 180)
	newEngine._ROLL = (2 * newEngine._settings.Steering) * (math.pi / 180)

	EngineRate = IIRFilter(0.005)

	StartSound:Play()
	local soundConnection
	soundConnection = StartSound.Ended:Connect(function()
		MotorSound:Play()
		soundConnection:Disconnect()
	end)

	return newEngine
end -- Engine:new()
