import pygame import sys # Initialize Pygame pygame.init() # Constants SCREEN_WIDTH, SCREEN_HEIGHT = 800, 600 BACKGROUND_COLOR = (30, 30, 30) MOVEMENT_SPEED = 5 FRAME_DELAY = 10 # Delay in frames between animation steps # Set up the screen screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption('Skibidi Toilet') # Load the toilet images toilet_images = [pygame.image.load(f'GPT funnies/toilet{i}.png') for i in range(1, 3)] TOILET_WIDTH, TOILET_HEIGHT = toilet_images[0].get_size() # Toilet position toilet_x = (SCREEN_WIDTH - TOILET_WIDTH) // 2 toilet_y = (SCREEN_HEIGHT - TOILET_HEIGHT) // 2 direction = 1 # Load and play the Skibidi song pygame.mixer.music.load('GPT funnies/skibidi.mp3') pygame.mixer.music.play(-1) # Loop the music # Animation variables current_frame = 0 frame_count = 0 # Main game loop clock = pygame.time.Clock() running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # Move the toilet toilet_x += direction * MOVEMENT_SPEED if toilet_x <= 0 or toilet_x >= SCREEN_WIDTH - TOILET_WIDTH: direction *= -1 # Update animation frame frame_count += 1 if frame_count >= FRAME_DELAY: current_frame = (current_frame + 1) % len(toilet_images) frame_count = 0 # Draw everything screen.fill(BACKGROUND_COLOR) screen.blit(toilet_images[current_frame], (toilet_x, toilet_y)) # Update the display pygame.display.flip() # Cap the frame rate clock.tick(30) # Quit Pygame pygame.quit() sys.exit()