local lib = getgenv().Library local plr = game.Players.LocalPlayer local function clickButton(title) for _, d in ipairs(lib.Open.Gui:GetDescendants()) do if d:IsA("TextButton") and d.Name == "Button_" .. title then firesignal(d.MouseButton1Click) return true end end return false end lib.Registry["Garage Vehicle"].Set("2001Ram 3500") clickButton("Spawn Vehicle") task.wait(22) local car for _, c in ipairs(workspace.CivCars:GetChildren()) do local o = c:FindFirstChild("Owner") if o and o.Value == plr.Name then car = c end end print("[test] car out:", car and car.Name or "none") if not car then return end local function partOf(c) return c.PrimaryPart or c:FindFirstChildWhichIsA('BasePart') end local startPos = partOf(car).Position local hrp = plr.Character.HumanoidRootPart print(string.format("[test] car at %.0f,%.0f,%.0f | player at %.0f,%.0f,%.0f", startPos.X, startPos.Y, startPos.Z, hrp.Position.X, hrp.Position.Y, hrp.Position.Z)) local hum = plr.Character:FindFirstChildOfClass("Humanoid") print("[test] seated before colour:", tostring(hum.SeatPart ~= nil)) lib.Registry["Select Body Color"].Set("Lime") clickButton("Apply Body Color") task.wait(16) local car2 for _, c in ipairs(workspace.CivCars:GetChildren()) do local o = c:FindFirstChild("Owner") if o and o.Value == plr.Name then car2 = c end end local paint for _, d in ipairs(car2:GetDescendants()) do if d.Name == "Paint" then paint = d break end end local moved = (partOf(car2).Position - startPos).Magnitude print(string.format("[test] after: paint=%s seated=%s carMovedFromOldSpot=%.0f studs", tostring(paint and paint.Color), tostring(hum.SeatPart ~= nil), moved))