Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ExecuteCommand(std::string Command) {
- ScanROBLOX();
- std::string Prefix("");
- std::vector<std::string> Arguments = SplitArguments(Command);
- if (Arguments.at(0) == std::string(Prefix += "kill")) {
- std::vector<std::string> Players = FindPlayers(Arguments.at(1));
- for (int Key = 0; (Key <= (Players.size() - 1)); Key++) {
- if (Key >= 0) {
- GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "game");
- GetField(RobloxLuaState_Location, -1, "GetService");
- PushValue(RobloxLuaState_Location, -2);
- PushString(RobloxLuaState_Location, "Players");
- CallFunction(RobloxLuaState_Location, 2, 1);
- GetField(RobloxLuaState_Location, -1, "FindFirstChild");
- PushValue(RobloxLuaState_Location, -2);
- PushString(RobloxLuaState_Location, Players.at(Key).c_str());
- CallFunction(RobloxLuaState_Location, 2, 1);
- if (RetrieveType(RobloxLuaState_Location, -1) != RLUA_TNIL) {
- GetField(RobloxLuaState_Location, -1, "Character");
- GetField(RobloxLuaState_Location, -1, "BreakJoints");
- PushValue(RobloxLuaState_Location, -2);
- CallFunction(RobloxLuaState_Location, 1, 0);
- };
- SetStackTop(RobloxLuaState_Location, 0);
- };
- };
- }
- else if (Arguments.at(0) == std::string(Prefix += "ff"))
- {
- std::vector<std::string> Players = FindPlayers(Arguments.at(1));
- for (int Key = 0; (Key <= (Players.size() - 1)); Key++) {
- if (Key >= 0) {
- GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "game");
- GetField(RobloxLuaState_Location, -1, "GetService");
- PushValue(RobloxLuaState_Location, -2);
- PushString(RobloxLuaState_Location, "Players");
- CallFunction(RobloxLuaState_Location, 2, 1);
- GetField(RobloxLuaState_Location, -1, "FindFirstChild");
- PushValue(RobloxLuaState_Location, -2);
- PushString(RobloxLuaState_Location, Players.at(Key).c_str());
- CallFunction(RobloxLuaState_Location, 2, 1);
- if (RetrieveType(RobloxLuaState_Location, -1) != RLUA_TNIL) {
- GetField(RobloxLuaState_Location, -1, "Character");
- GetField(RobloxLuaState_Location, RLUA_GLOBALSINDEX, "Instance");
- GetField(RobloxLuaState_Location, -1, "new");
- PushString(RobloxLuaState_Location, "ForceField");
- PushValue(RobloxLuaState_Location, -4);
- CallFunction(RobloxLuaState_Location, 2, 0);
- };
- SetStackTop(RobloxLuaState_Location, 0);
- }
- }
- }
- else {
- MessageBox(NULL, "Invalid command!", "Blaze - Error", (MB_OK | MB_ICONERROR));
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement