import time, threading
from tkinter import *
from tkinter import messagebox
import keyboard
def infinite_process():
while True:
while keyboard.is_pressed("space"):
time.sleep(0.00015)
keyboard.press_and_release("space")
time.sleep(0.030)
mainWindow = Tk()
mainWindow.geometry("500x75")
mainWindow.resizable(width=False, height=False)
mainWindow.config(bg='#232723')
mainWindow.title("G4Bhop")
lbCommand = Label(mainWindow, text="Hello world", font=("Courier New", 16)).place(x=20, y=20)
mainWindow.after(3000, infinite_process)
mainWindow.mainloop()