Skip to content

Instantly share code, notes, and snippets.

@vdsabev
Last active March 13, 2025 07:50
Show Gist options
  • Save vdsabev/bbbd13d483ba276304bbf777a4c2563b to your computer and use it in GitHub Desktop.
Save vdsabev/bbbd13d483ba276304bbf777a4c2563b to your computer and use it in GitHub Desktop.
Block ads on fly.pieter.com and fly.zullo.fun (sorry guys I just want to fly around :))
function blockAds() {
const ads = [
'banner',
'beachTextMesh',
'billboard',
'billboard2',
'blimp2Group',
'blimp3Group',
'blimpGroup',
'castle', // Sadly can't only hide the text
'chatBubbleMainGroup',
'floatingHouseLabel',
'flyThroughRingText',
'hotAirBalloon2Group',
'hotAirBalloon3Group',
'hotAirBalloonGroup',
'iphoneBillboard',
'iphoneBillboardPoleLeft',
'iphoneBillboardPoleRight',
'islandTextBanner2Plane',
'islandTextBannerPlane',
'jupiterBanner',
'lindyBanner',
'marsBanner',
'medviBlimpGroup',
'mountainSign',
'prisonBanner',
'shapedBillboard',
'textCloudGroup',
'ufoGroup',
];
for (const ad of ads) {
try {
eval(`${ad}.visible = false`);
} catch (error) {
console.error(`${ad} not found`);
}
}
}
function blockAds(children = game.sceneManager.scene.children) {
for (const child of children) {
if (child.userData.isClickable) {
child.visible = false;
}
blockAds(child.children);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment