def toggle_zeus(): global scripts if scripts['zeus_started']: scripts['zeus_started'] = False NewThread( target=lambda: cmd_run('taskkill /f /im hnh_zeus.exe')).start() ui.ahkzeusButton.setText('On') else: NewThread(target=lambda: cmd_run('hnh_zeus.vbs')).start() scripts['zeus_started'] = True ui.ahkzeusButton.setText('Off')
def toggle_cross_hair(): global scripts if scripts['cross_hair_running']: scripts['cross_hair_running'] = False NewThread(target=lambda: cmd_run('taskkill /f /im hnh_crosshair.exe') ).start() ui.crosshairButton.setText('On') else: scripts['cross_hair_running'] = True NewThread(target=lambda: run_program('crosshair\\hnh_crosshair.exe') ).start() ui.crosshairButton.setText('Off')
def toggle_shake(): global scripts if scripts['shake_started']: scripts['shake_started'] = False scripts['shake_running'] = False NewThread( target=lambda: cmd_run('taskkill /f /im hnh_shake.exe')).start() ui.ahkshakeButton.setText('On') else: scripts['shake_started'] = True ui.ahkshakeButton.setText('Off')
def toggle_trigger(): global scripts if scripts['trigger_started']: scripts['trigger_started'] = False scripts['trigger_running'] = False NewThread( target=lambda: cmd_run('taskkill /f /im hnh_trigger.exe')).start() ui.ahktriggerButton.setText('On') else: scripts['trigger_started'] = True ui.ahktriggerButton.setText('Off')
def toggle_no_recoil(): global scripts if scripts['recoil_started']: scripts['recoil_started'] = False scripts['recoil_running'] = False NewThread(target=lambda: cmd_run('taskkill /f /im hnh_no_recoil.exe') ).start() ui.ahknorecoilButton.setText('On') else: scripts['recoil_started'] = True ui.ahknorecoilButton.setText('Off')
def toggle_fast_zoom(): global scripts if scripts['zoom_started']: scripts['zoom_started'] = False scripts['zoom_running'] = False NewThread(target=lambda: cmd_run('taskkill /f /im hnh_fastzoom.exe') ).start() ui.ahkfastzoomButton.setText('On') else: scripts['zoom_started'] = True ui.ahkfastzoomButton.setText('Off')
def toggle_bunny_hop(): global scripts if scripts['bunny_hop_started']: scripts['bunny_hop_started'] = False scripts['bunny_hop_running'] = False NewThread( target=lambda: cmd_run('taskkill /f /im hnh_bhop.exe')).start() ui.ahkbhopButton.setText('On') else: scripts['bunny_hop_started'] = True ui.ahkbhopButton.setText('Off')
def setup_ui(): ui.ahkbhopButton.clicked.connect(toggle_bunny_hop) ui.crosshairButton.clicked.connect(toggle_cross_hair) ui.ahkfastzoomButton.clicked.connect(toggle_fast_zoom) ui.ahknorecoilButton.clicked.connect(toggle_no_recoil) ui.ahkshakeButton.clicked.connect(toggle_shake) ui.ahktriggerButton.clicked.connect(toggle_trigger) ui.ahkzeusButton.clicked.connect(toggle_zeus) if __name__ == '__main__': app = Widgets.QApplication([__name__]) MainWindow = Widgets.QMainWindow() ui = NewMainWindow() ui.setupUi(MainWindow) MainWindow.show() if csgo_is_not_ran(): msg = MessageBox() msg.setIcon(MessageBox.Warning) msg.setWindowTitle('Warning!') msg.setText('CSGO is not launched!') msg.show() setup_ui() NewThread(target=check_window).start() result = app.exec_() running = False kill_all() clear_cache() exit_(result)
def toggle_server(self): if self.is_server_on: self.runserver_btn.text = 'Run Server!' self.shutdown() self.is_server_on = False else: self.port = int(self.port_text.text) if self.port < 1 or self.port > 27125: self.port = 5000 self.port_text.text = str(self.port) self.app = FlaskApp(__name__, static_folder=self.path, template_folder=self.path) cors_for_flask(self.app) @self.app.route('/shutdown_this_fucking_server') def shutdown_this_fucking_server(): if self.can_shutdown: func = req.environ.get('werkzeug.server.shutdown') if func: func() return 'True' else: return 'False' else: return 'False' @self.app.route('/') def main_index(): index_path = join_path(self.path, 'index') if file_exists(index_path + '.html', file_exists_param): return self.fastread(join_path(self.path, 'index.html')) elif file_exists(index_path + '.htm', file_exists_param): return self.fastread(join_path(self.path, 'index.htm')) else: return self.error404() @self.app.route('/<path:url>') def main(url): if is_dir(join_path(self.path, url)): index_path = join_path(self.path, url, 'index') if file_exists(index_path + '.html', file_exists_param): print(join_path(self.path, url, 'index.html')) return self.fastread( join_path(self.path, url, 'index.html')) elif file_exists(index_path + '.htm', file_exists_param): return self.fastread( join_path(self.path, url, 'index.htm')) else: return self.error404() elif url[-5:] == '.html' or url[-4:] == '.htm': joined = join_path(self.path, url) if file_exists(joined, file_exists_param): return self.fastread(joined) else: return self.error404() else: joined = join_path(self.path, url) print(joined) if file_exists(joined, file_exists_param): return self.app.send_static_file(url) else: return self.error404() self.app.use_reloader = False self.can_shutdown = False self.runserver_btn.text = 'Stop Server!' NewThread(target=self.run_app).start() self.is_server_on = True