This application contains rapidly flashing colors and animations that may trigger seizures in people with photosensitive epilepsy or other photosensitive conditions. If you or anyone who may view this application has a history of epilepsy, seizures, or photosensitivity, DO NOT run this application. The disco mode feature includes:
Viewer discretion is strongly advised.
This application is intended for harmless pranks among friends in controlled environments. Please use responsibly and ensure you have permission before running it on someone else's computer. Always warn users about the photosensitive content before running the application.
A playful prank application that creates animated popups and changes the desktop wallpaper, accompanied by music playback.
- Animated Popups: Randomly generates animated windows with GIFs or rotating images
- Text Popups: Displays lyrics from the classic song at random intervals
- Wallpaper Management: Automatically sets a custom desktop background
- Music Playback: Plays songs with a special "disco mode" effect
- Smooth Animations: Popups glide across the screen with randomized movement patterns
- Python 3.7+
- Windows OS (for wallpaper management functionality)
- Required Python packages:
pygamePillow(PIL)tkinter(usually included with Python)
-
Clone or download this repository
-
Install the required dependencies:
pip install pygame Pillow- Ensure you have the following assets folder structure:
project_root/
├── rickroll.py
└── assets/
├── head.png
├── background.jpg
├── rickroll.mp3
├── rickroll2.mp3
├── rickroll1.gif
├── rickroll2.gif
└── rickroll3.gif
Simply run the main script:
python rickroll.pyWarning: This application will:
- Change your desktop wallpaper
- Create multiple popup windows
- Play music automatically
- Enter fullscreen "disco mode" during the second song
You can customize the application behavior by modifying the Config class:
class Config:
POPUP_SIZE_RANGE = (115, 135) # Size range for popups
POPUP_LIFETIME_MS = 5000 # How long popups stay visible
HEAD_PROBABILITY = 0.15 # Chance of rotating head vs GIF
TEXT_POPUP_PROBABILITY = 0.1 # Chance of text popup vs animatedThe application is organized into several key components:
- AssetManager: Handles preloading and caching of GIFs and images
- SoundManager: Manages music playback and disco mode effects
- WallpaperManager: Changes the Windows desktop wallpaper
- PopupFactory: Creates different types of animated and text popups
- RickrollApp: Main application controller
- Popups are created using
tkinter.Toplevelwindows - Animations run at 50ms intervals for smooth playback
- Movement uses interpolated gliding between random positions
- Transparent backgrounds using
transparentcolorattribute
- GIFs are preloaded into memory on startup
- Resized frames are cached to avoid redundant processing
- Threaded music playback prevents UI blocking
- Activates during the second song
- Changes background color every 200ms
- Uses fullscreen semi-transparent overlay
- Windows-only wallpaper management (uses PowerShell and Windows registry)
- Requires Windows user32.dll for SystemParametersInfo
- Assets must be present in the
assets/directory
This project is provided as-is for educational and entertainment purposes.