Skip to content

Instantly share code, notes, and snippets.

@DuyNgao2306
Created May 18, 2026 23:39
Show Gist options
  • Select an option

  • Save DuyNgao2306/9a1456280ab407915f0d42d25642a757 to your computer and use it in GitHub Desktop.

Select an option

Save DuyNgao2306/9a1456280ab407915f0d42d25642a757 to your computer and use it in GitHub Desktop.
const URL = "https://gist.githubusercontent.com/DuyNgao2306/84b67dd6e368b4d4a0d35fa9000cadb6/raw/74596e7ae372aa253565cb75bf911d37123143c7/Fix_Lag.lua";
let currentCode = null;
async function run() {
try {
const code = await fetch(URL + "?t=" + Date.now())
.then(r => r.text());
// nếu không đổi thì bỏ qua
if (code === currentCode) return;
console.log("🔄 Update script");
// cleanup script cũ
if (window.__cleanup__) {
try { window.__cleanup__(); } catch(e){}
}
window.__cleanup__ = null;
// chạy script mới
new Function(code)();
currentCode = code;
} catch (e) {
console.error(e);
}
}
run();
setInterval(run, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment