local lib = getgenv().Library local out = {} local function clickButton(title) for _, d in ipairs(lib.Open.Gui:GetDescendants()) do if d:IsA("TextButton") and d.Name == "Button_" .. title then if firesignal then pcall(firesignal, d.MouseButton1Click) else pcall(function() d:Activate() end) end return true end end return false end local plr = game.Players.LocalPlayer local hrp = plr.Character.HumanoidRootPart -- remember where we are and move somewhere recognisable first local startPos = Vector3.new(-694, 258, -684) -- backpack shop hrp.CFrame = CFrame.new(startPos) task.wait(1.5) local before = hrp.Position out[#out+1] = "player at " .. string.format("%.0f,%.0f,%.0f", before.X, before.Y, before.Z) local moneyBefore = plr.stored.Money.Value -- buy a cheap car we don't own lib.Registry["Garage Vehicle"].Set("2003 TrailBZ") clickButton("Purchase Vehicle") task.wait(22) local car, driving, carPos = nil, false, nil for _, c in ipairs(workspace.CivCars:GetChildren()) do local o = c:FindFirstChild("Owner") if o and o.Value == plr.Name then car = c.Name local seat = c:FindFirstChild("DriveSeat") driving = seat and seat.Occupant ~= nil local p = c.PrimaryPart or c:FindFirstChildWhichIsA("BasePart") carPos = p and p.Position end end local hrp2 = plr.Character.HumanoidRootPart out[#out+1] = string.format("after: player at %.0f,%.0f,%.0f (moved %.0f studs)", hrp2.Position.X, hrp2.Position.Y, hrp2.Position.Z, (hrp2.Position - before).Magnitude) out[#out+1] = "car: " .. tostring(car) .. " | driving: " .. tostring(driving) .. " | car to player: " .. tostring(carPos and math.floor((carPos - hrp2.Position).Magnitude)) out[#out+1] = "money: " .. moneyBefore .. " -> " .. plr.stored.Money.Value print("RESULTS: " .. table.concat(out, "\n"))