├── .gitattributes ├── Hax ├── Hax.rc ├── Hax.aps ├── Luau │ ├── Luau.VM.lib │ ├── Luau.Ast.lib │ ├── isocline.lib │ ├── Luau.CodeGen.lib │ ├── Luau.Compiler.lib │ ├── Confusables.h │ ├── lbytecode.h │ ├── BuiltinFolding.h │ ├── lapi.h │ ├── lbuiltins.h │ ├── TableShape.h │ ├── ParseOptions.h │ ├── ludata.h │ ├── ExperimentalFlags.h │ ├── CostModel.h │ ├── lstring.h │ ├── Builtins.h │ ├── lfunc.h │ ├── ConstantFolding.h │ ├── ValueTracking.h │ ├── lcommon.h │ ├── StringUtils.h │ ├── luacode.h │ ├── ldebug.h │ ├── ltm.h │ ├── ParseResult.h │ ├── ltable.h │ ├── lvm.h │ ├── lmem.h │ ├── lnumutils.h │ ├── ldo.h │ ├── Compiler.h │ ├── Location.h │ ├── Common.h │ ├── luaconf.h │ ├── lualib.h │ ├── lgc.h │ ├── TimeTrace.h │ ├── Lexer.h │ └── BytecodeBuilder.h ├── lib │ ├── xxhash.lib │ └── libzstd_static.lib ├── consolecolors.h ├── fps.h ├── rbxstring.h ├── Hax.vcxproj.user ├── fps.cpp ├── hwid.cpp ├── hwid.h ├── exceptionfilter.h ├── resource.h ├── file.h ├── rbxinstance.h ├── functions.h ├── encryption.cpp ├── rbxstring.cpp ├── encryption.h ├── AUMB_utils │ ├── utils.hpp │ └── utils.cpp ├── md5.h ├── rbxinstance.cpp ├── Hax.vcxproj.filters ├── exceptionfilter.cpp ├── file.cpp ├── rlapi.cpp ├── rlapi.h └── addresses.h ├── Release ├── TaaprWare2-UI.exe ├── TaaprWare2-UI.pdb ├── ICSharpCode.AvalonEdit.dll ├── ICSharpCode.AvalonEdit.pdb ├── bin │ └── TaaprWare2Internal.dll ├── ActiproSoftware.Text.Wpf.dll ├── ActiproSoftware.Shared.Wpf.dll ├── ActiproSoftware.SyntaxEditor.Wpf.dll └── TaaprWare2-UI.exe.config ├── TaaprWare2-UI ├── taapr.ico ├── taapr.png ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.config ├── App.xaml ├── App.xaml.cs ├── TaaprWare2-UI.csproj.user ├── InsecureKeysystem.cs ├── NamedPipes.cs ├── MainWindow.xaml ├── Functions.cs ├── Injector.cs ├── MainWindow.xaml.cs └── TaaprWare2-UI.csproj ├── README.md └── TaaprWare2.sln /.gitattributes: -------------------------------------------------------------------------------- 1 | *.h linguist-detectable=false 2 | -------------------------------------------------------------------------------- /Hax/Hax.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Hax.rc -------------------------------------------------------------------------------- /Hax/Hax.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Hax.aps -------------------------------------------------------------------------------- /Hax/Luau/Luau.VM.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Luau/Luau.VM.lib -------------------------------------------------------------------------------- /Hax/lib/xxhash.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/lib/xxhash.lib -------------------------------------------------------------------------------- /Hax/Luau/Luau.Ast.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Luau/Luau.Ast.lib -------------------------------------------------------------------------------- /Hax/Luau/isocline.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Luau/isocline.lib -------------------------------------------------------------------------------- /Hax/Luau/Luau.CodeGen.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Luau/Luau.CodeGen.lib -------------------------------------------------------------------------------- /Hax/consolecolors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define CONSOLE_COLOR_RED 12 4 | #define CONSOLE_COLOR_WHITE 15 -------------------------------------------------------------------------------- /Release/TaaprWare2-UI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/TaaprWare2-UI.exe -------------------------------------------------------------------------------- /Release/TaaprWare2-UI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/TaaprWare2-UI.pdb -------------------------------------------------------------------------------- /TaaprWare2-UI/taapr.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/TaaprWare2-UI/taapr.ico -------------------------------------------------------------------------------- /TaaprWare2-UI/taapr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/TaaprWare2-UI/taapr.png -------------------------------------------------------------------------------- /Hax/Luau/Luau.Compiler.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/Luau/Luau.Compiler.lib -------------------------------------------------------------------------------- /Hax/lib/libzstd_static.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Hax/lib/libzstd_static.lib -------------------------------------------------------------------------------- /Hax/fps.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "addresses.h" 4 | 5 | double get_fps(); 6 | void set_fps(double fps); -------------------------------------------------------------------------------- /Hax/rbxstring.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "addresses.h" 4 | 5 | std::string rbx_string_to_string(rbx_string rbx); -------------------------------------------------------------------------------- /Release/ICSharpCode.AvalonEdit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/ICSharpCode.AvalonEdit.dll -------------------------------------------------------------------------------- /Release/ICSharpCode.AvalonEdit.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/ICSharpCode.AvalonEdit.pdb -------------------------------------------------------------------------------- /Release/bin/TaaprWare2Internal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/bin/TaaprWare2Internal.dll -------------------------------------------------------------------------------- /Release/ActiproSoftware.Text.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/ActiproSoftware.Text.Wpf.dll -------------------------------------------------------------------------------- /Release/ActiproSoftware.Shared.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/ActiproSoftware.Shared.Wpf.dll -------------------------------------------------------------------------------- /Release/ActiproSoftware.SyntaxEditor.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plusgiant5/TaaprWareV2/HEAD/Release/ActiproSoftware.SyntaxEditor.Wpf.dll -------------------------------------------------------------------------------- /Hax/Hax.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Hax/fps.cpp: -------------------------------------------------------------------------------- 1 | #include "fps.h" 2 | 3 | double get_fps() { 4 | return double(1) / functions::rbx_getscheduler()->fps; 5 | } 6 | void set_fps(double fps) { 7 | functions::rbx_getscheduler()->fps = 1 / (double)fps; 8 | } -------------------------------------------------------------------------------- /Hax/hwid.cpp: -------------------------------------------------------------------------------- 1 | #include "hwid.h" 2 | 3 | std::string hwid; 4 | 5 | void update_hwid() { 6 | HW_PROFILE_INFOA hardware; 7 | GetCurrentHwProfileA(&hardware); 8 | hwid = hash::md5(std::string(hardware.szHwProfileGuid)); 9 | } -------------------------------------------------------------------------------- /TaaprWare2-UI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Hax/hwid.h: -------------------------------------------------------------------------------- 1 | // for user's hashed hwid 2 | // indended to create keys that roblox scripts can't create 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include "md5.h" 10 | 11 | extern std::string hwid; 12 | 13 | void update_hwid(); -------------------------------------------------------------------------------- /Hax/Luau/Confusables.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include 5 | 6 | namespace Luau 7 | { 8 | const char* findConfusable(uint32_t codepoint); 9 | } 10 | -------------------------------------------------------------------------------- /Hax/Luau/lbytecode.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | // This is a forwarding header for Luau bytecode definition 6 | #include "Luau/Bytecode.h" 7 | -------------------------------------------------------------------------------- /Hax/exceptionfilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "consolecolors.h" 10 | #include "functions.h" 11 | #include "addresses.h" 12 | 13 | LONG WINAPI TaaprWareExceptionFilter(EXCEPTION_POINTERS* ExceptionInfo); 14 | void unpatch_SetUnhandledExceptionFilter(); -------------------------------------------------------------------------------- /TaaprWare2-UI/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Release/TaaprWare2-UI.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Hax/Luau/BuiltinFolding.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "ConstantFolding.h" 5 | 6 | namespace Luau 7 | { 8 | namespace Compile 9 | { 10 | 11 | Constant foldBuiltin(int bfid, const Constant* args, size_t count); 12 | 13 | } // namespace Compile 14 | } // namespace Luau 15 | -------------------------------------------------------------------------------- /Hax/Luau/lapi.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | LUAI_FUNC const TValue* luaA_toobject(lua_State* L, int idx); 8 | LUAI_FUNC void luaA_pushobject(lua_State* L, const TValue* o); 9 | -------------------------------------------------------------------------------- /TaaprWare2-UI/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /TaaprWare2-UI/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace TaaprWare2_UI 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Hax/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Hax.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /Hax/Luau/lbuiltins.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | typedef int (*luau_FastFunction)(lua_State* L, StkId res, TValue* arg0, int nresults, StkId args, int nparams); 8 | 9 | extern luau_FastFunction luauF_table[256]; 10 | -------------------------------------------------------------------------------- /TaaprWare2-UI/TaaprWare2-UI.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /Hax/Luau/TableShape.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "Luau/Ast.h" 5 | #include "Luau/DenseHash.h" 6 | 7 | namespace Luau 8 | { 9 | namespace Compile 10 | { 11 | 12 | struct TableShape 13 | { 14 | unsigned int arraySize = 0; 15 | unsigned int hashSize = 0; 16 | }; 17 | 18 | void predictTableShapes(DenseHashMap& shapes, AstNode* root); 19 | 20 | } // namespace Compile 21 | } // namespace Luau 22 | -------------------------------------------------------------------------------- /Hax/file.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "xorstr.h" 12 | 13 | EXTERN_C IMAGE_DOS_HEADER __ImageBase; 14 | 15 | bool isfile(std::string path); 16 | bool isfolder(std::string path); 17 | const char* readfile(std::string path); 18 | bool delfile(std::string path); 19 | bool delfolder(std::string path); 20 | bool writefile(std::string path, const char* data); 21 | std::vector* listfiles(std::string path); 22 | std::vector* listfolders(std::string path); -------------------------------------------------------------------------------- /Hax/Luau/ParseOptions.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | namespace Luau 5 | { 6 | 7 | enum class Mode 8 | { 9 | NoCheck, // Do not perform any inference 10 | Nonstrict, // Unannotated symbols are any 11 | Strict, // Unannotated symbols are inferred 12 | Definition, // Type definition module, has special parsing rules 13 | }; 14 | 15 | struct ParseOptions 16 | { 17 | bool allowTypeAnnotations = true; 18 | bool supportContinueStatement = true; 19 | bool allowDeclarationSyntax = false; 20 | bool captureComments = false; 21 | }; 22 | 23 | } // namespace Luau 24 | -------------------------------------------------------------------------------- /Hax/Luau/ludata.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | // special tag value is used for user data with inline dtors 8 | #define UTAG_IDTOR LUA_UTAG_LIMIT 9 | 10 | // special tag value is used for newproxy-created user data (all other user data objects are host-exposed) 11 | #define UTAG_PROXY (LUA_UTAG_LIMIT + 1) 12 | 13 | #define sizeudata(len) (offsetof(Udata, data) + len) 14 | 15 | LUAI_FUNC Udata* luaU_newudata(lua_State* L, size_t s, int tag); 16 | LUAI_FUNC void luaU_freeudata(lua_State* L, Udata* u, struct lua_Page* page); 17 | -------------------------------------------------------------------------------- /Hax/rbxinstance.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "addresses.h" 6 | 7 | namespace instance { 8 | objects::instance* FindFirstChild(objects::instance* parent, std::string target_child_name, bool recursive = false, std::vector ignore_list = {}); 9 | objects::instance* FindFirstChildOfClass(objects::instance* parent, std::string target_class_name, bool recursive = false, std::vector ignore_list = {}); 10 | std::vector GetChildren(objects::instance* parent, std::string target_class_name); 11 | std::string GetFullName(objects::instance* inst); 12 | } 13 | objects::instance* get_datamodel(); 14 | objects::instance* get_scriptcontext(); 15 | std::vector> get_jobs(); -------------------------------------------------------------------------------- /Hax/functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Luau\Compiler.h" 6 | #include "Luau\BytecodeBuilder.h" 7 | #include "addresses.h" 8 | #include "rlapi.h" 9 | #include "file.h" 10 | #include "fps.h" 11 | #include "rbxinstance.h" 12 | #include "AUMB_utils\utils.hpp" 13 | #include "xorstr.h" 14 | #include "include\xxhash.h" 15 | #include "include\zstd.h" 16 | #include "hwid.h" 17 | 18 | #define RELEASE 19 | 20 | class roblox_encoder : public Luau::BytecodeEncoder { 21 | std::uint8_t encodeOp(const std::uint8_t opcode) { 22 | return opcode * 227; 23 | } 24 | }; 25 | 26 | extern CONTEXT context_record; 27 | extern BYTE* int3_address; // int3 is the 0xCC byte and it causes an exception 28 | extern std::vector bytecode_queue; 29 | 30 | int c_function_handler(UINT rL); 31 | -------------------------------------------------------------------------------- /Hax/Luau/ExperimentalFlags.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include 5 | 6 | namespace Luau 7 | { 8 | 9 | inline bool isFlagExperimental(const char* flag) 10 | { 11 | // Flags in this list are disabled by default in various command-line tools. They may have behavior that is not fully final, 12 | // or critical bugs that are found after the code has been submitted. 13 | static const char* kList[] = { 14 | "LuauLowerBoundsCalculation", 15 | "LuauInterpolatedStringBaseSupport", 16 | // makes sure we always have at least one entry 17 | nullptr, 18 | }; 19 | 20 | for (const char* item : kList) 21 | if (item && strcmp(item, flag) == 0) 22 | return true; 23 | 24 | return false; 25 | } 26 | 27 | } // namespace Luau 28 | -------------------------------------------------------------------------------- /Hax/Luau/CostModel.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "Luau/Ast.h" 5 | #include "Luau/DenseHash.h" 6 | 7 | namespace Luau 8 | { 9 | namespace Compile 10 | { 11 | 12 | // cost model: 8 bytes, where first byte is the baseline cost, and the next 7 bytes are discounts for when variable #i is constant 13 | uint64_t modelCost(AstNode* root, AstLocal* const* vars, size_t varCount, const DenseHashMap& builtins); 14 | 15 | // cost is computed as B - sum(Di * Ci), where B is baseline cost, Di is the discount for each variable and Ci is 1 when variable #i is constant 16 | int computeCost(uint64_t model, const bool* varsConst, size_t varCount); 17 | 18 | // get loop trip count or -1 if we can't compute it precisely 19 | int getTripCount(double from, double to, double step); 20 | 21 | } // namespace Compile 22 | } // namespace Luau 23 | -------------------------------------------------------------------------------- /Hax/encryption.cpp: -------------------------------------------------------------------------------- 1 | #include "encryption.h" 2 | 3 | UINT get_encrypted_ptr(encryption enc, UINT address_of_ptr) { 4 | switch (enc) { 5 | case ptrenc_none: 6 | return *reinterpret_cast(*reinterpret_cast(address_of_ptr)); 7 | case ptrenc_add: 8 | return address_of_ptr + *reinterpret_cast(address_of_ptr); 9 | case ptrenc_xor: 10 | return address_of_ptr ^ *reinterpret_cast(address_of_ptr); 11 | default: 12 | printf(XorString("[ERROR] Invalid encryption %d when getting\n"), enc); 13 | return 0; 14 | } 15 | } 16 | void set_encrypted_ptr(encryption enc, UINT address_of_ptr, UINT value) { 17 | switch (enc) { 18 | case ptrenc_none: 19 | *reinterpret_cast(address_of_ptr) = value; 20 | break; 21 | case ptrenc_add: 22 | *reinterpret_cast(address_of_ptr) = value - address_of_ptr; 23 | break; 24 | case ptrenc_xor: 25 | *reinterpret_cast(address_of_ptr) = value ^ address_of_ptr; 26 | break; 27 | default: 28 | printf(XorString("[ERROR] Invalid encryption %d when setting\n"), enc); 29 | break; 30 | } 31 | } -------------------------------------------------------------------------------- /TaaprWare2-UI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TaaprWare2_UI.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Hax/Luau/lstring.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | #include "lstate.h" 7 | 8 | // string size limit 9 | #define MAXSSIZE (1 << 30) 10 | 11 | // string atoms are not defined by default; the storage is 16-bit integer 12 | #define ATOM_UNDEF -32768 13 | 14 | #define sizestring(len) (offsetof(TString, data) + len + 1) 15 | 16 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 17 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, (sizeof(s) / sizeof(char)) - 1)) 18 | 19 | #define luaS_fix(s) l_setbit((s)->marked, FIXEDBIT) 20 | 21 | LUAI_FUNC unsigned int luaS_hash(const char* str, size_t len); 22 | 23 | LUAI_FUNC void luaS_resize(lua_State* L, int newsize); 24 | 25 | LUAI_FUNC TString* luaS_newlstr(lua_State* L, const char* str, size_t l); 26 | LUAI_FUNC void luaS_free(lua_State* L, TString* ts, struct lua_Page* page); 27 | 28 | LUAI_FUNC TString* luaS_bufstart(lua_State* L, size_t size); 29 | LUAI_FUNC TString* luaS_buffinish(lua_State* L, TString* ts); 30 | -------------------------------------------------------------------------------- /Hax/Luau/Builtins.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "ValueTracking.h" 5 | 6 | namespace Luau 7 | { 8 | struct CompileOptions; 9 | } 10 | 11 | namespace Luau 12 | { 13 | namespace Compile 14 | { 15 | 16 | struct Builtin 17 | { 18 | AstName object; 19 | AstName method; 20 | 21 | bool empty() const 22 | { 23 | return object == AstName() && method == AstName(); 24 | } 25 | 26 | bool isGlobal(const char* name) const 27 | { 28 | return object == AstName() && method == name; 29 | } 30 | 31 | bool isMethod(const char* table, const char* name) const 32 | { 33 | return object == table && method == name; 34 | } 35 | }; 36 | 37 | Builtin getBuiltin(AstExpr* node, const DenseHashMap& globals, const DenseHashMap& variables); 38 | 39 | void analyzeBuiltins(DenseHashMap& result, const DenseHashMap& globals, 40 | const DenseHashMap& variables, const CompileOptions& options, AstNode* root); 41 | 42 | } // namespace Compile 43 | } // namespace Luau 44 | -------------------------------------------------------------------------------- /Hax/Luau/lfunc.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | #define sizeCclosure(n) (offsetof(Closure, c.upvals) + sizeof(TValue) * (n)) 8 | #define sizeLclosure(n) (offsetof(Closure, l.uprefs) + sizeof(TValue) * (n)) 9 | 10 | LUAI_FUNC Proto* luaF_newproto(lua_State* L); 11 | LUAI_FUNC Closure* luaF_newLclosure(lua_State* L, int nelems, Table* e, Proto* p); 12 | LUAI_FUNC Closure* luaF_newCclosure(lua_State* L, int nelems, Table* e); 13 | LUAI_FUNC UpVal* luaF_findupval(lua_State* L, StkId level); 14 | LUAI_FUNC void luaF_close(lua_State* L, StkId level); 15 | LUAI_FUNC void luaF_closeupval(lua_State* L, UpVal* uv, bool dead); 16 | LUAI_FUNC void luaF_freeproto(lua_State* L, Proto* f, struct lua_Page* page); 17 | LUAI_FUNC void luaF_freeclosure(lua_State* L, Closure* c, struct lua_Page* page); 18 | LUAI_FUNC void luaF_unlinkupval(UpVal* uv); 19 | LUAI_FUNC void luaF_freeupval(lua_State* L, UpVal* uv, struct lua_Page* page); 20 | LUAI_FUNC const LocVar* luaF_getlocal(const Proto* func, int local_number, int pc); 21 | LUAI_FUNC const LocVar* luaF_findlocal(const Proto* func, int local_reg, int pc); 22 | -------------------------------------------------------------------------------- /Hax/Luau/ConstantFolding.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "ValueTracking.h" 5 | 6 | namespace Luau 7 | { 8 | namespace Compile 9 | { 10 | 11 | struct Constant 12 | { 13 | enum Type 14 | { 15 | Type_Unknown, 16 | Type_Nil, 17 | Type_Boolean, 18 | Type_Number, 19 | Type_String, 20 | }; 21 | 22 | Type type = Type_Unknown; 23 | unsigned int stringLength = 0; 24 | 25 | union 26 | { 27 | bool valueBoolean; 28 | double valueNumber; 29 | const char* valueString = nullptr; // length stored in stringLength 30 | }; 31 | 32 | bool isTruthful() const 33 | { 34 | LUAU_ASSERT(type != Type_Unknown); 35 | return type != Type_Nil && !(type == Type_Boolean && valueBoolean == false); 36 | } 37 | 38 | AstArray getString() const 39 | { 40 | LUAU_ASSERT(type == Type_String); 41 | return {valueString, stringLength}; 42 | } 43 | }; 44 | 45 | void foldConstants(DenseHashMap& constants, DenseHashMap& variables, 46 | DenseHashMap& locals, const DenseHashMap* builtins, AstNode* root); 47 | 48 | } // namespace Compile 49 | } // namespace Luau 50 | -------------------------------------------------------------------------------- /Hax/Luau/ValueTracking.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "Luau/Ast.h" 5 | #include "Luau/DenseHash.h" 6 | 7 | namespace Luau 8 | { 9 | class AstNameTable; 10 | } 11 | 12 | namespace Luau 13 | { 14 | namespace Compile 15 | { 16 | 17 | enum class Global 18 | { 19 | Default = 0, 20 | Mutable, // builtin that has contents unknown at compile time, blocks GETIMPORT for chains 21 | Written, // written in the code which means we can't reason about the value 22 | }; 23 | 24 | struct Variable 25 | { 26 | AstExpr* init = nullptr; // initial value of the variable; filled by trackValues 27 | bool written = false; // is the variable ever assigned to? filled by trackValues 28 | bool constant = false; // is the variable's value a compile-time constant? filled by constantFold 29 | }; 30 | 31 | void assignMutable(DenseHashMap& globals, const AstNameTable& names, const char** mutableGlobals); 32 | void trackValues(DenseHashMap& globals, DenseHashMap& variables, AstNode* root); 33 | 34 | inline Global getGlobalState(const DenseHashMap& globals, AstName name) 35 | { 36 | const Global* it = globals.find(name); 37 | 38 | return it ? *it : Global::Default; 39 | } 40 | 41 | } // namespace Compile 42 | } // namespace Luau 43 | -------------------------------------------------------------------------------- /Hax/Luau/lcommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include 6 | #include 7 | 8 | #include "luaconf.h" 9 | 10 | #include "Luau\Common.h" 11 | 12 | typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; 13 | 14 | // internal assertions for in-house debugging 15 | #define check_exp(c, e) (LUAU_ASSERT(c), (e)) 16 | #define api_check(l, e) LUAU_ASSERT(e) 17 | 18 | #ifndef cast_to 19 | #define cast_to(t, exp) ((t)(exp)) 20 | #endif 21 | 22 | #define cast_byte(i) cast_to(uint8_t, (i)) 23 | #define cast_num(i) cast_to(double, (i)) 24 | #define cast_int(i) cast_to(int, (i)) 25 | 26 | /* 27 | ** type for virtual-machine instructions 28 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) 29 | */ 30 | typedef uint32_t Instruction; 31 | 32 | /* 33 | ** macro to control inclusion of some hard tests on stack reallocation 34 | */ 35 | #if defined(HARDSTACKTESTS) && HARDSTACKTESTS 36 | #define condhardstacktests(x) (x) 37 | #else 38 | #define condhardstacktests(x) ((void)0) 39 | #endif 40 | 41 | /* 42 | ** macro to control inclusion of some hard tests on garbage collection 43 | */ 44 | #if defined(HARDMEMTESTS) && HARDMEMTESTS 45 | #define condhardmemtests(x, l) (HARDMEMTESTS >= l ? (x) : (void)0) 46 | #else 47 | #define condhardmemtests(x, l) ((void)0) 48 | #endif 49 | -------------------------------------------------------------------------------- /Hax/Luau/StringUtils.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #if defined(__GNUC__) 10 | #define LUAU_PRINTF_ATTR(fmt, arg) __attribute__((format(printf, fmt, arg))) 11 | #else 12 | #define LUAU_PRINTF_ATTR(fmt, arg) 13 | #endif 14 | 15 | namespace Luau 16 | { 17 | 18 | std::string format(const char* fmt, ...) LUAU_PRINTF_ATTR(1, 2); 19 | std::string vformat(const char* fmt, va_list args); 20 | 21 | void formatAppend(std::string& str, const char* fmt, ...) LUAU_PRINTF_ATTR(2, 3); 22 | void vformatAppend(std::string& ret, const char* fmt, va_list args); 23 | 24 | std::string join(const std::vector& segments, std::string_view delimiter); 25 | std::string join(const std::vector& segments, std::string_view delimiter); 26 | 27 | std::vector split(std::string_view s, char delimiter); 28 | 29 | // Computes the Damerau-Levenshtein distance of A and B. 30 | // https://en.wikipedia.org/wiki/Damerau-Levenshtein_distance#Distance_with_adjacent_transpositions 31 | size_t editDistance(std::string_view a, std::string_view b); 32 | 33 | bool startsWith(std::string_view lhs, std::string_view rhs); 34 | bool equalsLower(std::string_view lhs, std::string_view rhs); 35 | 36 | size_t hashRange(const char* data, size_t size); 37 | 38 | std::string escape(std::string_view s, bool escapeForInterpString = false); 39 | bool isIdentifier(std::string_view s); 40 | } // namespace Luau 41 | -------------------------------------------------------------------------------- /Hax/Luau/luacode.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include 5 | 6 | // Can be used to reconfigure visibility/exports for public APIs 7 | #ifndef LUACODE_API 8 | #define LUACODE_API extern 9 | #endif 10 | 11 | typedef struct lua_CompileOptions lua_CompileOptions; 12 | 13 | struct lua_CompileOptions 14 | { 15 | // 0 - no optimization 16 | // 1 - baseline optimization level that doesn't prevent debuggability 17 | // 2 - includes optimizations that harm debuggability such as inlining 18 | int optimizationLevel; // default=1 19 | 20 | // 0 - no debugging support 21 | // 1 - line info & function names only; sufficient for backtraces 22 | // 2 - full debug info with local & upvalue names; necessary for debugger 23 | int debugLevel; // default=1 24 | 25 | // 0 - no code coverage support 26 | // 1 - statement coverage 27 | // 2 - statement and expression coverage (verbose) 28 | int coverageLevel; // default=0 29 | 30 | // global builtin to construct vectors; disabled by default 31 | const char* vectorLib; 32 | const char* vectorCtor; 33 | 34 | // null-terminated array of globals that are mutable; disables the import optimization for fields accessed through these 35 | const char** mutableGlobals; 36 | }; 37 | 38 | // compile source to bytecode; when source compilation fails, the resulting bytecode contains the encoded error. use free() to destroy 39 | LUACODE_API char* luau_compile(const char* source, size_t size, lua_CompileOptions* options, size_t* outsize); 40 | -------------------------------------------------------------------------------- /Hax/Luau/ldebug.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lstate.h" 6 | 7 | #define pcRel(pc, p) ((pc) ? cast_to(int, (pc) - (p)->code) - 1 : 0) 8 | 9 | #define luaG_typeerror(L, o, opname) luaG_typeerrorL(L, o, opname) 10 | #define luaG_forerror(L, o, what) luaG_forerrorL(L, o, what) 11 | #define luaG_runerror(L, fmt, ...) luaG_runerrorL(L, fmt, ##__VA_ARGS__) 12 | 13 | #define LUA_MEMERRMSG "not enough memory" 14 | #define LUA_ERRERRMSG "error in error handling" 15 | 16 | LUAI_FUNC l_noret luaG_typeerrorL(lua_State* L, const TValue* o, const char* opname); 17 | LUAI_FUNC l_noret luaG_forerrorL(lua_State* L, const TValue* o, const char* what); 18 | LUAI_FUNC l_noret luaG_concaterror(lua_State* L, StkId p1, StkId p2); 19 | LUAI_FUNC l_noret luaG_aritherror(lua_State* L, const TValue* p1, const TValue* p2, TMS op); 20 | LUAI_FUNC l_noret luaG_ordererror(lua_State* L, const TValue* p1, const TValue* p2, TMS op); 21 | LUAI_FUNC l_noret luaG_indexerror(lua_State* L, const TValue* p1, const TValue* p2); 22 | LUAI_FUNC l_noret luaG_methoderror(lua_State* L, const TValue* p1, const TString* p2); 23 | LUAI_FUNC l_noret luaG_readonlyerror(lua_State* L); 24 | 25 | LUAI_FUNC LUA_PRINTF_ATTR(2, 3) l_noret luaG_runerrorL(lua_State* L, const char* fmt, ...); 26 | LUAI_FUNC void luaG_pusherror(lua_State* L, const char* error); 27 | 28 | LUAI_FUNC void luaG_breakpoint(lua_State* L, Proto* p, int line, bool enable); 29 | LUAI_FUNC bool luaG_onbreak(lua_State* L); 30 | 31 | LUAI_FUNC int luaG_getline(Proto* p, int pc); 32 | -------------------------------------------------------------------------------- /Hax/Luau/ltm.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | /* 8 | * WARNING: if you change the order of this enumeration, 9 | * grep "ORDER TM" 10 | */ 11 | // clang-format off 12 | typedef enum 13 | { 14 | 15 | TM_INDEX, 16 | TM_NEWINDEX, 17 | TM_MODE, 18 | TM_NAMECALL, 19 | TM_CALL, 20 | TM_ITER, 21 | TM_LEN, 22 | 23 | TM_EQ, // last tag method with `fast' access 24 | 25 | 26 | TM_ADD, 27 | TM_SUB, 28 | TM_MUL, 29 | TM_DIV, 30 | TM_MOD, 31 | TM_POW, 32 | TM_UNM, 33 | 34 | 35 | TM_LT, 36 | TM_LE, 37 | TM_CONCAT, 38 | TM_TYPE, 39 | 40 | TM_N // number of elements in the enum 41 | } TMS; 42 | // clang-format on 43 | 44 | #define gfasttm(g, et, e) ((et) == NULL ? NULL : ((et)->tmcache & (1u << (e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 45 | 46 | #define fasttm(l, et, e) gfasttm(l->global, et, e) 47 | #define fastnotm(et, e) ((et) == NULL || ((et)->tmcache & (1u << (e)))) 48 | 49 | LUAI_DATA const char* const luaT_typenames[]; 50 | LUAI_DATA const char* const luaT_eventname[]; 51 | 52 | LUAI_FUNC const TValue* luaT_gettm(Table* events, TMS event, TString* ename); 53 | LUAI_FUNC const TValue* luaT_gettmbyobj(lua_State* L, const TValue* o, TMS event); 54 | 55 | LUAI_FUNC const TString* luaT_objtypenamestr(lua_State* L, const TValue* o); 56 | LUAI_FUNC const char* luaT_objtypename(lua_State* L, const TValue* o); 57 | 58 | LUAI_FUNC void luaT_init(lua_State* L); 59 | -------------------------------------------------------------------------------- /Hax/Luau/ParseResult.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "Luau/Common.h" 5 | #include "Luau/Location.h" 6 | #include "Luau/Lexer.h" 7 | #include "Luau/StringUtils.h" 8 | 9 | namespace Luau 10 | { 11 | 12 | class AstStatBlock; 13 | 14 | class ParseError : public std::exception 15 | { 16 | public: 17 | ParseError(const Location& location, const std::string& message); 18 | 19 | virtual const char* what() const throw(); 20 | 21 | const Location& getLocation() const; 22 | const std::string& getMessage() const; 23 | 24 | static LUAU_NORETURN void raise(const Location& location, const char* format, ...) LUAU_PRINTF_ATTR(2, 3); 25 | 26 | private: 27 | Location location; 28 | std::string message; 29 | }; 30 | 31 | class ParseErrors : public std::exception 32 | { 33 | public: 34 | ParseErrors(std::vector errors); 35 | 36 | virtual const char* what() const throw(); 37 | 38 | const std::vector& getErrors() const; 39 | 40 | private: 41 | std::vector errors; 42 | std::string message; 43 | }; 44 | 45 | struct HotComment 46 | { 47 | bool header; 48 | Location location; 49 | std::string content; 50 | }; 51 | 52 | struct Comment 53 | { 54 | Lexeme::Type type; // Comment, BlockComment, or BrokenComment 55 | Location location; 56 | }; 57 | 58 | struct ParseResult 59 | { 60 | AstStatBlock* root; 61 | std::vector hotcomments; 62 | std::vector errors; 63 | 64 | std::vector commentLocations; 65 | }; 66 | 67 | static constexpr const char* kParseNameError = "%error-id%"; 68 | 69 | } // namespace Luau 70 | -------------------------------------------------------------------------------- /Hax/rbxstring.cpp: -------------------------------------------------------------------------------- 1 | #include "rbxstring.h" 2 | 3 | bool constexpr inline is_typable(unsigned char character) { 4 | if (character >= 'a' && character <= 'z') { 5 | return true; 6 | } 7 | if (character >= 'A' && character <= 'Z') { 8 | return true; 9 | } 10 | if (character >= '0' && character <= '9') { 11 | return true; 12 | } 13 | if (character == ' ' || character == '_') { 14 | return true; 15 | } 16 | return false; 17 | } 18 | bool constexpr inline uint_is_typable(UINT uint_address) { 19 | bool typable = true; 20 | for (UINT8 i = 0; i < 4; i++) { 21 | UCHAR byte = *reinterpret_cast(uint_address + i); 22 | if (!is_typable(byte)) { 23 | if (typable && byte == 0x00) { 24 | return true; 25 | } 26 | typable = false; 27 | } 28 | } 29 | /*if (!typable) { 30 | volatile UINT value_at_ptr = 0; 31 | printf("Testing..."); 32 | if (*reinterpret_cast(uint_address) != NULL) { 33 | value_at_ptr = ***reinterpret_cast(uint_address); 34 | printf("%X is a ptr to a valid ptr pointing to %X\n", uint_address, value_at_ptr); 35 | return false; 36 | } else { 37 | printf("%X is a ptr to an invalid ptr\n", uint_address); 38 | return true; 39 | } 40 | }*/ 41 | return typable; 42 | } 43 | 44 | std::string rbx_string_to_string(rbx_string rbx) { 45 | UINT address = reinterpret_cast(&rbx); 46 | if (uint_is_typable(address)) { 47 | // string 48 | return rbx.contents; 49 | } 50 | else { 51 | if (uint_is_typable(reinterpret_cast(&((*reinterpret_cast(address))->contents)))) { 52 | // &string 53 | return std::string((*reinterpret_cast(address))->contents); 54 | } 55 | else { 56 | // &&string 57 | return std::string((**reinterpret_cast(address))->contents); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Hax/Luau/ltable.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | 7 | #define gnode(t, i) (&(t)->node[i]) 8 | #define gkey(n) (&(n)->key) 9 | #define gval(n) (&(n)->val) 10 | #define gnext(n) ((n)->key.next) 11 | 12 | #define gval2slot(t, v) int(cast_to(LuaNode*, static_cast(v)) - t->node) 13 | 14 | // reset cache of absent metamethods, cache is updated in luaT_gettm 15 | #define invalidateTMcache(t) t->tmcache = 0 16 | 17 | LUAI_FUNC const TValue* luaH_getnum(Table* t, int key); 18 | LUAI_FUNC TValue* luaH_setnum(lua_State* L, Table* t, int key); 19 | LUAI_FUNC const TValue* luaH_getstr(Table* t, TString* key); 20 | LUAI_FUNC TValue* luaH_setstr(lua_State* L, Table* t, TString* key); 21 | LUAI_FUNC const TValue* luaH_get(Table* t, const TValue* key); 22 | LUAI_FUNC TValue* luaH_set(lua_State* L, Table* t, const TValue* key); 23 | LUAI_FUNC TValue* luaH_newkey(lua_State* L, Table* t, const TValue* key); 24 | LUAI_FUNC Table* luaH_new(lua_State* L, int narray, int lnhash); 25 | LUAI_FUNC void luaH_resizearray(lua_State* L, Table* t, int nasize); 26 | LUAI_FUNC void luaH_resizehash(lua_State* L, Table* t, int nhsize); 27 | LUAI_FUNC void luaH_free(lua_State* L, Table* t, struct lua_Page* page); 28 | LUAI_FUNC int luaH_next(lua_State* L, Table* t, StkId key); 29 | LUAI_FUNC int luaH_getn(Table* t); 30 | LUAI_FUNC Table* luaH_clone(lua_State* L, Table* tt); 31 | LUAI_FUNC void luaH_clear(Table* tt); 32 | 33 | #define luaH_setslot(L, t, slot, key) (invalidateTMcache(t), (slot == luaO_nilobject ? luaH_newkey(L, t, key) : cast_to(TValue*, slot))) 34 | 35 | extern const LuaNode luaH_dummynode; 36 | -------------------------------------------------------------------------------- /Hax/Luau/lvm.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | #include "ltm.h" 7 | 8 | #define tostring(L, o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 9 | 10 | #define tonumber(o, n) (ttype(o) == LUA_TNUMBER || (((o) = luaV_tonumber(o, n)) != NULL)) 11 | 12 | #define equalobj(L, o1, o2) (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 13 | 14 | LUAI_FUNC int luaV_strcmp(const TString* ls, const TString* rs); 15 | LUAI_FUNC int luaV_lessthan(lua_State* L, const TValue* l, const TValue* r); 16 | LUAI_FUNC int luaV_lessequal(lua_State* L, const TValue* l, const TValue* r); 17 | LUAI_FUNC int luaV_equalval(lua_State* L, const TValue* t1, const TValue* t2); 18 | LUAI_FUNC void luaV_doarith(lua_State* L, StkId ra, const TValue* rb, const TValue* rc, TMS op); 19 | LUAI_FUNC void luaV_dolen(lua_State* L, StkId ra, const TValue* rb); 20 | LUAI_FUNC const TValue* luaV_tonumber(const TValue* obj, TValue* n); 21 | LUAI_FUNC const float* luaV_tovector(const TValue* obj); 22 | LUAI_FUNC int luaV_tostring(lua_State* L, StkId obj); 23 | LUAI_FUNC void luaV_gettable(lua_State* L, const TValue* t, TValue* key, StkId val); 24 | LUAI_FUNC void luaV_settable(lua_State* L, const TValue* t, TValue* key, StkId val); 25 | LUAI_FUNC void luaV_concat(lua_State* L, int total, int last); 26 | LUAI_FUNC void luaV_getimport(lua_State* L, Table* env, TValue* k, uint32_t id, bool propagatenil); 27 | 28 | LUAI_FUNC void luau_execute(lua_State* L); 29 | LUAI_FUNC int luau_precall(lua_State* L, struct lua_TValue* func, int nresults); 30 | LUAI_FUNC void luau_poscall(lua_State* L, StkId first); 31 | LUAI_FUNC void luau_callhook(lua_State* L, lua_Hook hook, void* userdata); 32 | -------------------------------------------------------------------------------- /Hax/Luau/lmem.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lua.h" 6 | 7 | struct lua_Page; 8 | union GCObject; 9 | 10 | #define luaM_newgco(L, t, size, memcat) cast_to(t*, luaM_newgco_(L, size, memcat)) 11 | #define luaM_freegco(L, p, size, memcat, page) luaM_freegco_(L, obj2gco(p), size, memcat, page) 12 | 13 | #define luaM_arraysize_(L, n, e) ((cast_to(size_t, (n)) <= SIZE_MAX / (e)) ? (n) * (e) : (luaM_toobig(L), SIZE_MAX)) 14 | 15 | #define luaM_newarray(L, n, t, memcat) cast_to(t*, luaM_new_(L, luaM_arraysize_(L, n, sizeof(t)), memcat)) 16 | #define luaM_freearray(L, b, n, t, memcat) luaM_free_(L, (b), (n) * sizeof(t), memcat) 17 | #define luaM_reallocarray(L, v, oldn, n, t, memcat) \ 18 | ((v) = cast_to(t*, luaM_realloc_(L, v, (oldn) * sizeof(t), luaM_arraysize_(L, n, sizeof(t)), memcat))) 19 | 20 | LUAI_FUNC void* luaM_new_(lua_State* L, size_t nsize, uint8_t memcat); 21 | LUAI_FUNC GCObject* luaM_newgco_(lua_State* L, size_t nsize, uint8_t memcat); 22 | LUAI_FUNC void luaM_free_(lua_State* L, void* block, size_t osize, uint8_t memcat); 23 | LUAI_FUNC void luaM_freegco_(lua_State* L, GCObject* block, size_t osize, uint8_t memcat, lua_Page* page); 24 | LUAI_FUNC void* luaM_realloc_(lua_State* L, void* block, size_t osize, size_t nsize, uint8_t memcat); 25 | 26 | LUAI_FUNC l_noret luaM_toobig(lua_State* L); 27 | 28 | LUAI_FUNC void luaM_getpagewalkinfo(lua_Page* page, char** start, char** end, int* busyBlocks, int* blockSize); 29 | LUAI_FUNC lua_Page* luaM_getnextgcopage(lua_Page* page); 30 | 31 | LUAI_FUNC void luaM_visitpage(lua_Page* page, void* context, bool (*visitor)(void* context, lua_Page* page, GCObject* gco)); 32 | LUAI_FUNC void luaM_visitgco(lua_State* L, void* context, bool (*visitor)(void* context, lua_Page* page, GCObject* gco)); 33 | -------------------------------------------------------------------------------- /Hax/encryption.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "xorstr.h" 7 | 8 | #define LUAVM_SHUFFLE_COMMA , 9 | 10 | #define LUAVM_SHUFFLE2(sep,a0,a1) a0 sep a1 11 | #define LUAVM_SHUFFLE3(sep,a0,a1,a2) a2 sep a1 sep a0 12 | #define LUAVM_SHUFFLE4(sep,a0,a1,a2,a3) a2 sep a1 sep a3 sep a0 13 | #define LUAVM_SHUFFLE5(sep,a0,a1,a2,a3,a4) a0 sep a1 sep a2 sep a3 sep a4 14 | #define LUAVM_SHUFFLE6(sep,a0,a1,a2,a3,a4,a5) a0 sep a1 sep a2 sep a3 sep a4 sep a5 15 | #define LUAVM_SHUFFLE7(sep,a0,a1,a2,a3,a4,a5,a6) a0 sep a1 sep a2 sep a3 sep a4 sep a5 sep a6 16 | #define LUAVM_SHUFFLE8(sep,a0,a1,a2,a3,a4,a5,a6,a7) a0 sep a1 sep a2 sep a3 sep a4 sep a5 sep a6 sep a7 17 | #define LUAVM_SHUFFLE9(sep,a0,a1,a2,a3,a4,a5,a6,a7,a8) a0 sep a1 sep a2 sep a3 sep a4 sep a5 sep a6 sep a7 sep a8 18 | 19 | typedef enum { 20 | ptrenc_none, 21 | ptrenc_add, 22 | ptrenc_xor, 23 | } encryption; 24 | 25 | UINT get_encrypted_ptr(encryption enc, UINT address_of_ptr); 26 | void set_encrypted_ptr(encryption enc, UINT address_of_ptr, UINT value); 27 | 28 | template 29 | class ptr_encryption_add { 30 | public: 31 | operator const T() const { 32 | return (T)((uintptr_t)storage + reinterpret_cast(this)); 33 | } 34 | void operator=(const T& value) { 35 | storage = (T)((uintptr_t)value - reinterpret_cast(this)); 36 | } 37 | const T operator->() const { 38 | return operator const T(); 39 | } 40 | private: 41 | T storage; 42 | }; 43 | 44 | template class ptr_encryption_xor { 45 | public: 46 | operator const T() const { 47 | return (T)((uintptr_t)storage ^ reinterpret_cast(this)); 48 | } 49 | void operator=(const T& value) { 50 | storage = (T)((uintptr_t)value ^ reinterpret_cast(this)); 51 | } 52 | const T operator->() const { 53 | return operator const T(); 54 | } 55 | private: 56 | T storage; 57 | }; -------------------------------------------------------------------------------- /Hax/Luau/lnumutils.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include 6 | 7 | #define luai_numadd(a, b) ((a) + (b)) 8 | #define luai_numsub(a, b) ((a) - (b)) 9 | #define luai_nummul(a, b) ((a) * (b)) 10 | #define luai_numdiv(a, b) ((a) / (b)) 11 | #define luai_numpow(a, b) (pow(a, b)) 12 | #define luai_numunm(a) (-(a)) 13 | #define luai_numisnan(a) ((a) != (a)) 14 | #define luai_numeq(a, b) ((a) == (b)) 15 | #define luai_numlt(a, b) ((a) < (b)) 16 | #define luai_numle(a, b) ((a) <= (b)) 17 | 18 | inline bool luai_veceq(const float* a, const float* b) 19 | { 20 | #if LUA_VECTOR_SIZE == 4 21 | return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3]; 22 | #else 23 | return a[0] == b[0] && a[1] == b[1] && a[2] == b[2]; 24 | #endif 25 | } 26 | 27 | inline bool luai_vecisnan(const float* a) 28 | { 29 | #if LUA_VECTOR_SIZE == 4 30 | return a[0] != a[0] || a[1] != a[1] || a[2] != a[2] || a[3] != a[3]; 31 | #else 32 | return a[0] != a[0] || a[1] != a[1] || a[2] != a[2]; 33 | #endif 34 | } 35 | 36 | LUAU_FASTMATH_BEGIN 37 | inline double luai_nummod(double a, double b) 38 | { 39 | return a - floor(a / b) * b; 40 | } 41 | LUAU_FASTMATH_END 42 | 43 | #define luai_num2int(i, d) ((i) = (int)(d)) 44 | 45 | // On MSVC in 32-bit, double to unsigned cast compiles into a call to __dtoui3, so we invoke x87->int64 conversion path manually 46 | #if defined(_MSC_VER) && defined(_M_IX86) 47 | #define luai_num2unsigned(i, n) \ 48 | { \ 49 | __int64 l; \ 50 | __asm { __asm fld n __asm fistp l} \ 51 | ; \ 52 | i = (unsigned int)l; \ 53 | } 54 | #else 55 | #define luai_num2unsigned(i, n) ((i) = (unsigned)(long long)(n)) 56 | #endif 57 | 58 | #define LUAI_MAXNUM2STR 48 59 | 60 | LUAI_FUNC char* luai_num2str(char* buf, double n); 61 | 62 | #define luai_str2num(s, p) strtod((s), (p)) 63 | -------------------------------------------------------------------------------- /Hax/AUMB_utils/utils.hpp: -------------------------------------------------------------------------------- 1 | // most of these functions are unused and not made by me 2 | 3 | #pragma once 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "../xorstr.h" 12 | 13 | #pragma comment( lib, "DbgHelp.lib" ) 14 | 15 | namespace utils 16 | { 17 | struct segment 18 | { 19 | std::string_view name; 20 | std::uintptr_t start_addr = 0; 21 | std::uintptr_t end_addr = 0; 22 | std::size_t size = 0; 23 | 24 | segment(std::string_view name_s, HMODULE mod = GetModuleHandle(nullptr)) : name{ name_s } 25 | { 26 | const auto nt = ImageNtHeader(mod); 27 | auto section = reinterpret_cast(nt + 1); 28 | 29 | for (auto iteration = 0u; iteration < nt->FileHeader.NumberOfSections; ++iteration, ++section) 30 | { 31 | const auto segment_name = reinterpret_cast(section->Name); 32 | 33 | if (name == segment_name) 34 | { 35 | start_addr = reinterpret_cast(mod) + section->VirtualAddress; 36 | size = section->Misc.VirtualSize; 37 | end_addr = start_addr + size; 38 | 39 | break; 40 | } 41 | } 42 | } 43 | }; 44 | 45 | extern std::uintptr_t text_clone, vmp0_clone, base; 46 | extern utils::segment text_seg, vmp0_seg; 47 | 48 | void unhook_free_console(); 49 | void hook_free_console(); 50 | std::uintptr_t calculate_function_size(std::uintptr_t address); 51 | std::uintptr_t tramp_hook(std::uintptr_t func, std::uintptr_t new_func, std::size_t inst_size); 52 | std::vector pattern_scan(const std::string_view& pattern, const std::string_view& mask); 53 | std::uintptr_t clone_section(std::uintptr_t section_start); 54 | std::uintptr_t get_prologue(std::uintptr_t function_address); 55 | __declspec(noinline) std::uintptr_t __stdcall spoof(std::uintptr_t address); 56 | bool is_prologue(std::uintptr_t address); 57 | } -------------------------------------------------------------------------------- /Hax/Luau/ldo.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details 3 | #pragma once 4 | 5 | #include "lobject.h" 6 | #include "lstate.h" 7 | #include "luaconf.h" 8 | #include "ldebug.h" 9 | 10 | #define luaD_checkstack(L, n) \ 11 | if ((char*)L->stack_last - (char*)L->top <= (n) * (int)sizeof(TValue)) \ 12 | luaD_growstack(L, n); \ 13 | else \ 14 | condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK)); 15 | 16 | #define incr_top(L) \ 17 | { \ 18 | luaD_checkstack(L, 1); \ 19 | L->top++; \ 20 | } 21 | 22 | #define savestack(L, p) ((char*)(p) - (char*)L->stack) 23 | #define restorestack(L, n) ((TValue*)((char*)L->stack + (n))) 24 | 25 | #define expandstacklimit(L, p) \ 26 | { \ 27 | LUAU_ASSERT((p) <= (L)->stack_last); \ 28 | if ((L)->ci->top < (p)) \ 29 | (L)->ci->top = (p); \ 30 | } 31 | 32 | #define incr_ci(L) ((L->ci == L->end_ci) ? luaD_growCI(L) : (condhardstacktests(luaD_reallocCI(L, L->size_ci)), ++L->ci)) 33 | 34 | #define saveci(L, p) ((char*)(p) - (char*)L->base_ci) 35 | #define restoreci(L, n) ((CallInfo*)((char*)L->base_ci + (n))) 36 | 37 | // results from luaD_precall 38 | #define PCRLUA 0 // initiated a call to a Lua function 39 | #define PCRC 1 // did a call to a C function 40 | #define PCRYIELD 2 // C function yielded 41 | 42 | // type of protected functions, to be ran by `runprotected' 43 | typedef void (*Pfunc)(lua_State* L, void* ud); 44 | 45 | LUAI_FUNC CallInfo* luaD_growCI(lua_State* L); 46 | 47 | LUAI_FUNC void luaD_call(lua_State* L, StkId func, int nResults); 48 | LUAI_FUNC int luaD_pcall(lua_State* L, Pfunc func, void* u, ptrdiff_t oldtop, ptrdiff_t ef); 49 | LUAI_FUNC void luaD_reallocCI(lua_State* L, int newsize); 50 | LUAI_FUNC void luaD_reallocstack(lua_State* L, int newsize); 51 | LUAI_FUNC void luaD_growstack(lua_State* L, int n); 52 | LUAI_FUNC void luaD_checkCstack(lua_State* L); 53 | 54 | LUAI_FUNC l_noret luaD_throw(lua_State* L, int errcode); 55 | LUAI_FUNC int luaD_rawrunprotected(lua_State* L, Pfunc f, void* ud); 56 | -------------------------------------------------------------------------------- /TaaprWare2-UI/InsecureKeysystem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Net.Http; 7 | using System.IO; 8 | using System.Security.Policy; 9 | using System.Net; 10 | 11 | namespace TaaprWare2_UI 12 | { 13 | internal class InsecureKeysystem 14 | { 15 | private static readonly string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TaaprWare2"); 16 | private static readonly string FilePath = Path.Combine(AppDataPath, "key"); 17 | public WebClient Client 18 | => new WebClient { Headers = new WebHeaderCollection { { HttpRequestHeader.ContentType, "application/json" } } }; 19 | 20 | private static void CheckKeyStorage() 21 | { 22 | if (!Directory.Exists(AppDataPath)) 23 | { 24 | Console.WriteLine("AppData folder not found!"); 25 | Directory.CreateDirectory(AppDataPath); 26 | Console.WriteLine("Created AppData folder"); 27 | } 28 | if (!File.Exists(FilePath)) 29 | { 30 | Console.WriteLine("Key storage not found!"); 31 | using (FileStream stream = File.Create(FilePath)) 32 | { 33 | stream.WriteByte(0x50); 34 | } 35 | Console.WriteLine("Created key storage"); 36 | } 37 | } 38 | 39 | public static void SetKeyStorage(string str) 40 | { 41 | CheckKeyStorage(); 42 | File.WriteAllText(FilePath, str); 43 | } 44 | 45 | public static string GetKeyStorage() 46 | { 47 | CheckKeyStorage(); 48 | try 49 | { 50 | return File.ReadAllText(FilePath); 51 | } 52 | catch 53 | { 54 | return ""; 55 | } 56 | } 57 | public static bool IsKeyValid(string key) 58 | { 59 | CheckKeyStorage(); 60 | try 61 | { 62 | InsecureKeysystem ik = new InsecureKeysystem(); 63 | string response = ik.Client.DownloadString("https://1.kelprepl.repl.co/verify/taaprware?verify_key=" + key); 64 | ik.Client.Dispose(); 65 | return !response.Contains(" "); 66 | } 67 | catch 68 | { 69 | return false; 70 | } 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /TaaprWare2-UI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("TaaprWare2-UI")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("TaaprWare2-UI")] 15 | [assembly: AssemblyCopyright("Copyright © 2022")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NEW WORKING VERSION: https://github.com/plusgiant5/TaaprWareV3 2 | 3 | # TaaprWare V2 4 | 5 | WARNING: This code is very bad and I don't know if it still works anymore. Future exploits by me will be nothing like this. It's not updated, but it's possible to update (even following the recent compression changes). 6 | 7 | This is an open source Roblox executor with a custom DLL made in C++, and a UI made in C#. 8 | It features level 8 execution (or whatever level you want), custom functions, metamethod hooking (breaks corescripts), multi Roblox injection, an autoexec folder, and a workspace folder. 9 | 10 | It's not very secure though. With the init script, it's easily detectable because of the insecure hook that doesn't use newcclosure, but on the C++ side it's immune to simple detection methods that I though of while writing it. It doesn't trigger any 268/unexpected client behavior kicks, at least not at the time I'm writing this. 11 | 12 | Discord (better exploits soon): https://discord.gg/kj9cN9MfR4 (NEW) 13 | 14 | # How to build 15 | 16 | DLL: Set to Release x86 and turn off precompiled headers 17 | 18 | UI: Add reference to the AvalonEdit dll in the Release folder 19 | 20 | # HttpGet/GetObjects hook 21 | 22 | Because of the way custom functions work, hooking metamethods causes a bunch of errors in the output which is annoying. If you want game:HttpGet and game:GetObjects capabilities and can handle the error spam, uncomment line 1380 in InitScript.lua. 23 | 24 | # About 25 | 26 | This entire exploit started as testing grounds for me to learn more, and it definitely helped me learn. It helped me get from C++ hello world programs to real Luau function recreation for Roblox and finding offsets, so expect it to be messy. 27 | It heavily relies on the Lua init script to function properly, and it uses RuntimeScriptService::RunScript to execute. This execution method was annoying to work with as there is no lua state involved. I had to hook a terrain function and have the Lua code call that function with arguments that tell the C++ code what to do with the lua state. It was a good learning experience, but I will not be using this execution method again. 28 | 29 | With a few edits, you can get execution working with only these addresses and no offets: rbx_getscheduler, rbx_addscript, rbx_runscript, rbx_deserializer_detour and rbx_deserializer_detour2 30 | Or, for the bare minimum (localscript level, no custom bytecode) rbx_getscheduler and rbx_runscript. 31 | 32 | The framework of custom functions was also done with very few addresses, needing only rbx_writevoxels, rL->top, and rL->base. 33 | 34 | This exploit is good for beginners who want to experiment with custom functions without finding every offset in existence. 35 | 36 | If you need help with addresses or offsets, join the Discord and I will help you. 37 | -------------------------------------------------------------------------------- /Hax/Luau/Compiler.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include "Luau/ParseOptions.h" 5 | #include "Luau/Location.h" 6 | #include "Luau/StringUtils.h" 7 | #include "Luau/Common.h" 8 | 9 | namespace Luau 10 | { 11 | class AstNameTable; 12 | struct ParseResult; 13 | class BytecodeBuilder; 14 | class BytecodeEncoder; 15 | 16 | // Note: this structure is duplicated in luacode.h, don't forget to change these in sync! 17 | struct CompileOptions 18 | { 19 | // 0 - no optimization 20 | // 1 - baseline optimization level that doesn't prevent debuggability 21 | // 2 - includes optimizations that harm debuggability such as inlining 22 | int optimizationLevel = 1; 23 | 24 | // 0 - no debugging support 25 | // 1 - line info & function names only; sufficient for backtraces 26 | // 2 - full debug info with local & upvalue names; necessary for debugger 27 | int debugLevel = 1; 28 | 29 | // 0 - no code coverage support 30 | // 1 - statement coverage 31 | // 2 - statement and expression coverage (verbose) 32 | int coverageLevel = 0; 33 | 34 | // global builtin to construct vectors; disabled by default 35 | const char* vectorLib = nullptr; 36 | const char* vectorCtor = nullptr; 37 | 38 | // null-terminated array of globals that are mutable; disables the import optimization for fields accessed through these 39 | const char** mutableGlobals = nullptr; 40 | }; 41 | 42 | class CompileError : public std::exception 43 | { 44 | public: 45 | CompileError(const Location& location, const std::string& message); 46 | 47 | virtual ~CompileError() throw(); 48 | 49 | virtual const char* what() const throw(); 50 | 51 | const Location& getLocation() const; 52 | 53 | static LUAU_NORETURN void raise(const Location& location, const char* format, ...) LUAU_PRINTF_ATTR(2, 3); 54 | 55 | private: 56 | Location location; 57 | std::string message; 58 | }; 59 | 60 | // compiles bytecode into bytecode builder using either a pre-parsed AST or parsing it from source; throws on errors 61 | void compileOrThrow(BytecodeBuilder& bytecode, const ParseResult& parseResult, const AstNameTable& names, const CompileOptions& options = {}); 62 | void compileOrThrow(BytecodeBuilder& bytecode, const std::string& source, const CompileOptions& options = {}, const ParseOptions& parseOptions = {}); 63 | 64 | // compiles bytecode into a bytecode blob, that either contains the valid bytecode or an encoded error that luau_load can decode 65 | std::string compile( 66 | const std::string& source, const CompileOptions& options = {}, const ParseOptions& parseOptions = {}, BytecodeEncoder* encoder = nullptr); 67 | 68 | } // namespace Luau 69 | -------------------------------------------------------------------------------- /Hax/Luau/Location.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | #include 5 | 6 | namespace Luau 7 | { 8 | 9 | struct Position 10 | { 11 | unsigned int line, column; 12 | 13 | Position(unsigned int line, unsigned int column) 14 | : line(line) 15 | , column(column) 16 | { 17 | } 18 | 19 | bool operator==(const Position& rhs) const 20 | { 21 | return this->column == rhs.column && this->line == rhs.line; 22 | } 23 | bool operator!=(const Position& rhs) const 24 | { 25 | return !(*this == rhs); 26 | } 27 | 28 | bool operator<(const Position& rhs) const 29 | { 30 | if (line == rhs.line) 31 | return column < rhs.column; 32 | else 33 | return line < rhs.line; 34 | } 35 | 36 | bool operator>(const Position& rhs) const 37 | { 38 | if (line == rhs.line) 39 | return column > rhs.column; 40 | else 41 | return line > rhs.line; 42 | } 43 | 44 | bool operator<=(const Position& rhs) const 45 | { 46 | return *this == rhs || *this < rhs; 47 | } 48 | 49 | bool operator>=(const Position& rhs) const 50 | { 51 | return *this == rhs || *this > rhs; 52 | } 53 | }; 54 | 55 | struct Location 56 | { 57 | Position begin, end; 58 | 59 | Location() 60 | : begin(0, 0) 61 | , end(0, 0) 62 | { 63 | } 64 | 65 | Location(const Position& begin, const Position& end) 66 | : begin(begin) 67 | , end(end) 68 | { 69 | } 70 | 71 | Location(const Position& begin, unsigned int length) 72 | : begin(begin) 73 | , end(begin.line, begin.column + length) 74 | { 75 | } 76 | 77 | Location(const Location& begin, const Location& end) 78 | : begin(begin.begin) 79 | , end(end.end) 80 | { 81 | } 82 | 83 | bool operator==(const Location& rhs) const 84 | { 85 | return this->begin == rhs.begin && this->end == rhs.end; 86 | } 87 | bool operator!=(const Location& rhs) const 88 | { 89 | return !(*this == rhs); 90 | } 91 | 92 | bool encloses(const Location& l) const 93 | { 94 | return begin <= l.begin && end >= l.end; 95 | } 96 | bool contains(const Position& p) const 97 | { 98 | return begin <= p && p < end; 99 | } 100 | bool containsClosed(const Position& p) const 101 | { 102 | return begin <= p && p <= end; 103 | } 104 | }; 105 | 106 | std::string toString(const Position& position); 107 | std::string toString(const Location& location); 108 | 109 | } // namespace Luau 110 | -------------------------------------------------------------------------------- /TaaprWare2-UI/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TaaprWare2_UI.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TaaprWare2_UI.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /TaaprWare2.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33122.133 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TaaprWare2", "Hax\Hax.vcxproj", "{E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaaprWare2-UI", "TaaprWare2-UI\TaaprWare2-UI.csproj", "{7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|x64 = Debug|x64 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|Any CPU.ActiveCfg = Debug|x64 21 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|Any CPU.Build.0 = Debug|x64 22 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|x64.ActiveCfg = Debug|x64 23 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|x64.Build.0 = Debug|x64 24 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|x86.ActiveCfg = Debug|Win32 25 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Debug|x86.Build.0 = Debug|Win32 26 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|Any CPU.ActiveCfg = Release|x64 27 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|Any CPU.Build.0 = Release|x64 28 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|x64.ActiveCfg = Release|x64 29 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|x64.Build.0 = Release|x64 30 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|x86.ActiveCfg = Release|Win32 31 | {E6DE0105-06E7-43C4-A9A8-80FB888D6ECC}.Release|x86.Build.0 = Release|Win32 32 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|x64.ActiveCfg = Debug|Any CPU 35 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|x64.Build.0 = Debug|Any CPU 36 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|x86.ActiveCfg = Debug|Any CPU 37 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Debug|x86.Build.0 = Debug|Any CPU 38 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|x64.ActiveCfg = Release|Any CPU 41 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|x64.Build.0 = Release|Any CPU 42 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|x86.ActiveCfg = Release|Any CPU 43 | {7631001F-BBE2-4FD4-AB1E-8B8C6E2CBF0D}.Release|x86.Build.0 = Release|Any CPU 44 | EndGlobalSection 45 | GlobalSection(SolutionProperties) = preSolution 46 | HideSolutionNode = FALSE 47 | EndGlobalSection 48 | GlobalSection(ExtensibilityGlobals) = postSolution 49 | SolutionGuid = {702C840B-70CC-433B-99F4-6EA33558ED6F} 50 | EndGlobalSection 51 | EndGlobal 52 | -------------------------------------------------------------------------------- /Hax/Luau/Common.h: -------------------------------------------------------------------------------- 1 | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2 | #pragma once 3 | 4 | // Compiler codegen control macros 5 | #ifdef _MSC_VER 6 | #define LUAU_NORETURN __declspec(noreturn) 7 | #define LUAU_NOINLINE __declspec(noinline) 8 | #define LUAU_FORCEINLINE __forceinline 9 | #define LUAU_LIKELY(x) x 10 | #define LUAU_UNLIKELY(x) x 11 | #define LUAU_UNREACHABLE() __assume(false) 12 | #define LUAU_DEBUGBREAK() __debugbreak() 13 | #else 14 | #define LUAU_NORETURN __attribute__((__noreturn__)) 15 | #define LUAU_NOINLINE __attribute__((noinline)) 16 | #define LUAU_FORCEINLINE inline __attribute__((always_inline)) 17 | #define LUAU_LIKELY(x) __builtin_expect(x, 1) 18 | #define LUAU_UNLIKELY(x) __builtin_expect(x, 0) 19 | #define LUAU_UNREACHABLE() __builtin_unreachable() 20 | #define LUAU_DEBUGBREAK() __builtin_trap() 21 | #endif 22 | 23 | namespace Luau 24 | { 25 | 26 | using AssertHandler = int (*)(const char* expression, const char* file, int line, const char* function); 27 | 28 | inline AssertHandler& assertHandler() 29 | { 30 | static AssertHandler handler = nullptr; 31 | return handler; 32 | } 33 | 34 | inline int assertCallHandler(const char* expression, const char* file, int line, const char* function) 35 | { 36 | if (AssertHandler handler = assertHandler()) 37 | return handler(expression, file, line, function); 38 | 39 | return 1; 40 | } 41 | 42 | } // namespace Luau 43 | 44 | #if !defined(NDEBUG) || defined(LUAU_ENABLE_ASSERT) 45 | #define LUAU_ASSERT(expr) ((void)(!!(expr) || (Luau::assertCallHandler(#expr, __FILE__, __LINE__, __FUNCTION__) && (LUAU_DEBUGBREAK(), 0)))) 46 | #define LUAU_ASSERTENABLED 47 | #else 48 | #define LUAU_ASSERT(expr) (void)sizeof(!!(expr)) 49 | #endif 50 | 51 | namespace Luau 52 | { 53 | 54 | template 55 | struct FValue 56 | { 57 | static FValue* list; 58 | 59 | T value; 60 | bool dynamic; 61 | const char* name; 62 | FValue* next; 63 | 64 | FValue(const char* name, T def, bool dynamic) 65 | : value(def) 66 | , dynamic(dynamic) 67 | , name(name) 68 | , next(list) 69 | { 70 | list = this; 71 | } 72 | 73 | operator T() const 74 | { 75 | return value; 76 | } 77 | }; 78 | 79 | template 80 | FValue* FValue::list = nullptr; 81 | 82 | } // namespace Luau 83 | 84 | #define LUAU_FASTFLAG(flag) \ 85 | namespace FFlag \ 86 | { \ 87 | extern Luau::FValue flag; \ 88 | } 89 | #define LUAU_FASTFLAGVARIABLE(flag, def) \ 90 | namespace FFlag \ 91 | { \ 92 | Luau::FValue flag(#flag, def, false); \ 93 | } 94 | #define LUAU_FASTINT(flag) \ 95 | namespace FInt \ 96 | { \ 97 | extern Luau::FValue flag; \ 98 | } 99 | #define LUAU_FASTINTVARIABLE(flag, def) \ 100 | namespace FInt \ 101 | { \ 102 | Luau::FValue flag(#flag, def, false); \ 103 | } 104 | 105 | #define LUAU_DYNAMIC_FASTFLAG(flag) \ 106 | namespace DFFlag \ 107 | { \ 108 | extern Luau::FValue flag; \ 109 | } 110 | #define LUAU_DYNAMIC_FASTFLAGVARIABLE(flag, def) \ 111 | namespace DFFlag \ 112 | { \ 113 | Luau::FValue flag(#flag, def, true); \ 114 | } 115 | #define LUAU_DYNAMIC_FASTINT(flag) \ 116 | namespace DFInt \ 117 | { \ 118 | extern Luau::FValue flag; \ 119 | } 120 | #define LUAU_DYNAMIC_FASTINTVARIABLE(flag, def) \ 121 | namespace DFInt \ 122 | { \ 123 | Luau::FValue flag(#flag, def, true); \ 124 | } 125 | -------------------------------------------------------------------------------- /Hax/md5.h: -------------------------------------------------------------------------------- 1 | /* MD5 2 | converted to C++ class by Frank Thilo (thilo@unix-ag.org) 3 | for bzflag (http://www.bzflag.org) 4 | 5 | based on: 6 | 7 | md5.h and md5.c 8 | reference implementation of RFC 1321 9 | 10 | Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 11 | rights reserved. 12 | 13 | License to copy and use this software is granted provided that it 14 | is identified as the "RSA Data Security, Inc. MD5 Message-Digest 15 | Algorithm" in all material mentioning or referencing this software 16 | or this function. 17 | 18 | License is also granted to make and use derivative works provided 19 | that such works are identified as "derived from the RSA Data 20 | Security, Inc. MD5 Message-Digest Algorithm" in all material 21 | mentioning or referencing the derived work. 22 | 23 | RSA Data Security, Inc. makes no representations concerning either 24 | the merchantability of this software or the suitability of this 25 | software for any particular purpose. It is provided "as is" 26 | without express or implied warranty of any kind. 27 | 28 | These notices must be retained in any copies of any part of this 29 | documentation and/or software. 30 | 31 | */ 32 | 33 | #ifndef MD5_MD5_H 34 | #define MD5_MD5_H 35 | 36 | #include 37 | #include 38 | 39 | 40 | // a small class for calculating MD5 hashes of strings or byte arrays 41 | // it is not meant to be fast or secure 42 | // 43 | // usage: 1) feed it blocks of uchars with update() 44 | // 2) finalize() 45 | // 3) get hexdigest() string 46 | // or 47 | // MD5(std::string).hexdigest() 48 | // 49 | // assumes that char is 8 bit and int is 32 bit 50 | namespace hash { 51 | class MD5 { 52 | public: 53 | typedef unsigned int size_type; // must be 32bit 54 | 55 | MD5(); 56 | MD5(const std::string& text); 57 | void update(const unsigned char *buf, size_type length); 58 | void update(const char *buf, size_type length); 59 | MD5& finalize(); 60 | std::string hexdigest() const; 61 | friend std::ostream& operator<<(std::ostream&, MD5 md5); 62 | 63 | private: 64 | void init(); 65 | typedef unsigned char uint1; // 8bit 66 | typedef unsigned int uint4; // 32bit 67 | enum { 68 | blocksize = 64 69 | }; // VC6 won't eat a const static int here 70 | 71 | void transform(const uint1 block[blocksize]); 72 | static void decode(uint4 output[], const uint1 input[], size_type len); 73 | static void encode(uint1 output[], const uint4 input[], size_type len); 74 | 75 | bool finalized; 76 | uint1 buffer[blocksize]; // bytes that didn't fit in last 64 byte chunk 77 | uint4 count[2]; // 64bit counter for number of bits (lo, hi) 78 | uint4 state[4]; // digest so far 79 | uint1 digest[16]; // the result 80 | 81 | // low level logic operations 82 | static inline uint4 F(uint4 x, uint4 y, uint4 z); 83 | static inline uint4 G(uint4 x, uint4 y, uint4 z); 84 | static inline uint4 H(uint4 x, uint4 y, uint4 z); 85 | static inline uint4 I(uint4 x, uint4 y, uint4 z); 86 | static inline uint4 rotate_left(uint4 x, int n); 87 | static inline void FF(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); 88 | static inline void GG(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); 89 | static inline void HH(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); 90 | static inline void II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac); 91 | }; 92 | 93 | std::string md5(const std::string str); 94 | 95 | } 96 | #endif -------------------------------------------------------------------------------- /Hax/rbxinstance.cpp: -------------------------------------------------------------------------------- 1 | #include "rbxstring.h" 2 | #include "rbxinstance.h" 3 | 4 | namespace instance { 5 | objects::instance* FindFirstChild(objects::instance* parent, std::string target_child_name, bool recursive, std::vector ignore_list) { 6 | std::vector children = *(parent->children); 7 | int child_num = 0; 8 | for (objects::instance* instance : children) { 9 | // child 0: right, child 1: wrong, child 2: right, child 3: wrong, etc 10 | // This is because roblox uses shared_ptr which has an extra pointer to ref_count which isnt an instance 11 | if (++child_num % 2) { 12 | std::string name = *(instance->name); 13 | if (name == target_child_name && (std::find(ignore_list.begin(), ignore_list.end(), instance) == ignore_list.end())) { 14 | return instance; 15 | } else if (recursive) { 16 | objects::instance* child = instance::FindFirstChildOfClass(instance, target_child_name, recursive); 17 | if (child && (std::find(ignore_list.begin(), ignore_list.end(), child) == ignore_list.end())) { 18 | return child; 19 | } 20 | } 21 | } 22 | } 23 | return nullptr; 24 | } 25 | objects::instance* FindFirstChildOfClass(objects::instance* parent, std::string target_class_name, bool recursive, std::vector ignore_list) { 26 | if (!parent->children) { 27 | return nullptr; 28 | } 29 | std::vector children = *(parent->children); 30 | int child_num = 0; 31 | for (objects::instance* instance : children) { 32 | if (++child_num % 2) { 33 | std::string name = *(instance->class_descriptor->class_name); 34 | if (name == target_class_name && (std::find(ignore_list.begin(), ignore_list.end(), instance) == ignore_list.end())) { 35 | return instance; 36 | } else if (recursive) { 37 | objects::instance* child = instance::FindFirstChildOfClass(instance, target_class_name, recursive); 38 | if (child && (std::find(ignore_list.begin(), ignore_list.end(), child) == ignore_list.end())) { 39 | return child; 40 | } 41 | } 42 | } 43 | } 44 | return nullptr; 45 | } 46 | std::vector GetChildren(objects::instance* parent, std::string target_class_name) { 47 | return *(parent->children); 48 | } 49 | std::string GetFullName(objects::instance* inst) { 50 | std::string output = *(inst->name); 51 | while (inst->parent) { 52 | output = std::string(".").append(output.c_str()); 53 | output = std::string(inst->name->c_str()).append(output.c_str()); 54 | inst = inst->parent; 55 | } 56 | return output; 57 | } 58 | } 59 | 60 | objects::instance* get_datamodel() { 61 | objects::task_scheduler* task_scheduler = functions::rbx_getscheduler(); 62 | for (std::shared_ptr job : task_scheduler->jobs) { 63 | std::string name = job->name; 64 | if (name == std::string(XorString("WaitingHybridScriptsJob"))) { 65 | auto current_waiting_hybrid_script_job = reinterpret_cast(job.get()); 66 | return current_waiting_hybrid_script_job->script_context->parent; 67 | } 68 | } 69 | return NULL; 70 | }; 71 | objects::instance* get_scriptcontext() { 72 | objects::task_scheduler* task_scheduler = functions::rbx_getscheduler(); 73 | for (std::shared_ptr job : task_scheduler->jobs) { 74 | std::string name = job->name; 75 | if (name == std::string(XorString("WaitingHybridScriptsJob"))) { 76 | auto current_waiting_hybrid_script_job = reinterpret_cast(job.get()); 77 | return current_waiting_hybrid_script_job->script_context; 78 | } 79 | } 80 | return NULL; 81 | }; 82 | std::vector> get_jobs() { 83 | objects::task_scheduler* task_scheduler = functions::rbx_getscheduler(); 84 | return task_scheduler->jobs; 85 | }; -------------------------------------------------------------------------------- /TaaprWare2-UI/NamedPipes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.IO.Pipes; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Windows; 9 | using TaaprWare2_UI; 10 | 11 | namespace TaaprWare2_UI 12 | { 13 | class NamedPipes 14 | { 15 | public static string luapipename = "TaaprWare2_Pipe";//Axon name of lua pipe 16 | 17 | [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] 18 | [return: MarshalAs(UnmanagedType.Bool)] 19 | private static extern bool WaitNamedPipe(string name, int timeout); 20 | //function to check if the pipe exist 21 | public static bool NamedPipeExist(string pipeName) 22 | { 23 | try 24 | { 25 | if (!WaitNamedPipe($"\\\\.\\pipe\\{pipeName}", 0)) 26 | { 27 | int lastWin32Error = Marshal.GetLastWin32Error(); 28 | if (lastWin32Error == 0) 29 | { 30 | return false; 31 | } 32 | if (lastWin32Error == 2) 33 | { 34 | return false; 35 | } 36 | } 37 | return true; 38 | } 39 | catch (Exception) 40 | { 41 | return false; 42 | } 43 | } 44 | 45 | //lua pipe function 46 | public static void LuaPipe(StringBuilder script) 47 | { 48 | int UninjectedProcesses = 0; 49 | Process[] _procs = Process.GetProcesses(); 50 | for (int i = 0; i < _procs.Length; i++) 51 | { 52 | if (_procs[i].ProcessName == "RobloxPlayerBeta" && _procs[i].PagedMemorySize64 > 0x10000000) 53 | { 54 | if (NamedPipeExist(luapipename + _procs[i].Id.ToString())) 55 | { 56 | try 57 | { 58 | using (NamedPipeClientStream namedPipeClientStream = new NamedPipeClientStream(".", luapipename + _procs[i].Id.ToString(), PipeDirection.Out)) 59 | { 60 | namedPipeClientStream.Connect(0); 61 | using (StreamWriter streamWriter = new StreamWriter(namedPipeClientStream, System.Text.Encoding.Default, 999999))//changed buffer to max 1mb since default buffer is 1kb 62 | { 63 | streamWriter.Flush(); 64 | streamWriter.Write(script); 65 | } 66 | } 67 | } 68 | catch (IOException) 69 | { 70 | MessageBox.Show("Error occured connecting to the named pipe.", "Connection Failed!", MessageBoxButton.OK, MessageBoxImage.Hand); 71 | } 72 | catch (TimeoutException) 73 | { 74 | MessageBox.Show("Named pipe doesn't exist.", "Connection Failed!", MessageBoxButton.OK, MessageBoxImage.Hand); 75 | } 76 | catch (Exception ex) 77 | { 78 | MessageBox.Show(ex.Message.ToString()); 79 | } 80 | } 81 | } 82 | } 83 | if (UninjectedProcesses > 0) 84 | { 85 | MessageBox.Show("Not injected into " + UninjectedProcesses + " process" + (UninjectedProcesses == 1 ? "" : "es") + ". Please inject again so your execution will work on all processes.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning); 86 | } 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /TaaprWare2-UI/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 |