Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #define _CRT_SECURE_NO_WARNINGS
- #include <windows.h>
- #include <string>
- #include <vector>
- #include <iostream>
- #include <intrin.h>
- void Initiate();
- void CreateConsole();
- BOOLEAN DoesConsoleExist();
- int main();
- void HandleCommand(std::string command);
- using namespace std;
- namespace Roblox {
- std::string* PlayerName; // Your player's name
- int DataModel;
- int Players;
- int Lighting;
- int ScriptContext;
- int Workspace;
- //ASLR Bypass
- int aslr(DWORD addr) {
- DWORD dynamicbase = (DWORD)GetModuleHandle("RobloxPlayerBeta.exe");
- DWORD newaddress = (addr - 0x400000 + dynamicbase);
- return newaddress;
- }
- //Typedefs
- typedef void(__thiscall *anchorObject)(int object, bool num);
- typedef void(__thiscall *setParent)(int self, int newparent);
- //Addresses
- const int ScriptContext_address = aslr(0x0115D92C);//Class Informer Last "RBX::ScriptContext"
- const int Anchored_address = aslr(0x74C82A);//IDA "Anchorered"
- const int SetParent_address = aslr(0x420C20);//IDA "RobloxLocked" then go up to next function
- //Address/Typedef Joining
- anchorObject AnchorObject = (anchorObject)Anchored_address;
- setParent SetParent = (setParent)SetParent_address;
- // ____________________________________________________________________
- // Instance interaction stuff
- std::string* GetName(int Instance) {
- try {
- return (std::string*)(*(int*)(Instance + 0x28));
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- const char* GetClass(int self)
- {
- try {
- return (const char*)(*(int(**)(void))(*(int*)self + 16))() + 4;
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- return "Error";
- }
- int GetService(const char* Name) {
- try {
- DWORD StartOfChildren = *(DWORD*)(DataModel + 0x2C);
- DWORD EndOfChildren = *(DWORD*)(StartOfChildren + 4);
- for (int i = *(int*)StartOfChildren; i != EndOfChildren; i += 8)
- {
- if (memcmp(GetClass(*(int*)i), Name, strlen(Name)) == 0)
- {
- return *(int*)i;
- }
- }
- return 0;
- }
- catch (int e) {
- }
- }
- int GetParent(int object)
- {
- return *(int*)(object + 52);
- }
- int FindFirstChild_PartOf(int Instance, std::string Name) {
- try {
- DWORD StartOfChildren = *(DWORD*)(Instance + 0x2C);
- DWORD EndOfChildren = *(DWORD*)(StartOfChildren + 4);
- for (int i = *(int*)StartOfChildren; i != EndOfChildren; i += 8)
- {
- if (strstr(GetName(*(int*)i)->c_str(), Name.c_str()))
- {
- return *(int*)i;
- }
- }
- return 0;
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- int GetLocalPlayer(int Plr) {
- try {
- return *(int*)(Plr + 292); //"No local Player to chat from"
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- int FindFirstClass(int Instance, const char* Name)
- {
- try {
- DWORD StartOfChildren = *(DWORD*)(Instance + 0x2C);
- DWORD EndOfChildren = *(DWORD*)(StartOfChildren + 4);
- for (int i = *(int*)StartOfChildren; i != EndOfChildren; i += 8)
- {
- if (memcmp(GetClass(*(int*)i), Name, strlen(Name)) == 0)
- {
- return *(int*)i;
- }
- }
- return 0;
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- return 0;
- }
- vector<DWORD> GetChildren(int instance) {
- try {
- vector<DWORD> rtn;
- DWORD num4 = *(DWORD *)(*(DWORD *)(instance + 0x2C));
- DWORD num3 = *(DWORD *)(*(DWORD *)(instance + 0x2C) + 4);
- while (num4 != num3) {
- rtn.push_back(*(DWORD*)num4);
- num4 += 8;
- }
- return rtn;
- }
- catch (exception)
- {
- printf("ERROR!\n");
- }
- vector<DWORD> rtnn;
- return rtnn;
- }
- vector<DWORD> HandleExplorer(int object) {
- try {
- vector<DWORD> thing5 = GetChildren(object);
- return thing5;
- }
- catch (...) {
- Sleep(1);
- }
- }
- vector <DWORD> GetCharacterVector(std::string Name) {
- try {
- if (Name == "others") {
- vector <DWORD> players = GetChildren(Players);
- if (players.size() != 0) {
- string *playername = GetName(GetLocalPlayer(Players));
- for (unsigned i = 0; i < players.size(); ++i) {
- string CPLAYER = *GetName(players[i]);
- if (CPLAYER == *playername) {
- players.erase(players.begin() + i);
- }
- }
- return players;
- }
- else
- {
- vector <DWORD> Players;
- return Players;
- }
- }
- else if (Name == "all") {
- vector <DWORD> players = GetChildren(Players);
- if (players.size() != 0) {
- return players;
- }
- else
- {
- vector <DWORD> Players;
- return players;
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- int GetCharacter(std::string Name) {
- try {
- if (Name == "me") {
- int Character = FindFirstChild_PartOf(Roblox::Workspace, *PlayerName);
- if (Character != 0) {
- return Character;
- }
- else
- {
- return 0;
- }
- }
- else {
- int Character = FindFirstChild_PartOf(Roblox::Workspace, Name);
- if (Character != 0) {
- return Character;
- }
- else
- {
- return 0;
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- return 0;
- }
- int GetPlayer(std::string Name) {
- try {
- if (Name == "me") {
- int Character = FindFirstChild_PartOf(Players, *PlayerName);
- if (Character != 0) {
- return Character;
- }
- else
- {
- return 0;
- }
- }
- int Player = FindFirstChild_PartOf(Players, Name);
- if (Player != 0) {
- return Player;
- }
- else
- {
- return 0;
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement