robloxmemoryapi 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. robloxmemoryapi-0.3.1/.github/workflows/publish.yml +84 -0
  2. robloxmemoryapi-0.3.1/.gitignore +12 -0
  3. robloxmemoryapi-0.3.1/.luaurc +5 -0
  4. robloxmemoryapi-0.3.1/CMakeLists.txt +18 -0
  5. {robloxmemoryapi-0.3.0/src/robloxmemoryapi.egg-info → robloxmemoryapi-0.3.1}/PKG-INFO +14 -16
  6. robloxmemoryapi-0.3.1/example.py +106 -0
  7. robloxmemoryapi-0.3.1/misc/BytecodeGen.luau +16 -0
  8. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/pyproject.toml +13 -12
  9. robloxmemoryapi-0.3.1/rokit.toml +7 -0
  10. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/__init__.py +10 -6
  11. robloxmemoryapi-0.3.1/src/robloxmemoryapi/_native/__init__.py +1 -0
  12. robloxmemoryapi-0.3.1/src/robloxmemoryapi/_native/memory.cpp +866 -0
  13. robloxmemoryapi-0.3.1/src/robloxmemoryapi/utils/memory.py +42 -0
  14. robloxmemoryapi-0.3.0/PKG-INFO +0 -69
  15. robloxmemoryapi-0.3.0/setup.cfg +0 -4
  16. robloxmemoryapi-0.3.0/src/robloxmemoryapi/utils/memory.py +0 -450
  17. robloxmemoryapi-0.3.0/src/robloxmemoryapi.egg-info/SOURCES.txt +0 -20
  18. robloxmemoryapi-0.3.0/src/robloxmemoryapi.egg-info/dependency_links.txt +0 -1
  19. robloxmemoryapi-0.3.0/src/robloxmemoryapi.egg-info/requires.txt +0 -4
  20. robloxmemoryapi-0.3.0/src/robloxmemoryapi.egg-info/top_level.txt +0 -1
  21. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/LICENSE.md +0 -0
  22. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/README.md +0 -0
  23. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/__init__.py +0 -0
  24. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/luau/__init__.py +0 -0
  25. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/luau/parser.py +0 -0
  26. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/offsets.py +0 -0
  27. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/__init__.py +0 -0
  28. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/bytecode/decryptor.py +0 -0
  29. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/bytecode/encryptor.py +0 -0
  30. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/datastructures.py +0 -0
  31. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/fflags.py +0 -0
  32. {robloxmemoryapi-0.3.0 → robloxmemoryapi-0.3.1}/src/robloxmemoryapi/utils/rbx/instance.py +0 -0
@@ -0,0 +1,84 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+
8
+ jobs:
9
+ build-sdist:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Check out repository
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+
20
+ - name: Build source distribution
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ python -m pip install build
24
+ python -m build --sdist
25
+
26
+ - name: Upload source distribution
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: sdist
30
+ path: dist/*.tar.gz
31
+
32
+ build-wheels:
33
+ name: Build wheels on ${{ matrix.os }}
34
+ runs-on: ${{ matrix.os }}
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ include:
39
+ - os: windows-latest
40
+ cibw_archs: AMD64
41
+ - os: macos-15-intel
42
+ cibw_archs: x86_64
43
+ - os: macos-15
44
+ cibw_archs: arm64
45
+
46
+ steps:
47
+ - name: Check out repository
48
+ uses: actions/checkout@v4
49
+
50
+ - name: Set up Python
51
+ uses: actions/setup-python@v5
52
+ with:
53
+ python-version: "3.11"
54
+
55
+ - name: Build wheels
56
+ uses: pypa/cibuildwheel@v2.20.0
57
+ env:
58
+ CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
59
+ CIBW_SKIP: "pp* *-musllinux*"
60
+ CIBW_ARCHS: ${{ matrix.cibw_archs }}
61
+
62
+ - name: Upload wheels
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: wheels-${{ matrix.os }}
66
+ path: wheelhouse/*.whl
67
+
68
+ publish:
69
+ needs: [build-sdist, build-wheels]
70
+ runs-on: ubuntu-latest
71
+
72
+ steps:
73
+ - name: Download distributions
74
+ uses: actions/download-artifact@v4
75
+ with:
76
+ pattern: "*"
77
+ merge-multiple: true
78
+ path: dist
79
+
80
+ - name: Publish to PyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1
82
+ with:
83
+ password: ${{ secrets.PYPI_API_TOKEN }}
84
+ skip-existing: true
@@ -0,0 +1,12 @@
1
+ .DS_Store
2
+ offset_finder.py
3
+ **/__pycache__/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .eggs/
8
+ pip-wheel-metadata/
9
+ .venv/
10
+ venv/
11
+ misc/BytecodeToWrite.luac
12
+ documentation/
@@ -0,0 +1,5 @@
1
+ {
2
+ "aliases": {
3
+ "lune": "~/.lune/.typedefs/0.10.4/"
4
+ }
5
+ }
@@ -0,0 +1,18 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+
3
+ project(robloxmemoryapi_native LANGUAGES CXX)
4
+
5
+ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
6
+ find_package(pybind11 CONFIG REQUIRED)
7
+
8
+ pybind11_add_module(memory MODULE src/robloxmemoryapi/_native/memory.cpp)
9
+ target_compile_features(memory PRIVATE cxx_std_17)
10
+
11
+ if(WIN32)
12
+ target_link_libraries(memory PRIVATE psapi)
13
+ endif()
14
+
15
+ install(TARGETS memory
16
+ LIBRARY DESTINATION robloxmemoryapi/_native
17
+ RUNTIME DESTINATION robloxmemoryapi/_native
18
+ )
@@ -1,33 +1,31 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: robloxmemoryapi
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Python Library that abstracts reading and writing data from the Roblox DataModel
5
- Author-email: upio <notpoiu@users.noreply.github.com>, mstudio45 <mstudio45@users.noreply.github.com>, ActualMasterOogway <ActualMasterOogway@users.noreply.github.com>
6
- License: Copyright 2025 upio, mstudio45, master oogway
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
-
12
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
-
14
- Project-URL: Homepage, https://github.com/notpoiu/RobloxMemoryAPI
15
- Project-URL: Issues, https://github.com/notpoiu/RobloxMemoryAPI/issues
16
5
  Keywords: roblox,memory,windows
6
+ Author-Email: upio <notpoiu@users.noreply.github.com>, mstudio45 <mstudio45@users.noreply.github.com>, ActualMasterOogway <ActualMasterOogway@users.noreply.github.com>
7
+ License: Copyright 2025 upio, mstudio45, master oogway
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
17
15
  Classifier: Programming Language :: Python :: 3
18
16
  Classifier: License :: OSI Approved :: MIT License
19
17
  Classifier: Operating System :: Microsoft :: Windows
20
18
  Classifier: Development Status :: 3 - Alpha
21
19
  Classifier: Intended Audience :: Developers
22
20
  Classifier: Topic :: Software Development :: Libraries
21
+ Project-URL: Homepage, https://github.com/notpoiu/RobloxMemoryAPI
22
+ Project-URL: Issues, https://github.com/notpoiu/RobloxMemoryAPI/issues
23
23
  Requires-Python: >=3.9
24
- Description-Content-Type: text/markdown
25
- License-File: LICENSE.md
26
24
  Requires-Dist: requests>=2.0
27
25
  Requires-Dist: zstandard>=0.19.0
28
26
  Requires-Dist: xxhash>=3.6.0
29
27
  Requires-Dist: blake3>=1.0.8
30
- Dynamic: license-file
28
+ Description-Content-Type: text/markdown
31
29
 
32
30
  # RobloxMemoryAPI
33
31
 
@@ -0,0 +1,106 @@
1
+ from robloxmemoryapi import RobloxGameClient, RobloxRandom
2
+ from robloxmemoryapi.utils.rbx.datastructures import UDim2
3
+ import platform
4
+ import os
5
+ import hashlib
6
+
7
+ ## Random Class ##
8
+ Test = RobloxRandom(5)
9
+ print("Roblox Random Demo")
10
+ print("math.random() with seed '5' result:", Test.NextNumber())
11
+
12
+ ## Memory Reading ###
13
+ if platform.system() != "Windows":
14
+ print("Sorry! The memory reading module only works in windows, trying to access it will cause client.failed = True")
15
+ exit()
16
+
17
+ # Create a client instance
18
+ # allow_write is by default False, but can be enabled by passing True
19
+ client = RobloxGameClient(allow_write=True)
20
+ # client = RobloxGameClient(pid=2398) # PID is also possible
21
+
22
+ if client.failed:
23
+ print("Failed to get data model")
24
+ exit()
25
+
26
+ # Get the client's data model
27
+ game = client.DataModel
28
+
29
+ print("")
30
+
31
+ # Refresh hooks let you react when Roblox swaps between home screen and game.
32
+ def on_refresh(datamodel):
33
+ if game.is_lua_app():
34
+ print("[Refresh] You are now in the Roblox Home Screen.")
35
+ else:
36
+ print(f"[Refresh] You are now in-game (PlaceId: {game.PlaceId})")
37
+
38
+ # Register callback (optional invoke to run immediately with the current model).
39
+ game.bind_to_refresh(on_refresh, invoke_if_ready=True)
40
+
41
+ LocalPlayer = game.Players.LocalPlayer
42
+
43
+ print("")
44
+
45
+ # Print some info about the game
46
+ print("RobloxMemoryAPI Demo:")
47
+ print("An External Roblox Memory Reader")
48
+ print("==============================")
49
+ print("PlaceID:", game.PlaceId)
50
+ print("GameID:", game.GameId)
51
+ print("JobId:", game.JobId)
52
+ print("Loaded:", game.IsLoaded())
53
+ print("==============================")
54
+ print("Player Name:", LocalPlayer.Name, f"({LocalPlayer.DisplayName} | userid: {LocalPlayer.UserId})")
55
+
56
+ # LuaApp = Roblox Home Screen
57
+ if not game.is_lua_app():
58
+ print("Player HRP Parent:", LocalPlayer.Character.PrimaryPart.GetFullName())
59
+ print("Health:", LocalPlayer.Character.Humanoid.Health, LocalPlayer.Character.Humanoid.MaxHealth)
60
+ print("Player Count:", len(game.Players.GetPlayers()))
61
+ print("==============================")
62
+ print("CurrentCamera CFrame:", game.Workspace.CurrentCamera.CFrame)
63
+ print("CurrentCamera FOV:", game.Workspace.CurrentCamera.FieldOfView)
64
+ print("CurrentCamera ViewportSize:", game.Workspace.CurrentCamera.ViewportSize)
65
+
66
+ print("")
67
+
68
+ # Attributes
69
+ print("Attributes:")
70
+ for name, attribute in game.Workspace.GetAttributes().items():
71
+ print(f"Attribute: '{name}' | Type: {attribute.type_name} | Value: {attribute.value}")
72
+
73
+ print("")
74
+
75
+ if game.Workspace.GetAttribute("Test") is not None:
76
+ print("Test attribute found, testing...")
77
+ print(f"Old attribute: {game.Workspace.GetAttribute("Test")}")
78
+ game.Workspace.SetAttribute("Test", "Hello World")
79
+ print(f"New attribute: {game.Workspace.GetAttribute("Test")}")
80
+
81
+ print("")
82
+
83
+ # Bytecode operations (READING)
84
+ PlayerModule = LocalPlayer.PlayerScripts.PlayerModule
85
+ if PlayerModule is not None and PlayerModule.Bytecode is not None:
86
+ print("PlayerModule Script Hash:", hashlib.sha384(PlayerModule.RawBytecode).hexdigest())
87
+
88
+ # Bytecode write operations (WRITING)
89
+ if os.path.exists("misc/BytecodeToWrite.luac"):
90
+ with open("misc/BytecodeToWrite.luac", "rb") as f:
91
+ BytecodeToWrite = f.read()
92
+
93
+ PlayerModule.Bytecode = BytecodeToWrite
94
+ print("Set bytecode of PlayerModule to BytecodeToWrite.luac")
95
+ else:
96
+ print("misc/BytecodeToWrite.luac not found")
97
+ else:
98
+ print("Roblox is not in a game. No preview data available.")
99
+
100
+ # Write to the client's memory (kills player)
101
+ #LocalPlayer.Character.Humanoid.Health = 0
102
+
103
+ print("")
104
+
105
+ input("Press Enter to close.\n\n")
106
+ client.close()
@@ -0,0 +1,16 @@
1
+ local fs = require("@lune/fs")
2
+ local luau = require("@lune/luau")
3
+
4
+ fs.writeFile("BytecodeToWrite.luac", luau.compile([[
5
+ print("Hello World! :D")
6
+
7
+ local function sum(...)
8
+ local s = 0
9
+ for i, v in {...} do
10
+ s += v
11
+ end
12
+ return s
13
+ end
14
+ return sum(1, 2, 3, 4)]], {
15
+ optimizationLevel = 2
16
+ }))
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["setuptools>=68", "wheel"]
3
- build-backend = "setuptools.build_meta"
2
+ requires = ["scikit-build-core>=0.10", "pybind11>=2.12"]
3
+ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "robloxmemoryapi"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Python Library that abstracts reading and writing data from the Roblox DataModel"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  requires-python = ">=3.9"
@@ -34,13 +34,14 @@ dependencies = [
34
34
  Homepage = "https://github.com/notpoiu/RobloxMemoryAPI"
35
35
  Issues = "https://github.com/notpoiu/RobloxMemoryAPI/issues"
36
36
 
37
- [tool.setuptools]
38
- package-dir = {"" = "src"}
39
- include-package-data = true
40
-
41
- [tool.setuptools.packages.find]
42
- where = ["src"]
43
-
44
- [tool.setuptools.package-data]
45
- robloxmemoryapi = ["data/*.json"]
37
+ [tool.scikit-build]
38
+ minimum-version = "build-system.requires"
39
+ build-dir = "build/{wheel_tag}"
40
+ wheel.packages = ["src/robloxmemoryapi"]
46
41
 
42
+ [tool.scikit-build.sdist]
43
+ include = [
44
+ "CMakeLists.txt",
45
+ "src/robloxmemoryapi/**/*.cpp",
46
+ "src/robloxmemoryapi/**/*.py",
47
+ ]
@@ -0,0 +1,7 @@
1
+ # This file lists tools managed by Rokit, a toolchain manager for Roblox projects.
2
+ # For more information, see https://github.com/rojo-rbx/rokit
3
+
4
+ # New tools can be added by running `rokit add <tool>` in a terminal.
5
+
6
+ [tools]
7
+ lune = "lune-org/lune@0.10.4"
@@ -53,7 +53,8 @@ class RobloxGameClient:
53
53
  process_name: str = "RobloxPlayerBeta.exe",
54
54
  allow_write: bool = False,
55
55
  ):
56
- if platform.system() != "Windows":
56
+ system = platform.system()
57
+ if system not in {"Windows", "Darwin"}:
57
58
  self.failed = True
58
59
  return
59
60
 
@@ -66,6 +67,9 @@ class RobloxGameClient:
66
67
  get_pid_by_name,
67
68
  )
68
69
 
70
+ if system == "Darwin" and process_name == "RobloxPlayerBeta.exe":
71
+ process_name = "RobloxPlayer"
72
+
69
73
  if pid is None:
70
74
  self.pid = get_pid_by_name(process_name)
71
75
  else:
@@ -87,8 +91,8 @@ class RobloxGameClient:
87
91
 
88
92
  @property
89
93
  def FFlags(self):
90
- if platform.system() != "Windows":
91
- raise RuntimeError("This module is only compatible with Windows.")
94
+ if platform.system() not in {"Windows", "Darwin"}:
95
+ raise RuntimeError("This module is only compatible with Windows and macOS.")
92
96
  elif self.failed:
93
97
  raise RuntimeError("There was an error while getting access to memory. Please try again later.")
94
98
 
@@ -99,10 +103,10 @@ class RobloxGameClient:
99
103
 
100
104
  @property
101
105
  def DataModel(self):
102
- if platform.system() != "Windows":
103
- raise RuntimeError("This module is only compatible with Windows.")
106
+ if platform.system() not in {"Windows", "Darwin"}:
107
+ raise RuntimeError("This module is only compatible with Windows and macOS.")
104
108
  elif self.failed:
105
109
  raise RuntimeError("There was an error while getting access to memory. Please try again later.")
106
110
 
107
111
  from .utils.rbx.instance import DataModel
108
- return DataModel(self.memory_module)
112
+ return DataModel(self.memory_module)
@@ -0,0 +1 @@
1
+ """Native extension package for robloxmemoryapi."""