Jump to content

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

    • The Catapult 2: Castle defense v8.1.0 [ +13 Cheats ] Add Currency
      Modded/Hacked App: The Catapult 2: Castle defense By BYV GAMES EOOD
      Bundle ID: com.byv.TheCatapult2
      App Store Link: https://apps.apple.com/us/app/the-catapult-2-castle-defense/id1449450263?uo=4

      🤩 Hack Features

      - Ads No
      - ViP Active
      - Double XP Active
      - Battle Pass Active
      - Unlock All Map
      - Unlock All Weapons
      - Play Any Level
      - Add Currency
      - Add Ticket
      - Aimbot
      - Aim Power
      - Never Die
      - Max Damage
      - Enemy Can't Attack
      • 0 replies
    • The Catapult 2: Castle defense v8.1.0 [ +13 Jailed ] Add Currency
      Modded/Hacked App: The Catapult 2: Castle defense By BYV GAMES EOOD
      Bundle ID: com.byv.TheCatapult2
      App Store Link: https://apps.apple.com/us/app/the-catapult-2-castle-defense/id1449450263?uo=4

      🤩 Hack Features

      - Ads No
      - ViP Active
      - Double XP Active
      - Battle Pass Active
      - Unlock All Map
      - Unlock All Weapons
      - Play Any Level
      - Add Currency
      - Add Ticket
      - Aimbot
      - Aim Power
      - Never Die
      - Max Damage
      - Enemy Can't Attack
      • 2 replies
    • Arcane Breakout +4 Mods [ Damage & Defence ]
      Mod APK Game Name: Arcane Breakout By KEYSTORM HOLDINGS LTD
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.game.arcanebreakout

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Freeze Enemies
      • 1 reply
    • Dream Zone: My Fantasy Episode +2 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Dream Zone: My Fantasy Episode By SWAG MASHA
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.swagmasha.dreamzone

       

      🤩 Hack Features

      - Unlimited Keys -> Spend some.
      - Unlimited Diamonds -> Spend some.
      • 0 replies
    • Love Sparks: Dating Sim +2 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Love Sparks: Dating Sim By SWAG MASHA
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.swagmasha.lovespark

       

      🤩 Hack Features

      - Unlimited Currencies -> Earn or spend some.
      -- VIP Enabled
      • 0 replies
    • Field Day +6 Mods [ Damage & Defence ]
      Mod APK Game Name: Field Day By BIT ODD
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bitodd.vortex

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Freeze Enemies
      - Move Speed Multiplier
      - Kill All Enemies
      • 0 replies
    • Love Sick: My Love Episode +2 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Love Sick: My Love Episode By SWAG MASHA
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.swagmasha.genres

       

      🤩 Hack Features

      - Unlimited Keys -> Spend some.
      - Unlimited Diamonds -> Spend some.
      • 0 replies
    • Field Day +6 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Field Day By BIT ODD oy
      Bundle ID: com.bitodd.vortex
      App Store Link: https://apps.apple.com/us/app/field-day/id6754967275?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Freeze Enemies
      - Move Speed Multiplier
      - Kill All Enemies
      • 0 replies
    • Love Sick: Stories & Choices +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Sick: Stories & Choices By SVEG MASHA, OOO
      Bundle ID: com.swagmasha.genres
      iTunes Store Link: https://apps.apple.com/us/app/love-sick-stories-choices/id1450264153?uo=4


      Hack Features:
      - Unlimited Keys -> Spend some.
      - Unlimited Diamonds -> Spend some.


      Jailbreak required hack(s): [Mod Menu Hack] Love Sick: Stories & Choices ( All Versions ) +2 Cheats [ Unlimited Currencies ] - 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/
      • 79 replies
    • BOOM BOOM TD +4 Mods [ Damage & Defence ]
      Mod APK Game Name: BOOM BOOM TD By Gamezaaa
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.yblbsea.gpgat

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Kill All Enemies
      • 0 replies
    • Slime Hunter Idle Dx +7 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Slime Hunter Idle Dx By Gyeongtae Park
      Bundle ID: com.fingercat.slimehunterworldios
      App Store Link: https://apps.apple.com/us/app/slime-hunter-idle-dx/id6816451708?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Move Speed Multiplier
      - Kill All Enemies
      - Freeze Currencies
      - Unlimited Currencies -> Will increase instead of decrease.
      • 2 replies
    • BOOM BOOM TD +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: BOOM BOOM TD By Cedar Technology HK Limited
      Bundle ID: com.yblbsea.iosgat
      App Store Link: https://apps.apple.com/th/app/boom-boom-td/id6780721388?uo=4

       

      🤩 Hack Features

      - Damage Multiplier 
      - Defence Multiplier
      - God Mode
      - Kill All Enemies
      • 1 reply
×
  • 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