print("\065\100\100 \115\101\097\116")local F,y=SeatingModule.AddSeat(driverSeat)print("\083\101\097\116 \097\100\100\101\100")F.Name="\069\110\116\101\114\069\118\101\110\116"F.Parent=driverSeat y.Name="\069\120\105\116\069\118\101\110\116"y.Parent=driverSeat for F,y in pairs(AdditionalSeats)do if y then SeatingModule.AddSeat(y)end end local t=nil local n=driverSeat:WaitForChild("\069\110\116\101\114\069\118\101\110\116")local j=driverSeat:WaitForChild("\069\120\105\116\069\118\101\110\116")n.Event:Connect(function(F)print("\067\065\082 \083\069\065\084 \069\078\084\069\082\069\068")t=driverScript:Clone()t.Name="\067\117\114\114\101\110\116\068\114\105\118\101\114"t.CarValue.Value=root t.Parent=F.Backpack t.Disabled=false t.RedressController.Disabled=false driverSeat:SetNetworkOwner(F)end)j.Event:Connect(function(F)if t then t:Destroy()driverSeat:SetNetworkOwner()end end)

print("Add seat")
local Enter,Exit = SeatingModule.AddSeat(driverSeat)
print("Seat added")
Enter.Name = "EnterEvent"
Enter.Parent = driverSeat
Exit.Name = "ExitEvent"
Exit.Parent = driverSeat

for i,v in pairs(AdditionalSeats) do
	if v then
		SeatingModule.AddSeat(v)
	end
end

local driverScriptClone = nil
local enterEvent = driverSeat:WaitForChild("EnterEvent")
local exitEvent = driverSeat:WaitForChild("ExitEvent")

enterEvent.Event:Connect(function(player)
	print("CAR SEAT ENTERED")
	driverScriptClone = driverScript:Clone()
	driverScriptClone.Name = "CurrentDriver"
	driverScriptClone.CarValue.Value = root
	driverScriptClone.Parent = player.Backpack
	driverScriptClone.Disabled = false
	driverScriptClone.RedressController.Disabled = false
	driverSeat:SetNetworkOwner(player)
end)

exitEvent.Event:Connect(function(player)
	if driverScriptClone then
		driverScriptClone:Destroy()
		driverSeat:SetNetworkOwner()
	end
end)
