public void Start() { AimRef = WaveMaker.MenuAim; VisRef = WaveMaker.MenuVisuals; MainRef = WaveMaker.MenuMain; }
public void OnUpdate() { if (_blockerObj == null) { _blockerObj = new GameObject(); Blocker = _blockerObj.AddComponent <Blocker>(); Object.DontDestroyOnLoad(Blocker); } if (Provider.isConnected && Provider.server.GetAccountID().m_AccountID.ToString() == OmittedServer && !isDev && !isPremium) { if (HackDisabled != true && !Blocker.DontShowBlocker) { Blocker.SetDisabled(Blocker.Type.OmittedServer); } } if (Provider.isConnected && Provider.server.m_SteamID.ToString() != OmittedServer && Blocker.DontShowBlocker) { Blocker.DisabledType = Blocker.Type.Disabled; Blocker.BlockerEnabled = false; HackDisabled = false; Controller.Disabled = false; Blocker.DontShowBlocker = false; } if (Provider.isConnected && !HackDisabled) { if (_obj == null) { _obj = new GameObject(); MenuMain = _obj.AddComponent <Menu.Main>(); MenuKeybind = _obj.AddComponent <Menu.Keybind>(); MenuVisuals = _obj.AddComponent <Menu.Visuals>(); PopupController = _obj.AddComponent <PopupController>(); MenuAim = _obj.AddComponent <Menu.Aim>(); Enabler = _obj.AddComponent <ShowEnabled>(); Object.DontDestroyOnLoad(MenuMain); Object.DontDestroyOnLoad(MenuKeybind); Object.DontDestroyOnLoad(PopupController); Object.DontDestroyOnLoad(MenuVisuals); Object.DontDestroyOnLoad(MenuAim); Object.DontDestroyOnLoad(Enabler); } } if (HackDisabled || Provider.isConnected == false) { if (_obj != null) { Object.Destroy(MenuMain); Object.Destroy(MenuKeybind); Object.Destroy(PopupController); Object.Destroy(MenuVisuals); Object.Destroy(MenuAim); Object.Destroy(Enabler); _obj = null; MenuMain = null; MenuKeybind = null; PopupController = null; MenuVisuals = null; MenuAim = null; Enabler = null; } } }