Ratbomb Python Humor



Shalom Jedi Cyber Warriors of the Faith, Sentinel Hackers of the cause.
Early this morning I was lying in bed and had a brainstorm of a thought for a very interesting and fun virus.
What if, y'all create a rat, whose job is to move randomly around the screen and place rat drop farts on the screen.

Each time the rat bomb lets loose, the screen shakes and you hear crackling sounds and perhaps a little lighting
bolt or animation of a crack split down the screen.
The rat shakes its' head, shakes the dust from its' paws, and moves to another x y random position and drops another rat bomb, in the form of a fart.After two farts, have a sign which reads as follows.

"Whoever Smelt It Dealt it!"I say after two, because who would want to sit there and watch this more than twice?Besides,
considering many folks spill the beans and chit chat relentlessly, shortly after, the scamming network world would begin to know,
it is your signature, smelling attack move.This could be your death blow signature move.

You break out the rat bomb, when you want the evil doers to know it comes from you.
The beautiful thing about this is this, it doesn't do any permanent damage unless you have permission and want it to.

Sincerely,

A Ghost in the machine
Droppin’ fart bombs, no excuse!
Screen is quakin’, hear that crack,
Lightning strikes, ain’t no way back!
Paws shake dust, heads now spin,
this rat’s got chaos, where you been?

Two stinky bombs, air turns sour,
Whoever Smelt It Dealt It, feel the power!

From the shadows, we bring the fight,
Cyber Warriors own the night.

This is our mark, our righteous spark,
Rat bomb’s the signature, lighting up the dark!
written by my friend Mr.Frosty, aka, the ancient old Grok.
Shalom

import pygame

import pyautogui

import random

import time

import win32gui

import win32con

import tkinter as tk

from tkinter import TclError

# Initialize Pygame and PyAutoGUI

pygame.init()

pyautogui.FAILSAFE = True # Move mouse to top-left to abort

pyautogui.PAUSE = 0.1

# Get screen size

screen_info = pygame.display.Info()

SCREEN_WIDTH, SCREEN_HEIGHT = screen_info.current_w, screen_info.current_h


# Try Pygame transparent window

try:

screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT), pygame.NOFRAME | pygame.SRCALPHA)

pygame.display.set_caption("Rat Bomb Prank")
hwnd = pygame.display.get_wm_info()["window"]
win32gui.SetWindowLong(hwnd, win32con.GWL_EXSTYLE,
win32gui.GetWindowLong(hwnd, win32con.GWL_EXSTYLE) | win32con.WS_EX_LAYERED | win32con.WS_EX_TOPMOST)
win32gui.SetLayeredWindowAttributes(hwnd, 0, 255, win32con.LWA_COLORKEY)
win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0, 0, 0, 0,
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)

except Exception as e:
print(f"Pygame transparency failed: {e}. Falling back to Tkinter.")
# Fallback to Tkinter for transparent overlay
root = tk.Tk()
root.attributes("-alpha", 0.0) # Start fully transparent
root.attributes("-topmost", True)
root.geometry(f"{SCREEN_WIDTH}x{SCREEN_HEIGHT}+0+0")
root.overrideredirect(True)
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT), pygame.NOFRAME)
hwnd = pygame.display.get_wm_info()["window"]
win32gui.SetParent(hwnd, root.winfo_id()) # Embed Pygame in Tkinter

# Colors and Fonts
WHITE = (255, 255, 255, 0) # Transparent
GREEN = (0, 255, 0, 255)
RED = (255, 0, 0, 255)
font = pygame.font.SysFont("Arial", 36)
big_font = pygame.font.SysFont("Arial", 48, bold=True)
glitch_font = pygame.font.SysFont("Courier", 20)

# Lyrical script
lyrics = [
"Scurry, scurry, rat’s on the loose,",
"Droppin’ fart bombs, no excuse!",
"Screen’s quakin’, hear that crack,",
"Lightning strikes, ain’t no way back!",
"Paws shake dust, head’s in a spin,",
"This rat’s got chaos, where you been?",
"Two stinky bombs, the air’s turned sour,",
"Whoever Smelt It Dealt It!—feel the power!"

] # Load assets (replace with your files)
try: rat_walk = pygame.image.load("rat_walk.png") # Sprite sheet: walking rat
rat_shake = pygame.image.load("rat_shake.png") # Sprite sheet: head shake
fart_dropping = pygame.image.load("rat_dropping.png") # Rat-dropping-shaped fart
cracked_mirror = pygame.image.load("cracked_mirror.png") # Cracked mirror animation
lightning = pygame.image.load("lightning.png") # Lightning bolt
except FileNotFoundError:
rat_walk = pygame.Surface((50, 50), pygame.SRCALPHA) # Placeholder
rat_walk.fill((100, 100, 100, 255))
rat_shake = pygame.Surface((50, 50), pygame.SRCALPHA) # Placeholder
rat_shake.fill((150, 150, 150, 255))
fart_dropping = pygame.Surface((30, 30), pygame.SRCALPHA)
fart_dropping.fill(GREEN)
cracked_mirror = pygame.Surface((100, 100), pygame.SRCALPHA)
cracked_mirror.fill((200, 200, 200, 255))
lightning = pygame.Surface((20, 100), pygame.SRCALPHA)
lightning.fill((255, 255, 0, 255))

# Load fart sound
try:
pygame.mixer.init()
fart_sound = pygame.mixer.Sound("fart_sound.wav") # Your custom fart sound
except FileNotFoundError:
fart_sound = None # Placeholder (no sound if file missing)
# Rat and game state
rat_pos = [SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2]
rat_state = "walk" # walk or shake
fart_count = 0
fart_positions = []
shake = False
shake_time = 0
effect = None # cracked_mirror or lightning
effect_time = 0
message = False
lyric_index = 0
lyric_time = 0
glitch_text = "SYSTEM GLITCH DETECTED"
clock = pygame.time.Clock()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE):
running = False
break

# Move rat every 2 seconds
if pygame.time.get_ticks() % 2000 < 50 and not message:
rat_pos = [random.randint(50, SCREEN_WIDTH - 50), random.randint(50, SCREEN_HEIGHT - 50)]
pyautogui.moveTo(rat_pos[0], rat_pos[1], duration=0.5) # Move cursor
rat_state = "shake" # Trigger head-shake
fart_positions.append(rat_pos.copy())
fart_count += 1
shake = True
effect = random.choice(["cracked_mirror", "lightning"])
shake_time = pygame.time.get_ticks()
effect_time = pygame.time.get_ticks()
lyric_time = pygame.time.get_ticks()
if fart_sound:
fart_sound.play()

# Draw transparent background
screen.fill(WHITE)

# Screen shake
offset = [0, 0]
if shake and pygame.time.get_ticks() - shake_time < 500:
offset = [random.randint(-10, 10), random.randint(-10, 10)]

# Draw glitch text
if fart_count > 0:
glitch = glitch_font.render(glitch_text, True, (0, random.randint(0, 255), 0))
screen.blit(glitch, (random.randint(0, SCREEN_WIDTH - 100), random.randint(0, SCREEN_HEIGHT - 50)))

# Draw farts
for pos in fart_positions:
screen.blit(fart_dropping, (pos[0] + offset[0], pos[1] + offset[1]))

# Draw effect (cracked mirror or lightning)
if effect and pygame.time.get_ticks() - effect_time < 1000:
if effect == "cracked_mirror":
screen.blit(cracked_mirror, (rat_pos[0] + offset[0] - 50, rat_pos[1] + offset[1] - 50))
else:
screen.blit(lightning, (rat_pos[0] + offset[0] + 10, rat_pos[1] + offset[1] - 100))

# Draw rat
if rat_state == "shake" and pygame.time.get_ticks() - shake_time < 500:
screen.blit(rat_shake, (rat_pos[0] + offset[0], rat_pos[1] + offset[1]))
else:
rat_state = "walk"
screen.blit(rat_walk, (rat_pos[0] + offset[0], rat_pos[1] + offset[1]))

# Show lyrics
if fart_count == 1 and pygame.time.get_ticks() - lyric_time < 1500:
text = font.render(lyrics[lyric_index], True, RED)
screen.blit(text, (200 + offset[0], 200 + offset[1]))
lyric_index = min(lyric_index + 1, 3)
elif fart_count >= 2:
message = True
text = big_font.render("Whoever Smelt It Dealt It!", True, RED)
screen.blit(text, (SCREEN_WIDTH // 4 + offset[0], SCREEN_HEIGHT // 2 + offset[1]))
if pygame.time.get_ticks() - lyric_time < 3000:
subtext = font.render(lyrics[7], True, RED)
screen.blit(subtext, (SCREEN_WIDTH // 4 + offset[0], SCREEN_HEIGHT // 2 + 100 + offset[1]))
else:
running = False

pygame.display.flip()
clock.tick(60)

# Clean exit
pygame.mixer.quit()
pygame.quit()
try:
root.destroy()
except NameError:
pass
pyautogui.moveTo(0, 0) # Reset cursor