local lib = getgenv().Library local plr = game.Players.LocalPlayer local hum = plr.Character:FindFirstChildOfClass("Humanoid") if hum.SeatPart then hum.Sit = false hum.Jump = true task.wait(1) end local hrp = plr.Character.HumanoidRootPart -- walk-style teleport off the pad, then settle hrp.CFrame = CFrame.new(-694, 259, -684) task.wait(2) local startPos = hrp.Position print(string.format("[test] start %.0f,%.0f,%.0f | money %d | seated %s", startPos.X, startPos.Y, startPos.Z, plr.stored.Money.Value, tostring(hum.SeatPart ~= nil))) lib.Registry["Garage Vehicle"].Set("BansheeYamaha") local btn for _, d in ipairs(lib.Open.Gui:GetDescendants()) do if d:IsA("TextButton") and d.Name == "Button_Purchase Vehicle" then btn = d end end firesignal(btn.MouseButton1Click) task.wait(28) local cars, driving, carPos = {}, false, nil for _, c in ipairs(workspace.CivCars:GetChildren()) do local o = c:FindFirstChild("Owner") if o and o.Value == plr.Name then table.insert(cars, c.Name) local seat = c:FindFirstChild("DriveSeat") if seat and seat.Occupant then driving = true end local p = c.PrimaryPart or c:FindFirstChildWhichIsA("BasePart") carPos = p and p.Position end end local p = plr.Character.HumanoidRootPart.Position print(string.format("[test] end: money=%d cars=%s inSeat=%s playerAt %.0f,%.0f,%.0f (%.0f studs from start) car %.0f studs away", plr.stored.Money.Value, table.concat(cars, ","), tostring(driving), p.X, p.Y, p.Z, (p - startPos).Magnitude, carPos and (carPos - p).Magnitude or -1))