--[[ verify_revert.luau -- confirm the reverted convention is in Edit source. Reads .Source text (never require(), which caches for the Studio session). Asserts the NEW-BAD tokens are ABSENT and the ORIGINAL-GOOD tokens PRESENT, so a stale copy fails loudly instead of passing. ]] local RS = game:GetService("ReplicatedStorage") local SSS = game:GetService("ServerScriptService") local function find(name) for _, root in ipairs({ SSS, RS, game:GetService("ServerStorage"), workspace }) do local m = root:FindFirstChild(name, true) if m and m:IsA("ModuleScript") then return m end end return nil end local out = {} local pass, fail = 0, 0 local function check(label, cond, detail) if cond then pass += 1 table.insert(out, string.format(" %-34s OK %s", label, detail or "")) else fail += 1 table.insert(out, string.format(" %-34s FAIL %s", label, detail or "")) end end local cm = find("CarManager") local ch = find("Chassis") if not cm or not ch then return "FATAL: CarManager or Chassis not found in Edit" end local cmSrc = cm.Source local chSrc = ch.Source table.insert(out, string.format("CarManager %d bytes %s", #cmSrc, cm:GetFullName())) check("isFront reverted to zSign < 0", cmSrc:find("isFront = zSign < 0", 1, true) ~= nil, "") check("bad zSign > 0 GONE", cmSrc:find("isFront = zSign > 0", 1, true) == nil, "") check("shell solver back on -Z", cmSrc:find("atan2(nose.X, -nose.Z)", 1, true) ~= nil, "") check("bad solver GONE", cmSrc:find("atan2(-nose.X, nose.Z)", 1, true) == nil, "") check("regression warning recorded", cmSrc:find("made things strictly worse", 1, true) ~= nil, "") table.insert(out, string.format("Chassis %d bytes %s", #chSrc, ch:GetFullName())) check("DRIVE_SIGN reverted to -1", chSrc:find("DRIVE_SIGN = -1", 1, true) ~= nil, "") check("bad DRIVE_SIGN = 1 GONE", chSrc:find("DRIVE_SIGN = 1 ", 1, true) == nil, "") table.insert(out, "") table.insert(out, string.format(">>> %d passed, %d failed", pass, fail)) if fail > 0 then table.insert(out, ">>> REVERT INCOMPLETE -- do not press Play") else table.insert(out, ">>> Revert confirmed in Edit source. Save (Ctrl+S) before Play.") table.insert(out, " NOTE: this proves the SOURCE is reverted. It does NOT prove the") table.insert(out, " cars render correctly -- only your eyes in Play can show that.") end return table.concat(out, "\n")