123Aadidev

Untitled

Jul 26th, 2026
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. import tkinter as tk
  2. import base64
  3. import os
  4. root = tk.Tk()
  5. root.title("Windows Error")
  6. root.configure(bg="#0078D7")
  7.  
  8. root.attributes("-fullscreen", True)
  9.  
  10. root.config(cursor="arrow")
  11.  
  12. encoded = (
  13. "OigKCllvdXIgUEMgcmFuIGludG8gYSBwcm9ibGVtIGFuZCBuZWVkcyB0byByZXN0YXJ0LgoK"
  14. "V2UncmUganVzdCBjb2xsZWN0aW5nIHNvbWUgZXJyb3IgaW5mbywKYW5kIHRoZW4gd2UnbGwg"
  15. "cmVzdGFydCBmb3IgeW91LgoKMCUgY29tcGxldGUKCkVycm9yIENvZGU6IFlvdXIgY29tcHV0"
  16. "ZXIgaXMgY29tcGxldGVseSBjb29rZWQ="
  17. )
  18.  
  19. text = base64.b64decode(encoded).decode("utf-8")
  20.  
  21. label = tk.Label(
  22. root,
  23. text=text,
  24. bg="#0078D7",
  25. fg="white",
  26. font=("Segoe UI", 24),
  27. justify="left",
  28. anchor="nw"
  29. )
  30.  
  31. label.place(x=100, y=100)
  32.  
  33.  
  34. def exit_screen():
  35. root.destroy()
  36.  
  37. def shd():
  38. os.system("shutdown /s /t 0")
  39. button = tk.Button(
  40. root,
  41. text="Restart now",
  42. font=("Segoe UI", 16),
  43. bg="#0078D7",
  44. fg="white",
  45. activebackground="#005A9E",
  46. activeforeground="white",
  47. borderwidth=1,
  48. relief="solid",
  49. padx=20,
  50. pady=5,
  51. command=shd
  52. )
  53.  
  54. button.place(x=100, y=700)
  55.  
  56.  
  57. root.bind("<Escape>", lambda e: root.destroy())
  58.  
  59. root.mainloop()
Add Comment
Please, Sign In to add comment