# memory

* This is work in progress, any issues with the functions contact me.
* Current write types (`MEMORY_FLOAT`, `MEMORY_INT`, `MEMORY_BOOL`, `MEMORY_DOUBLE`, `MEMORY_VECTOR3`, `MEMORY_VECTOR2`)
* Current read types (`MEMORY_FLOAT`, `MEMORY_INT`, `MEMORY_BOOL`, `MEMORY_DOUBLE`, `MEMORY_VECTOR3`, `MEMORY_VECTOR2`,  `MEMORY_POINTER`,  `MEMORY_STRING`)

<mark style="color:purple;">`instance`</mark> `write_memory(`<mark style="color:green;">`offset`</mark>, <mark style="color:green;">`type`</mark>, <mark style="color:green;">`value`</mark>`)` -> <mark style="color:purple;">void</mark>

Writes the value to the address.

| Name     | Type                                            | Description                |
| -------- | ----------------------------------------------- | -------------------------- |
| `offset` | <mark style="color:green;">`hex`</mark>         | Where it points to.        |
| `type`   | <mark style="color:green;">`string`</mark>      | Value type.                |
| `value`  | <mark style="color:green;">`number/bool`</mark> | What it writes the memory. |

<mark style="color:purple;">`instance`</mark> `read_memory(`<mark style="color:green;">`offset`</mark>, <mark style="color:green;">`type`</mark>`)` -> <mark style="color:purple;">void</mark>

Returns the value stored in the address.

<mark style="color:purple;">`instance`</mark> `read_string(`<mark style="color:green;">`offset`</mark>, <mark style="color:green;">`size`</mark>`)` -> <mark style="color:purple;">void</mark>

Returns the string stored in the address.

<mark style="color:purple;">`instance`</mark> `write_string(`<mark style="color:green;">`offset`</mark>, <mark style="color:green;">`string`</mark>,  <mark style="color:green;">`size`</mark>`)` -> <mark style="color:purple;">void</mark>

Overwrites current string stored in the address.

<mark style="color:purple;">`void`</mark> `game_baseaddress()` -> <mark style="color:purple;">instance</mark>

Returns the game base address.

<mark style="color:purple;">`void`</mark> `get_renderview()` -> <mark style="color:purple;">instance</mark>

Returns the RenderView address.

<mark style="color:purple;">`void`</mark> `get_visualengine()` -> <mark style="color:purple;">instance</mark>

Returns the VisualEngine address.

## Example

<pre class="language-lua"><code class="lang-lua">-- Roblox version: version-8aa36bbf0eb1494a

local game_name_ptr = game:read_memory(0x68, MEMORY_POINTER)
local name_string = game_name_ptr:read_memory(0x0, MEMORY_STRING)
print(name_string)
-- if the string in the memory is over 16+ it will be stored in a pointer.

<strong>local players = game:get_service("Players")
</strong>local local_plr = players.local_player.character
local humanoidrootpart = local_plr:find_first_child("HumanoidRootPart")
local humanoid = local_plr:find_first_child("Humanoid")

humanoid:write_memory(0x1C8, MEMORY_FLOAT, 200) -- walkspeed
humanoid:write_memory(0x3A0, MEMORY_FLOAT, 200) -- walkspeed check

local position_ptr = humanoidrootpart:read_memory(0x160, MEMORY_POINTER)
local root_pos = position_ptr:read_memory(0x140, MEMORY_VECTOR3) -- position
-- the x, y, z floats are 0x4 offset away from eachother.
print(root_pos.x, root_pos.y, root_pos.z)

local lightning = game:get_service("Lighting")
lightning:write_memory(0x128, MEMORY_FLOAT, 200) -- fog end
</code></pre>

## How to start

<div align="left"><figure><img src="https://2125949812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizHZiELUkSKcTCobLisu%2Fuploads%2FiVk2emBwVJ4T32Sr4mfc%2Fimage.png?alt=media&#x26;token=87ee7916-a296-47cc-9551-732343086925" alt=""><figcaption></figcaption></figure></div>

To get started you need to use a software to analyze the memory, I would recommend re-class.

To reach the address, use the dex feature to copy the identity, which is the address.

If you want learn more about using re-class you can check it out here [here](https://www.unknowncheats.me/forum/league-of-legends/423786-reclass.html) or [here](https://www.youtube.com/watch?v=vQb21RM9-5M\&t=1s). Credits to the authors.

<figure><img src="https://2125949812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FizHZiELUkSKcTCobLisu%2Fuploads%2FLxYZHmS5jPcJabX7BYWM%2FMSYWDJt.png?alt=media&#x26;token=75914bb6-cad1-4674-8da7-0e8ce3915831" alt=""><figcaption></figcaption></figure>
