version = "1.0" import win32api, win32con, win32gui, win32process, psutil, time, threading, random, winsound, os, json, subprocess, sys, asyncio, itertools, pyMeow, base64, re import dearpygui.dearpygui as dpg from pypresence import Presence class configListener(dict): # Detecting changes to config def __init__(self, initialDict): for k, v in initialDict.items(): if isinstance(v, dict): initialDict[k] = configListener(v) super().__init__(initialDict) def __setitem__(self, item, value): if isinstance(value, dict): _value = configListener(value) else: _value = value super().__setitem__(item, _value) try: # Trash way of checking if Sharp class is initialized sharpClass except: while True: try: sharpClass break except: time.sleep(0.1) pass if sharpClass.config["misc"]["saveSettings"]: json.dump(sharpClass.config, open(f"{os.environ['LOCALAPPDATA']}\\temp\\{hwid}", "w", encoding="utf-8"), indent=4) class sharp(): def __init__(self, hwid: str): self.config = { "left": { "enabled": False, "mode": "Hold", "bind": 0, "averageCPS": 12, "onlyWhenFocused": True, "breakBlocks": False, "RMBLock": False, "blockHit": False, "blockHitChance": 25, "shakeEffect": False, "shakeEffectForce": 5, "soundPath": "", "workInMenus": False, "blatant": False, }, "right": { "enabled": False, "mode": "Hold", "bind": 0, "averageCPS": 12, "onlyWhenFocused": True, "LMBLock": False, "shakeEffect": False, "shakeEffectForce": False, "soundPath": "", "workInMenus": False, "blatant": False }, "recorder": { "enabled": False, "record": [0.08] # Default 12 CPS }, "overlay": { "enabled": False, "onlyWhenFocused": True, "x": 0, "y": 0 }, "misc": { "saveSettings": True, "guiHidden": False, "bindHideGUI": 0, "discordRichPresence": True } } if os.path.isfile(f"{os.environ['LOCALAPPDATA']}\\temp\\{hwid}"): try: config = json.loads(open(f"{os.environ['LOCALAPPDATA']}\\temp\\{hwid}", encoding="utf-8").read()) isConfigOk = True for key in self.config: if not key in config or len(self.config[key]) != len(config[key]): isConfigOk = False break if isConfigOk: if not config["misc"]["saveSettings"]: self.config["misc"]["saveSettings"] = False else: self.config = config except: pass self.config = configListener(self.config) self.record = itertools.cycle(self.config["recorder"]["record"]) threading.Thread(target=self.discordRichPresence, daemon=True).start() threading.Thread(target=self.windowListener, daemon=True).start() threading.Thread(target=self.leftBindListener, daemon=True).start() threading.Thread(target=self.rightBindListener, daemon=True).start() threading.Thread(target=self.hideGUIBindListener, daemon=True).start() threading.Thread(target=self.leftClicker, daemon=True).start() threading.Thread(target=self.rightClicker, daemon=True).start() def discordRichPresence(self): asyncio.set_event_loop(asyncio.new_event_loop()) discordRPC = Presence("1044302531272126534") discordRPC.connect() startTime = time.time() states = [ "Not cheating unless you get caught ;)", "The #1 Minecraft AutoClicker by Bambou" ] while True: if self.config["misc"]["discordRichPresence"]: discordRPC.update(state=random.choice(states), start=startTime, large_image="logo", large_text="#1 Minecraft AutoClicker", buttons=[{"label": "Website", "url": "https://github.com/B4mb0u/Sharp"}]) else: discordRPC.clear() time.sleep(15) def windowListener(self): while True: currentWindow = win32gui.GetForegroundWindow() self.realTitle = win32gui.GetWindowText(currentWindow) self.window = win32gui.FindWindow("LWJGL", None) try: self.focusedProcess = psutil.Process(win32process.GetWindowThreadProcessId(currentWindow)[-1]).name() except: self.focusedProcess = "" time.sleep(0.5) def overlay(self): try: # Trash way of checking if config, focusedProcess and realTitle are initialized self.focusedProcess self.realTitle self.config except: while True: try: self.focusedProcess self.realTitle self.config break except: time.sleep(0.1) pass pyMeow.overlay_init(title="Sharp - Overlay") # image = base64.b64decode(re.sub("data:image/png;base64", "", "iVBORw0KGgoAAAANSUhEUgAAAcIAAAEpCAYAAAAAmyIEAAAgAElEQVR4Xu2dCdxew/X4ByH2oCgRJELShNpLqCX2JaoJUnsISkvVUmJvQu1aiV1FiCWINQi1J7ZGUQmxFRWC2CWaWmKb3znPv2/+r3jf97n3zsx9nnnmez+f98Pnkzsz53zPPPfcO3PmnLkMFwQgAAEIQCBhAnMlrDuqQwACEIAABAyOkEkAAQhAAAJJE8ARJm1+lIcABCAAARwhcwACEIAABJImgCNM2vwoDwEIQAACOELmAAQgAAEIJE0AR5i0+VEeAhCAAARwhMwBCEAAAhBImgCOMGnzozwEIAABCOAImQMQgAAEIJA0ARxh0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/KQwACEIAAjpA5AAEIQAACSRPAESZtfpSHAAQgAAEcIXMAAhCAAASSJoAjTNr8KA8BCEAAAjhC5gAEIAABCCRNAEeYtPlRHgIQgAAEcITMAQhAAAIQSJoAjjBp86M8BCAAAQjgCJkDEIAABCCQNAEcYdLmR3kIQAACEMARMgcgAAEIQCBpAjjCpM2P8hCAAAQggCNkDkAAAhCAQNIEcIRJmx/lIQABCEAAR8gcgAAEIACBpAngCJM2P8pDAAIQgACOkDkAAQhAAAJJE8ARJm1+lIcABCAAARwhcwACEIAABJImgCNM2vwoDwEIQAACOELmAAQgAAEIJE0AR5i0+VEeAhCAAARwhMwBCEAAAhBImgCOMGnzozwEIAABCOAImQMQgAAEIJA0ARxh0uZHeQhAAAIQwBEyByAAAQhAIGkCOMKkzY/yEIAABCCAI2QOQAACEIBA0gRwhEmbH+UhAAEIQCB5R9itW7d91lprrZGrr766WX755c0KK6xgll12WbPQQguZBRdc0Mw777zm66+/NjNmzDCff/65+fTTT82rr75q/vWvf5lXXnlF/zv++eef36xWU+lnP/uZ/e1vf2vWX3/9itzt2rUz//3vf82///1vM2HCBHPdddeZSZMm1dzOm266qd1hhx2MyGtWWWUV06FDhwrjL774oiLr9ddfb04//fSayzmnHS+66CK78cYbm549e5p55pmn8s/K97XXXjN///vfzQUXXDDk5ZdfPrlW9s877q9+9SvbtWtXs/LKKxv9r9ph0UUXNe3bt6/Md7XJfPPNl6vbWbNmVX4b1lrzySefmA8//NB88MEH5vXXXzcvvfSSmTx5snniiSfqzrYtKbnhhhva/v37mw022MB06dKlwkfZ+L7+85//VObRzJkzK7xefPHFCqdnnnlG51UUrHwzqWV/SQI/+OCD7bbbbmt69+5tFllkEWf+X331lXnqqafM+PHjzdixY0v70Q8bNsweeuihZu65525Th1tvvdXsvPPONbO1sLHrrrtuVc4vvPCCWW211WomZ3MBjzvuODt48OCqD8FvvvnGDB061AwaNKgu5G4J8jHHHGMPPPBAs9JKK1W1QagbPvvss8qLw80332wuu+yyumMlL8P2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BEGgEqXEIAABCAQDwEcYTy2QlIIQAACEAhAAEcYACpdQgACEIBAPARwhPHYCkkhAAEIQCAAARxhAKh0CQEIQAAC8RDAEcZjKySFAAQgAIEABHCEAaDSJQQgAAEIxEMARxiPrZAUAhCAAAQCEMARBoBKlxCAAAQgEA8BHGE8tkJSCEAAAhAIQABHGAAqXUIAAhCAQDwEcITx2ApJIQABCEAgAAEcYQCodAkBCEAAAvEQwBHGYyskhQAEIACBAARwhAGg0iUEIAABCMRDAEcYj62QFAIQgAAEAhDAEQaASpcQgAAEIBAPARxhPLZCUghAAAIQCEAARxgAKl1CAAIQgEA8BHCE8dgKSSEAAQhAIAABHGEAqHQJAQhAAALxEMARxmMrJIUABCAAgQAEcIQBoNIlBCAAAQjEQwBHGI+tkBQCEIAABAIQwBEGgEqXEIAABCAQDwEcYTy2QlIIQAACEAhAAEcYACpdQgACEIBAPARwhPHYCkkhAAEIQCAAARxhAKh0CQEIQAAC8RDAEcZjKySFAAQgAIEABHCEAaDSJQQgAAEIxEMARxiPrZAUAhCAAAQCEMARBoBKlxCAAAQgEA8BHGE8tkJSCEAAAhAIQABHGAAqXUIAAhCAQDwEcITx2ApJIQABCEAgAAEcYQCodAkBCEAAAvEQwBHGYyskhQAEIACBAARwhAGg0iUEIAABCMRDAEcYj62QFAIQgAAEAhDAEQaASpcQgAAEIBAPARxhPLZCUghAAAIQCEAARxgAKl1CAAIQgEA8BHCE8dgKSSEAAQhAIAABHGEAqHQJAQhAAALxEMARxmMrJIUABCAAgQAEcIQBoNIlBCAAAQjEQwBHGI+tkBQCEIAABAIQwBEGgEqXEIAABCAQDwEcYTy2QlIIQAACEAhAAEcYACpdQgACEIBAPARwhPHYCkkhAAEIQCAAARxhAKh0CQEIQAAC8RDAEcZjKySFAAQgAIEABHCEAaDSJQQgAAEIxEMARxiPrZAUAhCAAAQCEMARBoBKlxCAAAQgEA+B/wNYItca7fbGrAAAAABJRU5ErkJggg==")) # logo = pyMeow.load_texture_bytes(".png", image) while pyMeow.overlay_loop(): if not self.config["overlay"]["enabled"]: pyMeow.overlay_close() continue if not "java" in self.focusedProcess and not "AZ-Launcher" in self.focusedProcess: if self.config["overlay"]["onlyWhenFocused"]: pyMeow.end_drawing() time.sleep(0.5) continue else: rect = (0, 0) try: # so it doesn't crash when Minecraft closed if not rect: rect = pyMeow.get_window_info(self.realTitle) except: time.sleep(0.5) continue pyMeow.begin_drawing() # pyMeow.draw_texture(logo, rect[0]+2, rect[1]+2, pyMeow.get_color(""), 0, 0.5) # Modules pyMeow.draw_text(f"Left", rect[0]+self.config["overlay"]["x"]+2, rect[1]+self.config["overlay"]["y"]+2, 15, pyMeow.get_color("orange")) pyMeow.draw_text(f"Right", rect[0]+self.config["overlay"]["x"]+2, rect[1]+self.config["overlay"]["y"]+16.9, 15, pyMeow.get_color("orange")) # Modules Status pyMeow.draw_text(f"[Enabled]" if self.config["left"]["enabled"] else "[Disabled]", rect[0]+self.config["overlay"]["x"]+40, rect[1]+self.config["overlay"]["y"]+2, 15, pyMeow.get_color("green") if self.config["left"]["enabled"] else pyMeow.get_color("red")) pyMeow.draw_text(f"[Enabled]" if self.config["right"]["enabled"] else "[Disabled]", rect[0]+self.config["overlay"]["x"]+40, rect[1]+self.config["overlay"]["y"]+16.9, 15, pyMeow.get_color("green") if self.config["right"]["enabled"] else pyMeow.get_color("red")) pyMeow.end_drawing() rect = None time.sleep(0.1) def leftClicker(self): while True: if not self.config["recorder"]["enabled"]: if self.config["left"]["blatant"]: delay = 1 / self.config["left"]["averageCPS"] else: delay = random.random() % (2 / self.config["left"]["averageCPS"]) else: delay = float(next(self.record)) if self.config["left"]["enabled"]: if self.config["left"]["mode"] == "Hold" and not win32api.GetAsyncKeyState(0x01) < 0: time.sleep(delay) continue if self.config["left"]["RMBLock"]: if win32api.GetAsyncKeyState(0x02) < 0: time.sleep(delay) continue if self.config["left"]["onlyWhenFocused"]: if not "java" in self.focusedProcess and not "AZ-Launcher" in self.focusedProcess: time.sleep(delay) continue if not self.config["left"]["workInMenus"]: cursorInfo = win32gui.GetCursorInfo()[1] if cursorInfo > 50000 and cursorInfo < 100000: time.sleep(delay) continue if self.config["left"]["onlyWhenFocused"]: threading.Thread(target=self.leftClick, args=(True,), daemon=True).start() else: threading.Thread(target=self.leftClick, args=(None,), daemon=True).start() time.sleep(delay) def leftClick(self, focused): if focused != None: if self.config["left"]["breakBlocks"]: win32api.SendMessage(self.window, win32con.WM_LBUTTONDOWN, 0, 0) else: win32api.SendMessage(self.window, win32con.WM_LBUTTONDOWN, 0, 0) time.sleep(0.02) win32api.SendMessage(self.window, win32con.WM_LBUTTONUP, 0, 0) if self.config["left"]["blockHit"] or (self.config["left"]["blockHit"] and self.config["right"]["enabled"] and self.config["right"]["LMBLock"] and not win32api.GetAsyncKeyState(0x02) < 0): if random.uniform(0, 1) <= self.config["left"]["blockHitChance"] / 100.0: win32api.SendMessage(self.window, win32con.WM_RBUTTONDOWN, 0, 0) time.sleep(0.02) win32api.SendMessage(self.window, win32con.WM_RBUTTONUP, 0, 0) else: if self.config["left"]["breakBlocks"]: # time.sleep(0.02) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0) # win32api.SendMessage(self.window, win32con.WM_LBUTTONUP, 0, 0) else: win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0) time.sleep(0.02) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0) if self.config["left"]["blockHit"] or (self.config["left"]["blockHit"] and self.config["right"]["enabled"] and self.config["right"]["LMBLock"] and not win32api.GetAsyncKeyState(0x02) < 0): if random.uniform(0, 1) <= self.config["left"]["blockHitChance"] / 100.0: win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTDOWN, 0, 0) time.sleep(0.02) win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTUP, 0, 0) if self.config["left"]["soundPath"] != "" and os.path.isfile(self.config["left"]["soundPath"]): winsound.PlaySound(self.config["left"]["soundPath"], winsound.SND_ASYNC) if self.config["left"]["shakeEffect"]: currentPos = win32api.GetCursorPos() direction = random.randint(0, 3) pixels = random.randint(-self.config["left"]["shakeEffectForce"], self.config["left"]["shakeEffectForce"]) if direction == 0: win32api.SetCursorPos((currentPos[0] + pixels, currentPos[1] - pixels)) elif direction == 1: win32api.SetCursorPos((currentPos[0] - pixels, currentPos[1] + pixels)) elif direction == 2: win32api.SetCursorPos((currentPos[0] + pixels, currentPos[1] + pixels)) elif direction == 3: win32api.SetCursorPos((currentPos[0] - pixels, currentPos[1] - pixels)) def leftBindListener(self): while True: if win32api.GetAsyncKeyState(self.config["left"]["bind"]) != 0: if "java" in self.focusedProcess or "AZ-Launcher" in self.focusedProcess: cursorInfo = win32gui.GetCursorInfo()[1] if cursorInfo > 50000 and cursorInfo < 100000: time.sleep(0.001) continue self.config["left"]["enabled"] = not self.config["left"]["enabled"] while True: try: dpg.set_value(checkboxToggleLeftClicker, not dpg.get_value(checkboxToggleLeftClicker)) break except: time.sleep(0.1) pass while win32api.GetAsyncKeyState(self.config["left"]["bind"]) != 0: time.sleep(0.001) time.sleep(0.001) def rightClicker(self): while True: if self.config["right"]["blatant"]: delay = 1 / self.config["right"]["averageCPS"] else: delay = random.random() % (2 / self.config["right"]["averageCPS"]) if self.config["right"]["enabled"]: if self.config["right"]["mode"] == "Hold" and not win32api.GetAsyncKeyState(0x02) < 0: time.sleep(delay) continue if self.config["right"]["LMBLock"]: if win32api.GetAsyncKeyState(0x01) < 0: time.sleep(delay) continue if self.config["right"]["onlyWhenFocused"]: if not "java" in self.focusedProcess and not "AZ-Launcher" in self.focusedProcess: time.sleep(delay) continue if not self.config["right"]["workInMenus"]: cursorInfo = win32gui.GetCursorInfo()[1] if cursorInfo > 50000 and cursorInfo < 100000: time.sleep(delay) continue if self.config["right"]["onlyWhenFocused"]: threading.Thread(target=self.rightClick, args=(True,), daemon=True).start() else: threading.Thread(target=self.rightClick, args=(None,), daemon=True).start() time.sleep(delay) def rightClick(self, focused): if focused != None: win32api.SendMessage(self.window, win32con.WM_RBUTTONDOWN, 0, 0) time.sleep(0.02) win32api.SendMessage(self.window, win32con.WM_RBUTTONUP, 0, 0) else: win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTDOWN, 0, 0) time.sleep(0.02) win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTUP, 0, 0) if self.config["right"]["soundPath"] != "" and os.path.isfile(self.config["right"]["soundPath"]): winsound.PlaySound(self.config["right"]["soundPath"], winsound.SND_ASYNC) if self.config["right"]["shakeEffect"]: currentPos = win32api.GetCursorPos() direction = random.randint(0, 3) pixels = random.randint(-self.config["right"]["shakeEffectForce"], self.config["right"]["shakeEffectForce"]) if direction == 0: win32api.SetCursorPos((currentPos[0] + pixels, currentPos[1] - pixels)) elif direction == 1: win32api.SetCursorPos((currentPos[0] - pixels, currentPos[1] + pixels)) elif direction == 2: win32api.SetCursorPos((currentPos[0] + pixels, currentPos[1] + pixels)) elif direction == 3: win32api.SetCursorPos((currentPos[0] - pixels, currentPos[1] - pixels)) def rightBindListener(self): while True: if win32api.GetAsyncKeyState(self.config["right"]["bind"]) != 0: if "java" in self.focusedProcess or "AZ-Launcher" in self.focusedProcess: cursorInfo = win32gui.GetCursorInfo()[1] if cursorInfo > 50000 and cursorInfo < 100000: time.sleep(0.001) continue self.config["right"]["enabled"] = not self.config["right"]["enabled"] while True: try: dpg.set_value(checkboxToggleRightClicker, not dpg.get_value(checkboxToggleRightClicker)) break except: time.sleep(0.1) pass while win32api.GetAsyncKeyState(self.config["right"]["bind"]) != 0: time.sleep(0.001) time.sleep(0.001) def hideGUIBindListener(self): while True: if win32api.GetAsyncKeyState(self.config["misc"]["bindHideGUI"]) != 0: self.config["misc"]["guiHidden"] = not self.config["misc"]["guiHidden"] if not self.config["misc"]["guiHidden"]: win32gui.ShowWindow(guiWindows, win32con.SW_SHOW) else: win32gui.ShowWindow(guiWindows, win32con.SW_HIDE) while win32api.GetAsyncKeyState(self.config["misc"]["bindHideGUI"]) != 0: time.sleep(0.001) time.sleep(0.001) if __name__ == "__main__": try: if os.name != "nt": input("sharp is only working on Windows.") os._exit(0) (suppost_sid, error) = subprocess.Popen("wmic useraccount where name='%username%' get sid", stdout=subprocess.PIPE, shell=True).communicate() hwid = suppost_sid.split(b"\n")[1].strip().decode() currentWindow = win32gui.GetForegroundWindow() processName = psutil.Process(win32process.GetWindowThreadProcessId(currentWindow)[-1]).name() if processName == "cmd.exe" or processName in sys.argv[0]: win32gui.ShowWindow(currentWindow, win32con.SW_HIDE) sharpClass = sharp(hwid) dpg.create_context() def toggleLeftClicker(id: int, value: bool): sharpClass.config["left"]["enabled"] = value waitingForKeyLeft = False def statusBindLeftClicker(id: int): global waitingForKeyLeft if not waitingForKeyLeft: with dpg.handler_registry(tag="Left Bind Handler"): dpg.add_key_press_handler(callback=setBindLeftClicker) dpg.set_item_label(buttonBindLeftClicker, "...") waitingForKeyLeft = True def setBindLeftClicker(id: int, value: str): global waitingForKeyLeft if waitingForKeyLeft: sharpClass.config["left"]["bind"] = value dpg.set_item_label(buttonBindLeftClicker, f"Bind: {chr(value)}") dpg.delete_item("Left Bind Handler") waitingForKeyLeft = False def setLeftMode(id: int, value: str): sharpClass.config["left"]["mode"] = value def setLeftAverageCPS(id: int, value: int): sharpClass.config["left"]["averageCPS"] = value def toggleLeftOnlyWhenFocused(id: int, value:bool): sharpClass.config["left"]["onlyWhenFocused"] = value def toggleLeftBreakBlocks(id: int, value: bool): sharpClass.config["left"]["breakBlocks"] = value def toggleLeftRMBLock(id: int, value: bool): sharpClass.config["left"]["RMBLock"] = value def toggleLeftBlockHit(id: int, value: bool): sharpClass.config["left"]["blockHit"] = value def setLeftBlockHitChance(id: int, value: int): sharpClass.config["left"]["blockHitChance"] = value def toggleLeftShakeEffect(id: int, value: bool): sharpClass.config["left"]["shakeEffect"] = value def setLeftShakeEffectForce(id: int, value: int): sharpClass.config["left"]["shakeEffectForce"] = value def setLeftClickSoundPath(id: int, value: str): sharpClass.config["left"]["soundPath"] = value def toggleLeftWorkInMenus(id: int, value: bool): sharpClass.config["left"]["workInMenus"] = value def toggleLeftBlatantMode(id: int, value: bool): sharpClass.config["left"]["blatant"] = value def toggleRightClicker(id: int, value: bool): sharpClass.config["right"]["enabled"] = value waitingForKeyRight = False def statusBindRightClicker(id: int): global waitingForKeyRight if not waitingForKeyRight: with dpg.handler_registry(tag="Right Bind Handler"): dpg.add_key_press_handler(callback=setBindRightClicker) dpg.set_item_label(buttonBindRightClicker, "...") waitingForKeyRight = True def setBindRightClicker(id: int, value: str): global waitingForKeyRight if waitingForKeyRight: sharpClass.config["right"]["bind"] = value dpg.set_item_label(buttonBindRightClicker, f"Bind: {chr(value)}") dpg.delete_item("Right Bind Handler") waitingForKeyRight = False def setRightMode(id: int, value: str): sharpClass.config["right"]["mode"] = value def setRightAverageCPS(id: int, value: int): sharpClass.config["right"]["averageCPS"] = value def toggleRightOnlyWhenFocused(id: int, value: int): sharpClass.config["right"]["onlyWhenFocused"] = True def toggleRightLMBLock(id: int, value: bool): sharpClass.config["right"]["LMBLock"] = value def toggleRightShakeEffect(id: int, value: bool): sharpClass.config["right"]["shakeEffect"] = value def setRightShakeEffectForce(id: int, value: int): sharpClass.config["right"]["shakeEffectForce"] = value def setRightClickSoundPath(id: int, value: str): sharpClass.config["right"]["soundPath"] = value def toggleRightWorkInMenus(id: int, value: bool): sharpClass.config["right"]["workInMenus"] = value def toggleRightBlatantMode(id: int, value: bool): sharpClass.config["right"]["blatant"] = value def toggleRecorder(id: int, value: bool): sharpClass.config["recorder"]["enabled"] = value recording = False def recorder(): global recording recording = True dpg.set_value(recordingStatusText, f"Recording: True") recorded = [] start = 0 while True: if not recording: if len(recorded) < 2: # Avoid saving a record with 0 click recorded[0] = 0.08 else: recorded[0] = 0 # No delay for the first click del recorded[-1] # Deleting last record time because that's when you click on stop button and it can take some time sharpClass.config["recorder"]["record"] = recorded sharpClass.record = itertools.cycle(recorded) totalTime = 0 for clickTime in recorded: totalTime += float(clickTime) dpg.set_value(averageRecordCPSText, f"Average CPS of previous Record: {round(len(recorded) / totalTime, 2)}") break if win32api.GetAsyncKeyState(0x01) < 0: recorded.append(time.time() - start) dpg.set_value(recordingStatusText, f"Recording: True - Recorded clicks: {len(recorded)}") start = time.time() while win32api.GetAsyncKeyState(0x01) < 0: time.sleep(0.001) def startRecording(): if not recording: threading.Thread(target=recorder, daemon=True).start() def stopRecording(): global recording recording = False dpg.set_value(recordingStatusText, f"Recording: False") def selfDestruct(): dpg.destroy_context() waitingForKeyHideGUI = False def statusBindHideGUI(): global waitingForKeyHideGUI if not waitingForKeyHideGUI: with dpg.handler_registry(tag="Hide GUI Bind Handler"): dpg.add_key_press_handler(callback=setBindHideGUI) dpg.set_item_label(buttonBindHideGUI, "...") waitingForKeyHideGUI = True def setBindHideGUI(id: int, value: str): global waitingForKeyHideGUI if waitingForKeyHideGUI: sharpClass.config["misc"]["bindHideGUI"] = value dpg.set_item_label(buttonBindHideGUI, f"Bind: {chr(value)}") dpg.delete_item("Hide GUI Bind Handler") waitingForKeyHideGUI = False def toggleOverlay(id: int, value: bool): sharpClass.config["overlay"]["enabled"] = value if value: threading.Thread(target=sharpClass.overlay, daemon=True).start() def toggleOverlayOnlyWhenFocused(id: int, value: bool): sharpClass.config["overlay"]["onlyWhenFocused"] = value def setOverlayX(id: int, value: int): sharpClass.config["overlay"]["x"] = value def setOverlayY(id: int, value: int): sharpClass.config["overlay"]["y"] = value def toggleSaveSettings(id: int, value: bool): sharpClass.config["misc"]["saveSettings"] = value def toggleAlwaysOnTop(id: int, value: bool): if value: win32gui.SetWindowPos(guiWindows, win32con.HWND_TOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE) else: win32gui.SetWindowPos(guiWindows, win32con.HWND_NOTOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE) def toggleDiscordRPC(id: int, value: bool): sharpClass.config["misc"]["discordRichPresence"] = value dpg.create_viewport(title=f"[v{version}] sharp - clicker.best", width=810, height=435) with dpg.window(tag="Primary Window"): with dpg.tab_bar(): with dpg.tab(label="Left Clicker"): dpg.add_spacer(width=75) with dpg.group(horizontal=True): checkboxToggleLeftClicker = dpg.add_checkbox(label="Toggle", default_value=sharpClass.config["left"]["enabled"], callback=toggleLeftClicker) buttonBindLeftClicker = dpg.add_button(label="Click to Bind", callback=statusBindLeftClicker) dropdownLeftMode = dpg.add_combo(label="Mode", items=["Hold", "Always"], default_value=sharpClass.config["left"]["mode"], callback=setLeftMode) bind = sharpClass.config["left"]["bind"] if bind != 0: dpg.set_item_label(buttonBindLeftClicker, f"Bind: {chr(bind)}") dpg.add_spacer(width=75) sliderLeftAverageCPS = dpg.add_slider_int(label="Average CPS", default_value=sharpClass.config["left"]["averageCPS"], min_value=1, callback=setLeftAverageCPS) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) checkboxLeftOnlyWhenFocused = dpg.add_checkbox(label="Only In Game", default_value=sharpClass.config["left"]["onlyWhenFocused"], callback=toggleLeftOnlyWhenFocused) dpg.add_spacer(width=75) checkBoxLeftBreakBlocks = dpg.add_checkbox(label="Break Blocks", default_value=sharpClass.config["left"]["breakBlocks"], callback=toggleLeftBreakBlocks) dpg.add_spacer(width=75) checkboxLeftRMBLock = dpg.add_checkbox(label="RMB-Lock", default_value=sharpClass.config["left"]["RMBLock"], callback=toggleLeftRMBLock) dpg.add_spacer(width=125) checkboxLeftBlockHit = dpg.add_checkbox(label="BlockHit", default_value=sharpClass.config["left"]["blockHit"], callback=toggleLeftBlockHit) sliderLeftBlockHitChance = dpg.add_slider_int(label="BlockHit Chance", default_value=sharpClass.config["left"]["blockHitChance"], min_value=1, max_value=100, callback=setLeftBlockHitChance) dpg.add_spacer(width=125) checkboxLeftShakeEffect = dpg.add_checkbox(label="Shake Effect", default_value=sharpClass.config["left"]["shakeEffect"], callback=toggleLeftShakeEffect) sliderLeftShakeEffectForce = dpg.add_slider_int(label="Shake Effect Force", default_value=sharpClass.config["left"]["shakeEffectForce"], min_value=1, max_value=20, callback=setLeftShakeEffectForce) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) inputLeftClickSoundPath = dpg.add_input_text(label="Click Sound Path (empty for no sound)", default_value=sharpClass.config["left"]["soundPath"], hint="Exemple: mysounds/G505.wav", callback=setLeftClickSoundPath) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) checkboxLeftWorkInMenus = dpg.add_checkbox(label="Work in Menus", default_value=sharpClass.config["left"]["workInMenus"], callback=toggleLeftWorkInMenus) checkboxLeftBlatantMode = dpg.add_checkbox(label="Blatant Mode", default_value=sharpClass.config["left"]["blatant"], callback=toggleLeftBlatantMode) with dpg.tab(label="Right Clicker"): dpg.add_spacer(width=75) with dpg.group(horizontal=True): checkboxToggleRightClicker = dpg.add_checkbox(label="Toggle", default_value=sharpClass.config["right"]["enabled"], callback=toggleRightClicker) buttonBindRightClicker = dpg.add_button(label="Click to Bind", callback=statusBindRightClicker) dropdownRightMode = dpg.add_combo(label="Mode", items=["Hold", "Always"], default_value=sharpClass.config["right"]["mode"], callback=setRightMode) bind = sharpClass.config["right"]["bind"] if bind != 0: dpg.set_item_label(buttonBindRightClicker, f"Bind: {chr(bind)}") dpg.add_spacer(width=75) sliderRightAverageCPS = dpg.add_slider_int(label="Average CPS", default_value=sharpClass.config["right"]["averageCPS"], min_value=1, callback=setRightAverageCPS) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) checkboxRightOnlyWhenFocused = dpg.add_checkbox(label="Only In Game", default_value=sharpClass.config["right"]["onlyWhenFocused"], callback=toggleRightOnlyWhenFocused) dpg.add_spacer(width=75) checkboxRightLMBLock = dpg.add_checkbox(label="LMB-Lock", default_value=sharpClass.config["right"]["LMBLock"], callback=toggleRightLMBLock) dpg.add_spacer(width=75) checkboxRightShakeEffect = dpg.add_checkbox(label="Shake Effect", default_value=sharpClass.config["right"]["shakeEffect"], callback=toggleRightShakeEffect) sliderRightShakeEffectForce = dpg.add_slider_int(label="Shake Effect Force", default_value=sharpClass.config["right"]["shakeEffectForce"], min_value=1, max_value=20, callback=setRightShakeEffectForce) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) inputRightClickSoundPath = dpg.add_input_text(label="Click Sound Path (empty for no sound)", default_value=sharpClass.config["right"]["soundPath"], hint="Exemple: mysounds/G505.wav", callback=setRightClickSoundPath) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) checkboxRightWorkInMenus = dpg.add_checkbox(label="Work in Menus", default_value=sharpClass.config["right"]["workInMenus"], callback=toggleRightWorkInMenus) checkboxRightBlatantMode = dpg.add_checkbox(label="Blatant Mode", default_value=sharpClass.config["right"]["blatant"], callback=toggleRightBlatantMode) with dpg.tab(label="Recorder"): dpg.add_spacer(width=75) recorderInfoText = dpg.add_text(default_value="Records your legit way of clicking in order to produce clicks even less detectable by AntiCheat.\nAfter pressing the \"Start\" button, click as if you were in PvP for a few seconds. Then press the \"Stop\" button.\nOnly works for the left click.") dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) checkboxRecorderEnabled = dpg.add_checkbox(label="Enabled", default_value=sharpClass.config["recorder"]["enabled"], callback=toggleRecorder) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) with dpg.group(horizontal=True): buttonStartRecording = dpg.add_button(label="Start Recording", callback=startRecording) buttonStopRecording = dpg.add_button(label="Stop Recording", callback=stopRecording) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) averageRecordCPSText = dpg.add_text(default_value="Average CPS of previous Record: ") totalTime = 0 for clickTime in sharpClass.config["recorder"]["record"]: totalTime += float(clickTime) dpg.set_value(averageRecordCPSText, f"Average CPS of previous Record: {round(len(sharpClass.config['recorder']['record']) / totalTime, 2)}") recordingStatusText = dpg.add_text(default_value="Recording: ") dpg.set_value(recordingStatusText, f"Recording: {recording}") with dpg.tab(label="Misc"): dpg.add_spacer(width=75) buttonSelfDestruct = dpg.add_button(label="Destruct", callback=selfDestruct) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) with dpg.group(horizontal=True): buttonBindHideGUI = dpg.add_button(label="Click to Bind", callback=statusBindHideGUI) hideGUIText = dpg.add_text(default_value="Hide GUI") bind = sharpClass.config["misc"]["bindHideGUI"] if bind != 0: dpg.set_item_label(buttonBindHideGUI, f"Bind: {chr(bind)}") dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) overlayInfoText = dpg.add_text(default_value="Displays an in-game GUI with Sharp's modules status info. Useful but does not work in fullscreen mode (F11)!") with dpg.group(horizontal=True): overlayToggle = dpg.add_checkbox(label="Overlay", default_value=sharpClass.config["overlay"]["enabled"], callback=toggleOverlay) if sharpClass.config["overlay"]["enabled"]: toggleOverlay(1, True) overlayOnlyWhenFocusedToggle = dpg.add_checkbox(label="Only when game focused (easier to change overlay position when disabled)", default_value=sharpClass.config["overlay"]["onlyWhenFocused"], callback=toggleOverlayOnlyWhenFocused) overlayXSlider = dpg.add_slider_int(label="X Position", default_value=sharpClass.config["overlay"]["x"], min_value=0, max_value=1920, callback=setOverlayX) overlayYSlider = dpg.add_slider_int(label="Y Position", default_value=sharpClass.config["overlay"]["y"], min_value=0, max_value=1080, callback=setOverlayY) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) saveSettings = dpg.add_checkbox(label="Save Settings", default_value=sharpClass.config["misc"]["saveSettings"], callback=toggleSaveSettings) dpg.add_spacer(width=75) checkboxAlwaysOnTop = dpg.add_checkbox(label="Always On Top", callback=toggleAlwaysOnTop) dpg.add_spacer(width=75) checkboxAlwaysOnTop = dpg.add_checkbox(label="Discord Rich Presence", default_value=sharpClass.config["misc"]["discordRichPresence"], callback=toggleDiscordRPC) dpg.add_spacer(width=75) dpg.add_separator() dpg.add_spacer(width=75) creditsText = dpg.add_text(default_value="Credits: Bambou (Developer)") githubText = dpg.add_text(default_value="https://github.com/B4mb0u/Sharp") with dpg.theme() as global_theme: with dpg.theme_component(dpg.mvAll): dpg.add_theme_style(dpg.mvStyleVar_WindowBorderSize, 0) dpg.add_theme_style(dpg.mvStyleVar_FrameRounding, 4) dpg.add_theme_style(dpg.mvStyleVar_GrabRounding, 1) dpg.add_theme_style(dpg.mvStyleVar_GrabMinSize, 20) dpg.add_theme_style(dpg.mvStyleVar_TabRounding, 1) dpg.add_theme_color(dpg.mvThemeCol_TabActive, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_TabHovered, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_ButtonHovered, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_CheckMark, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_ScrollbarGrabHovered, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_ScrollbarGrabActive, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_SliderGrab, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_SliderGrabActive, (107, 110, 248)) dpg.add_theme_color(dpg.mvThemeCol_FrameBgHovered, (71, 71, 77)) dpg.add_theme_color(dpg.mvThemeCol_HeaderHovered, (71, 71, 77)) dpg.bind_theme(global_theme) dpg.create_context() dpg.show_viewport() guiWindows = win32gui.GetForegroundWindow() dpg.setup_dearpygui() dpg.set_primary_window("Primary Window", True) dpg.start_dearpygui() selfDestruct() except KeyboardInterrupt: os._exit(0)