Vulcan't Autotoggle fly Script.
-
Base is taken from the other person who made that autotoggle script. Tested on Eu.loyisa.cn
const script = registerScript({ name: "AutoToggle", version: "1.0.0", authors: ["IgniteTNT"] }); script.registerModule({ name: "AutoToggle", category: "Misc", description: "Automatically toggles on and off different modules.", settings: { freezeDelayTicks: Setting.int({ name: "Freeze Initial Delay Ticks", default: 20, range: [0, 100] }), freezeOnTicks: Setting.int({ name: "Freeze On Ticks", default: 10, range: [0, 100] }), blinkOnTicks: Setting.int({ name: "Blink On Ticks", default: 10, range: [0, 100] }), flyOnTicks: Setting.int({ name: "Fly On Ticks", default: 100, range: [0, 100] }), freezeDelayAfterFlyTicks: Setting.int({ name: "Freeze Delay After Fly Ticks", default: 20, range: [0, 100] }) } }, (mod) => { let ticksPassed = 0; let currentStep = 0; let cycleExecuted = false; const freezeModule = Client.moduleManager.getModuleByName("Freeze"); const blinkModule = Client.moduleManager.getModuleByName("Blink"); const flyModule = Client.moduleManager.getModuleByName("Fly"); const autoToggleModule = mod; if (!freezeModule || !blinkModule || !flyModule) { Client.displayChatMessage("§cOne or more modules not found."); return; } mod.on("enable", () => { currentStep = 0; ticksPassed = 0; }); mod.on("disable", () => { freezeModule.enabled = false; blinkModule.enabled = false; flyModule.enabled = false; ticksPassed = 0; currentStep = 0; cycleExecuted = false; }); mod.on("playerTick", () => { if (!cycleExecuted) { ticksPassed++; switch (currentStep) { case 0: // Initial delay before enabling Freeze if (ticksPassed >= mod.settings.freezeDelayTicks.value) { freezeModule.enabled = true; currentStep = 1; ticksPassed = 0; } break; case 1: // Enable Freeze if (ticksPassed >= mod.settings.freezeOnTicks.value) { freezeModule.enabled = false; blinkModule.enabled = true; currentStep = 2; ticksPassed = 0; } break; case 2: // Enable Blink if (ticksPassed >= mod.settings.blinkOnTicks.value) { flyModule.enabled = true; currentStep = 3; ticksPassed = 0; } break; case 3: // Enable Fly if (ticksPassed >= mod.settings.flyOnTicks.value) { freezeModule.enabled = true; blinkModule.enabled = false; currentStep = 4; ticksPassed = 0; } break; case 4: // Delay with Freeze enabled if (ticksPassed >= mod.settings.freezeDelayAfterFlyTicks.value) { freezeModule.enabled = false; currentStep = 5; ticksPassed = 0; } break; case 5: // Turn everything off flyModule.enabled = false; autoToggleModule.disable(); currentStep = 0; ticksPassed = 0; cycleExecuted = true; break; } } }); });