/
main.py
98 lines (83 loc) · 3.02 KB
/
main.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# dunno why this is hear tbh
from sys import _clear_type_cache
import time, pyautogui
# Countdown Function. Used for giving a countdown before starting the spam.
def countdown():
print("you have 5 seconds to click where you want it to spam")
time.sleep(0.8)
print("5")
time.sleep(1)
print("4")
time.sleep(1)
print("3")
time.sleep(1)
print("2")
time.sleep(1)
print("1")
time.sleep(1)
# this repeats the spam code
#DO NOT TOUCH THE ANCIENT CODE
def spam(ti, si, answer, message, IsPingMessage):
if IsPingMessage == False:
for x in range(int(ti)):
pyautogui.typewrite(f'{message}')
pyautogui.press('space')
pyautogui.press('enter')
time.sleep(float(si))
pyautogui.typewrite("Thank you for using spambot 9000: Message Mode")
elif IsPingMessage == True:
for x in range(int(ti)):
pyautogui.typewrite(f'@{answer} {message}')
pyautogui.press('space')
pyautogui.press('enter')
time.sleep(float(si))
pyautogui.typewrite("Thank you for using spambot 9000: Ping Mode")
def main():
# Defaults
delayDefault = 0.75
timesDefault = 10
# Other assignemnts (REQUIRED FOR FIXING GLITCH). DO NOT TOUCH ANCIENT CODE
IsPingMessage = False
personInput = ""
time.sleep(0.5)
# Asks if this is a ping message or a regular message
spamTypeInput = input("Should this be a ping message? (y / n)\n")
if spamTypeInput == "n" or spamTypeInput == "N":
IsPingMessage = False
elif spamTypeInput == "y" or spamTypeInput == "Y":
IsPingMessage = True
else:
print("That is not a valid answer.")
main()
# This asks for the user name of the spam
if IsPingMessage == True:
personInput = input("Who would you like to spam?\n(You don't need the @ symbol)\n")
messageInput = input("Please input a message to go with the spam.\nIf you leave this blank it will have no message\n")
if messageInput == "":
print("Ok nothing will be sent with this spam\n")
else:
print("ok this will be sent with the spam\n")
# This asks how meny times to spam
timesInput = input(f'How many times would you like to spam? (Default: {timesDefault} times)\n')
# Catches errors
try:
int(timesInput)
except ValueError:
if timesInput == "":
print(f'Defaulting to {timesDefault}')
timesInput = timesDefault
else:
print("That is not a valid number.")
main()
delayInput = input(f'Please choose a delay between messages. (Default: {delayDefault} seconds)\n')
# Catches errors
try:
float(delayInput)
except ValueError:
print(f'Defaulting to {delayDefault} seconds')
delayInput = delayDefault
# Runs the countdown
countdown()
# Runs the spam function (Parameters needed since this code is in a function).
spam(timesInput, delayInput, personInput, messageInput, IsPingMessage)
main()