Jump to content

 Something great is coming! 🤖

Stay tuned for the big reveal happening here on iOSGods on the 20th of February!

Bullet Force Mod Menu Source Code


261 posts in this topic

Recommended Posts

Updated (edited)

Updated GitHub: https://github.com/shmoo419/BulletForceModMenu

 

Offsets are removed. A simple, efficient menu based around arrays. Lots of global floats because for some reason, when I passed in a float via a parameter, it went to 0.0 on my device but not in iOS Simulator -_-

Individual calls to writedata are present because for instant reload and always headshot, more than one offset was needed. I tried keeping everything in the arrays but it eventually became a cluttered mess of if statements so I just went with individual calls.

I was able to get away with hardcoding frame values because I'm the only one using this menu.

Hidden Content

    #import <UIKit/UIKit.h>
    #import "writeData.h"
    #import "Macros.h"
    
    void makeZeroXLabel(CGFloat, CGFloat, CGFloat, CGFloat);
    
    int arrayCreationCount = 0;
    
    float labelSpacing = 5.0;
    float switchSpacing = 0.5;
    float bulletTypeAndGrenadeTypeSpacing = 8.0;
    
    float labelXValue = 8.0;
    float labelWidth = 270.0;
    float labelHeight = 21.0;
    
    float switchXValue = 319.0;
    float switchWidth = 51.0;
    float switchHeight = 31.0;
    
    float bulletTypeAndGrenadeTypeXValue = 102.0;
    float bulletTypeAndGrenadeTypeWidth = 173.0;
    float bulletTypeAndGrenadeTypeHeight = 30.0;
    
    NSArray *labelArray;
    NSArray *bulletArray;
    NSArray *grenadeArray;
    
    NSUserDefaults *defaults;
    
    UIBlurEffect *blurEffect;
    UIView *blurEffectView;
    
    UIButton *bulletChooserButton;
    UIButton *closeMenu;
    UIButton *set;
    
    UIView *closeButtonBackgroundView;
    UIView *separator;
    
    UIViewController *main;
    
    UILabel *writeToOffset;
    UILabel *zeroX;
    UILabel *typeStatus;
    
    UIScrollView *normalModsScrollView;
    UIScrollView *bulletTypeScrollView;
    UIScrollView *grenadeTypeScrollView;
    
    UISegmentedControl *pageSelector;
    
    UITextField *offsetTextField;
    UITextField *hexTextField;
    
    UITableView *bulletTypeChooser;
    UITableView *grenadeTypeChooser;
    
    uint64_t offsetArray[20] = {- removed -};
    uint64_t moddedHexArray[17] = {- removed -};
    uint64_t originalHexArray[20] = {- removed -};
    uint64_t chooserHexes[25] = {- removed -};
    
    %hook UnityAppController
    
    - (void)applicationDidBecomeActive:(id)arg1 {
    %orig;
    
    main = [UIApplication sharedApplication].keyWindow.rootViewController;
    
    bulletChooserButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    bulletChooserButton.frame = CGRectMake((main.view.frame.size.width/2)-15,(main.view.frame.size.height/2)+50,30,30);
    bulletChooserButton.backgroundColor = [UIColor clearColor];
    bulletChooserButton.layer.cornerRadius = 16;
    bulletChooserButton.layer.borderWidth = 2.0f;
    bulletChooserButton.layer.borderColor = [UIColor colorWithRed:254.00/255.00 green:184.00/255.00 blue:0.00/255.00 alpha:1.0f].CGColor;
    [bulletChooserButton addTarget:self action:@[member='selectorr'](showMenu) 
    forControlEvents:UIControlEventTouchDragInside];
    [main.view addSubview:bulletChooserButton];
    }
    
    %new
    - (void)showMenu {
        defaults = [NSUserDefaults standardUserDefaults];
    
        if(arrayCreationCount == 0){
    
        [self setupMenuGUI];
        [self setupSwitchesAndLabels];
        [self setupBulletTypeSection];
        [self setupGrenadeTypeSection];
        [self setupCloseButtonStuff];
        }
        
        arrayCreationCount++;
    }
    
    %new
    - (void)setupBulletTypeSection {
        bulletTypeScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 73, 376, 184)];
        bulletTypeScrollView.backgroundColor = [UIColor clearColor];
        bulletTypeScrollView.contentSize = CGSizeMake(376, 640);
        bulletTypeScrollView.hidden = true;
        [blurEffectView addSubview:bulletTypeScrollView];
        
        [self setupBulletTypeButtons];
    }
    
    %new
    - (void)setupGrenadeTypeSection {
        grenadeTypeScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 73, 376, 184)];
        grenadeTypeScrollView.backgroundColor = [UIColor clearColor];
        grenadeTypeScrollView.contentSize = CGSizeMake(376, 0);
        grenadeTypeScrollView.hidden = true;
        [blurEffectView addSubview:grenadeTypeScrollView];
        
        [self setupGrenadeTypeButtons];
    }
    
    %new
    - (void)setupSwitchesAndLabels {
        labelArray = @[@"No Recoil", @"Better Aim", @"Infinite Ammo", @"Modded Gravity", @"Anti Flashbang", @"Everyone Orange", @"Crosshairs Always Enabled", @"25555.0 Pickup Range", @"Sniper Light Shows Through Walls", @"Knife Button Always Shows", @"Knife Faster", @"Debug Rechamber Animation", @"Instant Reload", @"God Mode Lobby", @"Always Headshot", @"All Camos", @"Killstreaks Ready", @"Deaths Don't Count", @"Instant Grenade Explosion"];
        
        UISwitch *s;
        
        for(int i=0; i<[labelArray count]; i++){
            [normalModsScrollView addSubview:[self makeHackLabel:labelArray[i]]];
            
            s = [self makeHackSwitch:i];
            
            [normalModsScrollView addSubview:s];
            [self setSwitchStateBasedOnPrefs:i withSwitch:s];
            
            if([defaults boolForKey:[NSString stringWithFormat:@"%d", (int)s.tag]]){
                [self switchToggled:s];
            }
            
        }
    }
    
    %new
    - (void)setupBulletTypeButtons {
        bulletArray = @[@"Original", @"M4A1", @"Famas", @"AK 12", @"SCAR-H", @"MP5", @"870 MCS", @"M40A5", @"MPX", @"SAIGA 12K", @"MG4", @"AS VAL", @"RPG", @"M200", @"Compact .45", @"MP412 REX", @"M320 HE", @"M320 DART", @"Hand", @"Butterfly Knife", @"G18"];
        
        for(int i=0; i<[bulletArray count]; i++){
            [bulletTypeScrollView addSubview:[self makeTypeChooserButton:bulletArray[i] withTag:i]];
        }
    }
    
    %new
    - (void)setupGrenadeTypeButtons {
        bulletTypeAndGrenadeTypeSpacing = 8.0;
        
        grenadeArray = @[@"Original", @"Frag Grenade", @"Smoke Grenade", @"Flashbang"];
        
        int bulletArrayLength = (int)[bulletArray count];
        
        for(int i=0; i<[grenadeArray count]; i++){
            [grenadeTypeScrollView addSubview:[self makeTypeChooserButton:grenadeArray[i] withTag:i+bulletArrayLength]];
        }
    }
    
    %new
    - (void)setupMenuGUI {
        blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
        
        blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
        blurEffectView.frame = CGRectMake(145, 44, 376, 286);
        [main.view addSubview:blurEffectView];
        
        writeToOffset = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 376, 19)];
        writeToOffset.text = @"Write To A Custom Offset";
        writeToOffset.textAlignment = NSTextAlignmentCenter;
        [writeToOffset setFont:[UIFont systemFontOfSize:12]];
        [blurEffectView addSubview:writeToOffset];
        
        makeZeroXLabel(8, 28, 22, 21);
        [blurEffectView addSubview:zeroX];
        
        makeZeroXLabel(205, 28, 22, 21);
        [blurEffectView addSubview:zeroX];
        
        offsetTextField = [[UITextField alloc] initWithFrame:CGRectMake(29, 24, 140, 30)];
        offsetTextField.placeholder = @"OFFSET";
        offsetTextField.returnKeyType = UIReturnKeyDone;
        offsetTextField.tag = 0;
        [blurEffectView addSubview:offsetTextField];
        
        hexTextField = [[UITextField alloc] initWithFrame:CGRectMake(228, 24, 140, 30)];
        hexTextField.placeholder = @"HEX";
        hexTextField.returnKeyType = UIReturnKeyDone;
        hexTextField.tag = 1;
        [blurEffectView addSubview:hexTextField];
        
        set = [UIButton buttonWithType:UIButtonTypeCustom];
        set.frame = CGRectMake(157, 51, 63, 26);
        set.backgroundColor = [UIColor clearColor];
        [set setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [set setTitle:@"Set" forState:UIControlStateNormal];
        [set addTarget:self action:@[member='selectorr'](writeToCustomOffset) forControlEvents:UIControlEventTouchDown];
        [blurEffectView addSubview:set];
        
        pageSelector = [[UISegmentedControl alloc] initWithItems:@[@"Normal Mods", @"Bullet Type", @"Grenade Type"]];
        pageSelector.frame = CGRectMake(87, 257, 289, 29);
        [pageSelector setSelectedSegmentIndex:0];
        [pageSelector addTarget:self
                         action:@[member='selectorr'](changeView:)
               forControlEvents:UIControlEventValueChanged];
        [blurEffectView addSubview:pageSelector];
        
        normalModsScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 73, 376, 184)];
        normalModsScrollView.backgroundColor = [UIColor clearColor];
        normalModsScrollView.contentSize = CGSizeMake(376, 580);
        [blurEffectView addSubview:normalModsScrollView];
    }
    
    %new
    - (void)setupCloseButtonStuff {
        separator = [[UIView alloc] initWithFrame:CGRectMake(0, 73, 376, 1)];
        separator.backgroundColor = [UIColor blackColor];
        [blurEffectView addSubview:separator];
        
        closeButtonBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 258, 87, 28)];
        closeButtonBackgroundView.backgroundColor = rgb(0xaa0114);
        closeButtonBackgroundView.layer.cornerRadius = 5;
        [blurEffectView addSubview:closeButtonBackgroundView];
        
        closeMenu = [UIButton buttonWithType:UIButtonTypeCustom];
        closeMenu.frame = CGRectMake(0, 258, 87, 30);
        closeMenu.backgroundColor = [UIColor clearColor];
        [closeMenu setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [closeMenu setTitle:@"Close" forState:UIControlStateNormal];
        [closeMenu addTarget:self action:@[member='selectorr'](closeModMenu) forControlEvents:UIControlEventTouchDown];
        [blurEffectView addSubview:closeMenu];
    }
    
    %new
    - (void)setSwitchStateBasedOnPrefs:(int)tag withSwitch:(UISwitch *)s {
        s.on = [defaults boolForKey:[NSString stringWithFormat:@"%d", tag]];
    }
    
    %new
    - (void)switchToggled:(UISwitch *)sender {
        int switchTag = (int)sender.tag;
        
        //instant reload
        if(switchTag == 12){
            if(sender.on){
                write(- removed -, - removed -);
                write(- removed -, - removed -);
            }
            else{
                write(- removed -, - removed -);
                write(- removed -, - removed -);
            }
        }
        else if(switchTag == 13){
            if(sender.on){
                write(offsetArray[switchTag-1], moddedHexArray[switchTag-1]);
            }
            else{
                write(offsetArray[switchTag-1], originalHexArray[switchTag-1]);
            }
        }
        //always headshot
        else if(switchTag == 14){
            if(sender.on){
                write(- removed -, - removed -);
                write(- removed -, - removed -);
                write(- removed -, - removed -);
            }
            else{
                write(- removed -, - removed -);
                write(- removed -, - removed -);
                write(- removed -, - removed -);
            }
        }
        else{
            if(switchTag > 14){
                if(sender.on){
                    write(offsetArray[switchTag-2], moddedHexArray[switchTag-2]);
                }
                else{
                    write(offsetArray[switchTag-2], originalHexArray[switchTag-2]);
                }
            }
            else{
                if(sender.on){
                    write(offsetArray[switchTag], moddedHexArray[switchTag]);
                }
                else{
                    write(offsetArray[switchTag], originalHexArray[switchTag]);
                }
            }
        }
        
        [defaults setBool:sender.on forKey:[NSString stringWithFormat:@"%d", (int)sender.tag]];
    }
    
    %new
    - (void)changeView:(UISegmentedControl *)sender {
        [self showViewBasedOnSelectedIndex:(int)pageSelector.selectedSegmentIndex];
    }
    
    %new
    - (void)writeToCustomOffset {
        [offsetTextField resignFirstResponder];
        [hexTextField resignFirstResponder];
        
        write([offsetTextField.text longLongValue], [hexTextField.text longLongValue]);
        
        offsetTextField.text = @"";
        hexTextField.text = @"";
    }
    
    %new
    - (void)applyTypeChooserHack:(UIButton *)button {
        [typeStatus removeFromSuperview];
        
        NSAttributedString *typeStatusBold;
        NSString *text;
    
        if((int)button.tag>19){
            write(- removed -, chooserHexes[(int)button.tag]);
    
            text = [NSString stringWithFormat:@"Grenade type changed to %@", button.titleLabel.text];
        }
        else{
            write(- removed -, chooserHexes[(int)button.tag]);
    
            text = [NSString stringWithFormat:@"Bullet type changed to %@", button.titleLabel.text];
        }
        
        typeStatus = [[UILabel alloc] initWithFrame:CGRectMake(138, 6, 391, 21)];
        typeStatus.textColor = [UIColor redColor];
        typeStatus.textAlignment = NSTextAlignmentCenter;
        typeStatusBold = [[NSAttributedString alloc] initWithString:text
                                                         attributes:@{ NSFontAttributeName: [UIFont boldSystemFontOfSize:18.0] }];
        typeStatus.attributedText = typeStatusBold;
        
        [main.view addSubview:typeStatus];
        
        [self performSelector:@[member='selectorr'](removeLabel) withObject:@NO afterDelay:3];
    }
    
    %new
    - (void)showViewBasedOnSelectedIndex:(int)index {
        if(index == 0){
            bulletTypeScrollView.hidden = true;
            grenadeTypeScrollView.hidden = true;
            normalModsScrollView.hidden = false;
        }
        else if(index == 1){
            bulletTypeScrollView.hidden = false;
            grenadeTypeScrollView.hidden = true;
            normalModsScrollView.hidden = true;
        }
        else{
            bulletTypeScrollView.hidden = true;
            grenadeTypeScrollView.hidden = false;
            normalModsScrollView.hidden = true;
        }
    }
    
    %new
    - (UIButton *)makeTypeChooserButton:(NSString *)title withTag:(int)tag {
        UIButton *toReturn = [UIButton buttonWithType:UIButtonTypeCustom];
        toReturn.frame = CGRectMake(bulletTypeAndGrenadeTypeXValue, bulletTypeAndGrenadeTypeSpacing, bulletTypeAndGrenadeTypeWidth, bulletTypeAndGrenadeTypeHeight);
        toReturn.backgroundColor = [UIColor clearColor];
        toReturn.tag = tag;
        [toReturn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [toReturn setTitle:title forState:UIControlStateNormal];
        [toReturn addTarget:self action:@[member='selectorr'](applyTypeChooserHack:) forControlEvents:UIControlEventTouchDown];
    
        bulletTypeAndGrenadeTypeSpacing+=30.0f;
    
        return toReturn;
    }
    
    %new
    - (UISwitch *)makeHackSwitch:(int)tag {
        UISwitch *toReturn = [[UISwitch alloc] initWithFrame:CGRectMake(switchXValue, switchSpacing, switchWidth, switchHeight)];
        toReturn.transform = CGAffineTransformMakeScale(0.5, 0.5);
        toReturn.onTintColor = rgb(0x228b28);
        toReturn.tag = tag;
        [toReturn addTarget:self action:@[member='selectorr'](switchToggled:) forControlEvents:UIControlEventValueChanged];
    
        switchSpacing+=30.0f;
        
        return toReturn;
    }
    
    %new
    - (UILabel *)makeHackLabel:(NSString *)text {
        UILabel *toReturn = [[UILabel alloc] initWithFrame:CGRectMake(labelXValue, labelSpacing, labelWidth, labelHeight)];
        toReturn.text = text;
    
        labelSpacing+=30.0f;
        
        return toReturn;
    }
    
    %new
    - (void)removeLabel {
        [typeStatus removeFromSuperview];
    }
    
    %new
    - (void)closeModMenu {
        arrayCreationCount = 0;
        labelSpacing = 5.0;
        switchSpacing = 0.5;
        bulletTypeAndGrenadeTypeSpacing = 8.0;
    
        [blurEffectView removeFromSuperview];
    }
    %end
    
    void makeZeroXLabel(CGFloat x, CGFloat y, CGFloat w, CGFloat h){
        zeroX = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
        zeroX.text = @"0x";
    }

Updated by Guest
Posted

This is superb @Shmoo well done. And I know you pretty much spend a lot of time working on the GUI and though it is totally in individual because of the array.

 

But it's okay then. +Rep. :)

  • Our picks

    • Idle Miner Tycoon: Gold Games v5.42.0 +100++ Mods [ Game Breaking ]
      Mod APK Game Name: Idle Miner Tycoon: Gold Games By Kolibri Games
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.fluffyfairygames.idleminertycoon

       

      🤩 Hack Features

      - Debug Menu -> Head over to Settings and toggle the Sound button. 
      • 10 replies
    • Idle Miner Tycoon: Money Games v5.43.0 +100++ Jailed Cheats [ Game Breaking ]
      Modded/Hacked App: Idle Miner Tycoon: Money Games By Kolibri Games GmbH
      Bundle ID: com.fluffyfairygames.idleminertycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-miner-tycoon-money-games/id1116645064
       

      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Jailbreak required hack(s): [Mod Menu Hack] Idle Miner Tycoon: Money Games v4.4.0 +1++ Cheats [ Game Breaking ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 502 replies
    • Stick Cricket Clash v2.2.10 [ +3 Cheats ] Currency Freeze
      Modded/Hacked App: Stick Cricket Clash By Stick Sports Ltd
      Bundle ID: com.sticksports.stickcricketclash
      iTunes Store Link: https://apps.apple.com/us/app/stick-cricket-clash/id6444344271?uo=4



      Hack Features:
      - Currency Freeze
      - Score Win All Match
      - Ads Reward 



      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 50 replies
    • Stick Cricket Clash v2.2.10 [ +3 Jailed ] Currency Freeze
      Modded/Hacked App: Stick Cricket Clash By Stick Sports Ltd
      Bundle ID: com.sticksports.stickcricketclash
      iTunes Store Link: https://apps.apple.com/us/app/stick-cricket-clash/id6444344271?uo=4


      Hack Features:
      - Currency Freeze
      - Score [ Win All Match ]
      - Ads Reward 


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 29 replies
    • Disney Solitaire v1.14.2 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/ph/app/disney-solitaire/id6475757306?uo=4
       

      🤩 Hack Features

      - Coins [ Win Match ]

      - Task [ No Need Star ]

      - Stars

      - Undo

      - Wild Card

      - Free Ticket

      - Auto Win
      • 53 replies
    • Disney Solitaire v1.14.2 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/ph/app/disney-solitaire/id6475757306?uo=4


      🤩 Hack Features

      - Coins [ Win Match ]

      - Task [ No Need Star ]

      - Stars

      - Undo

      - Wild Card

      - Free Ticket

      - Auto Win
      • 58 replies
    • Crozzle - Crossword Puzzles v1.48.0 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Crozzle - Crossword Puzzles By MAG Interactive AB
      Bundle ID: se.maginteractive.crozzle
      App Store Link: https://apps.apple.com/ph/app/crozzle-crossword-puzzles/id6474729809?uo=4

      🤩 Hack Features

      - Auto ADS OFF
      - Unlimited Currency / Visual But Works
      - Unlimited Resources / Visual But Works
      • 16 replies
    • Crozzle - Crossword Puzzles v1.48.0 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Crozzle - Crossword Puzzles By MAG Interactive AB
      Bundle ID: se.maginteractive.crozzle
      App Store Link: https://apps.apple.com/ph/app/crozzle-crossword-puzzles/id6474729809?uo=4

      🤩 Hack Features

      - Auto ADS OFF
      - Unlimited Currency / Visual But Works
      - Unlimited Resources / Visual But Works
      • 15 replies
    • Merge Beach : Gossip & Mystery v1.0.0 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge Beach : Gossip & Mystery By 1GRAM
      Bundle ID: com.ongram.merge.beach.gossip.mystery
      App Store Link: https://apps.apple.com/us/app/merge-beach-gossip-mystery/id6746242808?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      • 6 replies
    • Merge Beach : Gossip & Mystery v1.0.0 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Merge Beach : Gossip & Mystery By 1GRAM
      Bundle ID: com.ongram.merge.beach.gossip.mystery
      App Store Link: https://apps.apple.com/us/app/merge-beach-gossip-mystery/id6746242808?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coin
      - Unlimited Energy
      • 8 replies
    • Pop Island v1.5.2 [ +1 Cheats ] Coins Max
      Modded/Hacked App: Pop Island By HISTAR INTERACTIVE PTE. LTD.
      Bundle ID: com.hmbdgames.match
      iTunes Store Link: https://apps.apple.com/us/app/pop-island/id6505047210?uo=4


      🤩 Hack Features

      - Coins [ Win Match Disable After Hack ]


      • 37 replies
    • Pop Island v1.5.2 [ +1 Jailed ] Coins Max
      Modded/Hacked App: Pop Island By HISTAR INTERACTIVE PTE. LTD.
      Bundle ID: com.hmbdgames.match
      iTunes Store Link: https://apps.apple.com/us/app/pop-island/id6505047210?uo=4


      🤩 Hack Features

      - Coins [ Win Match Disable After Hack ]


      • 40 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines