GithubHelp home page GithubHelp logo

ios-mod-menu-template-for-theos's Introduction

iOS Mod Menu Template for Theos!

Sample UI of the Menu:

Features:

  • Customizable UI

  • Customizable menu & button image icon

  • 4 types of switches:

    • Offset Patcher Switch
    • Empty Switch
    • Textfield Switch
    • Slider Switch
  • Backend Offset Patcher Switch is based on KittyMemory

    • Original bytes are not required
    • Supports MSHookMemory
    • Write unlimited bytes to a offset
  • Compile-time string encryption

  • Open Source Menu


Installation:

You can download the template here: Latest Release.
iOS

  1. In the makefile on line 22, you've to set the path to your SDK. This menu has been tested with the "iPhoneOS11.2.sdk" SDK from theos/sdks
  2. I use initializer_list in this project, iOS doesn't have this included by itself. You can download it here, save it as "initializer_list" and copy the file to: "$THEOS/sdks/iPhoneOS11.2.sdk/usr/include/c++/4.2.1/"

MacOS:

  1. Install xCode if you haven't already.
  2. In the Makefile of the project, change "MOBILE_THEOS=1" to "MOBILE_THEOS=0"

Menu setup:

Changing the menu images Inside the Tweak.xm, you'll setup the menu under the function "setupMenu". Here you'll see two options under the menu: menuIcon & menuButton, those require a base64 image string. In order to get a base64 string from the image, upload the image here: https://www.browserling.com/tools/image-to-base64

Images 50x50 are recommended, you can get a sample of my images by copying the standard(in tweak.xm) base64 string & use this website to show the picture: https://base64.guru/converter/decode/image

Setting a framework as executable You can set this in the function setupMenu() inside Tweak.xm

[menu setFrameworkName:"FrameworkName"];

Menu usage:

Encryption

A quick note before showing all the switch examples; You can and should encrypt offsets, hexes, c-strings and NSStrings. Below you can find the proper syntax per string-type.

Offsets:

ENCRYPTOFFSET("0x10047FD90")

Hexes:

ENCRYPTHEX("0x00F0271E0008201EC0035FD6")

C-strings:

ENCRYPT("I am a c-string")

NSStrings:

NSSENCRYPT("Copperplate-Bold")

Patching a offset without switch:

patchOffset(ENCRYPTOFFSET("0x1002DB3C8"), ENCRYPTHEX("0xC0035FD6"));
patchOffset(ENCRYPTOFFSET("0x10020D2D4"), ENCRYPTHEX("0x00008052C0035FD6"));
// You can write as many bytes as you want to an offset
patchOffset(ENCRYPTOFFSET("0x10020D3A8"), ENCRYPTHEX("0x00F0271E0008201EC0035FD6"));
// or  
patchOffset(ENCRYPTOFFSET("0x10020D3A8"), ENCRYPTHEX("00F0271E0008201EC0035FD6"));
// spaces are fine too
patchOffset(ENCRYPTOFFSET("0x10020D3A8"), ENCRYPTHEX("00 F0 27 1E 00 08 20 1E C0 03 5F D6"));

Offset Patcher Switch:

  [switches addOffsetSwitch:NSSENCRYPT("One Hit Kill")
    description:NSSENCRYPT("Enemy will die instantly")
    offsets: {
      ENCRYPTOFFSET("0x1001BB2C0"),
      ENCRYPTOFFSET("0x1002CB3B0"),
      ENCRYPTOFFSET("0x1002CB3B8")
    }
    bytes: {
      ENCRYPTHEX("0x00E0BF12C0035FD6"),
      ENCRYPTHEX("0xC0035FD6"),
      ENCRYPTHEX("0x00F0271E0008201EC0035FD6")
    }
  ];

Empty Switch:

[switches addSwitch:NSSENCRYPT("Masskill")
  description:NSSENCRYPT("Teleport all enemies to you without them knowing")
];

Textfield Switch:

[switches addTextfieldSwitch:NSSENCRYPT("Custom Gold")
  description:NSSENCRYPT("Here you can enter your own gold amount")
  inputBorderColor:UIColorFromHex(0xBD0000)
];

Slider Switch:

[switches addSliderSwitch:NSSENCRYPT("Custom Move Speed")
  description:NSSENCRYPT("Set your custom move speed")
  minimumValue:0
  maximumValue:10
  sliderColor:UIColorFromHex(0xBD0000)
];

Checking if a switch is on:

bool isOn = [switches isSwitchOn:NSSENCRYPT("Switch Name Goes Here")];
if(isOn) {
  //Do stuff
}

//Or check directly:
if([switches isSwitchOn:NSSENCRYPT("Switch Name Goes Here")]) {
    // Do stuff
}

Getting textfield or slider value:

int userValue = [[switches getValueFromSwitch:NSSENCRYPT("Switch Name Goes Here")] intValue];
float userValue2 = [[switches getValueFromSwitch:NSSENCRYPT("Switch Name Goes Here")] floatValue];

Credits:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.