Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import random
- root = Tk()
- color_list = ['#FF3333', '#6CD720' , '#20D2D7', '#202CD7', '#D720D6', '#D72025'] # u can add more later idk xd
- number = 1
- dot_value = 0
- w = root.winfo_reqwidth()
- h = root.winfo_reqheight()
- ws = root.winfo_screenwidth()
- hs = root.winfo_screenheight()
- x = (ws/2) - (w/2)
- y = (hs/2) - (h/2)
- #root.geometry('400x250+%d+%d' % (x, y))
- root.geometry('%dx%d' % (ws,hs))
- root.resizable(height = False, width = False)
- root.attributes('-topmost', True)
- root.attributes('-alpha', 0)
- root.overrideredirect(1)
- root.config(background='black')
- import time
- wait = time.sleep
- ## // Fade Out Function \\ ##
- def fade_away():
- alpha = root.attributes("-alpha")
- print (alpha)
- if alpha > 0:
- alpha -= .01
- root.attributes("-alpha", alpha)
- root.after(100,fade_away)
- else:
- root.destroy()
- def pack_msg():
- global Main_message,text
- try:
- Main_message.destroy()
- except:
- print ("Passed Function.")
- pass
- text = StringVar()
- color_picker = (''.join(random.choice(color_list)))
- Main_message = Label(root, textvariable = text)
- Main_message.config(fg = color_picker, bg = 'black', font=('Times', 35))
- Main_message.place(relx=0.5, rely=0.5,anchor='center')
- ## // Fade In Function \\ ##
- def fade_in():
- alpha = root.attributes('-alpha')
- print (alpha) # Check numbers
- if 0 <= alpha <= 0.9900000000000007: # if between (exact number)
- alpha += .01
- make_the_eyes_blind_lul = (''.join(random.choice(color_list))) # mah eyes hurt...
- Main_message.config(fg = make_the_eyes_blind_lul, bg = 'black', font=('Times', 35))
- root.attributes("-alpha", alpha)
- root.after(100, fade_in) # refresh
- elif alpha == 1.0:
- print ("Dots Function...")
- root.after(5000, lambda:text.set("LOADING"))
- """ FIRST SCRIPT YOU WANT TO LOAD """
- Main_message.update()
- wait(5)
- root.after(5000, lambda:text.set("LOADING."))
- Main_message.update()
- """ SECOND SCRIPT """
- wait(5)
- root.after(5000, lambda:text.set("LOADING.."))
- """ THIRD SCRIPT """
- Main_message.update()
- wait(5)
- root.after(5000, lambda:text.set("LOADING..."))
- """ FINAL SCRIPT """
- Main_message.update()
- wait(2)
- root.after(5000, lambda:text.set("LOADING IS DONE!"))
- root.after(10000,fade_away)
- else:
- print ("Function started.")
- root.destroy()
- pack_msg()
- text.set("Welcome, please wait!")
- fade_in()
- root.mainloop()
- # hi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement