function module.ExitSeat()local O=getLocalHumanoid()if not O then return false end local V=O.Parent if V.Humanoid.Sit==true then for O,V in ipairs(V.HumanoidRootPart:GetJoints())do if V.Name=="\083\101\097\116\087\101\108\100"then local O=V.Part0:FindFirstChild("\080\114\111\109\112\116\076\111\099\097\116\105\111\110")if O then local b=O:FindFirstChildWhichIsA("\080\114\111\120\105\109\105\116\121\080\114\111\109\112\116")if b and b.Name=="\069\110\100\111\114\115\101\100\086\101\104\105\099\108\101\080\114\111\120\105\109\105\116\121\080\114\111\109\112\116\086\049"then for O,b in pairs(module.OnExitFunctions)do b(V.Part0)end ExitSeat:FireServer()for O,V in pairs(AnimationTracks)do V:Stop()end return true end end end end end end
---Exit function
function module.ExitSeat()
	local humanoid = getLocalHumanoid()
	if not humanoid then
		return false
	end
	local character = humanoid.Parent
	if character.Humanoid.Sit == true then
		for _, joint in ipairs(character.HumanoidRootPart:GetJoints()) do
			if joint.Name == "SeatWeld" then
				local promptLocation = joint.Part0:FindFirstChild("PromptLocation")
				if promptLocation then
					local proximityPrompt = promptLocation:FindFirstChildWhichIsA("ProximityPrompt")
					if proximityPrompt and proximityPrompt.Name == "EndorsedVehicleProximityPromptV1" then
						for _, func in pairs(module.OnExitFunctions) do
							func(joint.Part0)
						end
						ExitSeat:FireServer()
						-- stop playing animations

						for name, track in pairs(AnimationTracks) do
							track:Stop()
						end

						return true
					end
				end
			end
		end
	end
end
