-
Notifications
You must be signed in to change notification settings - Fork 129
/
lunar.py
74 lines (61 loc) · 2.25 KB
/
lunar.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import json
import os
import sys
import threading
from pynput import keyboard
from termcolor import colored
def on_release(key):
try:
if key == keyboard.Key.f1:
Aimbot.update_status_aimbot()
if key == keyboard.Key.f2:
Aimbot.clean_up()
except NameError:
pass
def main():
global lunar
lunar = Aimbot(collect_data = "collect_data" in sys.argv)
lunar.start()
def setup():
path = "lib/config"
if not os.path.exists(path):
os.makedirs(path)
print("[INFO] In-game X and Y axis sensitivity should be the same")
def prompt(str):
valid_input = False
while not valid_input:
try:
number = float(input(str))
valid_input = True
except ValueError:
print("[!] Invalid Input. Make sure to enter only the number (e.g. 6.9)")
return number
xy_sens = prompt("X-Axis and Y-Axis Sensitivity (from in-game settings): ")
targeting_sens = prompt("Targeting Sensitivity (from in-game settings): ")
print("[INFO] Your in-game targeting sensitivity must be the same as your scoping sensitivity")
sensitivity_settings = {"xy_sens": xy_sens, "targeting_sens": targeting_sens, "xy_scale": 10/xy_sens, "targeting_scale": 1000/(targeting_sens * xy_sens)}
with open('lib/config/config.json', 'w') as outfile:
json.dump(sensitivity_settings, outfile)
print("[INFO] Sensitivity configuration complete")
if __name__ == "__main__":
os.system('cls' if os.name == 'nt' else 'clear')
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
print(colored('''
| |
| | _ _ _ __ __ _ _ __
| | | | | | '_ \ / _` | '__|
| |___| |_| | | | | (_| | |
\_____/\__,_|_| |_|\__,_|_|
(Neural Network Aimbot)''', "yellow"))
path_exists = os.path.exists("lib/config/config.json")
if not path_exists or ("setup" in sys.argv):
if not path_exists:
print("[!] Sensitivity configuration is not set")
setup()
path_exists = os.path.exists("lib/data")
if "collect_data" in sys.argv and not path_exists:
os.makedirs("lib/data")
from lib.aimbot import Aimbot
listener = keyboard.Listener(on_release=on_release)
listener.start()
main()