Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS //msvc doesn't like freopen
- #include <Windows.h>
- #include <iostream>
- #include <sstream>
- #include <vector>
- #include <string>
- #include <typeinfo>
- #include <string>
- #include <iterator>
- #define SetParent 0x412360
- using namespace std;
- namespace Roblox {
- int WalkSpeed_Address = 0x6D0910;
- typedef void(__thiscall * setwalkspeed)(int self, float value);
- setwalkspeed SetWalkSpeed = (setwalkspeed)WalkSpeed_Address;
- int MaxHealth_Address = 0x6CFD90;
- typedef void(__thiscall * setmaxhealth)(int self, float value);
- setmaxhealth SetMaxHealth = (setmaxhealth)MaxHealth_Address;
- int SetMinutesAfterMidnight_Address = 0x6DC0A0;
- typedef void(__thiscall * setminutesaftermidnight)(void* lighting, double value);
- setminutesaftermidnight SetMinutesAfterMidnight = (setminutesaftermidnight)SetMinutesAfterMidnight_Address;
- int SetFogEnd_Address = 0x6DBF80;
- typedef void(__thiscall * setfogend)(void* lighting, float value);
- setfogend SetFogE = (setfogend)SetFogEnd_Address;
- int SetFogStart_Address = 0x6DBFB0;
- typedef void(__thiscall * setfogstart)(void* lighting, float value);
- setfogstart SetFogStart = (setfogstart)SetFogStart_Address;
- int SetJumpPower_Address = 0x6CF9B0;
- typedef void(__thiscall * setjumppower)(int self, float value);
- setjumppower SetJumpPower = (setjumppower)SetJumpPower_Address;
- int SetTransparency_Address = 0xE5D3B0;
- typedef void(__thiscall * settransparency)(int self, int value);
- settransparency SetTransparency = (settransparency)SetTransparency_Address;
- int SetPersonalRankServer_Address = 0xAADC40;
- typedef void(__thiscall * setpersonalrankserver)(int self, int value);
- setpersonalrankserver setPSR = (setpersonalrankserver)SetPersonalRankServer_Address;
- typedef void(__thiscall *setparent)(int self, int parent);
- setparent setParent = (setparent)SetParent;
- int DataModel;
- int Workspace;
- int Lighting;
- int Players;
- int Camera;
- int Head;
- int LogService;
- int CurrentPlayer;
- int State;
- int Teams;
- bool Changing;
- int antiscript = 0;
- bool Seizure = false;
- bool Night = false;
- std::string* PlayerName;
- int GetParent(int Instance) {
- return *(int*)(Instance + 0x34);
- }
- std::string* GetName(int Instance) {
- return (std::string*)(*(int*)(Instance + 0x28) - 0x4);
- }
- const char* GetClass(int self)
- {
- return (const char*)(*(int(**)(void))(*(int*)self + 16))() + 4;
- }
- void DoLoop() {
- //VMProtectBeginUltra("SEXYdsf");
- do {
- if (Seizure == true && Lighting != 0) {
- if (Night == false) {
- SetMinutesAfterMidnight((void*)Lighting, 24 * 60.0);
- Night = true;
- }
- else {
- SetMinutesAfterMidnight((void*)Lighting, 8 * 60.0);
- Night = false;
- }
- }
- } while (true);
- // VMProtectEnd();
- }
- int FindFirstChild_PartOf(int Instance, std::string Name) {
- 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;
- }
- int GetLocalPlayer(int Plr) {
- return *(int*)(Plr + 0x16C);
- }
- int FindFirstClass(int Instance, const char* Name)
- {
- DWORD CHILD_START = *(DWORD*)(Instance + 0x2C);
- DWORD CHILD_END = *(DWORD*)(CHILD_START + 4);
- for (int i = *(int*)CHILD_START; i != CHILD_END; i += 8)
- {
- if (memcmp(GetClass(*(int*)i), Name, strlen(Name)) == 0)
- {
- return *(int*)i;
- }
- }
- }
- int GetCharacter(std::string Name) {
- int Character = FindFirstChild_PartOf(Workspace, Name);
- if (Character != 0) {
- return Character;
- }
- else
- {
- return 0;
- }
- }
- int GetPlayer(std::string Name) {
- int Player = FindFirstChild_PartOf(Players, Name);
- if (Player != 0) {
- return Player;
- }
- else
- {
- return 0;
- }
- }
- std::vector<int> GetChildren(int Instance) {
- DWORD StartOfChildren = *(DWORD*)(Instance + 0x2C);
- DWORD EndOfChildren = *(DWORD*)(StartOfChildren + 4);
- std::vector<int> Children;
- for (int i = *(int*)StartOfChildren; i != EndOfChildren; i += 8)
- {
- Children.push_back(*(int*)i);
- }
- return Children;
- }
- }
- std::string IntToHex(int Val) {
- std::stringstream stream;
- stream << std::hex << Val;
- return stream.str();
- }
- std::string Input() {
- std::string input_Elecryst;
- getline(std::cin, input_Elecryst);
- return input_Elecryst;
- }
- 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;
- }
- const char* Commands =
- "=====SERVER COMMANDS======\n"
- "fogstart [n] - Fogstarts the [n]\r\n"
- "fogend [n] - Set's the fogend to [n]\r\n"
- "shutdown - Shutsdown the server\r\n"
- "clearallchildren - Clears all the children from workspace\r\n"
- "music [n] - Set's music to [n]\r\n"
- "fogcolor [r] [g] [b] - Set's fogcolor to [r] [g] [b]\r\n"
- "killall - Kills all players\r\n"
- "seizure on / off - Turns seizure on / off\r\n"
- "rainbow on / off - Turns rainbow on / off\r\n"
- "\n"
- "=====PLAYER COMMANDS======"
- "kill [p] - Kills the [p]\r\n"
- "god [p] - Gods the [p]\r\n"
- "ungod [p] - Ungods [p]\r\n"
- "sethealth [p] [n] - Set's [p]'s health to [n]\r\n"
- "jumppower [p] [n] - Set's [p]'s jumppower to [n]\r\n"
- "ws [p] [n] - Set's [p]'s walkspeed to [n]\r\n"
- "punish [p] - Punishes the [p]\r\n"
- "unpunish [p] - Disables the punish from [p]\r\n"
- "showname [p] - Show's the name from [p]\r\n"
- "hidename [p] - Hides the name from [p]\r\n"
- "freeze [p] - Freeze's the [p]\r\n"
- "thaw [p] - Thaw's the [p]\r\n"
- "btools [p] - Give's btools to the [p]\r\n"
- "changestat [p] - Changes the [p]'s stat\r\n"
- "loopkill [p] - Loopkills the [p]\r\n"
- "rh [p] - Remove's [p]'s humanoid\r\n"
- "rlegs [p] - Remove's [p]'s right leg\r\n"
- "rlegs2 [p] - Remove's [p]'s left leg\r\n"
- "faceless [p] - Make's [p] faceless\r\n"
- "topless [p] - Make's [p] topless\r\n"
- "naked [p] - Make's [p] naked\r\n"
- "rtools [p] - Remove's [p]'s tools\r\n"
- "stealtools [p] - Steals the tools from [p]\r\n"
- "rhead [p] - Remove's [p]'s head\r\n"
- "rshirt [p] - Remove's [p]'s shirt\r\n"
- "\n"
- "=====LOCALPLAYER COMMANDS====="
- "swim - Toggles Swim \r\n"
- "dswim - UnToggles Swim \r\n"
- "noclip - Toggles Noclip \r\n"
- "dnoclip - UnToggles Noclip \r\n"
- "superjump - Toggles SuperJump \r\n"
- "dsuperjump - UnToggles superjump \r\n"
- "airwalk - Toggles airwalk \r\n"
- "dairwalk - Untoggles airwalk \r\n"
- "ragdoll - Toggles ragdoll \r\n"
- "dragdoll - Untoggles ragdoll \r\n"
- "disable - Disables all localplayer cmds.\r\n"
- "\n"
- ;
- int State;
- bool Changing = false;
- int ScriptContextVftable;
- int ScriptContext = 0;
- void SetHumanoidState(int self, int state) {
- int sPtr = *(int*)(self + 0x2DC);
- if (sPtr) {
- *(BYTE*)(self + state + 0x229) = 1;
- *(int*)(sPtr + 0x20) = state;
- }
- }
- void doState() {
- if (Changing == true) {
- int LocalCharacter = Roblox::GetCharacter(*Roblox::PlayerName);
- if (LocalCharacter != 0) {
- int Humanoid = Roblox::FindFirstClass(LocalCharacter, "Humanoid");
- if (Humanoid != 0) {
- SetHumanoidState(Humanoid, State);
- }
- }
- }
- }
- char* mfm;
- void Loop() {
- do {
- __try {
- doState();
- }
- __except (EXCEPTION_EXECUTE_HANDLER) {
- Sleep(1); // do absolutely fucking nothing
- }
- } while (true);
- }
- void ABC_Commands() {
- while (1) {
- std::cout << ">";
- std::vector<std::string> Arguments = split(Input());
- if (Arguments.at(0) == "noclip") {
- State = 11;
- Changing = true;
- }
- else if (Arguments.at(0) == "swim") {
- State = 4;
- Changing = true;
- }
- else if (Arguments.at(0) == "superjump") {
- State = 13;
- Changing = true;
- }
- else if (Arguments.at(0) == "airwalk") {
- State = 10;
- Changing = true;
- }
- else if (Arguments.at(0) == "jesusfly") {
- State = 12;
- Changing = true;
- }
- else if (Arguments.at(0) == "ragdoll") {
- State = 1;
- Changing = true;
- }
- else if (Arguments.at(0) == "slow'd") {
- State = -1;
- Changing = true;
- }
- else if (Arguments.at(0) == "phyH") {
- State = 16;
- Changing = true;
- }
- else if (Arguments.at(0) == "topless")
- {
- if (Arguments.size() == 2) {
- DWORD Characterr = Roblox::GetCharacter(Arguments.at(1));
- if (Characterr != 0) {
- DWORD Shirtt = Roblox::FindFirstClass(Characterr, "Shirt");
- if (Shirtt != 0) {
- Roblox::setParent(Shirtt, Roblox::Lighting);
- }
- }
- }
- }
- else if (Arguments.at(0) == "dpants") {
- if (Arguments.size() == 2) {
- DWORD Characte3r = Roblox::GetCharacter(Arguments.at(1));
- if (Characte3r != 0) {
- DWORD Shir3t = Roblox::FindFirstClass(Characte3r, "Pants");
- if (Shir3t != 0) {
- Roblox::setParent(Shir3t, Roblox::Lighting);
- }
- }
- }
- }
- else if (Arguments.at(0) == "dswim") {
- Changing = false;
- }
- else if (Arguments.at(0) == "dsuperjump") {
- Changing = false;
- }
- else if (Arguments.at(0) == "dnoclip") {
- Changing = false;
- }
- else if (Arguments.at(0) == "cmds") {
- std::cout << Commands;
- }
- else if (Arguments.at(0) == "naked") {
- if (Arguments.size() == 2) {
- DWORD Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- DWORD Shirt = Roblox::FindFirstClass(Character, "Shirt");
- if (Shirt != 0) {
- Roblox::setParent(Shirt, Roblox::Lighting);
- }
- DWORD Pants = Roblox::FindFirstClass(Character, "Pants");
- if (Pants != 0) {
- Roblox::setParent(Pants, Roblox::Lighting);
- }
- }
- }
- }
- else if (Arguments.at(0) == "ws") {
- if (Arguments.size() == 3) {
- float NewSpeed = std::stof(Arguments.at(2).c_str());
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetWalkSpeed(Humanoid, NewSpeed);
- }
- }
- }
- }
- else if (Arguments.at(0) == "seizure") {
- if (Arguments.size() == 2) {
- if (Arguments.at(1) == "on") {
- Roblox::Seizure = true;
- }
- else if (Arguments.at(1) == "off") {
- Roblox::Seizure = false;
- }
- }
- }
- else if (Arguments.at(0) == "time") {
- if (Arguments.size() == 2) {
- double Time = std::stod(Arguments.at(1).c_str());
- Roblox::SetMinutesAfterMidnight((void*)Roblox::Lighting, Time * 60.0);
- }
- }
- else if (Arguments.at(0) == "sfog") {
- if (Arguments.size() == 2) {
- float FogS = std::stof(Arguments.at(1).c_str());
- float FogE = std::stof(Arguments.at(1).c_str());
- Roblox::SetFogStart((void*)Roblox::Lighting, FogS);
- Roblox::SetFogE((void*)Roblox::Lighting, FogE);
- }
- }
- else if (Arguments.at(0) == "god") {
- if (Arguments.size() == 2) {
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetMaxHealth(Humanoid, 99999999999);
- State = 4;
- Changing = true;
- Sleep(300);
- Changing = false;
- }
- }
- else
- {
- std::cout << "Failed to god " << std::endl;
- }
- }
- }
- else if (Arguments.at(0) == "swimgod") {
- if (Arguments.size() == 2) {
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetMaxHealth(Humanoid, 99999999999);
- State = 4;
- Changing = true;
- }
- }
- else
- {
- std::cout << "Failed to god " << std::endl;
- }
- }
- }
- else if (Arguments.at(0) == "unswimgod") {
- if (Arguments.size() == 2) {
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetMaxHealth(Humanoid, 0);
- Changing = false;
- }
- }
- else
- {
- std::cout << "Failed to god " << std::endl;
- }
- }
- }
- else if (Arguments.at(0) == "ungod") {
- if (Arguments.size() == 2) {
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetMaxHealth(Humanoid, 0);
- }
- }
- else
- {
- std::cout << "Failed to ungod " << std::endl;
- }
- }
- }
- else if (Arguments.at(0) == "rtorso") {
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- if (Torso != 0) {
- Roblox::setParent(Torso, Roblox::Workspace);
- }
- }
- }
- else if (Arguments.at(0) == "rh") {
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Humanoid = Roblox::FindFirstChild_PartOf(Character, "Humanoid");
- if (Humanoid != 0) {
- Roblox::setParent(Humanoid, Roblox::Lighting);
- }
- }
- }
- else if (Arguments.at(0) == "btools") {
- int Player = Roblox::GetPlayer(Arguments.at(1));
- if (Player != 0) {
- Roblox::setPSR(Player, 255);
- }
- }
- if (Arguments.at(0) == "loopkill") {
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Humanoid = Roblox::FindFirstChild_PartOf(Character, "Humanoid");
- if (Humanoid != 0) {
- Roblox::setParent(Humanoid, Roblox::Workspace);
- }
- }
- }
- else if (Arguments.at(0) == "jumppower") {
- float NewSpeed = std::stof(Arguments.at(2).c_str());
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Humanoid = Roblox::FindFirstClass(Character, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetJumpPower(Humanoid, NewSpeed);
- }
- }
- else {
- cout << "Failed to set the players jumppower " << endl;
- }
- }
- else if (Arguments.at(0) == "sethealth") {
- float NewSpeed = std::stof(Arguments.at(2).c_str());
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Humanoid = Roblox::FindFirstClass(Character, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetMaxHealth(Humanoid, NewSpeed);
- }
- else {
- cout << "Failed to sethealth " << endl;
- }
- }
- else {
- cout << "Failed to sethealth " << Arguments.at(1) << " " << endl;
- }
- }
- else if (Arguments.at(0) == "punish") {
- std::string Name = Arguments.at(1);
- int Character = Roblox::GetCharacter(Name);
- if (Character != 0) {
- Roblox::setParent(Character, Roblox::Lighting);
- }
- }
- else if (Arguments.at(0) == "unpunish") {
- std::string Name = Arguments.at(1);
- int Character = Roblox::GetCharacter(Name);
- if (Character != 0) {
- Roblox::setParent(Character, Roblox::Workspace);
- }
- }
- else if (Arguments.at(0) == "freeze") {
- if (Arguments.size() == 3) {
- //float NewSpeed = std::stof(Arguments.at(2).c_str());
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetWalkSpeed(Humanoid, 0);
- }
- }
- }
- }
- else if (Arguments.at(0) == "thaw") {
- if (Arguments.size() == 3) {
- //float NewSpeed = std::stof(Arguments.at(2).c_str());
- int Player = Roblox::GetCharacter(Arguments.at(1));
- if (Player != 0) {
- int Humanoid = Roblox::FindFirstClass(Player, "Humanoid");
- if (Humanoid != 0) {
- Roblox::SetWalkSpeed(Humanoid, 15);
- }
- }
- }
- }
- else if (Arguments.at(0) == "rshirt") {
- DWORD Characterr = Roblox::GetCharacter(Arguments.at(1));
- if (Characterr != 0) {
- DWORD Shirt = Roblox::FindFirstChild_PartOf(Characterr, "Shirt");
- if (Shirt != 0) {
- Roblox::setParent(Shirt, Roblox::Lighting);
- }
- }
- }
- else if (Arguments.at(0) == "faceless") {
- DWORD Characterr = Roblox::GetCharacter(Arguments.at(1));
- if (Characterr != 0) {
- DWORD Face = Roblox::FindFirstChild_PartOf(Characterr, "Face");
- if (Face != 0) {
- Roblox::setParent(Face, Roblox::Workspace);
- }
- }
- }
- else if (Arguments.at(0) == "rhead") {
- DWORD Characterr = Roblox::GetCharacter(Arguments.at(1));
- if (Characterr != 0) {
- DWORD Head = Roblox::FindFirstChild_PartOf(Characterr, "Head");
- if (Head != 0) {
- Roblox::setParent(Head, Roblox::Lighting);
- }
- }
- }
- else if (Arguments.at(0) == "ghost") {
- int Character = Roblox::GetCharacter(Arguments.at(1));
- if (Character != 0) {
- int Head = Roblox::FindFirstChild_PartOf(Character, "Head");
- if (Head != 0) {
- Roblox::SetTransparency(Head, 0.0f);
- }
- int Torso = Roblox::FindFirstChild_PartOf(Character, "Torso");
- if (Torso != 0) {
- Roblox::SetTransparency(Torso, 0.0f);
- }
- }
- }
- }
- }
- namespace Memory {
- bool Compare(const BYTE *pData, const BYTE *bMask, const char *szMask)
- {
- for (; *szMask; ++szMask, ++pData, ++bMask)
- if (*szMask == 'x' && *pData != *bMask) return 0;
- return (*szMask) == NULL;
- }
- DWORD FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, char *szMask)
- {
- for (int i = 0; i<(int)dwLen; i++)
- if (Compare((BYTE*)(dwAddress + (int)i), bMask, szMask)) return (int)(dwAddress + i);
- return 0;
- }
- int Scan(DWORD mode, char* content, char* mask)
- {
- DWORD PageSize;
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- PageSize = si.dwPageSize;
- MEMORY_BASIC_INFORMATION mi;
- for (DWORD lpAddr = 0; lpAddr<0x7FFFFFFF; lpAddr += PageSize)
- {
- DWORD vq = VirtualQuery((void*)lpAddr, &mi, PageSize);
- if (vq == ERROR_INVALID_PARAMETER || vq == 0) break;
- if (mi.Type == MEM_MAPPED) continue;
- if (mi.Protect == mode)
- {
- int addr = FindPattern(lpAddr, PageSize, (PBYTE)content, mask);
- if (addr != 0)
- {
- return addr;
- }
- }
- }
- }
- }
- void ABC_Start() {
- AllocConsole();//create console
- freopen("CONOUT$", "w", stdout); //to use output (cout)
- freopen("CONIN$", "r", stdin); //to use input, useless because I never take input
- SetConsoleTitleA("Vulvix By Catie Minx");
- cout << " Vulvix By Catie Minx " << endl;
- cout << "Players can be, 'me' <playername> " << endl;
- cout << "Scanning Please Wait... " << endl;
- ScriptContextVftable = 0xF873F4;
- ScriptContext = Memory::Scan(PAGE_READWRITE, (char*)&ScriptContextVftable, "xxxx");
- Roblox::DataModel = Roblox::GetParent(ScriptContext);
- Roblox::Players = Roblox::FindFirstClass(Roblox::DataModel, "Players");
- Roblox::Lighting = Roblox::FindFirstClass(Roblox::DataModel, "Lighting");
- Roblox::Workspace = Roblox::FindFirstClass(Roblox::DataModel, "Workspace");
- Roblox::Teams = Roblox::FindFirstClass(Roblox::DataModel, "Teams");
- Roblox::CurrentPlayer = Roblox::GetLocalPlayer(Roblox::Players);
- Roblox::PlayerName = Roblox::GetName(Roblox::CurrentPlayer);
- //Sleep(2000);
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Loop, NULL, NULL, NULL);
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Roblox::DoLoop, NULL, NULL, NULL);
- //CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)jjj, NULL, NULL, NULL);
- //Sleep(2000);
- int NUU = Roblox::CurrentPlayer;
- std::string* CurrentName = Roblox::GetName(NUU);
- cout << "Welcome, " << "" << *CurrentName << "" << endl;
- cout << "Scanner is completed. " << endl;
- ABC_Commands();
- }
- BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
- {
- if (fdwReason == DLL_PROCESS_ATTACH)
- {
- DisableThreadLibraryCalls(hinstDLL);
- CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ABC_Start, 0, 0, 0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement