import tkinter as tk
import random
import winsound
from pathlib import Path
folder = Path(__file__).resolve().parent
root = tk.Tk()
root.title("GTA 6")
root.configure(bg="black")
root.attributes("-fullscreen", True)
W = root.winfo_screenwidth()
H = root.winfo_screenheight()
canvas = tk.Canvas(
root, bg="black", highlightthickness=0
)
canvas.pack(fill="both", expand=True)
running = True
lines = []
def close(event=None):
global running
running = False
root.destroy()
root.bind("<Escape>", close)
try:
eyes = tk.PhotoImage(file=str(folder / "Глаза.png"))
except tk.TclError:
eyes = None
if eyes:
canvas.create_image(
W // 2, H // 2 - 50,
image=eyes, anchor="center"
)
canvas.create_text(
W // 2, H // 2 + 100,
text="ВАС ЗАМЕТИЛИ",
fill="white",
font=("Consolas", 32, "bold")
)
for i in range(14):
y = random.randint(20, H - 20)
item = canvas.create_text(
random.randint(100, W),
y,
text="SYSTEM ALERT // ACCESS DETECTED",
fill="#ff1010",
font=("Consolas", 12, "bold"),
anchor="w"
)
lines.append(item)
try:
winsound.PlaySound(
str(folder / "scream.wav"),
winsound.SND_FILENAME | winsound.SND_ASYNC
)
except Exception:
pass
def animate():
if not running:
return
for item in lines:
x, y = canvas.coords(item)
if x > -350:
canvas.move(item, -random.randint(15, 35), 0)
else:
canvas.coords(item, W + 100, y)
root.after(35, animate)
def reveal():
if not running:
return
canvas.destroy()
root.configure(bg="white")
panel = tk.Frame(root, bg="white")
panel.place(relx=0.5, rely=0.5, anchor="center")
tk.Label(
panel,
text="Упс! Windows взломан!",
fg="#c00000", bg="white",
font=("Arial", 30, "bold")
).pack(pady=20)
tk.Label(
panel,
text="Шутка! Это безопасный хоррор-пранк.",
fg="black", bg="white",
font=("Arial", 16)
).pack(pady=10)
tk.Button(
panel, text="Закрыть",
command=close,
font=("Arial", 14),
padx=25, pady=8
).pack(pady=25)
animate()
root.after(5000, reveal)
root.mainloop()