Advertisement
ejectedmatrix

Untitled

Feb 2nd, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 16.77 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include <vector>
  4. #include <string>
  5. #include <iterator>
  6. #include <sstream>
  7. #include <algorithm>
  8. #include "customrbx.h"
  9. #include "aobscan.h"
  10.  
  11. using namespace std;
  12.  
  13. #define SCVFTable 0x00C57844
  14.  
  15. class Vector3 {
  16.     float X, Y, Z;
  17. public:
  18.     Vector3(float x, float y, float z) {
  19.         X = x;
  20.         Y = y;
  21.         Z = z;
  22.     }
  23. };
  24.  
  25. typedef float(__thiscall *s1)(int Object, int Object2);
  26. s1 SetInstParent = (s1)(0x1BE30 + (DWORD)GetModuleHandle(0));
  27.  
  28. typedef float(__thiscall *s2)(int Object, Vector3 Position);
  29. s2 MoveTo = (s2)(0x38DBB0 + (DWORD)GetModuleHandle(0));
  30.  
  31. typedef float(__thiscall *s3)(int Object, bool Anchored);
  32. s3 SetAnchored = (s3)(0x31F18A + (DWORD)GetModuleHandle(0));
  33.  
  34. int MADX = 0x15037CC + (DWORD)GetModuleHandle(0);
  35. int MADY = MADX + 4;
  36. int MADZ = MADY + 4;
  37.  
  38. HWND ParentWindow;
  39. HWND MainWindow;
  40. HWND LUAWINDOW;
  41. HWND LuaEditor;
  42. HWND Output;
  43. HWND Input;
  44. HMENU WindowMenu;
  45. HMODULE HInstance;
  46.  
  47. #define MONO_CREDITS (WM_APP + 101)
  48. #define MONO_LUAENV (WM_APP + 102)
  49. #define LUA_EXECUTE (WM_APP + 103)
  50. #define OUTPUT_CLEAR (WM_APP + 104)
  51. #define EXECUTE_COMMAND (WM_APP + 105)
  52. #define QUICK_COMMAND_KILLALL (WM_APP + 106)
  53.  
  54. int DataModel = 0;
  55. int Players = 0;
  56. int Workspace = 0;
  57. int Lighting = 0;
  58. int LocalPlayer = 0;
  59. string LocalPlayerName = "";
  60.  
  61. HFONT textFont = CreateFont(18, 0, 0, 0, FW_LIGHT, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, VARIABLE_PITCH, TEXT("Segoe UI"));
  62.  
  63. void Print(string Text)
  64. {
  65.     int nLength = GetWindowTextLength(Output);
  66.     SendMessage(Output, EM_SETSEL, (WPARAM)nLength, (LPARAM)nLength);
  67.     SendMessage(Output, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)Text.c_str());
  68.     SendMessage(Output, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)"\n");
  69. }
  70.  
  71. vector<string> split(string s) {
  72.     vector<string> elems;
  73.     stringstream ss(s);
  74.     istream_iterator<string> begin(ss);
  75.     istream_iterator<string> end;
  76.     vector<string> vstrings(begin, end);
  77.     return vstrings;
  78. }
  79.  
  80. vector<int> GetPlayers(string Name, int Me) {
  81.     vector<int> Victims;
  82.     string LN = RBX::GetName(LocalPlayer);
  83.     transform(Name.begin(), Name.end(), Name.begin(), tolower);
  84.     if (Name == "me") {
  85.         Victims.push_back(Me);
  86.     }
  87.     else if (Name == "all") {
  88.         vector<int> Children = RBX::GetChildren(Players);
  89.         for (int i = 0; i < Children.size(); i++) {
  90.             Victims.push_back(Children.at(i));
  91.         }
  92.     }
  93.     else if (Name == "others") {
  94.         vector<int> Children = RBX::GetChildren(Players);
  95.         for (int i = 0; i < Children.size(); i++) {
  96.             string N = RBX::GetName(Children.at(i));
  97.             if (N != LN) {
  98.                 Victims.push_back(Children.at(i));
  99.             }
  100.         }
  101.     }
  102.     else {
  103.         vector<int> Children = RBX::GetChildren(Players);
  104.         for (int i = 0; i < Children.size(); i++) {
  105.             string N = RBX::GetName(Children.at(i));
  106.             transform(N.begin(), N.end(), N.begin(), tolower);
  107.             if (N.substr(0, strlen(Name.c_str())) == Name) {
  108.                 Victims.push_back(Children.at(i));
  109.             }
  110.         }
  111.     }
  112.     return Victims;
  113. }
  114.  
  115. int GetCharacter(int Player) {
  116.     return RBX::FindFirstChild(Workspace, RBX::GetName(Player));
  117. }
  118.  
  119. int ProcessCmd(string Cmd) {
  120.     vector<string> Arguments = split(Cmd);
  121.     if (Arguments.size() > 0) {
  122.         if (Arguments.at(0) == "cmds") {
  123.             Print(Commands);
  124.         }
  125.         else if (Arguments.at(0) == "clear") {
  126.             SendMessage(Output, WM_SETTEXT, (WPARAM)"", (LPARAM)"Output cleared!\r\n");
  127.         }
  128.     }
  129.     if (Arguments.size() > 1) {
  130.         if (Arguments.at(0) == "kill") {
  131.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  132.             for (int i = 0; i < Victims.size(); i++) {
  133.                 int Char = GetCharacter(Victims.at(i));
  134.                 if (Char != 0) {
  135.                     int Head = RBX::FindFirstChild(Char, "Head");
  136.                     if (Head != 0) {
  137.                         SetInstParent(Head, Lighting);
  138.                     }
  139.                 }
  140.             }
  141.         }
  142.         else if (Arguments.at(0) == "rh") {
  143.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  144.             for (int i = 0; i < Victims.size(); i++) {
  145.                 int Char = GetCharacter(Victims.at(i));
  146.                 if (Char != 0) {
  147.                     int Hum = RBX::FindFirstChild(Char, "Humanoid");
  148.                     if (Hum != 0) {
  149.                         SetInstParent(Hum, Lighting);
  150.                     }
  151.                 }
  152.             }
  153.         }
  154.         else if (Arguments.at(0) == "punish") {
  155.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  156.             for (int i = 0; i < Victims.size(); i++) {
  157.                 int Char = GetCharacter(Victims.at(i));
  158.                 if (Char != 0) {
  159.                     SetInstParent(Char, Lighting);
  160.                 }
  161.             }
  162.         }
  163.         else if (Arguments.at(0) == "unpunish") {
  164.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  165.             for (int i = 0; i < Victims.size(); i++) {
  166.                 int Char = RBX::FindFirstChild(Lighting, RBX::GetName(Victims.at(i)));
  167.                 if (Char != 0) {
  168.                     SetInstParent(Char, Workspace);
  169.                 }
  170.             }
  171.         }
  172.         else if (Arguments.at(0) == "stools") {
  173.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  174.             int MyBackpack = RBX::FindFirstChild(LocalPlayer, "Backpack");
  175.             if (MyBackpack != 0) {
  176.                 for (int i = 0; i < Victims.size(); i++) {
  177.                     int Backpack = RBX::FindFirstChild(Victims.at(i), "Backpack");
  178.                     if (Backpack != 0) {
  179.                         vector<int> Tools = RBX::GetChildren(Backpack);
  180.                         for (int x = 0; x < Tools.size(); x++) {
  181.                             SetInstParent(Tools.at(x), MyBackpack);
  182.                         }
  183.                     }
  184.                 }
  185.             }
  186.         }
  187.         else if (Arguments.at(0) == "naked") {
  188.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  189.             for (int i = 0; i < Victims.size(); i++) {
  190.                 int Char = GetCharacter(Victims.at(i));
  191.                 if (Char != 0) {
  192.                     vector<int> Children = RBX::GetChildren(Char);
  193.                     for (int x = 0; x < Children.size(); x++) {
  194.                         if (RBX::GetName(Children.at(x)) == "Pants" || RBX::GetName(Children.at(x)) == "Shirt") {
  195.                             SetInstParent(Children.at(x), Lighting);
  196.                         }
  197.                     }
  198.                 }
  199.             }
  200.         }
  201.         else if (Arguments.at(0) == "rlimbs") {
  202.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  203.             for (int i = 0; i < Victims.size(); i++) {
  204.                 int Char = GetCharacter(Victims.at(i));
  205.                 if (Char != 0) {
  206.                     int RArm = RBX::FindFirstChild(Char, "Right Arm");
  207.                     if (RArm != 0) {
  208.                         SetInstParent(RArm, Lighting);
  209.                     }
  210.                     int LArm = RBX::FindFirstChild(Char, "Left Arm");
  211.                     if (LArm != 0) {
  212.                         SetInstParent(LArm, Lighting);
  213.                     }
  214.                     int RLeg = RBX::FindFirstChild(Char, "Right Leg");
  215.                     if (RLeg != 0) {
  216.                         SetInstParent(RLeg, Lighting);
  217.                     }
  218.                     int LLeg = RBX::FindFirstChild(Char, "Left Leg");
  219.                     if (LLeg != 0) {
  220.                         SetInstParent(LLeg, Lighting);
  221.                     }
  222.                 }
  223.             }
  224.         }
  225.         else if (Arguments.at(0) == "rlegs") {
  226.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  227.             for (int i = 0; i < Victims.size(); i++) {
  228.                 int Char = GetCharacter(Victims.at(i));
  229.                 if (Char != 0) {
  230.                     int RLeg = RBX::FindFirstChild(Char, "Right Leg");
  231.                     if (RLeg != 0) {
  232.                         SetInstParent(RLeg, Lighting);
  233.                     }
  234.                     int LLeg = RBX::FindFirstChild(Char, "Left Leg");
  235.                     if (LLeg != 0) {
  236.                         SetInstParent(LLeg, Lighting);
  237.                     }
  238.                 }
  239.             }
  240.         }
  241.         else if (Arguments.at(0) == "rarms") {
  242.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  243.             for (int i = 0; i < Victims.size(); i++) {
  244.                 int Char = GetCharacter(Victims.at(i));
  245.                 if (Char != 0) {
  246.                     int RArm = RBX::FindFirstChild(Char, "Right Arm");
  247.                     if (RArm != 0) {
  248.                         SetInstParent(RArm, Lighting);
  249.                     }
  250.                     int LArm = RBX::FindFirstChild(Char, "Left Arm");
  251.                     if (LArm != 0) {
  252.                         SetInstParent(LArm, Lighting);
  253.                     }
  254.                 }
  255.             }
  256.         }
  257.         else if (Arguments.at(0) == "blockhead") {
  258.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  259.             for (int i = 0; i < Victims.size(); i++) {
  260.                 int Char = GetCharacter(Victims.at(i));
  261.                 if (Char != 0) {
  262.                     int Head = RBX::FindFirstChild(Char, "Head");
  263.                     if (Head != 0) {
  264.                         int Mesh = RBX::FindFirstChild(Head, "Mesh");
  265.                         if (Mesh != 0) {
  266.                             SetInstParent(Mesh, Char);
  267.                         }
  268.                     }
  269.                 }
  270.             }
  271.         }
  272.         else if (Arguments.at(0) == "normalhead") {
  273.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  274.             for (int i = 0; i < Victims.size(); i++) {
  275.                 int Char = GetCharacter(Victims.at(i));
  276.                 if (Char != 0) {
  277.                     int Head = RBX::FindFirstChild(Char, "Head");
  278.                     if (Head != 0) {
  279.                         int Mesh = RBX::FindFirstChild(Char, "Mesh");
  280.                         if (Mesh != 0) {
  281.                             SetInstParent(Mesh, Head);
  282.                         }
  283.                     }
  284.                 }
  285.             }
  286.         }
  287.         else if (Arguments.at(0) == "faceless") {
  288.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  289.             for (int i = 0; i < Victims.size(); i++) {
  290.                 int Char = GetCharacter(Victims.at(i));
  291.                 if (Char != 0) {
  292.                     int Head = RBX::FindFirstChild(Char, "Head");
  293.                     if (Head != 0) {
  294.                         int Face = RBX::FindFirstChild(Head, "face");
  295.                         if (Face != 0) {
  296.                             SetInstParent(Face, Char);
  297.                         }
  298.                     }
  299.                 }
  300.             }
  301.         }
  302.         else if (Arguments.at(0) == "face") {
  303.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  304.             for (int i = 0; i < Victims.size(); i++) {
  305.                 int Char = GetCharacter(Victims.at(i));
  306.                 if (Char != 0) {
  307.                     int Head = RBX::FindFirstChild(Char, "Head");
  308.                     if (Head != 0) {
  309.                         int Face = RBX::FindFirstChild(Char, "face");
  310.                         if (Face != 0) {
  311.                             SetInstParent(Face, Head);
  312.                         }
  313.                     }
  314.                 }
  315.             }
  316.         }
  317.         else if (Arguments.at(0) == "freeze") {
  318.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  319.             for (int i = 0; i < Victims.size(); i++) {
  320.                 int Char = GetCharacter(Victims.at(i));
  321.                 if (Char != 0) {
  322.                     int Torso = RBX::FindFirstChild(Char, "Torso");
  323.                     if (Torso != 0) {
  324.                         SetAnchored(Torso, true);
  325.                     }
  326.                 }
  327.             }
  328.         }
  329.         else if (Arguments.at(0) == "thaw") {
  330.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  331.             for (int i = 0; i < Victims.size(); i++) {
  332.                 int Char = GetCharacter(Victims.at(i));
  333.                 if (Char != 0) {
  334.                     int Torso = RBX::FindFirstChild(Char, "Torso");
  335.                     if (Torso != 0) {
  336.                         SetAnchored(Torso, false);
  337.                     }
  338.                 }
  339.             }
  340.         }
  341.     }
  342.     if (Arguments.size() > 2) {
  343.         if (Arguments.at(0) == "stealstat") {
  344.             vector<int> Victims = GetPlayers(Arguments.at(1), LocalPlayer);
  345.             for (int i = 0; i < Victims.size(); i++) {
  346.                 int Leaderstats = RBX::FindFirstChild(Victims.at(0), "leaderstats");
  347.                 if (Leaderstats != 0) {
  348.                     int Stat = RBX::FindFirstChild(Leaderstats, Arguments.at(2));
  349.                     if (Stat != 0) {
  350.                         int myLeaderstats = RBX::FindFirstChild(LocalPlayer, "leaderstats");
  351.                         if (myLeaderstats != 0) {
  352.                             int myStat = RBX::FindFirstChild(myLeaderstats, Arguments.at(2));
  353.                             SetInstParent(Stat, myLeaderstats);
  354.                             Sleep(50);
  355.                             SetInstParent(myStat, Leaderstats);
  356.                         }
  357.                     }
  358.                 }
  359.             }
  360.         }
  361.     }
  362.     return 0;
  363. }
  364.  
  365. void RunCommand() {
  366.     char buffer[256];
  367.     GetWindowText(Input, buffer, sizeof(buffer));
  368.     string cmd = (string)buffer;
  369.     ProcessCmd(cmd);
  370. }
  371.  
  372. int CreateLuaWindow() {
  373.     LUAWINDOW = CreateWindowEx(0, "MonoSploit", "Lua Environment", WS_SYSMENU | WS_MINIMIZEBOX, 200, 200, 350, 350, NULL, NULL, HInstance, NULL);
  374.     SetWindowPos(LUAWINDOW, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
  375.     LuaEditor = CreateWindowEx(NULL, "EDIT", "Coming soon!", WS_CHILD | WS_BORDER | ES_MULTILINE | WS_VISIBLE | ES_AUTOVSCROLL, 10, 10, 322, 260, LUAWINDOW, NULL, HInstance, 0);
  376.     HWND Execute = CreateWindowEx(NULL, "BUTTON", "Execute", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 10, 278, 322, 35, LUAWINDOW, (HMENU)LUA_EXECUTE, HInstance, 0);
  377.     SendMessage(LuaEditor, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  378.     ShowWindow(LUAWINDOW, SW_SHOWNORMAL);
  379.     return 0;
  380. }
  381.  
  382. LRESULT CALLBACK DLLWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
  383. {
  384.     switch (message) {
  385.     case WM_CTLCOLORSTATIC:
  386.     {
  387.         HDC hEdit = (HDC)wParam;
  388.         SetTextColor(hEdit, RGB(0, 0, 0));
  389.         SetBkColor(hEdit, RGB(255, 255, 255));
  390.         return (LRESULT)GetStockObject(WHITE_BRUSH);
  391.     }
  392.     case WM_COMMAND:
  393.         switch (wParam) {
  394.         case MONO_LUAENV:
  395.             CreateLuaWindow();
  396.             break;
  397.         case OUTPUT_CLEAR:
  398.             SendMessage(Output, WM_SETTEXT, (WPARAM)"", (LPARAM)"Output cleared!\r\n");
  399.             break;
  400.         case QUICK_COMMAND_KILLALL:
  401.             ProcessCmd("kill all");
  402.             break;
  403.         case EXECUTE_COMMAND:
  404.             RunCommand();
  405.             break;
  406.         case LUA_EXECUTE:
  407.             char buffer[100000];
  408.             GetWindowText(LuaEditor, buffer, sizeof(buffer));
  409.             string source = (string)buffer;
  410.             MessageBox(0, "This feature is not working yet :(", "Coming soon", 0);
  411.             break;
  412.         }
  413.         break;
  414.     case WM_DESTROY:
  415.         if (hwnd == MainWindow) {
  416.             ExitThread(0);
  417.         }
  418.         break;
  419.     case WM_QUIT:
  420.         if (hwnd == MainWindow) {
  421.             ExitThread(0);
  422.         }
  423.         break;
  424.     default:
  425.         return DefWindowProc(hwnd, message, wParam, lParam);
  426.     }
  427. }
  428.  
  429. BOOL RegisterWindowClass(const char* wClassName) {
  430.     WNDCLASSEX nClass;
  431.  
  432.     nClass.cbSize = sizeof(WNDCLASSEX);
  433.     nClass.style = CS_DBLCLKS;
  434.     nClass.lpfnWndProc = DLLWindowProc;
  435.     nClass.cbClsExtra = 0;
  436.     nClass.cbWndExtra = 0;
  437.     nClass.hInstance = GetModuleHandle(NULL);
  438.     nClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
  439.     nClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
  440.     nClass.hCursor = LoadCursor(NULL, IDC_ARROW);
  441.     nClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
  442.     nClass.lpszMenuName = "MonoSploitMenu";
  443.     nClass.lpszClassName = wClassName;
  444.  
  445.     if (!RegisterClassEx(&nClass))
  446.         return 0;
  447.  
  448.     return 1;
  449. }
  450.  
  451. BOOL StartMessageLoop() {
  452.     MSG msg;
  453.     BOOL bRet;
  454.  
  455.     while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
  456.     {
  457.         if (bRet == 0) {
  458.             return 0;
  459.         }
  460.         else if (bRet == -1)
  461.         {
  462.             return 0;
  463.         }
  464.         else
  465.         {
  466.             TranslateMessage(&msg);
  467.             DispatchMessage(&msg);
  468.         }
  469.     }
  470. }
  471.  
  472. BOOL InitiateWindow() {
  473.     HInstance = GetModuleHandle(NULL);
  474.  
  475.     UnregisterClass("MonoSploit", HInstance);
  476.     RegisterWindowClass("MonoSploit");
  477.  
  478.     WindowMenu = CreateMenu();
  479.  
  480.     HMENU aboutDropdown = CreatePopupMenu();
  481.     AppendMenu(aboutDropdown, MF_STRING, MONO_LUAENV, "Lua Environment");
  482.  
  483.     AppendMenu(WindowMenu, MF_POPUP, (UINT_PTR)aboutDropdown, "View");
  484.  
  485.     MainWindow = CreateWindowEx(0, "MonoSploit", "MonoSploit (Alpha)", WS_SYSMENU | WS_MINIMIZEBOX, 100, 100, 570, 340, NULL, WindowMenu, HInstance, NULL);
  486.     Output = CreateWindowEx(NULL, "EDIT", "", WS_CHILD | WS_BORDER | WS_VSCROLL | ES_MULTILINE | WS_VISIBLE | ES_READONLY | ES_AUTOVSCROLL, 10, 10, 440, 242, MainWindow, NULL, HInstance, 0);
  487.     Input = CreateWindowEx(NULL, "EDIT", "", WS_CHILD | WS_BORDER | WS_VISIBLE | ES_WANTRETURN | ES_MULTILINE, 10, 258, 365, 22, MainWindow, WindowMenu, HInstance, 0);
  488.  
  489.     HWND CommandExecuteButton = CreateWindowEx(NULL, "BUTTON", "Execute", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 380, 258, 70, 22, MainWindow, (HMENU)EXECUTE_COMMAND, HInstance, 0);
  490.  
  491.     HWND OutputClearButton = CreateWindowEx(NULL, "BUTTON", "Clear", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 460, 10, 90, 25, MainWindow, (HMENU)OUTPUT_CLEAR, HInstance, 0);
  492.     HWND KillAllButton = CreateWindowEx(NULL, "BUTTON", "Kill All", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 460, 45, 90, 25, MainWindow, (HMENU)QUICK_COMMAND_KILLALL, HInstance, 0);
  493.  
  494.     SendMessage(Output, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  495.     SendMessage(Input, WM_SETFONT, (WPARAM)textFont, MAKELPARAM(TRUE, 0));
  496.  
  497.     ShowWindow(MainWindow, SW_SHOWNORMAL);
  498.     SetWindowPos(MainWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
  499.  
  500.     return StartMessageLoop();
  501. }
  502.  
  503. DWORD WINAPI Init(LPVOID lpParam) {
  504.     CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitiateWindow, 0, 0, 0);
  505.     Sleep(500);
  506.     Print("Loading...");
  507.     DWORD VFTable = SCVFTable;
  508.     DWORD BAddr = (DWORD)GetModuleHandle(NULL);
  509.     DWORD NewVFTable = BAddr + VFTable;
  510.     byte byt[4];
  511.     byt[0] = NewVFTable & 0x000000ff;
  512.     byt[1] = (NewVFTable & 0x0000ff00) >> 8;
  513.     byt[2] = (NewVFTable & 0x00ff0000) >> 16;
  514.     byt[3] = (NewVFTable & 0xff000000) >> 24;
  515.     int SC = Memory::Scan(PAGE_READWRITE, byt, "xxxx");
  516.     DataModel = RBX::GetParent(SC);
  517.     Players = RBX::FindFirstChild(DataModel, "Players");
  518.     Workspace = RBX::FindFirstChild(DataModel, "Workspace");
  519.     Lighting = RBX::FindFirstChild(DataModel, "Lighting");
  520.     LocalPlayer = RBX::GetLocalPlayer(Players);
  521.     string LocalPlayerName = RBX::GetName(LocalPlayer);
  522.     vector<string> Whitelist(arr, arr + sizeof(arr) / sizeof(arr[0]));
  523.     int Whitelisted = 0;
  524.     for (int i = 0; i < Whitelist.size(); i++) {
  525.         if (Whitelist.at(i) == LocalPlayerName) {
  526.             Whitelisted = 1;
  527.         }
  528.     }
  529.     if (Whitelisted == 0) {
  530.         exit(0);
  531.     }
  532.     while (1) {
  533.         if (GetAsyncKeyState(VK_LCONTROL) & 0x8000) {
  534.             if (GetAsyncKeyState(VK_LBUTTON) & 0x8000) {
  535.                 int Char = GetCharacter(LocalPlayer);
  536.                 if (Char != 0) {
  537.                     Vector3 pos = Vector3(*(float*)MADX, *(float*)MADY, *(float*)MADZ);
  538.                     MoveTo(Char, pos);
  539.                     while (1) {
  540.                         if (!(GetAsyncKeyState(VK_LBUTTON))) {
  541.                             break;
  542.                         }
  543.                         Sleep(50);
  544.                     }
  545.                 }
  546.             }
  547.         }
  548.         Sleep(50);
  549.     }
  550.     return 0;
  551. }
  552.  
  553. BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwAttached, LPVOID lpUseless) {
  554.     if (dwAttached == DLL_PROCESS_ATTACH) {
  555.         CreateThread(0, 0, Init, 0, 0, 0);
  556.         //Creates a new non-blocking thread when it's attached.
  557.     }
  558.     return 1;
  559. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement