Skip to content

Instantly share code, notes, and snippets.

@TayIorRobinson
Created November 27, 2023 22:01
Show Gist options
  • Save TayIorRobinson/9ef573fb61a0c2b9b7ef0d22872143f4 to your computer and use it in GitHub Desktop.
Save TayIorRobinson/9ef573fb61a0c2b9b7ef0d22872143f4 to your computer and use it in GitHub Desktop.
i should not be allowed to use Xccode
import Foundation
import CoreGraphics
import ApplicationServices
func GetCGEventCharacter(evt: CGEvent) -> Character {
var char = UniChar()
var length = 0
evt.keyboardGetUnicodeString(maxStringLength: 1, actualStringLength: &length, unicodeString: &char)
return Character(UnicodeScalar(char)!)
}
func SendString(baseEvent: CGEvent, string: NSString) {
for idx in 0...string.length-1 {
var h = string.character(at: idx)
baseEvent.keyboardSetUnicodeString(stringLength: 1, unicodeString: &h)
baseEvent.post(tap: CGEventTapLocation.cgSessionEventTap)
}
}
var vappypasta = "Hey guys, did you know that in terms of male human and female Pokémon breeding, Vaporeon is the most compatible Pokémon for humans? Not only are they in the field egg group, which is mostly comprised of mammals, Vaporeon are an average of 3”03’ tall and 63.9 pounds, this means they’re large enough to be able handle human dicks, and with their impressive Base Stats for HP and access to Acid Armor, you can be rough with one. Due to their mostly water based biology, there’s no doubt in my mind that an aroused Vaporeon would be incredibly wet, so wet that you could easily have sex with one for hours without getting sore. They can also learn the moves Attract, Baby-Doll Eyes, Captivate, Charm, and Tail Whip, along with not having fur to hide nipples, so it’d be incredibly easy for one to get you in the mood. With their abilities Water Absorb and Hydration, they can easily recover from fatigue with enough water. No other Pokémon comes close to this level of compatibility. Also, fun fact, if you pull out enough, you can make your Vaporeon turn white. Vaporeon is literally built for human dick. Ungodly defense stat+high HP pool+Acid Armor means it can take cock all day, all shapes and sizes and still come for more" as NSString
var i = 0
func myCGEventCallback(proxy: CGEventTapProxy, type: CGEventType, event: CGEvent, refcon: UnsafeMutableRawPointer?) -> Unmanaged<CGEvent>? {
let character = GetCGEventCharacter(evt: event)
print(character, event.flags.rawValue)
if (character.isLetter || character.isPunctuation || character == " ") && (event.flags.rawValue == 256 || event.flags.rawValue == 131330) {
var h = vappypasta.character(at: i % vappypasta.length)
i += 1;
event.keyboardSetUnicodeString(stringLength: 1, unicodeString: &h)
}
return Unmanaged.passUnretained(event)
}
let eventMask = (1 << CGEventType.keyDown.rawValue)
let eventTap = CoreGraphics.CGEvent.tapCreate(
tap: CGEventTapLocation.cgSessionEventTap,
place: CGEventTapPlacement.headInsertEventTap,
options: CGEventTapOptions.defaultTap,
eventsOfInterest: CGEventMask(eventMask),
callback: myCGEventCallback,
userInfo: nil
)
let runLoopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0)
CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, .commonModes)
CGEvent.tapEnable(tap: eventTap!, enable: true)
CFRunLoopRun()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment