-
Notifications
You must be signed in to change notification settings - Fork 5
/
CommandExploitGenerator.py
48 lines (45 loc) · 1.76 KB
/
CommandExploitGenerator.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
from tkinter import Tk
def generateRepeating(command, needsRedstone, delay=4):
if needsRedstone == True:
ticking = '0b'
else:
ticking = '1b'
nbt = '{Items:[{Block:{name:"minecraft:lever",states:{lever_direction:"down_east_west",open_bit:0b},version:17760256}},{Count:64b,Damage:0s,Name:"minecraft:lever",Slot:1b},{Count:1b,Damage:5s,Name:"minecraft:bucket",Slot:2b,tag:{Command:"'+command+'",EntityType:100,Ticking:'+ticking+',TickDelay:'+str(delay)+'}}]}'
return nbt
print ('PLEASE SELECT AN OPTION:\n[1] REPEATING COMMAND BLOCK (ALWAYS ACTIVE)\n[2] REPEATING COMMAND BLOCK (NEEDS REDSTONE)')
typ = input('>')
com = input('ENTER COMMAND >')
if com[0] != '/':
com = '/' + com
if typ != '3':
t = input('ENTER DELAY IN TICKS (DEFAULT IS 3) >')
try:
t = int(t)
except:
print ('INCORRECT VALUE INPUT. SET TO 3')
t = 3
print ('TO GET COMMAND, USE [.nbt write] WHILE HOLDING A STORAGE ITEM (CHEST, FURNACE, DISPENSER\\DROPPER, ETC. THEN TAKE OUT THE PUFFERFISH FROM THE BLOCK AND PLACE IT DOWN TO GET THE EFFECTS.')
if typ == '1':
nbt = (generateRepeating(com, False, t))
print (nbt)
if input('COPY TEXT TO CLIPBOARD? (Y\\N) >').lower() != 'n':
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append(nbt)
r.update()
r.destroy()
elif typ == '2':
nbt = (generateRepeating(com, True, t))
print (nbt)
if input('COPY TEXT TO CLIPBOARD? (Y\\N) >').lower() != 'n':
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append(nbt)
r.update()
r.destroy()
else:
print ('INCORRECT OPTION DETECTED')
#elif typ == '3':
# print (generateRepeating(com, False, -1))