Advertisement
MortalityPastebin

Untitled

Mar 18th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.43 KB | None | 0 0
  1. void ExecuteCommand(std::string Command) {
  2.     ScanROBLOX();
  3.     std::string Prefix("");
  4.     std::vector<std::string> Arguments = SplitArguments(Command);
  5.     if (Arguments.at(0) == std::string(Prefix += "kill")) {
  6.         std::vector<std::string> Players = FindPlayers(Arguments.at(1));
  7.         for (int Key = 0; (Key <= (Players.size() - 1)); Key++) {
  8.             if (Key >= 0) {
  9.                 GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "game");
  10.                 GetField(RobloxLuaState_Location, -1, "GetService");
  11.                 PushValue(RobloxLuaState_Location, -2);
  12.                 PushString(RobloxLuaState_Location, "Players");
  13.                 CallFunction(RobloxLuaState_Location, 2, 1);
  14.                 GetField(RobloxLuaState_Location, -1, "FindFirstChild");
  15.                 PushValue(RobloxLuaState_Location, -2);
  16.                 PushString(RobloxLuaState_Location, Players.at(Key).c_str());
  17.                 CallFunction(RobloxLuaState_Location, 2, 1);
  18.                 if (RetrieveType(RobloxLuaState_Location, -1) != RLUA_TNIL) {
  19.                     GetField(RobloxLuaState_Location, -1, "Character");
  20.                     GetField(RobloxLuaState_Location, -1, "BreakJoints");
  21.                     PushValue(RobloxLuaState_Location, -2);
  22.                     CallFunction(RobloxLuaState_Location, 1, 0);
  23.                 };
  24.                 SetStackTop(RobloxLuaState_Location, 0);
  25.             };
  26.         };
  27.     }
  28.     else if (Arguments.at(0) == std::string(Prefix += "ff"))
  29.     {
  30.         std::vector<std::string> Players = FindPlayers(Arguments.at(1));
  31.         for (int Key = 0; (Key <= (Players.size() - 1)); Key++) {
  32.             if (Key >= 0) {
  33.                 GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "game");
  34.                 GetField(RobloxLuaState_Location, -1, "GetService");
  35.                 PushValue(RobloxLuaState_Location, -2);
  36.                 PushString(RobloxLuaState_Location, "Players");
  37.                 CallFunction(RobloxLuaState_Location, 2, 1);
  38.                 GetField(RobloxLuaState_Location, -1, "FindFirstChild");
  39.                 PushValue(RobloxLuaState_Location, -2);
  40.                 PushString(RobloxLuaState_Location, Players.at(Key).c_str());
  41.                 CallFunction(RobloxLuaState_Location, 2, 1);
  42.                 if (RetrieveType(RobloxLuaState_Location, -1) != RLUA_TNIL) {
  43.                     GetField(RobloxLuaState_Location, -1, "Character");
  44.                     GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "Instance");
  45.                     GetField(RobloxLuaState_Location, -1, "new");
  46.                     PushString(RobloxLuaState_Location, "ForceField");
  47.                     PushValue(RobloxLuaState_Location, -4);
  48.                     CallFunction(RobloxLuaState_Location, 2, 0);
  49.                 };
  50.                 SetStackTop(RobloxLuaState_Location, 0);
  51.             }
  52.         }
  53.     }
  54.     else {
  55.         MessageBox(NULL, "Invalid command!", "Blaze - Error", (MB_OK | MB_ICONERROR));
  56.     };
  57. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement