Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Roblox v3.0.cpp : Defines the exported functions for the DLL application.
- //
- #include <windows.h>
- #include <tchar.h>
- #include <stdio.h>
- #include <strsafe.h>
- #include <iostream>
- #include <Windows.h>
- #include <string>
- #include <ctime>
- #include <sstream>
- #include <vector>
- #include <iterator>
- #include <fcntl.h>
- #include <io.h>
- #include <TlHelp32.h>
- #include <fstream>
- #include <wininet.h>
- #include <Iphlpapi.h>
- #include <Shlwapi.h>
- #include <tchar.h>
- #include <urlmon.h>
- #include <DbgHelp.h>
- #include <Iphlpapi.h>
- #include <wininet.h>
- #include <stdlib.h>
- #include "main.h"
- #include "source.h"
- #include "form.h"
- #include "helper.h"
- #include "Memory.h"
- #include <urlmon.h>
- DWORD ROBLOX_BASE;
- DWORD BASE;
- int thingy;
- const char* message;
- const char* message2;
- void ConsoleOutput(const char * format, ...) {
- char message[INPUT_CHAR_LIMIT];
- va_list vl;
- va_start(vl, format);
- vsnprintf_s(message, INPUT_CHAR_LIMIT, format, vl);
- va_end(vl);
- SendMessage(ConsoleField, EM_SETSEL, -1, 0);
- SendMessage(ConsoleField, EM_REPLACESEL, FALSE, (LPARAM)message);
- }
- BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
- if (ul_reason_for_call == 1) {
- DisableThreadLibraryCalls(hModule);
- athread begin(Initiate, NULL);
- }
- return 1;
- }
- void Initiate() {
- //if (DEBUG_MODE)
- CreateConsole();
- printf("Initiating...\n");
- ROBLOX_BASE = (DWORD)GetModuleHandle(NULL);
- HMODULE Base = GetModuleHandle("Layout Source.dll");
- BASE = (DWORD)Base;
- athread mainThread(InitiateWindow, NULL);
- int exitCode = mainThread.wait();
- }
- void ScanStuff()
- {
- ConsoleOutput("Scanning...\n");
- // Scan for DataModel address
- DWORD VFTable = Roblox::ScriptContext_address;
- byte byt[4];
- byt[0] = VFTable & 0x000000ff;
- byt[1] = (VFTable & 0x0000ff00) >> 8;
- byt[2] = (VFTable & 0x00ff0000) >> 16;
- byt[3] = (VFTable & 0xff000000) >> 24;
- Roblox::ScriptContext = Memory::Scan(PAGE_READWRITE, byt, "xxxx");
- // Check if DataModel address is 0. This means something went wrong. Often seen in Windows version less than 8.
- Roblox::DataModel = Roblox::GetParent(Roblox::ScriptContext);
- ConsoleOutput("DataModel: %d\n", Roblox::DataModel);
- // Get the service addresses
- Roblox::Lighting = Roblox::GetService("Lighting");
- Roblox::Workspace = Roblox::GetService("Workspace");
- Roblox::Players = Roblox::GetService("Players");
- // Print the service addresses
- ConsoleOutput("Lighting: %d\n", Roblox::Lighting);
- ConsoleOutput("Workspace: %d\n", Roblox::Workspace);
- ConsoleOutput("Players: %d\n", Roblox::Players);
- // Get your player's address
- int LocalPlayer = Roblox::GetLocalPlayer(Roblox::Players);
- Roblox::PlayerName = Roblox::GetName(LocalPlayer);
- ConsoleOutput("OK!\n");
- }
- // Function to input a string
- std::string Input()
- {
- std::string sInput;
- getline(std::cin, sInput);
- return sInput;
- }
- // Splits a strings into multiple strings
- std::vector<std::string> split(std::string s)
- {
- std::vector<std::string> elems;
- std::stringstream ss(s);
- std::istream_iterator<std::string> begin(ss);
- std::istream_iterator<std::string> end;
- std::vector<std::string> vstrings(begin, end);
- return vstrings;
- }
- std::vector<std::string> &split_str_2(const std::string &s, char delim, std::vector<std::string> &elems);
- std::vector<std::string> split_str(const std::string &s, char delim);
- std::vector<std::string> &split_str_2(const std::string &s, char delim, std::vector<std::string> &elems) {
- std::stringstream ss(s);
- std::string item;
- while (std::getline(ss, item, delim)) {
- elems.push_back(item);
- }
- return elems;
- }
- std::vector<std::string> split_str(const std::string &s, char delim) {
- std::vector<std::string> elems;
- split_str_2(s, delim, elems);
- return elems;
- }
- // Creates the seizure effect by rapidly changing time from night to day and vice-versa
- const char* command_list[] =
- {
- "\r\nCommands:\r\n",
- "punish [p/all/others] - punishes player \r\n",
- "unpunish [p/all/others] - unpunishes player \r\n",
- "kill [p/all/others] - Kills player [p] \r\n",
- "freeze [p/all/others] - freezes player \r\n",
- "thaw [p/all/others] - unfreezes player \r\n",
- "noarms [p/all/others] - removes players arms \r\n",
- "nolegs [p/all/others] - removes players legs \r\n",
- "potato [p/all/others] - removes all players limbs \r\n",
- "topless [p/all/others] - removes players top \r\n",
- "pantless [p/all/others] - removes players pants \r\n",
- "swapclothes [p1] [p2] - swaps players clothes around \r\n",
- "swapface [p1] [p2] - swaps players face around \r\n",
- "nohat [p/all/others] - removes players hat \r\n",
- "noface [p/all/others] - removes players face \r\n",
- "mashup [p/all/others] - mashes players body up(reset fixes,works best with 1.0) \r\n",
- "blockhead [p/all/others] - makes player have a blockhead \r\n",
- "hhs [p/all/others] - make you a hammer head shark!!!!!!!! \r\n",
- "stealtools [p] - puts there tools in your backpack! \r\n",
- "noanimation [p/all/others] - animationless \r\n",
- "animation [p/all/others] - gives player there animation back \r\n",
- "fish [p/all/others] - Flop Like a fish\r\n",
- "swapstat [stat] [p] - swaps your stats \r\n",
- "rescanaob - rescans required AOB \r\n",
- };
- // Processes the commands
- void HandleCommand_r(const string& command) {
- std::vector<std::string> In = split(command);
- ConsoleOutput("\r\n>%s\r\n", command.c_str());
- if (In.size() == 0) { return; }
- else if (In.at(0) == "punish")
- {
- try {
- if (In.size() == 2)
- {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- Roblox::SetParent(CPlayer, Roblox::Lighting);
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- Roblox::SetParent(CPlayer, Roblox::Lighting);
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- Roblox::SetParent(Character, Roblox::Lighting);
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "unpunish")
- {
- try {
- if (In.size() == 2)
- {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Lighting, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- Roblox::SetParent(CPlayer, Roblox::Workspace);
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Lighting, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- Roblox::SetParent(CPlayer, Roblox::Workspace);
- }
- }
- }
- }
- else {
- int Character = Roblox::FindFirstChild_PartOf(Roblox::Lighting, In.at(1).c_str());
- if (Character != 0) {
- Roblox::SetParent(Character, Roblox::Workspace);
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "kill")
- {
- try {
- if (In.size() == 2)
- {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::GetCharacter(*Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (Head != 0) {
- Roblox::SetParent(Head, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::GetCharacter(*Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (Head != 0) {
- Roblox::SetParent(Head, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1));
- if (Character != 0) {
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if (Head != 0) {
- Roblox::SetParent(Head, Roblox::Lighting);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "freeze")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 1);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 1);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1));
- if (Character != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 1);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "thaw")
- {
- try {
- if (In.size() == 2) {
- int Speed = 16;
- int jpow = 50;
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 0);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 0);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1));
- if (Character != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- if (Torso != 0) {
- Roblox::AnchorObject(Torso, 0);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "nohat")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Humanoid = Roblox::FindFirstChild_PartOf(CPlayer, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetParent(Humanoid, Roblox::Lighting);
- int Humanoid = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Humanoid");
- Roblox::SetParent(Humanoid, CPlayer);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Humanoid = Roblox::FindFirstChild_PartOf(CPlayer, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetParent(Humanoid, Roblox::Lighting);
- int Humanoid = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Humanoid");
- Roblox::SetParent(Humanoid, CPlayer);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int Humanoid = Roblox::FindFirstClass(Character, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetParent(Humanoid, Roblox::Lighting);
- int Humanoid = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Humanoid");
- Roblox::SetParent(Humanoid, Character);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "noarms")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if ((LA != 0) & (RA != 0)) {
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if ((LA != 0) & (RA != 0)) {
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LA = Roblox::FindFirstChild_PartOf(Character, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(Character, "Right Arm");
- if ((LA != 0) & (RA != 0)) {
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "nolegs")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- if ((LL != 0) & (RL != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- if ((LL != 0) & (RL != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(Character, "Right Leg");
- if ((LL != 0) & (RL != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- }
- else {
- printf("Error!\n");
- }
- }
- }
- }
- else {
- printf("Error!\n");
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "potato")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if ((LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if ((LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(Character, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(Character, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(Character, "Right Arm");
- if ((LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- }
- else {
- printf("Error!\n");
- }
- }
- }
- }
- else {
- printf("Error!\n");
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "topless")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Shirt");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Shirt");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Shirt");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- else {
- printf("Error!\n");
- }
- }
- }
- }
- else {
- printf("Error!\n");
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "pantless")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Pants");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Pants");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Pants");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- else {
- printf("Error!\n");
- }
- }
- }
- }
- else {
- printf("Error!\n");
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "mashup")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (Head != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LLm != 0) & (LLf != 0)) {
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (Head != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LLm != 0) & (LLf != 0)) {
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if (Head != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LLm != 0) & (LLf != 0)) {
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- else {
- printf("Error!\n");
- }
- }
- }
- }
- else {
- printf("Error!\n");
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "hhs")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if (Head != 0) {
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- if (CPlayer != 0) {
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- int Torso = Roblox::FindFirstChild_PartOf(CPlayer, "Torso");
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(CPlayer, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(CPlayer, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(CPlayer, "Right Arm");
- if (Head != 0) {
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Left Leg");
- int RL = Roblox::FindFirstChild_PartOf(Character, "Right Leg");
- int LA = Roblox::FindFirstChild_PartOf(Character, "Left Arm");
- int RA = Roblox::FindFirstChild_PartOf(Character, "Right Arm");
- if (Head != 0) {
- int LLm = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- int LLf = Roblox::FindFirstChild_PartOf(Head, "face");
- if ((Torso != 0) & (LL != 0) & (RL != 0) & (LA != 0) & (RA != 0)) {
- Roblox::SetParent(LL, Roblox::Lighting);
- Roblox::SetParent(RL, Roblox::Lighting);
- Roblox::SetParent(LA, Roblox::Lighting);
- Roblox::SetParent(RA, Roblox::Lighting);
- Roblox::SetParent(LLf, Torso);
- Roblox::SetParent(LLm, Torso);
- }
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "swapclothes")
- {
- try {
- if (In.size() == 3) {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- int Character2 = Roblox::GetCharacter(In.at(2).c_str());
- if (Character != 0) {
- if (Character2 != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Pants");
- int Ls = Roblox::FindFirstChild_PartOf(Character, "Shirt");
- int LL2 = Roblox::FindFirstChild_PartOf(Character2, "Pants");
- int Ls2 = Roblox::FindFirstChild_PartOf(Character2, "Shirt");
- if ((LL != 0) & (Ls != 0) & (LL2 != 0) & (Ls2 != 0)) {
- Roblox::SetParent(LL, Character2);
- Roblox::SetParent(Ls, Character2);
- Roblox::SetParent(LL2, Character);
- Roblox::SetParent(Ls2, Character);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "swapface")
- {
- try {
- if (In.size() == 3) {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if ((Character != 0) & (Head != 0)) {
- int Character2 = Roblox::GetCharacter(In.at(2).c_str());
- int Head2 = Roblox::FindFirstChild_PartOf(Character2, "Head");
- if ((Character2 != 0) & (Head2 != 0)) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "face");
- int LL2 = Roblox::FindFirstChild_PartOf(Head2, "face");
- if ((LL != 0) & (LL2 != 0)) {
- Roblox::SetParent(LL, Head2);
- Roblox::SetParent(LL2, Head);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "noface")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "face");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "face");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "face");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "blockhead")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Head, "Mesh");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "noanimation")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(CPlayer, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Character, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, Roblox::Lighting);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "animation")
- {
- try {
- if (In.size() == 2) {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, CPlayer);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, CPlayer);
- }
- }
- }
- }
- }
- else {
- int Character = Roblox::GetCharacter(In.at(1).c_str());
- if (Character != 0) {
- int LL = Roblox::FindFirstChild_PartOf(Roblox::Lighting, "Animate");
- if (LL != 0) {
- Roblox::SetParent(LL, Character);
- }
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "fish")
- {
- try {
- if (In.at(1) == "all") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int part = Roblox::FindFirstChild_PartOf(CPlayer, "HumanoidRootPart");
- if (part != 0) {
- Roblox::SetParent(part, Roblox::Lighting);
- }
- }
- }
- }
- }
- else if (In.at(1) == "others") {
- vector <DWORD> Players = Roblox::GetCharacterVector(In.at(1).c_str());
- if (Players.size() != 0) {
- for (unsigned i = 0; i < Players.size(); ++i) {
- int CPlayer = Roblox::FindFirstChild_PartOf(Roblox::Workspace, *Roblox::GetName(Players[i]));
- int Head = Roblox::FindFirstChild_PartOf(CPlayer, "Head");
- if (CPlayer != 0) {
- int part = Roblox::FindFirstChild_PartOf(CPlayer, "HumanoidRootPart");
- if (part != 0) {
- Roblox::SetParent(part, Roblox::Lighting);
- }
- }
- }
- }
- }
- else {
- int chara = Roblox::GetCharacter(In.at(1));
- if (chara != 0) {
- int part = Roblox::FindFirstChild_PartOf(chara, "HumanoidRootPart");
- if (part != 0) {
- Roblox::SetParent(part, Roblox::Lighting);
- }
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "stealtools")
- {
- try {
- int person = Roblox::GetPlayer(In.at(1));
- int me = Roblox::GetPlayer("me");
- int person_b = Roblox::FindFirstChild_PartOf(person, "Backpack");
- int me_b = Roblox::FindFirstChild_PartOf(me, "Backpack");
- vector<DWORD> children = Roblox::GetChildren(person_b);
- for (int p = 0; p < children.size(); ++p) {
- string me = Roblox::GetClass(children[p]);
- if (me == "Tool") {
- Roblox::SetParent(children[p], me_b);
- Sleep(0.2);
- }
- if (me == "HopperBin") {
- Roblox::SetParent(children[p], me_b);
- Sleep(0.2);
- }
- }
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "rescanaob")
- {
- try {
- ScanStuff();
- }
- catch (exception) {
- printf("Error!\n");
- Sleep(1);
- }
- }
- else if (In.at(0) == "cmds") {
- ConsoleOutput("\r\n");
- for (int i = 0; i < _countof(command_list); ++i)
- ConsoleOutput("%s", command_list[i]);
- ConsoleOutput("\r\n");
- }
- }
- void HandleCommand(string command) {
- try {
- HandleCommand_r(command);
- }
- catch (...) {
- ConsoleOutput("Oops, I crashed when trying to execute the command '%s'.\r\n", command.c_str());
- }
- }
- int main() {
- ScanStuff();
- ConsoleOutput("Starting!\n");
- ConsoleOutput("Welcome %s!\n", Roblox::PlayerName);
- ConsoleOutput("Layout Source has fully loaded!\n");
- ConsoleOutput("Type 'cmds' to view a list of commands.\n");
- return 1;
- }
- void CreateConsole() {
- if (DoesConsoleExist())
- return;
- int hConHandle = 0;
- HANDLE lStdHandle = 0;
- FILE *fp = 0;
- // Allocate a console
- AllocConsole();
- // redirect unbuffered STDOUT to the console
- lStdHandle = GetStdHandle(STD_OUTPUT_HANDLE);
- hConHandle = _open_osfhandle(PtrToUlong(lStdHandle), _O_TEXT);
- fp = _fdopen(hConHandle, "w");
- *stdout = *fp;
- setvbuf(stdout, NULL, _IONBF, 0);
- // redirect unbuffered STDIN to the console
- lStdHandle = GetStdHandle(STD_INPUT_HANDLE);
- hConHandle = _open_osfhandle(PtrToUlong(lStdHandle), _O_TEXT);
- fp = _fdopen(hConHandle, "r");
- *stdin = *fp;
- setvbuf(stdin, NULL, _IONBF, 0);
- // redirect unbuffered STDERR to the console
- lStdHandle = GetStdHandle(STD_ERROR_HANDLE);
- hConHandle = _open_osfhandle(PtrToUlong(lStdHandle), _O_TEXT);
- fp = _fdopen(hConHandle, "w");
- *stderr = *fp;
- setvbuf(stderr, NULL, _IONBF, 0);
- SetConsoleTitle("Layout Source");
- }
- BOOLEAN DoesConsoleExist() {
- return GetConsoleWindow() != NULL;
- }
Add Comment
Please, Sign In to add comment