# Table of Contents - [Introduction | Photon](#introduction-photon) - [roblox | Photon](#roblox-photon) - [universal | Photon](#universal-photon) - [part | Photon](#part-photon) - [shape | Photon](#shape-photon) - [attribute type | Photon](#attribute-type-photon) - [material type | Photon](#material-type-photon) - [humanoid state | Photon](#humanoid-state-photon) - [team | Photon](#team-photon) - [rig type | Photon](#rig-type-photon) - [fflag | Photon](#fflag-photon) - [proximity button | Photon](#proximity-button-photon) - [game | Photon](#game-photon) - [player | Photon](#player-photon) - [value | Photon](#value-photon) - [humanoid | Photon](#humanoid-photon) - [camera | Photon](#camera-photon) - [camera type | Photon](#camera-type-photon) - [sound | Photon](#sound-photon) - [script | Photon](#script-photon) - [software | Photon](#software-photon) - [config | Photon](#config-photon) - [game | Photon](#game-photon) - [decal/texture | Photon](#decal-texture-photon) - [type | Photon](#type-photon) - [specialmesh | Photon](#specialmesh-photon) - [file | Photon](#file-photon) - [lightning | Photon](#lightning-photon) - [input | Photon](#input-photon) - [gui | Photon](#gui-photon) - [websocket | Photon](#websocket-photon) - [globals | Photon](#globals-photon) - [raycast | Photon](#raycast-photon) - [memory | Photon](#memory-photon) - [log | Photon](#log-photon) - [hook | Photon](#hook-photon) - [http | Photon](#http-photon) - [gui | Photon](#gui-photon) - [render | Photon](#render-photon) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) - [roblox | Photon](#roblox-photon) - [Unknown](#unknown) - [Unknown](#unknown) - [Unknown](#unknown) --- # Introduction | Photon ![Page cover](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FvoCl6qHlhVaaG9tnjX3P%252Fffff.png%3Falt%3Dmedia%26token%3D7632f4d8-8fbb-4529-9c97-cc4ef8166954&width=1248&dpr=3&quality=100&sign=87960f65&sv=2) For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/introduction.md) . [](https://photon-4.gitbook.io/api#any-suggestions-or-issues) Any suggestions or issues? --------------------------------------------------------------------------------------------- Contact us below. `memelouse` `883709157864255539` `Owner` `milkbottle` `208568102265290752` `Developer` [](https://photon-4.gitbook.io/api#disclaimer) Disclaimer -------------------------------------------------------------- * Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. * Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. [](https://photon-4.gitbook.io/api#credits) Credits -------------------------------------------------------- * Primordial team for the inspiration for the menu. [](https://photon-4.gitbook.io/api#language) Language ---------------------------------------------------------- * Lua * We currently support `math`, `table`, `coroutine` libraries [](https://photon-4.gitbook.io/api#about-us) About us ---------------------------------------------------------- * Photon was firstly introduced in 2022 as "Arceus" and was rebranded in 2023. * We currently have an team 2 active developers. * Memelouse is lead developer of the project. * If the function descriptions are unclear, you can refer to the Roblox Instance documentation for more details. Most of these functions aim to replicate the same results. [](https://photon-4.gitbook.io/api#our-discord) Our Discord ---------------------------------------------------------------- [https://discord.gg/v](https://discord.gg/uu8sdnrk) [ro](https://discord.com/invite/vro) [Nextroblox](https://photon-4.gitbook.io/api/documentation/roblox) Last updated 1 year ago --- # roblox | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox.md) . Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. [PreviousIntroduction](https://photon-4.gitbook.io/api) [Nextuniversal](https://photon-4.gitbook.io/api/documentation/roblox/universal) Last updated 6 months ago --- # universal | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/universal.md) . `stance` `identity` -> int Gets place in memory. `instance` `name` -> string Gets name of the instance. `instance` `class_name` -> string Gets the class name of the instance. `instance` `get_parent()` -> instance Returns the instance parent from the instance. `instance` `isvalid()` -> bool Checks if the instance is in roblox or invalid. `instance` `isa(``string``)` -> bool Checks if the the instance is this type of class name. `instance` `find_first_descendant(``string``)` -> instance Returns the first descendant found with the given name. `instance` `find_first_descendant_of_class(``string``)` -> instance Returns the first descendant found with the given class name. `instance` `find_first_child(``string``)` -> instance Returns the first child of the instance found with the given name. `instance` `wait_for_child(``string``)` -> instance Returns the child instance with the specified name once it is found. * The function will keep waiting indefinitely if the specified child instance is never added. `instance` `find_first_child_class(``string``)` -> instance Finds the instance by the class name and returns it. `instance` `get_service(``string``)` -> instance Finds the service instance by the name and returns it. `instance` `get_children()` -> table Gets every instance inside the current instance. `instance` `get_descendants()` -> table Gets every instance that contains all of the descendants of that instance. `instance` `is_ancestor_of(``instance``)` -> bool Returns true if an instance is an ancestor of the given descendant. `instance` `is_descendant_of(``instance``)` -> bool Returns true if an instance is a descendant of the given ancestor. `instance` `get_attribute(``string`, `attribute_type``)` -> value type Returns the value which has been assigned to the given attribute name. If no attribute has been assigned, nil is returned. `instance` `set_attribute(``string`, `attribute_type`, `value``)` -> void Sets the attribute with the given name to the given value. Doesnt work for `STRING` attribute type. `instance` `get_attributes()` -> table Returns every attributes assigned to the instance. [](https://photon-4.gitbook.io/api/documentation/roblox/universal#example) Example --------------------------------------------------------------------------------------- Copy local players = game:get_service("Players") local workspace = game:get_service("Workspace") local random_player = players:find_first_child_class("Player") print(random_player.name) local localplayer = players.local_player local localcharacter = localplayer.character if localcharacter:isvalid() then local character_head = localcharacter:find_first_child("Head") if character_head:isvalid() then print(character_head.name) print(character_head:get_parent().name) -- character<-head end for _, v in pairs(localcharacter:get_children()) do if v.identity == character_head.identity then print("Found") break end end end local part = workspace:find_first_child("Part") for name, type in pairs(part:get_attributes()) do print(name, type) end local bool_attribute = part:get_attribute("name_1", attribute_type.BOOLEAN) if bool_attribute then print(bool_attribute) end local number_attribute = part:get_attribute("name_2", attribute_type.NUMBER) if number_attribute then print(number_attribute) end part:set_attribute("name_2", attribute_type.NUMBER, 0) `void` `add_entity(``name`, `part`, `humanoid`, `should_aimbot`, `min`, `max``)` -> void Adds instance part to the esp, aimbot, triggerbot player system. Name Type name `string` part `instance` humanoid `instance` -> optional should\_aimbot `bool` min `vector3` max `vector3` `void` `add_entity_ex(``name`, `character`, `humanoid`, `root`, `should_aimbot`, `min`, `max`, `bodyparts``)` -> void Adds instance part to the esp, aimbot, triggerbot player system. Name Type name `string` character `instance` humanoid `instance` -> optional root `instance` should\_aimbot `bool` min `vector3` max `vector3` bodyparts `table` `void` `force_custom_players()` -> void Disables the player caching system allowing only custom entities to be cached. `void` `add_custom_hitparts(``bodyparts``)` -> void Changes the aimbot, triggerbot, etc hitpart dropdown to the specific bodypart. **The listed functions only works in the "init\_custom\_entity" hook** `add_custom_hitparts` `force_custom_players` `add_entity_ex` `add_entity` [](https://photon-4.gitbook.io/api/documentation/roblox/universal#example-1) Example ----------------------------------------------------------------------------------------- Copy -- phantom forces simple esp local folder = game:get_service("Workspace"):find_first_child("Players") local random_team = folder:find_first_child_class("Folder") hook.add("init_custom_entity", "phantom_forces", function() for _, plr in pairs(random_team:get_children()) do local part = plr:find_first_child_class("Part") add_entity("Enemy", part, nil_instance, true, vector3(1, 0, 1), vector3(1, 1, 1)) end end) -- Advanced version local players = game:get_service("Players") hook.add("init_custom_entity", "phantom_forces", function() add_custom_hitparts({ "Head", "Torso" }) -- Changes the hitparts for aimbot, triggerbot, etc force_custom_players() -- Disables the player caching system for _, plr in pairs(players:get_children()) do local plr_character = plr.character local head = plr_character:find_first_child("Head") local torso = plr_character:find_first_child("Torso") -- R6 local root = plr_character:find_first_child("HumanoidRootPart") add_entity_ex( "Enemy", -- Name plr_character, -- Character nil_instance, -- Humanoid root, -- Root true, -- Should aimbot vector3(1, 0, 1), -- Min vector3(1, 1, 1), -- Max { -- Body parts { "Head", head }, -- Defines the head instance for custom hitpart { "Torso", torso } } ) end end) ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FJxnySzdy1xKKUi9sf16w%252Fpointinaabb.png%3Falt%3Dmedia%26token%3D3856c4a9-f6f9-4aef-89cd-1f82e672d841&width=768&dpr=3&quality=100&sign=a0ce8140&sv=2) [Previousroblox](https://photon-4.gitbook.io/api/documentation/roblox) [Nextattribute type](https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type) Last updated 11 months ago --- # part | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/part.md) . `instance` `shape` -> shape\_type Gets the shape of the part. `instance` `position` -> vector3 Gets the position of the part. `instance` `set_position(``vector3``)` -> void Sets part position of the part. `instance` `cframe_position` -> vector3 Gets the position of the part. `instance` `set_cframe_position(``vector3``)` -> void Sets the cframe position of the part. `instance` `cframe_angle` -> vector3 Gets the cframe angle of the part. `instance` `set_cframe_angle(``vector3``)` -> void Sets the cframe angle of the part. * Cframe angle will use degrees so 1 to 360. `instance` `cframe_lookvector` -> vector3 Gets the cframe lookvector of the part. `instance` `set_cframe_lookvector(``vector3``)` -> void Sets the cframe lookvector of the part. `instance` `cframe_rightvector` -> vector3 Gets the cframe rightvector of the part. `instance` `cframe_upvector` -> vector3 Gets the cframe upvector of the part. `instance` `velocity` -> vector3 Gets the velocity of the part. `instance` `set_velocity(``vector3``)` -> void Sets part velocity of the part. `instance` `linear_velocity` -> vector3 Gets the assemblylinearvelocity of the part. `instance` `set_linear_velocity(``vector3``)` -> void Sets part assemblylinearvelocity of the part. `instance` `size` -> vector3 Gets the size of the part. `instance` `set_size(``vector3``)` -> void Sets the size of the part. `instance` `collision` -> bool Gets the position state of the part. `instance` `set_collision(``bool``)` -> void Sets the collision of the part. `instance` `transparency` -> float Gets the transparency of the part. `instance` `set_transparency(``float``)` -> void Sets the transparency of the part. `nstance` `reflectance`\-> float Gets the reflectance of the part. `instance` `spectate()` -> void Sets your camera target to the instance. `instance` `color` -> color Gets the color of the part. `instance` `set_color(``color``)` -> color Sets the part color. `instance` `material` -> material\_type enum Gets the [material type](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type) of the part. Example (`wood`, `plastic`, `forcefield`, `...`) `instance` `set_material(``material_type``)` -> void Sets the material of the part. `instance` `anchored` -> bool Returns if the object is anchored. Anchored determines whether the part will be immovable by physics. `instance` `set_anchored(``bool``)` -> void Sets the the anchored property. `instance` `get_primitive()` -> instance Gets the primitive pointer. stores position, size, etc. Use the [memory](https://photon-4.gitbook.io/api/documentation/roblox/memory) to access or manipulate this data. `instance` `get_meshpart_id()` -> string Gets the mesh part id. `instance` `apply_chams(``color`, `always_ontop`, `wireframe`, `wireframe_texture`, `glow`, `visible_textures`, `is_playerpart``)` -> void Sets parts rendering settings. * Current color types (`CHAMS_RED`, `CHAMS_GREEN`, `CHAMS_YELLOW`, `CHAMS_BLUE`, `CHAMS_PINK`, `CHAMS_CYAN`, `CHAMS_WHITE`) Name Type Description color `int` Color type from CHAMS\_... always\_ontop `bool` Renders through parts etc. wireframe `bool` Self explanatory wireframe\_texture `bool` Self explanatory glow `bool` Makes it glow visible\_textures `bool` Makes the part not see through is\_playerpart `bool` Needs to be true if the characters parent is the character. `instance` `reset_chams()` -> void Resets the part to its origin render settings. [](https://photon-4.gitbook.io/api/documentation/roblox/part#example) Example ---------------------------------------------------------------------------------- Copy local workspace = game:get_service("Workspace") local players = game:get_service("Players") local localplayer = players.local_player local stored_parts = {} for _, v in pairs(workspace:get_children()) do if v.class_name == "Part" then local part_position = v.position local part_size = v.size print(v.name) print(v.transparency) print(tostring(v.collision)) print(part_size.x, part_size.y, part_size.z) print(part_position.x, part_position.y, part_position.z) print("-") table.insert(stored_parts, v) end end -- gets every parts in workspace and prints out specific properties local local_character = localplayer.character if local_character:isvalid() then -- checks if the instance is not invalid for _, v in pairs(local_character:get_children()) do if v.class_name == "MeshPart" or v.class_name == "Part" then v:set_collision(false) end end end -- basic noclip if local_character:isvalid() then local rootpart = local_character:find_first_child("HumanoidRootPart") if rootpart:isvalid() then local angle = rootpart.cframe_angle print(angle.x, angle.y, angle.z) rootpart:set_velocity(vector3(0, 50, 0)) end end -- flings you upp a little local random_index = math.random(1, #stored_parts) local random_part = stored_parts[random_index] random_part:spectate() -- spectates a random part in workspace -- local characters humanoid is the default camera subject if local_character.material == material_type.PLASTIC then print("humanoidrootpart = plastic!") end -- chams example local head = localplayer.character:find_first_child("Head") head:apply_chams( CHAMS_RED, -- Color true, -- Always on top false, -- Wireframe false, -- Wireframe textured true, -- Glow true, -- Visible textures true -- Is player part ) [Previousfflag](https://photon-4.gitbook.io/api/documentation/roblox/fflag) [Nextmaterial type](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type) Last updated 3 months ago --- # shape | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/part/shape.md) . `shape_type` `:` `BALL` = 0 `CYLINDER` = 1 `BLOCK` = 2 `WEDGE` = 3 `CORNER_WEDGE` = 4 [Previousmaterial type](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type) [Nextplayer](https://photon-4.gitbook.io/api/documentation/roblox/player) Last updated 4 months ago --- # attribute type | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type.md) . `attribute_type``:` `STRING` = 6 `NUMBER` = 5 `BOOLEAN` = 1 `VECTOR3` = 12 `VECTOR2` = 11 `COLOR` = 17 `ENUM` = 33 `CFRAME` = 16 [Previousuniversal](https://photon-4.gitbook.io/api/documentation/roblox/universal) [Nextfflag](https://photon-4.gitbook.io/api/documentation/roblox/fflag) Last updated 4 days ago --- # material type | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type.md) . `material_type` `:` `RUBBER` = 2311 `PLASTER` = 2310 `LEATHER` = 2309 `ROOFSHINGLES` = 2308 `CLAYFOOFTILES` = 2307 `CERAMICTILES` = 2306 `CARPET` = 2305 `CARDBOARD` = 2304 `WATER` \= 2048 `AIR` = 1792 `FORCEFIELD` = 1584 `GLASS` = 1568 `GLACIER` = 1552 `ICE` = 1536 `SALT` = 1392 `ASPHALT` = 1376 `GROUND` = 1360 `MUD` = 1344 `SNOW` = 1328 `FABRIC` = 1312 `SAND` = 1296 `LEAFYGRASS` = 1284 `GRASS` = 1280 `SANDSTONE` = 912 `PEBBLE` = 864 `COBBLESTONE` = 880 `ROCK` = 896 `BRICK` = 848 `PAVEMENT` = 836 `GRANITE` = 832 `LIMESTONE` = 820 `CONCRETE` = 816 `CRACKEDLAVA` = 804 `SLATE` = 800 `BASALT` = 788 `MARBLE` = 784 `WOODPLANKS` = 528 `WOOD` = 512 `METAL` = 1088 `FOIL` = 1072 `DIAMONDPLATE` = 1056 `CORRODEDMETAL` = 1040 `NEON` = 288 `SMOOTHPLASTIC` = 272 `PLASTIC` = 256 [Previouspart](https://photon-4.gitbook.io/api/documentation/roblox/part) [Nextshape](https://photon-4.gitbook.io/api/documentation/roblox/part/shape) Last updated 5 months ago --- # humanoid state | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state.md) . `humanoid_state``:` `FALLING_DOWN` = 0 `RAGDOLL` = 1 `GETTING_UP` = 2 `JUMPING` = 3 `SWIMMING` = 4 `FREE_FALL` = 5 `FLYING` = 6 `LANDED` = 7 `RUNNING` = 8 `RUNNING_NUN` = 9 `RUNNING_NO_PHYS` = 10 `STRAFING_NO_PHYS` = 11 `CLIMBING` = 12 `SEATED` = 13 `PLATFORM_STANDING` = 14 `DEAD` = 15 `PHYSICS` = 16 `NUM_STATE_TYPES` = 17 `NONE` = 18 [Previousrig type](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type) [Nextteam](https://photon-4.gitbook.io/api/documentation/roblox/team) Last updated 1 year ago --- # team | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/team.md) . `instance` `get_team_color()` -> color Gets the team color display. `instance` `get_team_index()` -> int Gets the brick-color index. [Previoushumanoid state](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state) [Nextproximity button](https://photon-4.gitbook.io/api/documentation/roblox/proximity-button) Last updated 3 months ago --- # rig type | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type.md) . `rigtype``:` `R6` = 0 `R15` = 1 [Previoushumanoid](https://photon-4.gitbook.io/api/documentation/roblox/humanoid) [Nexthumanoid state](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state) Last updated 1 year ago --- # fflag | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/fflag.md) . `void` `get_fflag_bool(``name``)` -> bool Get the boolean value of the named fflag. > Will return `nil` if named fflag couldn't be found. This applies to all get functions. `void` `get_fflag_value(``name``)` -> int Get the integer value of the named fflag. `void` `get_fflag_string(``name``)` -> string Get the string value of the named fflag. `void` `get_fflag_log(``name``)` -> byte Get the byte value of the named fflag. `void` `set_fflag_bool(``name``)` -> void Self explanatory. `void` `set_fflag_value(``name``)` -> void Self explanatory. [9/18/25 fflag list](https://raw.githubusercontent.com/memelouse/photon_external_info/refs/heads/main/roblox_fflag_list) [](https://photon-4.gitbook.io/api/documentation/roblox/fflag#example) Example ----------------------------------------------------------------------------------- Copy local maxbandwidthbps = get_fflag_value("PhysicsSenderMaxBandwidthBps") -- integer type if maxbandwidthbps ~= nil then print(maxbandwidthbps) set_fflag_value("PhysicsSenderMaxBandwidthBps", 0) -- prevents physics packets from reaching the server, causing your character to freeze serverside. end local debughumanoidrendering = get_fflag_bool("DebugHumanoidRendering") -- bool type if debughumanoidrendering ~= nil then print(debughumanoidrendering) set_fflag_bool("DebugHumanoidRendering", true) end [Previousattribute type](https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type) [Nextpart](https://photon-4.gitbook.io/api/documentation/roblox/part) Last updated 6 months ago --- # proximity button | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/proximity-button.md) . `instance` `hold_duration` -> float Specifies the amount of time (in seconds) required to complete the action once interaction begins. `instance` `set_hold_duration(``float``)` -> void Overwrites the amount of time to complete the action when it begins. [Previousteam](https://photon-4.gitbook.io/api/documentation/roblox/team) [Nextgame](https://photon-4.gitbook.io/api/documentation/roblox/game) Last updated 3 months ago --- # game | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/game.md) . `void` `get_gravity()` -> float Returns the workspace gravity `void` `set_gravity(``value``)` -> void Sets the workspace gravity `void` `get_tickrate()` -> float Returns the workspace tickrate `void` `set_tickrate(``value``)` -> void Sets the workspace tickrate Normal gravity: `196.2` studs/second [](https://photon-4.gitbook.io/api/documentation/roblox/game#example) Example ---------------------------------------------------------------------------------- Copy local current_tickrate = get_tickrate() local current_gravity = get_gravity() print(current_tickrate, current_gravity) set_tickrate(120) -- 2 times faster, origin 60 fps set_gravity(0) [Previousproximity button](https://photon-4.gitbook.io/api/documentation/roblox/proximity-button) [Nextvalue](https://photon-4.gitbook.io/api/documentation/roblox/value) Last updated 3 months ago --- # player | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/player.md) . `instance` `is_friend()` -> bool Checks if player is added in the friend table in the software. `instance` `get_team()` -> instance Gets players team. `instance` `display_name` -> string Gets the players display name. `instance` `local_player` -> instance Gets local player. `instance` `userid` -> string Gets players user id from roblox. `instance` `character` -> instance Gets the character of player. `instance` `get_camera_max_dist()` -> float Gets camera max distance. `instance` `set_camera_max_dist(``float``)` -> void Sets camera max distance. `instance` `get_camera_min_dist()` -> float Gets camera min distance. `instance` `set_camera_min_dist(``float``)` -> void Sets camera min distance. `void` `**get_cached_playerinfo(**``plr``**)**` -> table Returns a table of cached info for a player instance. Returns `nil` if the player is not found. Field Type Description `id` `string` Player ID `name` `string` Username `display_name` `string` Display name `weapon_name` `string` Current weapon name `team_name` `string` Team name `team_color` `color` Team color `is_friend` `bool` Is on your friends list `is_target` `bool` Is the current aimbot target `same_team` `bool` Is on the same team as local player `not_visible` `bool` Failed last visibility check `rigtype` `int` `0` = R6, `1` = R15 `player` `instance` Player instance `character` `instance` Character instance `team` `instance` Team instance [](https://photon-4.gitbook.io/api/documentation/roblox/player#example) Example ------------------------------------------------------------------------------------ Copy local players = game:get_service("Players") local localplayer = players.local_player local character = localplayer.character -- in workspace print(localplayer.name) print(localplayer.display_name) local local_team = localplayer:get_team() if local_team:isvalid() then print(local_team.name) end for i, v in pairs(players:get_children()) do if v.class_name == "Player" and v.identity ~= localplayer.identity then -- not include localplayer print(v.name) print(tostring(v:is_friend())) if v:get_team().identity == local_team.identity then print("same team") end end end local players = get_players() for _, player in ipairs(players) do local info = get_cached_playerinfo(player) if info then print(info.name, info.team_name, info.rigtype) end end [Previousshape](https://photon-4.gitbook.io/api/documentation/roblox/part/shape) [Nexthumanoid](https://photon-4.gitbook.io/api/documentation/roblox/humanoid) Last updated 1 month ago --- # value | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/value.md) . * IntValue `instance` `get_value_int()` -> int Gets the int value of the instance. `instance` `set_value_int(``int``)` -> void Sets the int value of the instance. * StringValue `instance` `get_value_string()` -> int Gets the string value of the instance. `instance` `set_value_string(``string``)` -> void Sets the string of the instance. * Color3Value `instance` `get_value_color()` -> int Gets the color value of the instance. * NumberValue `instance` `get_value_float()` -> float Gets the float value of the instance. `instance` `set_value_float(``float``)` -> void Sets the float value of the instance. * BoolValue `instance` `get_value_bool()` -> bool Gets the bool of the boolvalue. `instance` `set_value_bool(``bool``)` Sets the bool of the instance. * VectorValue `instance` `get_value_vector()` `vector3` Gets the vector of the instance. `instance` `set_value_vector(``vector3``)` Sets the vector of the instance. * ObjectValue `instance` `get_value_object()` -> instance * Misc `instance` `get_value_double()` -> double Gets the double value of the instance. `instance` `set_value_double(``double``)` -> void Sets the double of the instance. [](https://photon-4.gitbook.io/api/documentation/roblox/value#example) Example ----------------------------------------------------------------------------------- Copy local workspace = game:get_service("Workspace") local random_boolvalue = workspace:find_first_child_class("BoolValue") local random_vector3value = workspace:find_first_child_class("VectorValue") local random_intvalue = workspace:find_first_child_class("IntValue") local random_numbervalue = workspace:find_first_child_class("NumberValue") print(random_boolvalue:get_bool()) print(random_vector3value:get_vector_value()) print(random_intvalue:get_int_value()) print(random_numbervalue:get_float_value()) [Previousgame](https://photon-4.gitbook.io/api/documentation/roblox/game) [Nextcamera](https://photon-4.gitbook.io/api/documentation/roblox/camera) Last updated 6 months ago --- # humanoid | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/humanoid.md) . `instance` `health` -> float Gets the humanoid health of the character. `instance` `max_health` -> float Gets the maximum health of the character. `instance` `get_rigtype()` -> rig\_type Gets the [rig type](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type) . `instance` `move_direction` -> vector3 Gets the direction of the character. `instance` `jumppower` -> float Gets the jumppower of the character. `instance` `set_jumppower(``float``)` -> void Sets the jumppower of the character. `instance` `hipheight` -> float Gets the hipheight of the character. `instance` `set_hipheight(``float``)` -> void Sets the hipheight of the character. `instance` `walkspeed` -> float Gets the walkspeed of the character. `instance` `set_walkspeed(``float``)` -> void Sets the walkspeed of the character. `instance` `sit` -> bool Gets the sit state of the character. `instance` `set_sit(``bool``)` -> void Sets the sit state of the character. `instance` `get_state()` -> humanoid\_state Gets the current [humanoid state](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state) . [](https://photon-4.gitbook.io/api/documentation/roblox/humanoid#example) Example -------------------------------------------------------------------------------------- Copy local players = game:get_service("Players") local localplayer = players.local_player local character = localplayer.character local humanoid = character:find_first_child_class("Humanoid") local move_direction = humanoid.move_direction humanoid:set_walkspeed(200) humanoid:set_jumppower(200) humanoid:set_hipheight(3) print(humanoid.health) print(humanoid.max_health) print(move_direction.x, move_direction.y, move_direction.z) if humanoid:get_state() == humanoid_state.FREE_FALL then print("character is free falling") else print("character is free falling") end if humanoid:get_rigtype() == rig_type.R6 then print("character is r6") else print("character is r15") end [Previousplayer](https://photon-4.gitbook.io/api/documentation/roblox/player) [Nextrig type](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type) Last updated 3 months ago --- # camera | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/camera.md) . `instance` `set_camera_position(``vector3`, `smootness``)` -> void Sets the camera lookat position `instance` `camera_position` -> vector3 Gets the camera position. `instance` `camera_subject` -> instance Gets the camera subject instance. `instance` `camera_lookvector` -> vector3 Gets the camera lookvector. `instance` `fov` -> int Gets the fov on the camera. `instance` `set_fov()` -> void Sets the fov on the camera. (0 - 180) instance `get_camera_type()`\-> camera\_type Gets the [camera type](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type) , (`scriptable`, `orbital`, `...`) [](https://photon-4.gitbook.io/api/documentation/roblox/camera#example) Example ------------------------------------------------------------------------------------ [Previousvalue](https://photon-4.gitbook.io/api/documentation/roblox/value) [Nextcamera type](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type) Last updated 3 months ago Copy local workspace = game:get_service("Workspace") local camera = workspace:find_first_child_class("Camera") local camera_subject = camera.camera_subject print(camera_subject.name .. " - " .. camera_subject.class_name) local camera_position = camera.camera_position print(camera_position.x, camera_position.y, camera_position.z) print(camera.fov) camera:set_camera_position(vector3(0,0,0), 0.5) -- Goes half way camera:set_fov(120) --- # camera type | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type.md) . `camera_type``:` `FIXED_CAMERA` = 0 `ATTACH_CAMERA` = 1 `WATCH_CAMERA` = 2 `TRACK_CAMERA` = 3 `FOLLOW_CAMERA` = 4 `CUSTOM_CAMERA` = 5 `SCRIPTABLE_CAMERA` = 6 `ORBITAL_CAMERA` = 7 `NUM_CAMERA_TYPE` = 8 [Previouscamera](https://photon-4.gitbook.io/api/documentation/roblox/camera) [Nextgame](https://photon-4.gitbook.io/api/documentation/roblox/game-1) Last updated 1 year ago --- # sound | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/sound.md) . `instance` `get_soundid()` -> string gets the sound id from the instance. [Previousscript](https://photon-4.gitbook.io/api/documentation/roblox/script) [Nextdecal/texture](https://photon-4.gitbook.io/api/documentation/roblox/decal-texture) Last updated 3 months ago --- # script | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/script.md) . `instance` `getscriptbytecode()` -> string Returns base64 encrypted byte code of the script. `instance` `decompile_script()` -> string Returns decompiled script. [Previousgame](https://photon-4.gitbook.io/api/documentation/roblox/game-1) [Nextsound](https://photon-4.gitbook.io/api/documentation/roblox/sound) Last updated 6 months ago --- # software | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software.md) . Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. [Previousraycast](https://photon-4.gitbook.io/api/documentation/roblox/raycast) [Nextglobals](https://photon-4.gitbook.io/api/documentation/software/globals) Last updated 3 months ago --- # config | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/config.md) . `config` `create(``name``)` -> void Creates the config. `config` `save(``name``)` -> void Saves the config. `config` `load(``name``)` -> void Loads the config. [Previousglobals](https://photon-4.gitbook.io/api/documentation/software/globals) [Nextfile](https://photon-4.gitbook.io/api/documentation/software/file) Last updated 3 months ago --- # game | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/game-1.md) . `var` `game` -> instance The datamodel of roblox. `var` `nil_instance` -> instance A instance with no stored data. `void` `get_placeid()` -> string Gets the game placeid. `void` `get_gameid()` -> string Gets the gameid session. `void` `get_jobid()` -> string Gets the jobid session. `void` `get_ping()` -> float Gets current ping in the game. `void` `get_memory()` -> float Gets current memory usage from roblox. `void` `get_cpu()` -> float Gets current gpu usage from roblox. `void` `get_gpu()` -> float Gets current gpu usage from roblox. `void` `get_fps()` -> float Gets frames per second from roblox. `void` `get_players()` -> table Gets the table of the current players in the game. `void` `get_characters()` -> table Gets the table of the current characters in the game. `void` `get_screen_size()` -> vector2 Returns the display size of roblox. Example returns { 1920, 1080 } `void` `refresh_roblox()` -> void Refreshes the software, Only suppose to be using when rejoining a new game. [](https://photon-4.gitbook.io/api/documentation/roblox/game-1#example) Example ------------------------------------------------------------------------------------ [Previouscamera type](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type) [Nextscript](https://photon-4.gitbook.io/api/documentation/roblox/script) Last updated 6 months ago Copy local gameid = get_gameid() print(gameid) local placeid = get_placeid() print(placeid) print(tostring(placeid == "4483381587")) local ping = get_ping() print(ping) local screen_size = get_screen_size() print(screen_size.x, screen_size.y) for _, v in pairs(get_players()) do log.add(v.name .. " - " .. v.class_name) local character = v:get_character() log.add(character.name .. " - " .. character.class_name) end for _, v in pairs(get_characters()) do log.add(v.name .. " - " .. v.class_name) end --- # decal/texture | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/decal-texture.md) . `instance` `get_texture()` -> string gets the texture from the instance. `instance` `image_transparency` -> float gets the transparency of the decal/texture instance [Previoussound](https://photon-4.gitbook.io/api/documentation/roblox/sound) [Nextspecialmesh](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh) Last updated 3 months ago --- # type | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/type.md) . `void` `color(``r`, `g`, `b`, `a``)` Name Type Description r `float` value 0 - 1 g `float` value 0 - 1 b `float` value 0 - 1 a `float` value 0 - 1 `var` `COLOR_WHITE` -> `color(1, 1, 1, 1)` `var` `COLOR_BLACK` -> `color(0, 0, 0, 1)` `var` `COLOR_RED` -> `color(1, 0, 0, 1)` `var` `COLOR_GREEN` -> `color(0, 1, 0, 1)` `var` `COLOR_BLUE` -> `color(0, 0, 1, 1)` `void` `vector2(``x`, `y``)` Name Type x `float` y `float` `void` `vector3(``x`, `y`, `z``)` Name Type x `float` y `float` z `float` * vector2 functions `vector2` `add(``vector2``)` -> vector2 `vector2` `subtract(``vector2``)` -> vector2 `vector2` `multiply_scalar(``float``)` -> vector2 `vector2` `multiply_vector(``vector2``)` -> vector2 `vector2` `divide_scalar(``float``)` -> vector2 `vector2` `divide_vector(``vector2``)` -> vector2 `vector2` `divide_vector(``vector2``)` -> vector2 `vector2` `length()` -> float `vector2` `distance(``vector2``)` -> float `vector2` `out_of_screen(``vector2``)` -> bool `vector2` `lerp(``vector2`, `float``)` -> vector2 `vector2` `unpack()` -> table `vector2` `type()` -> string * vector3 functions `vector3` `add(``vector3``)` -> vector3 `vector3` `subtract(``vector3``)` -> vector3 `vector3` `multiply_scalar(``float``)` -> vector3 `vector3` `multiply_vector(``vector3``)` -> vector3 `vector3` `divide_scalar(``float``)` -> vector3 `vector3` `divide_vector(``vector3``)` -> vector3 `vector3` `divide_vector(``vector3``)` -> vector3 `vector3` `length()` -> float `vector3` `distance(``vector3``)` -> float `vector3` `unit()` -> vector3 `vector3` `normalize()` -> vector3 `vector3` `cross_product(``vector3``)` -> vector3 `vector3` `look_vector(``vector3``)` -> vector3 `vector3` `is_zero()` -> bool `vector3` `lerp(``vector3`, `float``)` -> vector3 `vector3` `unpack()` -> table `vector3` `type()` -> string * color functions `color` `hex(``uint32_T``)` -> color `color` `int(``int`, `int`, `int`, `int``)` -> color `color` `to_hex()` -> uint32\_t `color` `to_hex_string()` -> string `color` `unpack()` -> table `color` `type()` -> string [](https://photon-4.gitbook.io/api/type#example) Example ------------------------------------------------------------- [Previouslog](https://photon-4.gitbook.io/api/documentation/software/log) Last updated 12 months ago Copy local white_color = color(1, 1, 1, 1) local white_color_1 = color():int(255, 255, 255, 255) local white_color_2 = color():hex(0xffffff) print(white_color_1.r, white_color_1.g, white_color_1.b) print(white_color_2:to_hex_string()) local t = white_color_1:unpack() print(t.r, t.g, t.b, t.a) local r_vector = vector3(1, 1, 1) + vector3(1, 1, 1) print(r_vector.x, r_vector.y, r_vector.z) local added_vector = r_vector:add(vector3(1, 1, 1)) -- result 3, 3, 3 local distance = r_vector:distance(added_vector) print(distance) local subtracted_vector = r_vector:subtract(vector3(1, 1, 1)) print(tostring(subtracted_vector:is_zero())) local length = r_vector:length() local unit = r_vector:unit() print(length) print(unit.x, unit.y, unit.z) --- # specialmesh | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh.md) . `instance` `get_meshid()` -> string gets the mesh id string from the instance. `instance` `get_textureid()` -> string gets the texture id string from the instance. [](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh#example) Example ----------------------------------------------------------------------------------------- Copy local woprkspace = game:get_service("Workspace") local random_specialmesh = workspace:find_first_child_class("SpecialMesh") local mesh = random_specialmesh:get_meshid() local texture = random_specialmesh:get_textureid() print(mesh) print(texture) [Previousdecal/texture](https://photon-4.gitbook.io/api/documentation/roblox/decal-texture) [Nextlightning](https://photon-4.gitbook.io/api/documentation/roblox/lightning) Last updated 3 months ago --- # file | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/file.md) . `file` `write(``filepath`, `data`, `mode``)` -> void Name Type Description `filepath` `string` The filepath name `data` `string` The data to the file. `mode` `string` \-> optional "binary" `file` `exists(``filepath``)` -> bool Returns true if the filepath exists. `file` `overwrite(``filepath`, `data`, `mode``)` -> void Name Type Description `filepath` `string` The filepath name `data` `string` The data to the file. `mode` `string` \-> optional "binary" `file` `read(``filepath``)` -> string Name Type Description `filepath` `string` The filepath name. * This will only read/write in the photon data folder. `file` `**list_folder(**``folderpath``**)**` \-> table Returns a sequential table of filenames inside the given folder. Both files and subfolders are included. `file` `**delete_file(**``filepath``**)**` -> void Deletes a single file at the given path. `file` `**delete_folder(**``folderpath``**)**` -> void Recursively deletes a folder and all of its contents. [](https://photon-4.gitbook.io/api/documentation/software/file#example) Example ------------------------------------------------------------------------------------ [Previousconfig](https://photon-4.gitbook.io/api/documentation/software/config) [Nextrender](https://photon-4.gitbook.io/api/documentation/software/render) Last updated 1 month ago Copy local data = "hello!" file.write("test.txt", data) local read_data = file.read("test.txt") -- returns "hello!" print(read_data) --- # lightning | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/lightning.md) . `instance` `fog` -> float Returns the fogend of lighting. `instance` `set_fog(``float``)` -> void Sets the fogend for lighting. `instance` `exposure` -> float Returns the exposure of lighting. `instance` `set_exposure(``float``)` Sets the exposure for lighting. `instance` `outdoor_ambient` -> color Returns the color of lightnings outdoor ambient. `instance` `set_outdoor_ambient(``color``)` Sets the color of lightnings outdoor ambient. `instance` `ambient` -> color Gets the color of the lighting ambient. `instance` `set_ambient(``color``)` -> void Sets the color of the lighting ambient. `instance` `get_timeof_day()` -> float Gets the time in roblox. `instance` `set_timeof_day(``value``)` -> void Sets the time in roblox. [](https://photon-4.gitbook.io/api/documentation/roblox/lightning#example) Example --------------------------------------------------------------------------------------- [Previousspecialmesh](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh) [Nextgui](https://photon-4.gitbook.io/api/documentation/roblox/gui) Last updated 5 months ago Copy local lighting = game:get_service("Lighting") print(lighting.exposure) print(lighting.fog) local ambient = lighting.ambient print(ambient.r, ambient.g, ambient.b, ambient.a) local outdoor_ambient = lighting.outdoor_ambient print(outdoor_ambient.r, outdoor_ambient.g, outdoor_ambient.b, outdoor_ambient.a) lighting:set_fog(100) lighting:set_exposure(1) lighting:set_outdoor_ambient(color(0, 0, 0)) lighting:set_ambient(color(0, 0, 0)) --- # input | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/input.md) . `input` `get_mouse_position()` -> vector2 Returns your 2D mouse position. `input` `set_mouse_position(``vector2``)` -> void Sets your mouse position in the coordinate. `input` `set_mouse_position_rel(``vector2``)` -> void Moves your mouse position in the coordinate. `input` `simulate_press(``int``)` -> void Simulates a key press, takes virtual key codes. `input` `simulate_press_down(``int``)` -> void Simulates a key press down, takes virtual key codes. `input` `simulate_press_up(``int``)` -> void Simulates a key press up, takes virtual key codes. * Use MOUSE1 (Left Mouse Button) MOUSE2 (Right Mouse Button) MOUSE3 (Middle Mouse Button) `input` `simulate_mouse_up(``int``)` -> void Simulates mouse up movement. `input` `simulate_mouse_down(``int``)` -> void Simulates mouse down movement. `input` `simulate_mouse_click(``int``)` -> void Simulates mouse click. `input` `scroll(``int``)` -> void Simulates a scroll, example (`-120`, `120`) `input` `key_down(``int``)` -> bool Checks if the key is down, takes virtual key codes. `input` `is_key_pressed(``int``)` -> bool Returns true once when the key is being held. `input` `set_clipboard(``string``)` -> void Sets the clipboard with the string * [virtual key codes](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) [](https://photon-4.gitbook.io/api/documentation/software/input#example) Example ------------------------------------------------------------------------------------- [Previousgui](https://photon-4.gitbook.io/api/documentation/software/gui) [Nexthook](https://photon-4.gitbook.io/api/documentation/software/hook) Last updated 2 months ago Copy local mouse_pos = input.get_mouse_position() input.set_mouse_position(mouse_pos:add(vector2(1, 1))) input.simulate_press(0x2D) -- simulates insert key [VK_INSERT 0x2D INS key] input.simulate_mouse_up(MOUSE2) --- # gui | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/gui.md) . `instance` `get_label_text()` -> string Gets text name from the label `instance` `get_label_text_color()` -> color Returns the text color3 from the label `instance` `get_label_background_color()` -> color Returns the background color3 from the label `instance` `gui_position` -> vector2 Returns the guis position in pixels, You can use this on frames, text label/button etc. `instance` `gui_size` -> vector2 Returns the guis size in pixels, You can use this on frames, text label/button etc. `instance` `set_gui_size(``vector2``)` -> void Sets the gui size in pixels. `instance` `set_frame_position(``vector2``)` -> void Sets the frame position in pixels. [](https://photon-4.gitbook.io/api/documentation/roblox/gui#example) Example --------------------------------------------------------------------------------- [Previouslightning](https://photon-4.gitbook.io/api/documentation/roblox/lightning) [Nextmemory](https://photon-4.gitbook.io/api/documentation/roblox/memory) Last updated 3 months ago Copy local starter_gui = game:get_service("StarterGui") local screen_gui = starter_gui:find_first_child_class("ScreenGui") local text_label = screen_gui:find_first_child_class("TextLabel") local text = text_label:get_label_text() local label_color = text_label:get_label_text_color() local background_color = text_label:get_label_background_color() local text_label_position = text_label.gui_position local text_label_size = text_label.gui_size print(text_label_position.x, text_label_position.y) print(label_color.r, label_color.g, label_color.b) print(background_color.r, background_color.g, background_color.b) print(text) --- # websocket | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/websocket.md) . `websocket` `connect(``link``)` -> struct/nil Creates a WebSocket connection to the given URL. Returns a connection object on success, or nil if the connection fails. `struct` `send(``string``)` -> bool Sends a text message. Returns true if successfully queued/sent, false on failure. `struct` `send_binary(``string``)` -> bool Sends binary data. Returns true if successful, false otherwise. `struct` `recv()` -> nil/string Returns next received message, or nil if no messages are available. `struct` `close()` -> void Closes the WebSocket connection. `struct` `is_connected()` -> bool Returns true if the connection is currently active. `struct` `is_closed()` -> bool Returns true if the connection has been closed. [Previoushook](https://photon-4.gitbook.io/api/documentation/software/hook) [Nexthttp](https://photon-4.gitbook.io/api/documentation/software/http) Last updated 3 months ago Copy -- Connect (returns nil on failure) local ws = websocket.connect("ws://localhost:8080") if not ws then print("connection failed") return end -- Send text or binary ws:send("hello world") ws:send_binary("data") -- Poll for incoming messages (non-blocking, returns nil if none queued) local msg = ws:recv() -- Check state ws:is_connected() -- true while connection is live ws:is_closed() -- true after server sends a close frame -- Disconnect ws:close() --- # globals | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/globals.md) . `void` `world_to_screen(``world_pos``)` -> vector2 Returns the screen position vector. Name Type Description world\_pos `vector3` World position. `void` `in_screen(``screen_pos``)` -> bool Checks if screen position is in inside the screen. > Consider using the `out_of_screen` vector2 function instead. Name Type Description screen\_pos `vector2` 2D position in your screen `void` `run_string(``string``)` -> void Evaluates and executes the given code. `void` `get_eye_angle()` -> vector3 Returns your eye angles of the camera angle. `void` `playsound(``string``)` -> void Plays a sound, only supports `wav` files. Path is relative to photon\\data. `void` `get_tickcount()` -> uint64 Returns the number of milliseconds that have elapsed since the system was started. `void` `menu_active()` -> bool Returns true if menu is open. `void` `is_aimbotting()` -> bool Returns true if you are aimbotting. `void` `get_aimbottarget()` -> instance Returns the instance of the aimbot target. `void` `is_gamefocused()` -> bool Returns true if roblox or menu is active. `void` `get_unixtime()` -> instance Returns unix current time. `void` `JSON_to_table(``string``)` -> table Converts the json string and converts data to table. Name Type Description text `string` JSON formatted data. `void` `table_to_JSON(``table``)` -> string Takes table data and converts it into a JSON formatted string. Name Type Description `tbl` `table` lua table `void` `get_hwid()` -> string Returns the serialized hwid of the computer. `void` `wait(``int``)` -> void Stops the thread for amount of milliseconds. `void` `spawn(``function``)` -> void Creates a thread for the function. `void` `keybind_active(``name``)` -> bool Returns true if the keybind is toggled * Available keybinds. * `menu, silent, flickbot, macro, triggerbot` * `aimbot, noclip, cframe, fly, underground, reverse` `void` `uninject()` -> void Uninjects the cheat. [](https://photon-4.gitbook.io/api/documentation/software/globals#example) Example --------------------------------------------------------------------------------------- [Previoussoftware](https://photon-4.gitbook.io/api/documentation/software) [Nextconfig](https://photon-4.gitbook.io/api/documentation/software/config) Last updated 3 months ago Copy local position = vector3(0, 5, 0) local name = getusername() print(name) hook.add("render", "hook example", function() local screen_pos = world_to_screen(position) if in_screen(screen_pos) then render.add_text(screen_pos, "Hello", color(1, 1, 1, 1)) end end) _G.test = 100 run_string("print(_G.test)") print(function() end) print({hello = {"world"}}) print(1, 1.123) print("hello", "world") print(nil) --- # raycast | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/raycast.md) . Issues: * This is currently in WIP, this means the feature can be buggy/non functional at times. * The current raycasting system is limited to detecting parts and does not support terrain or character interactions. * Max distance the ray can reach is `6000` `studs` `table` \-> `result_table` Field Type Description `hit` `bool` `true` if the ray hit an object, `false` otherwise. `distance` `number` The distance from `point_a` to the hit point. `origin` `vector3` The starting position of the ray (`point_a`). `hit_part` `instance` The object or part that was hit by the ray. `nil` if hit is `false`. `hit_point` `vector3` The position where the ray intersected the object. `nil` if hit is `false`. `raycast` `send(``point_a`, `point_b`, `ignore``)` -> result\_table Casting an invisible ray from a `vector3` in a specified direction with a set length. After you caste the ray, you can detect if it intersects with a basepart. Name Type Description `point_a` `vector3` The starting position of the ray. `point_b` `vector3` The ending position of the ray. `ignore` `table` A list of instances that should be ignored by the raycast. `raycast` `setnext_ray_debug()` -> void Enables visual debugging for the next raycast. * When this function is called, the next raycast performed will be displayed visually (e.g., as a line in the environment). * This is useful for troubleshooting and verifying the raycast's behavior. ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FZsy5KzRxfqfNyHhWfDy0%252Fimage.png%3Falt%3Dmedia%26token%3D9731c0be-07ca-4e22-9037-24e389a004b3&width=768&dpr=3&quality=100&sign=a6b4cd6a&sv=2) An example of how the debug visuals will appear. `raycast` `clear_logs()` -> void Clears all debug logs generated by `setnext_ray_debug`. * Removes any visual representations or logged information created during debugging. [](https://photon-4.gitbook.io/api/documentation/roblox/raycast#example) Example ------------------------------------------------------------------------------------- [Previousmemory](https://photon-4.gitbook.io/api/documentation/roblox/memory) [Nextsoftware](https://photon-4.gitbook.io/api/documentation/software) Last updated 3 months ago Copy local workspace = game:get_service("Workspace") local camera = workspace:find_first_child_class("Camera") local cam_lookvector = camera.camera_lookvector local cam_pos = camera.camera_position local ray_target_pos = cam_pos:add(cam_lookvector:multiply_scalar(5000)) local random_part = workspace:find_first_child_class("Part") raycast.setnext_ray_debug() local results = raycast.send(cam_pos, ray_target_pos, { random_part }) -- will perform a raycast from the camera's position towards the camera's look-at direction print(results) print(results.origin.x, results.origin.y, results.origin.z) -- start position if results.hit then print(results.hit_point.x, results.hit_point.y, results.hit_point.z) -- end position print(results.hit_part.name, results.hit_part.class_name) end wait(10000) -- 10 seconds raycast.clear_logs() --- # memory | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox/memory.md) . * 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`) `instance` `write_memory(``offset`, `type`, `value``)` -> void Writes the value to the address. Name Type Description `offset` `hex` Where it points to. `type` `string` Value type. `value` `number/bool` What it writes the memory. `instance` `read_memory(``offset`, `type``)` -> void Returns the value stored in the address. `instance` `read_string(``offset`, `size``)` -> void Returns the string stored in the address. `instance` `write_string(``offset`, `string`, `size``)` -> void Overwrites current string stored in the address. `void` `game_baseaddress()` -> instance Returns the game base address. `void` `get_renderview()` -> instance Returns the RenderView address. `void` `get_visualengine()` -> instance Returns the VisualEngine address. [](https://photon-4.gitbook.io/api/documentation/roblox/memory#example) Example ------------------------------------------------------------------------------------ [](https://photon-4.gitbook.io/api/documentation/roblox/memory#how-to-start) How to start ---------------------------------------------------------------------------------------------- ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FiVk2emBwVJ4T32Sr4mfc%252Fimage.png%3Falt%3Dmedia%26token%3D87ee7916-a296-47cc-9551-732343086925&width=768&dpr=3&quality=100&sign=8b925d50&sv=2) 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. ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FLxYZHmS5jPcJabX7BYWM%252FMSYWDJt.png%3Falt%3Dmedia%26token%3D75914bb6-cad1-4674-8da7-0e8ce3915831&width=768&dpr=3&quality=100&sign=c717deba&sv=2) [Previousgui](https://photon-4.gitbook.io/api/documentation/roblox/gui) [Nextraycast](https://photon-4.gitbook.io/api/documentation/roblox/raycast) Last updated 3 months ago * [Example](https://photon-4.gitbook.io/api/documentation/roblox/memory#example) * [How to start](https://photon-4.gitbook.io/api/documentation/roblox/memory#how-to-start) Copy -- 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. local players = game:get_service("Players") 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 --- # log | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/log.md) . `log` `add(``message`, `color``)` -> void Name Type Description message `string` What you want to log color `color` Optional color for the log Adds a log. `void` `print(``args``)` -> void Does the same thing as log add. `log` `clear()` -> void Clears all the logs. `log` `notification(``message`, `type``)` -> void Name Type Description message `string` The notification text type `string` Optional type (info, warning, success) [](https://photon-4.gitbook.io/api/documentation/software/log#example) Example ----------------------------------------------------------------------------------- Copy log.add("message 1", color(1, 1, 0, 1)) print("message 2") log.notification("message 3", "info") wait(5000) log.clear() [Previoushttp](https://photon-4.gitbook.io/api/documentation/software/http) [Nexttype](https://photon-4.gitbook.io/api/type) Last updated 1 year ago --- # hook | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/hook.md) . **All available hooks.** Name Return type Return args render `void` `void` init\_custom\_entity `void` `void` init `void` `void` esp\_drawextra `void` `instance` aimbot\_check `bool` `instance` ignore\_plr `bool` `instance` esp\_ignore `bool` `instance` esp\_name `string` `instance` aimbot\_ignore `bool` `instance` triggerbot\_ignore `bool` `instance` triggerbot\_shouldfire `bool` `instance` silent\_ignore `bool` `instance` append\_watermark `string` `void` player\_added `void` `instance` player\_removing `void` `instance` silent\_check `bool` `instance` silent\_ignore `bool` `instance` * All of the return args with instance will be returning the player, Not the character. `hook` `add(``name`, `id`, `function``)` -> void Adds a hook with a callback. Name Type Description name `string` Name of the hook, see above. id `string` Id of the hook. function `function` Function to be called when hook is called. `hook` `remove(``name`, `id``)` -> bool Removes the specific hook. Name Type Description name `string` Name of the hook, see above. id `string` Id of the hook. `hook` `removeall()` -> void Removes all hooks that are active. `hook` `addkey(``key`, `id`, `function` -> `toggle``)`\-> void Adds a hook on a key and will trigger the callback when pressed, takes VK Codes. [https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) Name Type Description key `number` The virtual key code. Example: 0x41 = A Key. function `function` Callback function. id `string` Id of the hook. `hook` `removekey(``key`, `id``)`\-> bool Removes the key hook. Name Type Description key `number` VK Key number. id `string` Id of the hook. [Previousinput](https://photon-4.gitbook.io/api/documentation/software/input) [Nextwebsocket](https://photon-4.gitbook.io/api/documentation/software/websocket) Last updated 13 days ago Copy local place_id = get_placeid() local screen_size = get_screen_size() hook.add("append_watermark", "a", function() return tostring(place_id) end) hook.add("render", "hook example", function() render.add_circle(vector2(screen_size.x / 2, screen_size.y / 2), 100, color(1, 1, 1, 1)) end) wait(1000) hook.remove("render","hook example") hook.addkey(0x0D, "key example", function(toggle) -- 0x0D is the key code for the enter key if toggle then print("gleep") end end) wait(1000) hook.removekey(0x0D, "key example") --- # http | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/http.md) . `http` `get(``website`, `function: body, statuscode``)` -> void Retrieves websites body. Name Type Description website `string` Website address. function `function` Callback function. body `string` Data returned by the website. statuscode `number` Status code returned by the website. `http` `post(``website`, `payload`, `function: body, statuscode``)` -> void Sends a post to the website. Name Type Description website `string` Website address. payload `string` Data to post. body `string` Data returned by the website. statuscode `number` Status code returned by the website. [](https://photon-4.gitbook.io/api/documentation/software/http#example) Example ------------------------------------------------------------------------------------ Copy http.get("https://cataas.com/cat", function(body, stats) if stats == 200 then -- 200 = success, 500 = error local filename = "random_cat.jfif" file.write(filename, body, "binary") end end) [Previouswebsocket](https://photon-4.gitbook.io/api/documentation/software/websocket) [Nextlog](https://photon-4.gitbook.io/api/documentation/software/log) Last updated 3 months ago --- # gui | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/gui.md) . `gui` `create(``name`, `force_open``)` -> menu Name Type Description name `string` Window title force\_open `bool` Still open when menu is not drawing `gui` `remove(``name``)` -> menu Removes the specific windows title. `menu` `set_pos(``X`, `Y``)` -> void Sets the position of the menu, Can be set constantly. `menu` `set_size(``X`, `Y``)` -> void Sets the size of the menu, Can be set constantly. `menu` `add_button(``name`, `callback``)` -> button\_struct Adds the button to the specific menu. Callback will be called when its been pressed. `menu` `add_textbox(``name``)` -> textbox\_struct Adds a textbox to the menu for user input. `menu` `add_slider(``name`, `min`, `max`, `initial_value``)` -> slider\_struct Name Type Description name `string` The display label of the slider. min `float` The minimum value of the slider. max `float` The maximum value of the slider. initial\_value `float` The initial value of the slider, What it starts from. `menu` `add_combo(``name`, `options`, `initial_index``)` -> combo\_struct Name Type Description name `string` The display label of the combo box. options `table` A list of string options. initial\_index `int` The index of the initially selected option (0-based). `menu` `add_multicombo(``name`, `options`, `initial_selected``)` -> combo\_struct Name Type Description name `string` The display label of the combo box. options `table` A list of string options. initial\_selected `table` The index of the initially selected option (0-based). `menu` `add_checkbox(``name`, `initial_value``)` -> checkbox\_struct Name Type Description name `string` The display label of the check box. initial\_value `bool` The initial value of the checkbox (`true` or `false`). `menu` `add_label(``text``)` -> label\_struct Name Type Description text `string` The text display. `menu` `add_keybind(``id`, `keycode``)` -> label\_struct Name Type Description id `string` The id. keycode `int` [virtual keycode](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) `label_struct` `set_label(``label``)` -> void Sets a new label. `struct` `get_state()` -> bool Returns the current state from the structure, This can only be used on `keybind_struct`. `menu` `add_color(``name`, `color``)` -> color\_struct Self explanatory. `struct` `change_callback(``callback``)` -> void This can used for every struct except `button_struct`. `struct` `get_value()` -> value\_type Returns the value from the structure. This cannot be used on `textbox_struct`, `color_struct`, `button_struct`. `checkbox_struct` `bool` `slider_struct` `float` `combo_struct` `int` `struct` `get_text()` -> string Returns the current string from the structure, This can only be used on `combo_struct`, `textbox_struct`. `struct` `get_color()` -> color Returns the current color from the structure, This can be only used on `color_struct`. * * * `render` `**setvalue(**``**menu**`**,** `**label**`**,** `**value**``**)**` -> void Sets the value of a widget inside a menu by its label. Name Type menu `string` label `string` value `float / bool / int / string` Supported widget types and accepted value types: Widget Value type slider `float` checkbox `bool` combo `int` (index) textbox `string` * * * `render` `**getvalue(**``**menu**`**,** `**label**``**)**` **->** **float / bool / int / string / nil** Returns the current value of a widget inside a menu by its label. Returns `nil` if the menu or widget is not found. Name Type menu `string` label `string` [](https://photon-4.gitbook.io/api/documentation/software/gui#example) Example ----------------------------------------------------------------------------------- [](https://photon-4.gitbook.io/api/documentation/software/gui#result) Result --------------------------------------------------------------------------------- ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252Fjn6evzg3zQnQLnmXvXTO%252Fimage.png%3Falt%3Dmedia%26token%3D7aedf154-ef33-412b-b998-ecc76ac9e31e&width=768&dpr=3&quality=100&sign=f137769&sv=2) [Previousrender](https://photon-4.gitbook.io/api/documentation/software/render) [Nextinput](https://photon-4.gitbook.io/api/documentation/software/input) Last updated 1 month ago * [Example](https://photon-4.gitbook.io/api/documentation/software/gui#example) * [Result](https://photon-4.gitbook.io/api/documentation/software/gui#result) Copy local menu = gui.create("Example Menu", false) menu:set_pos(100, 100) menu:set_size(400, 300) local button = menu:add_button("Remove", function() gui.remove("Example Menu") end) local checkbox = menu:add_checkbox("Enable Feature", false) checkbox:change_callback(function() print("Checkbox:", checkbox:get_value()) end) local textbox = menu:add_textbox("Enter Text") textbox:change_callback(function() print("Textbox:", textbox:get_text()) end) local slider = menu:add_slider("Adjust Value", 0, 100, 50) slider:change_callback(function() print("Slider:", slider:get_value()) end) ui.setvalue("Example Menu", "Adjust Value", 99) print("Slider new:", ui.getvalue("Example Menu", "Adjust Value")) local combo = menu:add_combo("Select Option", {"Option 1", "Option 2", "Option 3"}, 0) combo:change_callback(function() print("Selected index:", combo:get_value()) print("Selected option:", combo:get_text()) end) local col = menu:add_color("Color", color(1, 1, 1, 1)) col:change_callback(function() local saved = col:get_color() print("Color:", saved.r, saved.g, saved.b, saved.a) end) local label = menu:add_label("test 123") label:set_label("test 321") local mc = menu:add_multicombo("Types", {"3","2","1"}, {1,3}) mc:change_callback(function() local list = mc:get_selected() for _, v in pairs(list) do print("list", v) end end) local keybind = menu:add_keybind("Keybind", 0x48) print(keybind:get_state()) --- # render | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/software/render.md) . `render` `deltatime()` -> float Gets the overlay delta time. `**Every function under must be called in the hook "render" to work**` `render` `add_line(``position1`, `position2`, `color`, `thickness``)` -> void Draws a line from position1 to position2. Name Type position1 `vector2` position2 `vector2` color `color` thickness `float` \-> optional `render` `add_rect(``mins`, `maxs`, `color`, `rounding`, `thickness``)` -> void Draws a rectangle starting. Name Type mins `vector2` maxs `vector2` color `color` rounding `float` \-> optional thickness `float` \-> optional `render` `add_rect_filled()` -> void Identical usage as add\_rect. `render` `get_text_size(``text``)` -> vector2 Returns how big/size of the text. `render` `add_arc(``position`, `radius`, `angle_start`, `angle_end`, `color`, `thickness`, `segments``)` -> void Draws continuous portion of a curved line Name Type position `vector2` radius `float` angle\_start `float` angle\_end `float` color `color` thickness `float` \-> optional segments `int` \-> optional `render` `add_pie_filled(``position`, `radius`, `angle_start`, `angle_end`, `color`, `segments``)` -> void Identical usage as add\_arc. Name Type position `vector2` radius `float` angle\_start `float` angle\_end `float` color `color` segments `int` \-> optional `render` `add_text(``position`, `text`, `color`, `size`, `outline``)` -> void Draws text at position. Name Type position `vector2` text `string` color `color` size `float` \-> optional outline `bool` \-> optional `render` `add_extra(``text`, `type`, `color``)` -> void Draws text on the player ESP. * Manually supported games will use character instead of player. * This can only be called in the "esp\_drawextra" hook. Name Type text `string` type ESP\_TOP ESP\_BOTTOM ESP\_RIGHT ESP\_LEFT color `color` `render` `add_circle(``position`, `radius`, `color``)` -> void Adds a circle at position with changable radius. Name Type position `vector2` radius `number` color `color` `render` `add_circle_filled()` -> void Identical usage as add\_circle. `render` `add_polyline(``points`, `color`, `thickness``)` -> void Creates a line with multiple points Name Type points `{vector2}` color `color` thickness `float` \-> optional `render` `add_triangle(``point1`, `point2`, `point3`, `color``)` -> void Plots a triangle Name Type point1 `vector2` point2 `vector2` point3 `vector2` color `color` `render` `add_triangle_filled()` -> void Identical usage as add\_triangle. `render` `add_ngon(``vector2`, `radius`, `color`, `segments`, `thickness``)` Plots a poly shape. Name Type vector2 `vector2` radius `float` color `color` segment `int` \-> optional thickness `float` \-> optional `render` `add_ngon_filled()` -> void Identical usage as add\_ngon. `texture_table` \-> `table` Name Type id `int` width `float` height `float` `render` `load_texture(``filename``)` -> texture\_table Converts the texture to be usable for render.addimage. We currently support `jpg`, `jpeg`, `png`, `bmp`, `webp` file types. Name Type filename `string` `render` `add_texture(``textureid`, `min`, `max`, `color``)` -> void Renders the image from load\_texture textureid. Name Type textureid `texture_table.id` min `vector2` max `vector2` color `color` \-> optional [](https://photon-4.gitbook.io/api/documentation/software/render#example) Example -------------------------------------------------------------------------------------- [](https://photon-4.gitbook.io/api/documentation/software/render#result) Result ------------------------------------------------------------------------------------ ![](https://photon-4.gitbook.io/api/~gitbook/image?url=https%3A%2F%2F2125949812-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FizHZiELUkSKcTCobLisu%252Fuploads%252FXLwZrQ57RxbsDIDPU1jw%252Fimage.png%3Falt%3Dmedia%26token%3Dd8d3a690-3623-4f67-bf64-accbd15f9ab0&width=768&dpr=3&quality=100&sign=2e499e90&sv=2) [Previousfile](https://photon-4.gitbook.io/api/documentation/software/file) [Nextgui](https://photon-4.gitbook.io/api/documentation/software/gui) Last updated 19 days ago * [Example](https://photon-4.gitbook.io/api/documentation/software/render#example) * [Result](https://photon-4.gitbook.io/api/documentation/software/render#result) Copy local tole = render.load_texture("toletole.png") hook.add("render", "my hook", function() render.add_line( vector2(20, 145), vector2(500, 145), color(1, 1, 1, 1), 1-- thickness ) render.add_rect( vector2(20, 200), vector2(500, 400) , color(0, 0, 1,1), 3, -- rounding 1 -- thickness ) render.add_text( vector2(262, 220), "Player", color(1, 1, 1, 1) ) render.add_circle_filled( vector2(265, 303), 55, -- radius color(1, 1, 1, 1) ) render.add_triangle( vector2(510, 402), vector2(631, 271), vector2(808, 398), color(1, 0, 1, 1), 3 -- thickness ) render.add_ngon( vector2(252, 511), 40, -- radius color(0.5, 0.3, 1, 1), 5, -- segments 1 -- thickness ) render.add_polyline( { vector2(59, 568), vector2(296, 563), vector2(564, 432), vector2(600, 600), vector2(824, 524) }, color(1, 1, 0, 1), 1 -- thickness ) if tole then -- identifier, pos (top left pixel of img will be pos), width, height, transparency render.add_image( tole.id, vector2(500,44), vector2(50, 50), vector2(100, 100), 1 ) end end) hook.add("esp_drawextra", "draw_extra_example", function(plr) render.add_extra("Test123", ESP_TOP, color(1, 1, 1, 1)) end) --- # Unknown \# Photon ## photonapi - \[Introduction\](https://photon-4.gitbook.io/api/introduction.md): Welcome to the official Photon wiki! - \[roblox\](https://photon-4.gitbook.io/api/documentation/roblox.md): Functions for interacting with Roblox. - \[universal\](https://photon-4.gitbook.io/api/documentation/roblox/universal.md): Functions for interacting with any instances. - \[attribute type\](https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type.md): enum type of the attribute system. - \[fflag\](https://photon-4.gitbook.io/api/documentation/roblox/fflag.md): Functions to change/get fflags. - \[part\](https://photon-4.gitbook.io/api/documentation/roblox/part.md): Functions to get property information from parts. (MeshPart, Part, etc) - \[material type\](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type.md): enum type of the material system. - \[shape\](https://photon-4.gitbook.io/api/documentation/roblox/part/shape.md): enum type of the material system. - \[player\](https://photon-4.gitbook.io/api/documentation/roblox/player.md): Functions to get property information from players. - \[humanoid\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid.md): Functions to get property information from humanoid. - \[rig type\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type.md): enum types of the rig system. - \[humanoid state\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state.md): enum types of the humanoid state. - \[team\](https://photon-4.gitbook.io/api/documentation/roblox/team.md): Functions to get property information from get\\\_team() function instance. - \[proximity button\](https://photon-4.gitbook.io/api/documentation/roblox/proximity-button.md): Functions to get property information from proximity buttons. - \[game\](https://photon-4.gitbook.io/api/documentation/roblox/game.md): Functions to get property information from game. - \[value\](https://photon-4.gitbook.io/api/documentation/roblox/value.md): Functions to get property information from value instances. (IntValue, NumberValue, BoolValue, VectorValue) - \[camera\](https://photon-4.gitbook.io/api/documentation/roblox/camera.md): Functions to get property information from camera. - \[camera type\](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type.md): enum type of the camera type. - \[game\](https://photon-4.gitbook.io/api/documentation/roblox/game-1.md): Functions to get information from the game. - \[script\](https://photon-4.gitbook.io/api/documentation/roblox/script.md): Functions to get information from script instances. Will only work for 'LocalScript' and 'ModuleScript' - \[sound\](https://photon-4.gitbook.io/api/documentation/roblox/sound.md): Functions to get property information from sound. - \[decal/texture\](https://photon-4.gitbook.io/api/documentation/roblox/decal-texture.md): Functions to get property information from decals or texture. - \[specialmesh\](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh.md): Functions to get property information from specialmesh. - \[lightning\](https://photon-4.gitbook.io/api/documentation/roblox/lightning.md): Functions to get property information from Lightning. - \[gui\](https://photon-4.gitbook.io/api/documentation/roblox/gui.md): Functions to get property information from gui. - \[memory\](https://photon-4.gitbook.io/api/documentation/roblox/memory.md): Functions to access memory state from roblox instances. - \[raycast\](https://photon-4.gitbook.io/api/documentation/roblox/raycast.md): Functions to cast a ray for roblox objects. - \[software\](https://photon-4.gitbook.io/api/documentation/software.md) - \[globals\](https://photon-4.gitbook.io/api/documentation/software/globals.md): Functions for screen interactions, sound playback, user information, data conversion, and thread management. - \[config\](https://photon-4.gitbook.io/api/documentation/software/config.md): Functions for creating, saving and loading configs for the software. - \[file\](https://photon-4.gitbook.io/api/documentation/software/file.md): Functions for reading from and writing to files in the photon data folder. - \[render\](https://photon-4.gitbook.io/api/documentation/software/render.md): Functions for drawing various shapes and text on the screen. - \[gui\](https://photon-4.gitbook.io/api/documentation/software/gui.md): Functions for creating a menu. - \[input\](https://photon-4.gitbook.io/api/documentation/software/input.md): Functions for retrieving and setting mouse positions, simulating key presses and mouse clicks, and managing clipboard content. - \[hook\](https://photon-4.gitbook.io/api/documentation/software/hook.md): Functions for managing hooks, allowing you to add, remove, and handle callbacks for various events, including key presses. - \[websocket\](https://photon-4.gitbook.io/api/documentation/software/websocket.md): Functions for creating, managing, and interacting with WebSocket connections, including sending and receiving data, handling events, and connection lifecycle control. - \[http\](https://photon-4.gitbook.io/api/documentation/software/http.md): Functions for making HTTP requests, allowing you to retrieve website content and send POST requests with payloads. - \[log\](https://photon-4.gitbook.io/api/documentation/software/log.md): Functions for managing logs, allowing you to add, print, clear logs, and send notifications. - \[type\](https://photon-4.gitbook.io/api/type.md) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on a page URL with the \`ask\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/introduction.md?ask= \`\`\` The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/introduction.md). # Introduction ## Any suggestions or issues? Contact us below. \`memelouse\` \`883709157864255539\` \`Owner\` \`milkbottle\` \`208568102265290752\` \`Developer\` ## Disclaimer \* Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. \* Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. ## Credits \* Primordial team for the inspiration for the menu. ## Language \* Lua \* We currently support \`math\`, \`table\`, \`coroutine\` libraries ## About us \* Photon was firstly introduced in 2022 as "Arceus" and was rebranded in 2023. \* We currently have an team 2 active developers. \* Memelouse is lead developer of the project. \* If the function descriptions are unclear, you can refer to the Roblox Instance documentation for more details. Most of these functions aim to replicate the same results. ## Our Discord \[https://discord.gg/v\](https://discord.gg/uu8sdnrk)\[ro\](https://discord.com/invite/vro) --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/introduction.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox.md). # roblox Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/universal.md). # universal \`stance\` \`identity\` -> int Gets place in memory. \`instance\` \`name\` -> string Gets name of the instance. \`instance\` \`class\_name\` -> string Gets the class name of the instance. \`instance\` \`get\_parent()\` -> instance Returns the instance parent from the instance. \`instance\` \`isvalid()\` -> bool Checks if the instance is in roblox or invalid. \`instance\` \`isa(\`\`string\`\`)\` -> bool Checks if the the instance is this type of class name. \`instance\` \`find\_first\_descendant(\`\`string\`\`)\` -> instance Returns the first descendant found with the given name. \`instance\` \`find\_first\_descendant\_of\_class(\`\`string\`\`)\` -> instance Returns the first descendant found with the given class name. \`instance\` \`find\_first\_child(\`\`string\`\`)\` -> instance Returns the first child of the instance found with the given name. \`instance\` \`wait\_for\_child(\`\`string\`\`)\` -> instance Returns the child instance with the specified name once it is found. \* The function will keep waiting indefinitely if the specified child instance is never added. \`instance\` \`find\_first\_child\_class(\`\`string\`\`)\` -> instance Finds the instance by the class name and returns it. \`instance\` \`get\_service(\`\`string\`\`)\` -> instance Finds the service instance by the name and returns it. \`instance\` \`get\_children()\` -> table Gets every instance inside the current instance. \`instance\` \`get\_descendants()\` -> table Gets every instance that contains all of the descendants of that instance. \`instance\` \`is\_ancestor\_of(\`\`instance\`\`)\` -> bool Returns true if an instance is an ancestor of the given descendant. \`instance\` \`is\_descendant\_of(\`\`instance\`\`)\` -> bool Returns true if an instance is a descendant of the given ancestor. \`instance\` \`get\_attribute(\`\`string\`, \`attribute\_type\`\`)\` -> value type Returns the value which has been assigned to the given attribute name. If no attribute has been assigned, nil is returned. \`instance\` \`set\_attribute(\`\`string\`, \`attribute\_type\`, \`value\`\`)\` -> void Sets the attribute with the given name to the given value. Doesnt work for \`STRING\` attribute type. \`instance\` \`get\_attributes()\` -> table Returns every attributes assigned to the instance. ## Example \`\`\`lua local players = game:get\_service("Players") local workspace = game:get\_service("Workspace") local random\_player = players:find\_first\_child\_class("Player") print(random\_player.name) local localplayer = players.local\_player local localcharacter = localplayer.character if localcharacter:isvalid() then local character\_head = localcharacter:find\_first\_child("Head") if character\_head:isvalid() then print(character\_head.name) print(character\_head:get\_parent().name) -- character<-head end for \_, v in pairs(localcharacter:get\_children()) do if v.identity == character\_head.identity then print("Found") break end end end local part = workspace:find\_first\_child("Part") for name, type in pairs(part:get\_attributes()) do print(name, type) end local bool\_attribute = part:get\_attribute("name\_1", attribute\_type.BOOLEAN) if bool\_attribute then print(bool\_attribute) end local number\_attribute = part:get\_attribute("name\_2", attribute\_type.NUMBER) if number\_attribute then print(number\_attribute) end part:set\_attribute("name\_2", attribute\_type.NUMBER, 0) \`\`\` \`void\` \`add\_entity(\`\`name\`, \`part\`, \`humanoid\`, \`should\_aimbot\`, \`min\`, \`max\`\`)\` -> void Adds instance part to the esp, aimbot, triggerbot player system. | Name | Type | | -------------- | ------------------------------------------------------------------------------------------- | | name | \`string\` | | part | \`instance\` | | humanoid | \`instance\` -> optional | | should\\\_aimbot | \`bool\` | | min | \`vector3\` | | max | \`vector3\` | \`void\` \`add\_entity\_ex(\`\`name\`, \`character\`, \`humanoid\`, \`root\`, \`should\_aimbot\`, \`min\`, \`max\`, \`bodyparts\`\`)\` -> void Adds instance part to the esp, aimbot, triggerbot player system. | Name | Type | | -------------- | ------------------------------------------------------------------------------------------- | | name | \`string\` | | character | \`instance\` | | humanoid | \`instance\` -> optional | | root | \`instance\` | | should\\\_aimbot | \`bool\` | | min | \`vector3\` | | max | \`vector3\` | | bodyparts | \`table\` | \`void\` \`force\_custom\_players()\` -> void Disables the player caching system allowing only custom entities to be cached. \`void\` \`add\_custom\_hitparts(\`\`bodyparts\`\`)\` -> void Changes the aimbot, triggerbot, etc hitpart dropdown to the specific bodypart. \*\*The listed functions only works in the "init\\\_custom\\\_entity" hook\*\* \`add\_custom\_hitparts\` \`force\_custom\_players\` \`add\_entity\_ex\` \`add\_entity\` ## Example
-- phantom forces simple esp
local folder = game:get\_service("Workspace"):find\_first\_child("Players")
local random\_team = folder:find\_first\_child\_class("Folder")

hook.add("init\_custom\_entity", "phantom\_forces", function()
    for \_, plr in pairs(random\_team:get\_children()) do
        local part = plr:find\_first\_child\_class("Part")
        add\_entity("Enemy", part, nil\_instance, true, vector3(1, 0, 1), vector3(1, 1, 1))
    end
end)


-- Advanced version
local players = game:get\_service("Players")

hook.add("init\_custom\_entity", "phantom\_forces", function()
    add\_custom\_hitparts({ "Head", "Torso" }) -- Changes the hitparts for aimbot, triggerbot, etc
    force\_custom\_players() -- Disables the player caching system
    
    for \_, plr in pairs(players:get\_children()) do
        local plr\_character = plr.character
        local head = plr\_character:find\_first\_child("Head")
        local torso = plr\_character:find\_first\_child("Torso") -- R6
        local root = plr\_character:find\_first\_child("HumanoidRootPart")
        
        add\_entity\_ex(
            "Enemy", -- Name
            plr\_character, -- Character
            nil\_instance, -- Humanoid
            root, -- Root
            true, -- Should aimbot
            vector3(1, 0, 1), -- Min
            vector3(1, 1, 1), -- Max
            { -- Body parts
                { "Head", head }, -- Defines the head instance for custom hitpart
                { "Torso", torso }
            }
        )
    end
end)
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/universal.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/part.md). # part \`instance\` \`shape\` -> shape\\\_type Gets the shape of the part. \`instance\` \`position\` -> vector3 Gets the position of the part. \`instance\` \`set\_position(\`\`vector3\`\`)\` -> void Sets part position of the part. \`instance\` \`cframe\_position\` -> vector3 Gets the position of the part. \`instance\` \`set\_cframe\_position(\`\`vector3\`\`)\` -> void Sets the cframe position of the part. \`instance\` \`cframe\_angle\` -> vector3 Gets the cframe angle of the part. \`instance\` \`set\_cframe\_angle(\`\`vector3\`\`)\` -> void Sets the cframe angle of the part. \* Cframe angle will use degrees so 1 to 360. \`instance\` \`cframe\_lookvector\` -> vector3 Gets the cframe lookvector of the part. \`instance\` \`set\_cframe\_lookvector(\`\`vector3\`\`)\` -> void Sets the cframe lookvector of the part. \`instance\` \`cframe\_rightvector\` -> vector3 Gets the cframe rightvector of the part. \`instance\` \`cframe\_upvector\` -> vector3 Gets the cframe upvector of the part. \`instance\` \`velocity\` -> vector3 Gets the velocity of the part. \`instance\` \`set\_velocity(\`\`vector3\`\`)\` -> void Sets part velocity of the part. \`instance\` \`linear\_velocity\` -> vector3 Gets the assemblylinearvelocity of the part. \`instance\` \`set\_linear\_velocity(\`\`vector3\`\`)\` -> void Sets part assemblylinearvelocity of the part. \`instance\` \`size\` -> vector3 Gets the size of the part. \`instance\` \`set\_size(\`\`vector3\`\`)\` -> void Sets the size of the part. \`instance\` \`collision\` -> bool Gets the position state of the part. \`instance\` \`set\_collision(\`\`bool\`\`)\` -> void Sets the collision of the part. \`instance\` \`transparency\` -> float Gets the transparency of the part. \`instance\` \`set\_transparency(\`\`float\`\`)\` -> void Sets the transparency of the part. \`nstance\` \`reflectance\`-> float Gets the reflectance of the part. \`instance\` \`spectate()\` -> void Sets your camera target to the instance. \`instance\` \`color\` -> color Gets the color of the part. \`instance\` \`set\_color(\`\`color\`\`)\` -> color Sets the part color. \`instance\` \`material\` -> material\\\_type enum Gets the \[material type\](/api/documentation/roblox/part/material-type.md) of the part. Example (\`wood\`, \`plastic\`, \`forcefield\`, \`...\`) \`instance\` \`set\_material(\`\`material\_type\`\`)\` -> void Sets the material of the part. \`instance\` \`anchored\` -> bool Returns if the object is anchored. Anchored determines whether the part will be immovable by physics. \`instance\` \`set\_anchored(\`\`bool\`\`)\` -> void Sets the the anchored property. \`instance\` \`get\_primitive()\` -> instance Gets the primitive pointer. stores position, size, etc. Use the \[memory\](/api/documentation/roblox/memory.md) to access or manipulate this data. \`instance\` \`get\_meshpart\_id()\` -> string Gets the mesh part id. \`instance\` \`apply\_chams(\`\`color\`, \`always\_ontop\`, \`wireframe\`, \`wireframe\_texture\`, \`glow\`, \`visible\_textures\`, \`is\_playerpart\`\`)\` -> void Sets parts rendering settings. \* Current color types (\`CHAMS\_RED\`, \`CHAMS\_GREEN\`, \`CHAMS\_YELLOW\`, \`CHAMS\_BLUE\`, \`CHAMS\_PINK\`, \`CHAMS\_CYAN\`, \`CHAMS\_WHITE\`) | Name | Type | Description | | ------------------ | ---------------------------------------- | ----------------------------------------------------------- | | color | \`int\` | Color type from CHAMS\\\_... | | always\\\_ontop | \`bool\` | Renders through parts etc. | | wireframe | \`bool\` | Self explanatory | | wireframe\\\_texture | \`bool\` | Self explanatory | | glow | \`bool\` | Makes it glow | | visible\\\_textures | \`bool\` | Makes the part not see through | | is\\\_playerpart | \`bool\` | Needs to be true if the characters parent is the character. | \`instance\` \`reset\_chams()\` -> void Resets the part to its origin render settings. ## Example
local workspace = game:get\_service("Workspace")
local players = game:get\_service("Players")
local localplayer = players.local\_player

local stored\_parts = {}

for \_, v in pairs(workspace:get\_children()) do
    if v.class\_name == "Part" then
       local part\_position = v.position
       local part\_size = v.size
       
       print(v.name)
       print(v.transparency)
       print(tostring(v.collision))
       print(part\_size.x, part\_size.y, part\_size.z)
       print(part\_position.x, part\_position.y, part\_position.z)
       print("-")
       
       table.insert(stored\_parts, v)
    end
end -- gets every parts in workspace and prints out specific properties

local local\_character = localplayer.character
if local\_character:isvalid() then -- checks if the instance is not invalid
   for \_, v in pairs(local\_character:get\_children()) do
      if v.class\_name == "MeshPart" or v.class\_name == "Part" then
         v:set\_collision(false)
      end
   end
end -- basic noclip

if local\_character:isvalid() then
   local rootpart = local\_character:find\_first\_child("HumanoidRootPart")
   if rootpart:isvalid() then
      local angle = rootpart.cframe\_angle
      print(angle.x, angle.y, angle.z)
      
      rootpart:set\_velocity(vector3(0, 50, 0))
   end
end -- flings you upp a little

local random\_index = math.random(1, #stored\_parts)
local random\_part = stored\_parts\[random\_index\]
random\_part:spectate() -- spectates a random part in workspace
-- local characters humanoid is the default camera subject

if local\_character.material == material\_type.PLASTIC then
   print("humanoidrootpart = plastic!")
end

-- chams example
local head = localplayer.character:find\_first\_child("Head")

head:apply\_chams(
    CHAMS\_RED, -- Color
    true, -- Always on top
    false, -- Wireframe
    false, -- Wireframe textured
    true, -- Glow
    true, -- Visible textures
    true -- Is player part
)
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/part.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/part/shape.md). # shape \`shape\_type\` \`:\` \`BALL\` = 0 \`CYLINDER\` = 1 \`BLOCK\` = 2 \`WEDGE\` = 3 \`CORNER\_WEDGE\` = 4 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/part/shape.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type.md). # attribute type \`attribute\_type\`\`:\` \`STRING\` = 6 \`NUMBER\` = 5 \`BOOLEAN\` = 1 \`VECTOR3\` = 12 \`VECTOR2\` = 11 \`COLOR\` = 17 \`ENUM\` = 33 \`CFRAME\` = 16 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/universal/attribute-type.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/part/material-type.md). # material type \`material\_type\` \`:\` \`RUBBER\` = 2311 \`PLASTER\` = 2310 \`LEATHER\` = 2309 \`ROOFSHINGLES\` = 2308 \`CLAYFOOFTILES\` = 2307 \`CERAMICTILES\` = 2306 \`CARPET\` = 2305 \`CARDBOARD\` = 2304 \`WATER\` = 2048 \`AIR\` = 1792 \`FORCEFIELD\` = 1584 \`GLASS\` = 1568 \`GLACIER\` = 1552 \`ICE\` = 1536 \`SALT\` = 1392 \`ASPHALT\` = 1376 \`GROUND\` = 1360 \`MUD\` = 1344 \`SNOW\` = 1328 \`FABRIC\` = 1312 \`SAND\` = 1296 \`LEAFYGRASS\` = 1284 \`GRASS\` = 1280 \`SANDSTONE\` = 912 \`PEBBLE\` = 864 \`COBBLESTONE\` = 880 \`ROCK\` = 896 \`BRICK\` = 848 \`PAVEMENT\` = 836 \`GRANITE\` = 832 \`LIMESTONE\` = 820 \`CONCRETE\` = 816 \`CRACKEDLAVA\` = 804 \`SLATE\` = 800 \`BASALT\` = 788 \`MARBLE\` = 784 \`WOODPLANKS\` = 528 \`WOOD\` = 512 \`METAL\` = 1088 \`FOIL\` = 1072 \`DIAMONDPLATE\` = 1056 \`CORRODEDMETAL\` = 1040 \`NEON\` = 288 \`SMOOTHPLASTIC\` = 272 \`PLASTIC\` = 256 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/part/material-type.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state.md). # humanoid state \`humanoid\_state\`\`:\` \`FALLING\_DOWN\` = 0 \`RAGDOLL\` = 1 \`GETTING\_UP\` = 2 \`JUMPING\` = 3 \`SWIMMING\` = 4 \`FREE\_FALL\` = 5 \`FLYING\` = 6 \`LANDED\` = 7 \`RUNNING\` = 8 \`RUNNING\_NUN\` = 9 \`RUNNING\_NO\_PHYS\` = 10 \`STRAFING\_NO\_PHYS\` = 11 \`CLIMBING\` = 12 \`SEATED\` = 13 \`PLATFORM\_STANDING\` = 14 \`DEAD\` = 15 \`PHYSICS\` = 16 \`NUM\_STATE\_TYPES\` = 17 \`NONE\` = 18 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/humanoid/humanoid-state.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type.md). # rig type \`rigtype\`\`:\` \`R6\` = 0 \`R15\` = 1 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/humanoid/rig-type.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/team.md). # team \`instance\` \`get\_team\_color()\` -> color Gets the team color display. \`instance\` \`get\_team\_index()\` -> int Gets the brick-color index. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/team.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/fflag.md). # fflag \`void\` \`get\_fflag\_bool(\`\`name\`\`)\` -> bool Get the boolean value of the named fflag. > Will return \`nil\` if named fflag couldn't be found. This applies to all get functions. \`void\` \`get\_fflag\_value(\`\`name\`\`)\` -> int Get the integer value of the named fflag. \`void\` \`get\_fflag\_string(\`\`name\`\`)\` -> string Get the string value of the named fflag. \`void\` \`get\_fflag\_log(\`\`name\`\`)\` -> byte Get the byte value of the named fflag. \`void\` \`set\_fflag\_bool(\`\`name\`\`)\` -> void Self explanatory. \`void\` \`set\_fflag\_value(\`\`name\`\`)\` -> void Self explanatory. \[9/18/25 fflag list\](https://raw.githubusercontent.com/memelouse/photon\_external\_info/refs/heads/main/roblox\_fflag\_list) ## Example \`\`\`lua local maxbandwidthbps = get\_fflag\_value("PhysicsSenderMaxBandwidthBps") -- integer type if maxbandwidthbps ~= nil then print(maxbandwidthbps) set\_fflag\_value("PhysicsSenderMaxBandwidthBps", 0) -- prevents physics packets from reaching the server, causing your character to freeze serverside. end local debughumanoidrendering = get\_fflag\_bool("DebugHumanoidRendering") -- bool type if debughumanoidrendering ~= nil then print(debughumanoidrendering) set\_fflag\_bool("DebugHumanoidRendering", true) end \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/fflag.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/proximity-button.md). # proximity button \`instance\` \`hold\_duration\` -> float Specifies the amount of time (in seconds) required to complete the action once interaction begins. \`instance\` \`set\_hold\_duration(\`\`float\`\`)\` -> void Overwrites the amount of time to complete the action when it begins. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/proximity-button.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/player.md). # player \`instance\` \`is\_friend()\` -> bool Checks if player is added in the friend table in the software. \`instance\` \`get\_team()\` -> instance Gets players team. \`instance\` \`display\_name\` -> string Gets the players display name. \`instance\` \`local\_player\` -> instance Gets local player. \`instance\` \`userid\` -> string Gets players user id from roblox. \`instance\` \`character\` -> instance Gets the character of player. \`instance\` \`get\_camera\_max\_dist()\` -> float Gets camera max distance. \`instance\` \`set\_camera\_max\_dist(\`\`float\`\`)\` -> void Sets camera max distance. \`instance\` \`get\_camera\_min\_dist()\` -> float Gets camera min distance. \`instance\` \`set\_camera\_min\_dist(\`\`float\`\`)\` -> void Sets camera min distance. \`void\` \*\*\`get\_cached\_playerinfo(\`\*\*\`plr\`\*\*\`)\`\*\* -> table Returns a table of cached info for a player instance. Returns \`nil\` if the player is not found. | Field | Type | Description | | -------------- | ------------------------------------------------------------------ | ----------------------------------- | | \`id\` | \`string\` | Player ID | | \`name\` | \`string\` | Username | | \`display\_name\` | \`string\` | Display name | | \`weapon\_name\` | \`string\` | Current weapon name | | \`team\_name\` | \`string\` | Team name | | \`team\_color\` | \`color\` | Team color | | \`is\_friend\` | \[\`bool\`\](#user-content-fn-1)\[^1\] | Is on your friends list | | \`is\_target\` | \[\`bool\`\](#user-content-fn-1)\[^1\] | Is the current aimbot target | | \`same\_team\` | \[\`bool\`\](#user-content-fn-1)\[^1\] | Is on the same team as local player | | \`not\_visible\` | \[\`bool\`\](#user-content-fn-1)\[^1\] | Failed last visibility check | | \`rigtype\` | \`int\` | \`0\` = R6, \`1\` = R15 | | \`player\` | \`instance\` | Player instance | | \`character\` | \`instance\` | Character instance | | \`team\` | \`instance\` | Team instance |
## Example
local players = game:get\_service("Players")
local localplayer = players.local\_player
local character = localplayer.character -- in workspace

print(localplayer.name)
print(localplayer.display\_name)
local local\_team = localplayer:get\_team()

if local\_team:isvalid() then
    print(local\_team.name)
end

for i, v in pairs(players:get\_children()) do
    if v.class\_name == "Player" and v.identity ~= localplayer.identity then -- not include localplayer
        print(v.name)
        print(tostring(v:is\_friend()))
        
        if v:get\_team().identity == local\_team.identity then
            print("same team")
        end
    end
end

local players = get\_players()
for \_, player in ipairs(players) do
    local info = get\_cached\_playerinfo(player)
    if info then
        print(info.name, info.team\_name, info.rigtype)
    end
end
\[^1\]: --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/player.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/humanoid.md). # humanoid \`instance\` \`health\` -> float Gets the humanoid health of the character. \`instance\` \`max\_health\` -> float Gets the maximum health of the character. \`instance\` \`get\_rigtype()\` -> rig\\\_type Gets the \[rig type\](/api/documentation/roblox/humanoid/rig-type.md). \`instance\` \`move\_direction\` -> vector3 Gets the direction of the character. \`instance\` \`jumppower\` -> float Gets the jumppower of the character. \`instance\` \`set\_jumppower(\`\`float\`\`)\` -> void Sets the jumppower of the character. \`instance\` \`hipheight\` -> float Gets the hipheight of the character. \`instance\` \`set\_hipheight(\`\`float\`\`)\` -> void Sets the hipheight of the character. \`instance\` \`walkspeed\` -> float Gets the walkspeed of the character. \`instance\` \`set\_walkspeed(\`\`float\`\`)\` -> void Sets the walkspeed of the character. \`instance\` \`sit\` -> bool Gets the sit state of the character. \`instance\` \`set\_sit(\`\`bool\`\`)\` -> void Sets the sit state of the character. \`instance\` \`get\_state()\` -> humanoid\\\_state Gets the current \[humanoid state\](/api/documentation/roblox/humanoid/humanoid-state.md). ## Example \`\`\`lua local players = game:get\_service("Players") local localplayer = players.local\_player local character = localplayer.character local humanoid = character:find\_first\_child\_class("Humanoid") local move\_direction = humanoid.move\_direction humanoid:set\_walkspeed(200) humanoid:set\_jumppower(200) humanoid:set\_hipheight(3) print(humanoid.health) print(humanoid.max\_health) print(move\_direction.x, move\_direction.y, move\_direction.z) if humanoid:get\_state() == humanoid\_state.FREE\_FALL then print("character is free falling") else print("character is free falling") end if humanoid:get\_rigtype() == rig\_type.R6 then print("character is r6") else print("character is r15") end \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/humanoid.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/value.md). # value \* IntValue \`instance\` \`get\_value\_int()\` -> int Gets the int value of the instance. \`instance\` \`set\_value\_int(\`\`int\`\`)\` -> void Sets the int value of the instance. \* StringValue \`instance\` \`get\_value\_string()\` -> int Gets the string value of the instance. \`instance\` \`set\_value\_string(\`\`string\`\`)\` -> void Sets the string of the instance. \* Color3Value \`instance\` \`get\_value\_color()\` -> int Gets the color value of the instance. \* NumberValue \`instance\` \`get\_value\_float()\` -> float Gets the float value of the instance. \`instance\` \`set\_value\_float(\`\`float\`\`)\` -> void Sets the float value of the instance. \* BoolValue \`instance\` \`get\_value\_bool()\` -> bool Gets the bool of the boolvalue. \`instance\` \`set\_value\_bool(\`\`bool\`\`)\` Sets the bool of the instance. \* VectorValue \`instance\` \`get\_value\_vector()\` \`vector3\` Gets the vector of the instance. \`instance\` \`set\_value\_vector(\`\`vector3\`\`)\` Sets the vector of the instance. \* ObjectValue \`instance\` \`get\_value\_object()\` -> instance \* Misc \`instance\` \`get\_value\_double()\` -> double Gets the double value of the instance. \`instance\` \`set\_value\_double(\`\`double\`\`)\` -> void Sets the double of the instance. ## Example \`\`\`lua local workspace = game:get\_service("Workspace") local random\_boolvalue = workspace:find\_first\_child\_class("BoolValue") local random\_vector3value = workspace:find\_first\_child\_class("VectorValue") local random\_intvalue = workspace:find\_first\_child\_class("IntValue") local random\_numbervalue = workspace:find\_first\_child\_class("NumberValue") print(random\_boolvalue:get\_bool()) print(random\_vector3value:get\_vector\_value()) print(random\_intvalue:get\_int\_value()) print(random\_numbervalue:get\_float\_value()) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/value.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/game.md). # game \`void\` \`get\_gravity()\` -> float Returns the workspace gravity \`void\` \`set\_gravity(\`\`value\`\`)\` -> void Sets the workspace gravity \`void\` \`get\_tickrate()\` -> float Returns the workspace tickrate \`void\` \`set\_tickrate(\`\`value\`\`)\` -> void Sets the workspace tickrate Normal gravity: \`196.2\` studs/second ## Example \`\`\`lua local current\_tickrate = get\_tickrate() local current\_gravity = get\_gravity() print(current\_tickrate, current\_gravity) set\_tickrate(120) -- 2 times faster, origin 60 fps set\_gravity(0) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/game.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type.md). # camera type \`camera\_type\`\`:\` \`FIXED\_CAMERA\` = 0 \`ATTACH\_CAMERA\` = 1 \`WATCH\_CAMERA\` = 2 \`TRACK\_CAMERA\` = 3 \`FOLLOW\_CAMERA\` = 4 \`CUSTOM\_CAMERA\` = 5 \`SCRIPTABLE\_CAMERA\` = 6 \`ORBITAL\_CAMERA\` = 7 \`NUM\_CAMERA\_TYPE\` = 8 --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/camera/camera-type.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/camera.md). # camera \`instance\` \`set\_camera\_position(\`\`vector3\`, \`smootness\`\`)\` -> void Sets the camera lookat position \`instance\` \`camera\_position\` -> vector3 Gets the camera position. \`instance\` \`camera\_subject\` -> instance Gets the camera subject instance. \`instance\` \`camera\_lookvector\` -> vector3 Gets the camera lookvector. \`instance\` \`fov\` -> int Gets the fov on the camera. \`instance\` \`set\_fov()\` -> void Sets the fov on the camera. (0 - 180) instance \`get\_camera\_type()\`-> camera\\\_type Gets the \[camera type\](/api/documentation/roblox/camera/camera-type.md), (\`scriptable\`, \`orbital\`, \`...\`) ## Example \`\`\`lua local workspace = game:get\_service("Workspace") local camera = workspace:find\_first\_child\_class("Camera") local camera\_subject = camera.camera\_subject print(camera\_subject.name .. " - " .. camera\_subject.class\_name) local camera\_position = camera.camera\_position print(camera\_position.x, camera\_position.y, camera\_position.z) print(camera.fov) camera:set\_camera\_position(vector3(0,0,0), 0.5) -- Goes half way camera:set\_fov(120) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/camera.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/globals.md). # globals \`void\` \`world\_to\_screen(\`\`world\_pos\`\`)\` -> vector2 Returns the screen position vector. | Name | Type | Description | | ---------- | ------------------------------------------- | --------------- | | world\\\_pos | \`vector3\` | World position. | \`void\` \`in\_screen(\`\`screen\_pos\`\`)\` -> bool Checks if screen position is in inside the screen. > Consider using the \`out\_of\_screen\` vector2 function instead. | Name | Type | Description | | ----------- | ------------------------------------------- | -------------------------- | | screen\\\_pos | \`vector2\` | 2D position in your screen | \`void\` \`run\_string(\`\`string\`\`)\` -> void Evaluates and executes the given code. \`void\` \`get\_eye\_angle()\` -> vector3 Returns your eye angles of the camera angle. \`void\` \`playsound(\`\`string\`\`)\` -> void Plays a sound, only supports \`wav\` files. Path is relative to photon\\data. \`void\` \`get\_tickcount()\` -> uint64 Returns the number of milliseconds that have elapsed since the system was started. \`void\` \`menu\_active()\` -> bool Returns true if menu is open. \`void\` \`is\_aimbotting()\` -> bool Returns true if you are aimbotting. \`void\` \`get\_aimbottarget()\` -> instance Returns the instance of the aimbot target. \`void\` \`is\_gamefocused()\` -> bool Returns true if roblox or menu is active. \`void\` \`get\_unixtime()\` -> instance Returns unix current time. \`void\` \`JSON\_to\_table(\`\`string\`\`)\` -> table Converts the json string and converts data to table. | Name | Type | Description | | ---- | ------------------------------------------ | -------------------- | | text | \`string\` | JSON formatted data. | \`void\` \`table\_to\_JSON(\`\`table\`\`)\` -> string Takes table data and converts it into a JSON formatted string. | Name | Type | Description | | ----- | ----------------------------------------- | ----------- | | \`tbl\` | \`table\` | lua table | \`void\` \`get\_hwid()\` -> string Returns the serialized hwid of the computer. \`void\` \`wait(\`\`int\`\`)\` -> void Stops the thread for amount of milliseconds. \`void\` \`spawn(\`\`function\`\`)\` -> void Creates a thread for the function. \`void\` \`keybind\_active(\`\`name\`\`)\` -> bool Returns true if the keybind is toggled \* Available keybinds. \* \`menu, silent, flickbot, macro, triggerbot\` \* \`aimbot, noclip, cframe, fly, underground, reverse\` \`void\` \`uninject()\` -> void Uninjects the cheat. ## Example \`\`\`lua local position = vector3(0, 5, 0) local name = getusername() print(name) hook.add("render", "hook example", function() local screen\_pos = world\_to\_screen(position) if in\_screen(screen\_pos) then render.add\_text(screen\_pos, "Hello", color(1, 1, 1, 1)) end end) \_G.test = 100 run\_string("print(\_G.test)") print(function() end) print({hello = {"world"}}) print(1, 1.123) print("hello", "world") print(nil) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/globals.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/sound.md). # sound \`instance\` \`get\_soundid()\` -> string gets the sound id from the instance. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/sound.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/game-1.md). # game \`var\` \`game\` -> instance The datamodel of roblox. \`var\` \`nil\_instance\` -> instance A instance with no stored data. \`void\` \`get\_placeid()\` -> string Gets the game placeid. \`void\` \`get\_gameid()\` -> string Gets the gameid session. \`void\` \`get\_jobid()\` -> string Gets the jobid session. \`void\` \`get\_ping()\` -> float Gets current ping in the game. \`void\` \`get\_memory()\` -> float Gets current memory usage from roblox. \`void\` \`get\_cpu()\` -> float Gets current gpu usage from roblox. \`void\` \`get\_gpu()\` -> float Gets current gpu usage from roblox. \`void\` \`get\_fps()\` -> float Gets frames per second from roblox. \`void\` \`get\_players()\` -> table Gets the table of the current players in the game. \`void\` \`get\_characters()\` -> table Gets the table of the current characters in the game. \`void\` \`get\_screen\_size()\` -> vector2 Returns the display size of roblox. Example returns { 1920, 1080 } \`void\` \`refresh\_roblox()\` -> void Refreshes the software, Only suppose to be using when rejoining a new game. ## Example \`\`\`lua local gameid = get\_gameid() print(gameid) local placeid = get\_placeid() print(placeid) print(tostring(placeid == "4483381587")) local ping = get\_ping() print(ping) local screen\_size = get\_screen\_size() print(screen\_size.x, screen\_size.y) for \_, v in pairs(get\_players()) do log.add(v.name .. " - " .. v.class\_name) local character = v:get\_character() log.add(character.name .. " - " .. character.class\_name) end for \_, v in pairs(get\_characters()) do log.add(v.name .. " - " .. v.class\_name) end \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/game-1.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/file.md). # file \`file\` \`write(\`\`filepath\`, \`data\`, \`mode\`\`)\` -> void | Name | Type | Description | | ---------- | ------------------------------------------ | ------------------------------------------------------- | | \`filepath\` | \`string\` | The filepath name | | \`data\` | \`string\` | The data to the file. | | \`mode\` | \`string\` | -> optional "binary" | \`file\` \`exists(\`\`filepath\`\`)\` -> bool Returns true if the filepath exists. \`file\` \`overwrite(\`\`filepath\`, \`data\`, \`mode\`\`)\` -> void | Name | Type | Description | | ---------- | ------------------------------------------ | ------------------------------------------------------- | | \`filepath\` | \`string\` | The filepath name | | \`data\` | \`string\` | The data to the file. | | \`mode\` | \`string\` | -> optional "binary" | \`file\` \`read(\`\`filepath\`\`)\` -> string | Name | Type | Description | | ---------- | ------------------------------------------ | ------------------ | | \`filepath\` | \`string\` | The filepath name. | \* This will only read/write in the photon data folder. \`file\` \*\*\`list\_folder(\`\*\*\`folderpath\`\*\*\`)\`\*\* -> table Returns a sequential table of filenames inside the given folder. Both files and subfolders are included. \`file\` \*\*\`delete\_file(\`\*\*\`filepath\`\*\*\`)\`\*\* -> void Deletes a single file at the given path. \`file\` \*\*\`delete\_folder(\`\*\*\`folderpath\`\*\*\`)\`\*\* -> void Recursively deletes a folder and all of its contents. ## Example \`\`\`lua local data = "hello!" file.write("test.txt", data) local read\_data = file.read("test.txt") -- returns "hello!" print(read\_data) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/file.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/render.md). # render \`render\` \`deltatime()\` -> float Gets the overlay delta time. \*\*\`Every function under must be called in the hook "render" to work\`\*\* \`render\` \`add\_line(\`\`position1\`, \`position2\`, \`color\`, \`thickness\`\`)\` -> void Draws a line from position1 to position2. | Name | Type | | --------- | ---------------------------------------------------------------------------------------- | | position1 | \`vector2\` | | position2 | \`vector2\` | | color | \`color\` | | thickness | \`float\` -> optional | \`render\` \`add\_rect(\`\`mins\`, \`maxs\`, \`color\`, \`rounding\`, \`thickness\`\`)\` -> void Draws a rectangle starting. | Name | Type | | --------- | ---------------------------------------------------------------------------------------- | | mins | \`vector2\` | | maxs | \`vector2\` | | color | \`color\` | | rounding | \`float\` -> optional | | thickness | \`float\` -> optional | \`render\` \`add\_rect\_filled()\` -> void Identical usage as add\\\_rect. \`render\` \`get\_text\_size(\`\`text\`\`)\` -> vector2 Returns how big/size of the text. \`render\` \`add\_arc(\`\`position\`, \`radius\`, \`angle\_start\`, \`angle\_end\`, \`color\`, \`thickness\`, \`segments\`\`)\` -> void Draws continuous portion of a curved line
NameTypeDescription
positionvector2Text position on screen.
radiusfloatText to draw.
angle\_startfloatText color in RGBA.
angle\_endfloat
colorcolor
thicknessfloat -> optional
segmentsint -> optional
\`render\` \`add\_pie\_filled(\`\`position\`, \`radius\`, \`angle\_start\`, \`angle\_end\`, \`color\`, \`segments\`\`)\` -> void Identical usage as add\\\_arc.
NameTypeDescription
positionvector2Text position on screen.
radiusfloatText to draw.
angle\_startfloatText color in RGBA.
angle\_endfloat
colorcolor
segmentsint -> optional
\`render\` \`add\_text(\`\`position\`, \`text\`, \`color\`, \`size\`, \`outline\`\`)\` -> void Draws text at position.
NameTypeDescription
positionvector2Text position on screen.
textstringText to draw.
colorcolorText color in RGBA.
sizefloat -> optional
outlinebool -> optional
\`render\` \`add\_extra(\`\`text\`, \`type\`, \`color\`\`)\` -> void Draws text on the player ESP. \* Manually supported games will use character instead of player. \* This can only be called in the "esp\\\_drawextra" hook.
NameTypeDescription
textstringText to draw.
type

ESP\_TOP

ESP\_BOTTOM

ESP\_RIGHT

ESP\_LEFT

colorcolorText color in RGBA.
\`render\` \`add\_circle(\`\`position\`, \`radius\`, \`color\`\`)\` -> void Adds a circle at position with changable radius. | Name | Type | | -------- | ------------------------------------------- | | position | \`vector2\` | | radius | \`number\` | | color | \`color\` | \`render\` \`add\_circle\_filled()\` -> void Identical usage as add\\\_circle. \`render\` \`add\_polyline(\`\`points\`, \`color\`, \`thickness\`\`)\` -> void Creates a line with multiple points | Name | Type | | --------- | ---------------------------------------------------------------------------------------- | | points | \`{vector2}\` | | color | \`color\` | | thickness | \`float\` -> optional | \`render\` \`add\_triangle(\`\`point1\`, \`point2\`, \`point3\`, \`color\`\`)\` -> void Plots a triangle | Name | Type | | ------ | ------------------------------------------- | | point1 | \`vector2\` | | point2 | \`vector2\` | | point3 | \`vector2\` | | color | \`color\` | \`render\` \`add\_triangle\_filled()\` -> void Identical usage as add\\\_triangle. \`render\` \`add\_ngon(\`\`vector2\`, \`radius\`, \`color\`, \`segments\`, \`thickness\`\`)\` Plots a poly shape. | Name | Type | | --------- | ---------------------------------------------------------------------------------------- | | vector2 | \`vector2\` | | radius | \`float\` | | color | \`color\` | | segment | \`int\` -> optional | | thickness | \`float\` -> optional | \`render\` \`add\_ngon\_filled()\` -> void Identical usage as add\\\_ngon. \`texture\_table\` -> \`table\` | Name | Type | | ------ | ----------------------------------------- | | id | \`int\` | | width | \`float\` | | height | \`float\` | \`render\` \`load\_texture(\`\`filename\`\`)\` -> texture\\\_table Converts the texture to be usable for render.addimage. We currently support \`jpg\`, \`jpeg\`, \`png\`, \`bmp\`, \`webp\` file types. | Name | Type | | -------- | ------------------------------------------ | | filename | \`string\` | \`render\` \`add\_texture(\`\`textureid\`, \`min\`, \`max\`, \`color\`\`)\` -> void Renders the image from load\\\_texture textureid. | Name | Type | | --------- | ---------------------------------------------------------------------------------------- | | textureid | \`texture\_table.id\` | | min | \`vector2\` | | max | \`vector2\` | | color | \`color\` -> optional | ## Example
local tole = render.load\_texture("toletole.png")

hook.add("render", "my hook", function()
    render.add\_line(
        vector2(20, 145),  
        vector2(500, 145), 
        color(1, 1, 1, 1), 
        1-- thickness
    )

    render.add\_rect(
        vector2(20, 200), 
        vector2(500, 400) , 
        color(0, 0, 1,1), 
        3, -- rounding
        1 -- thickness
    )

    render.add\_text(
        vector2(262, 220), 
        "Player", 
        color(1, 1, 1, 1)
    )

    render.add\_circle\_filled(
        vector2(265, 303), 
        55, -- radius
        color(1, 1, 1, 1)
    )

    render.add\_triangle(
        vector2(510, 402), 
        vector2(631, 271), 
        vector2(808, 398), 
        color(1, 0, 1, 1), 
        3 -- thickness
    )

    render.add\_ngon(
        vector2(252, 511), 
        40, -- radius
        color(0.5, 0.3, 1, 1), 
        5, -- segments
        1 -- thickness
    )

    render.add\_polyline( {
        vector2(59, 568), 
        vector2(296, 563), 
        vector2(564, 432), 
        vector2(600, 600), 
        vector2(824, 524) },
        color(1, 1, 0, 1),
        1 -- thickness
    )
    
    if tole then
        -- identifier, pos (top left pixel of img will be pos), width, height, transparency
        render.add\_image(
            tole.id, 
            vector2(500,44), 
            vector2(50, 50), 
            vector2(100, 100), 
            1
        )
    end
end)

hook.add("esp\_drawextra", "draw\_extra\_example", function(plr) 
    render.add\_extra("Test123", ESP\_TOP, color(1, 1, 1, 1))
end)
## Result
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/render.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/specialmesh.md). # specialmesh \`instance\` \`get\_meshid()\` -> string gets the mesh id string from the instance. \`instance\` \`get\_textureid()\` -> string gets the texture id string from the instance. ## Example \`\`\`lua local woprkspace = game:get\_service("Workspace") local random\_specialmesh = workspace:find\_first\_child\_class("SpecialMesh") local mesh = random\_specialmesh:get\_meshid() local texture = random\_specialmesh:get\_textureid() print(mesh) print(texture) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/specialmesh.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/script.md). # script \`instance\` \`getscriptbytecode()\` -> string Returns base64 encrypted byte code of the script. \`instance\` \`decompile\_script()\` -> string Returns decompiled script. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/script.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/input.md). # input \`input\` \`get\_mouse\_position()\` -> vector2 Returns your 2D mouse position. \`input\` \`set\_mouse\_position(\`\`vector2\`\`)\` -> void Sets your mouse position in the coordinate. \`input\` \`set\_mouse\_position\_rel(\`\`vector2\`\`)\` -> void Moves your mouse position in the coordinate. \`input\` \`simulate\_press(\`\`int\`\`)\` -> void Simulates a key press, takes virtual key codes. \`input\` \`simulate\_press\_down(\`\`int\`\`)\` -> void Simulates a key press down, takes virtual key codes. \`input\` \`simulate\_press\_up(\`\`int\`\`)\` -> void Simulates a key press up, takes virtual key codes. \* Use MOUSE1 (Left Mouse Button) MOUSE2 (Right Mouse Button) MOUSE3 (Middle Mouse Button) \`input\` \`simulate\_mouse\_up(\`\`int\`\`)\` -> void Simulates mouse up movement. \`input\` \`simulate\_mouse\_down(\`\`int\`\`)\` -> void Simulates mouse down movement. \`input\` \`simulate\_mouse\_click(\`\`int\`\`)\` -> void Simulates mouse click. \`input\` \`scroll(\`\`int\`\`)\` -> void Simulates a scroll, example (\`-120\`, \`120\`) \`input\` \`key\_down(\`\`int\`\`)\` -> bool Checks if the key is down, takes virtual key codes. \`input\` \`is\_key\_pressed(\`\`int\`\`)\` -> bool Returns true once when the key is being held. \`input\` \`set\_clipboard(\`\`string\`\`)\` -> void Sets the clipboard with the string \* \[virtual key codes\](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) ## Example \`\`\`lua local mouse\_pos = input.get\_mouse\_position() input.set\_mouse\_position(mouse\_pos:add(vector2(1, 1))) input.simulate\_press(0x2D) -- simulates insert key \[VK\_INSERT 0x2D INS key\] input.simulate\_mouse\_up(MOUSE2) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/input.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/type.md). # type \`void\` \`color(\`\`r\`, \`g\`, \`b\`, \`a\`\`)\` | Name | Type | Description | | ---- | ----------------------------------------- | ----------- | | r | \`float\` | value 0 - 1 | | g | \`float\` | value 0 - 1 | | b | \`float\` | value 0 - 1 | | a | \`float\` | value 0 - 1 | \`var\` \`COLOR\_WHITE\` -> \`color(1, 1, 1, 1)\` \`var\` \`COLOR\_BLACK\` -> \`color(0, 0, 0, 1)\` \`var\` \`COLOR\_RED\` -> \`color(1, 0, 0, 1)\` \`var\` \`COLOR\_GREEN\` -> \`color(0, 1, 0, 1)\` \`var\` \`COLOR\_BLUE\` -> \`color(0, 0, 1, 1)\` \`void\` \`vector2(\`\`x\`, \`y\`\`)\` | Name | Type | | ---- | ----------------------------------------- | | x | \`float\` | | y | \`float\` | \`void\` \`vector3(\`\`x\`, \`y\`, \`z\`\`)\` | Name | Type | | ---- | ----------------------------------------- | | x | \`float\` | | y | \`float\` | | z | \`float\` | \* vector2 functions \`vector2\` \`add(\`\`vector2\`\`)\` -> vector2 \`vector2\` \`subtract(\`\`vector2\`\`)\` -> vector2 \`vector2\` \`multiply\_scalar(\`\`float\`\`)\` -> vector2 \`vector2\` \`multiply\_vector(\`\`vector2\`\`)\` -> vector2 \`vector2\` \`divide\_scalar(\`\`float\`\`)\` -> vector2 \`vector2\` \`divide\_vector(\`\`vector2\`\`)\` -> vector2 \`vector2\` \`divide\_vector(\`\`vector2\`\`)\` -> vector2 \`vector2\` \`length()\` -> float \`vector2\` \`distance(\`\`vector2\`\`)\` -> float \`vector2\` \`out\_of\_screen(\`\`vector2\`\`)\` -> bool \`vector2\` \`lerp(\`\`vector2\`, \`float\`\`)\` -> vector2 \`vector2\` \`unpack()\` -> table \`vector2\` \`type()\` -> string \* vector3 functions \`vector3\` \`add(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`subtract(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`multiply\_scalar(\`\`float\`\`)\` -> vector3 \`vector3\` \`multiply\_vector(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`divide\_scalar(\`\`float\`\`)\` -> vector3 \`vector3\` \`divide\_vector(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`divide\_vector(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`length()\` -> float \`vector3\` \`distance(\`\`vector3\`\`)\` -> float \`vector3\` \`unit()\` -> vector3 \`vector3\` \`normalize()\` -> vector3 \`vector3\` \`cross\_product(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`look\_vector(\`\`vector3\`\`)\` -> vector3 \`vector3\` \`is\_zero()\` -> bool \`vector3\` \`lerp(\`\`vector3\`, \`float\`\`)\` -> vector3 \`vector3\` \`unpack()\` -> table \`vector3\` \`type()\` -> string \* color functions \`color\` \`hex(\`\`uint32\_T\`\`)\` -> color \`color\` \`int(\`\`int\`, \`int\`, \`int\`, \`int\`\`)\` -> color \`color\` \`to\_hex()\` -> uint32\\\_t \`color\` \`to\_hex\_string()\` -> string \`color\` \`unpack()\` -> table \`color\` \`type()\` -> string ## Example \`\`\`lua local white\_color = color(1, 1, 1, 1) local white\_color\_1 = color():int(255, 255, 255, 255) local white\_color\_2 = color():hex(0xffffff) print(white\_color\_1.r, white\_color\_1.g, white\_color\_1.b) print(white\_color\_2:to\_hex\_string()) local t = white\_color\_1:unpack() print(t.r, t.g, t.b, t.a) local r\_vector = vector3(1, 1, 1) + vector3(1, 1, 1) print(r\_vector.x, r\_vector.y, r\_vector.z) local added\_vector = r\_vector:add(vector3(1, 1, 1)) -- result 3, 3, 3 local distance = r\_vector:distance(added\_vector) print(distance) local subtracted\_vector = r\_vector:subtract(vector3(1, 1, 1)) print(tostring(subtracted\_vector:is\_zero())) local length = r\_vector:length() local unit = r\_vector:unit() print(length) print(unit.x, unit.y, unit.z) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/type.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software.md). # software Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/websocket.md). # websocket \`websocket\` \`connect(\`\`link\`\`)\` -> struct/nil Creates a WebSocket connection to the given URL. Returns a connection object on success, or nil if the connection fails. \`struct\` \`send(\`\`string\`\`)\` -> bool Sends a text message. Returns true if successfully queued/sent, false on failure. \`struct\` \`send\_binary(\`\`string\`\`)\` -> bool Sends binary data. Returns true if successful, false otherwise. \`struct\` \`recv()\` -> nil/string Returns next received message, or nil if no messages are available. \`struct\` \`close()\` -> void Closes the WebSocket connection. \`struct\` \`is\_connected()\` -> bool Returns true if the connection is currently active. \`struct\` \`is\_closed()\` -> bool Returns true if the connection has been closed. \`\`\`lua -- Connect (returns nil on failure) local ws = websocket.connect("ws://localhost:8080") if not ws then print("connection failed") return end -- Send text or binary ws:send("hello world") ws:send\_binary("data") -- Poll for incoming messages (non-blocking, returns nil if none queued) local msg = ws:recv() -- Check state ws:is\_connected() -- true while connection is live ws:is\_closed() -- true after server sends a close frame -- Disconnect ws:close() \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/websocket.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/lightning.md). # lightning \`instance\` \`fog\` -> float Returns the fogend of lighting. \`instance\` \`set\_fog(\`\`float\`\`)\` -> void Sets the fogend for lighting. \`instance\` \`exposure\` -> float Returns the exposure of lighting. \`instance\` \`set\_exposure(\`\`float\`\`)\` Sets the exposure for lighting. \`instance\` \`outdoor\_ambient\` -> color Returns the color of lightnings outdoor ambient. \`instance\` \`set\_outdoor\_ambient(\`\`color\`\`)\` Sets the color of lightnings outdoor ambient. \`instance\` \`ambient\` -> color Gets the color of the lighting ambient. \`instance\` \`set\_ambient(\`\`color\`\`)\` -> void Sets the color of the lighting ambient. \`instance\` \`get\_timeof\_day()\` -> float Gets the time in roblox. \`instance\` \`set\_timeof\_day(\`\`value\`\`)\` -> void Sets the time in roblox. ## Example \`\`\`lua local lighting = game:get\_service("Lighting") print(lighting.exposure) print(lighting.fog) local ambient = lighting.ambient print(ambient.r, ambient.g, ambient.b, ambient.a) local outdoor\_ambient = lighting.outdoor\_ambient print(outdoor\_ambient.r, outdoor\_ambient.g, outdoor\_ambient.b, outdoor\_ambient.a) lighting:set\_fog(100) lighting:set\_exposure(1) lighting:set\_outdoor\_ambient(color(0, 0, 0)) lighting:set\_ambient(color(0, 0, 0)) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/lightning.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/raycast.md). # raycast Issues: \* This is currently in WIP, this means the feature can be buggy/non functional at times. \* The current raycasting system is limited to detecting parts and does not support terrain or character interactions. \* Max distance the ray can reach is \`6000\` \`studs\` \`table\` -> \`result\_table\` | Field | Type | Description | | ----------- | -------------------------------------------- | --------------------------------------------------------------------------- | | \`hit\` | \`bool\` | \`true\` if the ray hit an object, \`false\` otherwise. | | \`distance\` | \`number\` | The distance from \`point\_a\` to the hit point. | | \`origin\` | \`vector3\` | The starting position of the ray (\`point\_a\`). | | \`hit\_part\` | \`instance\` | The object or part that was hit by the ray. \`nil\` if hit is \`false\`. | | \`hit\_point\` | \`vector3\` | The position where the ray intersected the object. \`nil\` if hit is \`false\`. | \`raycast\` \`send(\`\`point\_a\`, \`point\_b\`, \`ignore\`\`)\` -> result\\\_table Casting an invisible ray from a \`vector3\` in a specified direction with a set length. After you caste the ray, you can detect if it intersects with a basepart. | Name | Type | Description | | --------- | ------------------------------------------- | ---------------------------------------------------------- | | \`point\_a\` | \`vector3\` | The starting position of the ray. | | \`point\_b\` | \`vector3\` | The ending position of the ray. | | \`ignore\` | \`table\` | A list of instances that should be ignored by the raycast. | \`raycast\` \`setnext\_ray\_debug()\` -> void Enables visual debugging for the next raycast. \* When this function is called, the next raycast performed will be displayed visually (e.g., as a line in the environment). \* This is useful for troubleshooting and verifying the raycast's behavior.

An example of how the debug visuals will appear.

\`raycast\` \`clear\_logs()\` -> void Clears all debug logs generated by \`setnext\_ray\_debug\`. \* Removes any visual representations or logged information created during debugging. ## Example \`\`\`lua local workspace = game:get\_service("Workspace") local camera = workspace:find\_first\_child\_class("Camera") local cam\_lookvector = camera.camera\_lookvector local cam\_pos = camera.camera\_position local ray\_target\_pos = cam\_pos:add(cam\_lookvector:multiply\_scalar(5000)) local random\_part = workspace:find\_first\_child\_class("Part") raycast.setnext\_ray\_debug() local results = raycast.send(cam\_pos, ray\_target\_pos, { random\_part }) -- will perform a raycast from the camera's position towards the camera's look-at direction print(results) print(results.origin.x, results.origin.y, results.origin.z) -- start position if results.hit then print(results.hit\_point.x, results.hit\_point.y, results.hit\_point.z) -- end position print(results.hit\_part.name, results.hit\_part.class\_name) end wait(10000) -- 10 seconds raycast.clear\_logs() \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/raycast.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/gui.md). # gui \`instance\` \`get\_label\_text()\` -> string Gets text name from the label \`instance\` \`get\_label\_text\_color()\` -> color Returns the text color3 from the label \`instance\` \`get\_label\_background\_color()\` -> color Returns the background color3 from the label \`instance\` \`gui\_position\` -> vector2 Returns the guis position in pixels, You can use this on frames, text label/button etc. \`instance\` \`gui\_size\` -> vector2 Returns the guis size in pixels, You can use this on frames, text label/button etc. \`instance\` \`set\_gui\_size(\`\`vector2\`\`)\` -> void Sets the gui size in pixels. \`instance\` \`set\_frame\_position(\`\`vector2\`\`)\` -> void Sets the frame position in pixels. ## Example \`\`\`lua local starter\_gui = game:get\_service("StarterGui") local screen\_gui = starter\_gui:find\_first\_child\_class("ScreenGui") local text\_label = screen\_gui:find\_first\_child\_class("TextLabel") local text = text\_label:get\_label\_text() local label\_color = text\_label:get\_label\_text\_color() local background\_color = text\_label:get\_label\_background\_color() local text\_label\_position = text\_label.gui\_position local text\_label\_size = text\_label.gui\_size print(text\_label\_position.x, text\_label\_position.y) print(label\_color.r, label\_color.g, label\_color.b) print(background\_color.r, background\_color.g, background\_color.b) print(text) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/gui.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/log.md). # log \`log\` \`add(\`\`message\`, \`color\`\`)\` -> void
NameTypeDescriptionDescription
messagestringWhat you want to logWhat you want to log
colorcolorOptional color for the log
Adds a log. \`void\` \`print(\`\`args\`\`)\` -> void Does the same thing as log add. \`log\` \`clear()\` -> void Clears all the logs. \`log\` \`notification(\`\`message\`, \`type\`\`)\` -> void
NameTypeDescriptionDescription
messagestringThe notification textWhat you want to log
typestringOptional type (info, warning, success)
## Example \`\`\`lua log.add("message 1", color(1, 1, 0, 1)) print("message 2") log.notification("message 3", "info") wait(5000) log.clear() \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/log.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/hook.md). # hook \*\*All available hooks.\*\*
NameReturn typeReturn args
rendervoidvoid
init\_custom\_entityvoidvoid
initvoidvoid
esp\_drawextravoidinstance
aimbot\_checkboolinstance
ignore\_plrboolinstance
esp\_ignoreboolinstance
esp\_namestringinstance
aimbot\_ignoreboolinstance
triggerbot\_ignoreboolinstance
triggerbot\_shouldfireboolinstance
silent\_ignoreboolinstance
append\_watermarkstringvoid
player\_addedvoidinstance
player\_removingvoidinstance
silent\_checkboolinstance
silent\_ignoreboolinstance
\* All of the return args with instance will be returning the player, Not the character. \`hook\` \`add(\`\`name\`, \`id\`, \`function\`\`)\` -> void Adds a hook with a callback. | Name | Type | Description | | -------- | -------------------------------------------- | ------------------------------------------ | | name | \`string\` | Name of the hook, see above. | | id | \`string\` | Id of the hook. | | function | \`function\` | Function to be called when hook is called. | \`hook\` \`remove(\`\`name\`, \`id\`\`)\` -> bool Removes the specific hook. | Name | Type | Description | | ---- | ------------------------------------------ | ---------------------------- | | name | \`string\` | Name of the hook, see above. | | id | \`string\` | Id of the hook. | \`hook\` \`removeall()\` -> void Removes all hooks that are active. \`hook\` \`addkey(\`\`key\`, \`id\`, \`function\` -> \`toggle\`\`)\`-> void Adds a hook on a key and will trigger the callback when pressed, takes VK Codes. | Name | Type | Description | | -------- | -------------------------------------------- | -------------------------------------------- | | key | \`number\` | The virtual key code. Example: 0x41 = A Key. | | function | \`function\` | Callback function. | | id | \`string\` | Id of the hook. | \`hook\` \`removekey(\`\`key\`, \`id\`\`)\`-> bool Removes the key hook. | Name | Type | Description | | ---- | ------------------------------------------ | --------------- | | key | \`number\` | VK Key number. | | id | \`string\` | Id of the hook. | \`\`\`lua local place\_id = get\_placeid() local screen\_size = get\_screen\_size() hook.add("append\_watermark", "a", function() return tostring(place\_id) end) hook.add("render", "hook example", function() render.add\_circle(vector2(screen\_size.x / 2, screen\_size.y / 2), 100, color(1, 1, 1, 1)) end) wait(1000) hook.remove("render","hook example") hook.addkey(0x0D, "key example", function(toggle) -- 0x0D is the key code for the enter key if toggle then print("gleep") end end) wait(1000) hook.removekey(0x0D, "key example") \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/hook.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/config.md). # config \`config\` \`create(\`\`name\`\`)\` -> void Creates the config. \`config\` \`save(\`\`name\`\`)\` -> void Saves the config. \`config\` \`load(\`\`name\`\`)\` -> void Loads the config. --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/config.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/gui.md). # gui \`gui\` \`create(\`\`name\`, \`force\_open\`\`)\` -> menu | Name | Type | Description | | ----------- | ------------------------------------------ | ----------------------------------- | | name | \`string\` | Window title | | force\\\_open | \`bool\` | Still open when menu is not drawing | \`gui\` \`remove(\`\`name\`\`)\` -> menu Removes the specific windows title. \`menu\` \`set\_pos(\`\`X\`, \`Y\`\`)\` -> void Sets the position of the menu, Can be set constantly. \`menu\` \`set\_size(\`\`X\`, \`Y\`\`)\` -> void Sets the size of the menu, Can be set constantly. \`menu\` \`add\_button(\`\`name\`, \`callback\`\`)\` -> button\\\_struct Adds the button to the specific menu. Callback will be called when its been pressed. \`menu\` \`add\_textbox(\`\`name\`\`)\` -> textbox\\\_struct Adds a textbox to the menu for user input. \`menu\` \`add\_slider(\`\`name\`, \`min\`, \`max\`, \`initial\_value\`\`)\` -> slider\\\_struct | Name | Type | Description | | -------------- | ------------------------------------------ | ----------------------------------------------------- | | name | \`string\` | The display label of the slider. | | min | \`float\` | The minimum value of the slider. | | max | \`float\` | The maximum value of the slider. | | initial\\\_value | \`float\` | The initial value of the slider, What it starts from. | \`menu\` \`add\_combo(\`\`name\`, \`options\`, \`initial\_index\`\`)\` -> combo\\\_struct | Name | Type | Description | | -------------- | ------------------------------------------ | ----------------------------------------------------- | | name | \`string\` | The display label of the combo box. | | options | \`table\` | A list of string options. | | initial\\\_index | \`int\` | The index of the initially selected option (0-based). | \`menu\` \`add\_multicombo(\`\`name\`, \`options\`, \`initial\_selected\`\`)\` -> combo\\\_struct | Name | Type | Description | | ----------------- | ------------------------------------------ | ----------------------------------------------------- | | name | \`string\` | The display label of the combo box. | | options | \`table\` | A list of string options. | | initial\\\_selected | \`table\` | The index of the initially selected option (0-based). | \`menu\` \`add\_checkbox(\`\`name\`, \`initial\_value\`\`)\` -> checkbox\\\_struct | Name | Type | Description | | -------------- | ------------------------------------------ | ------------------------------------------------------ | | name | \`string\` | The display label of the check box. | | initial\\\_value | \`bool\` | The initial value of the checkbox (\`true\` or \`false\`). | \`menu\` \`add\_label(\`\`text\`\`)\` -> label\\\_struct | Name | Type | Description | | ---- | ------------------------------------------ | ----------------- | | text | \`string\` | The text display. | \`menu\` \`add\_keybind(\`\`id\`, \`keycode\`\`)\` -> label\\\_struct | Name | Type | Description | | ------- | ------------------------------------------ | --------------------------------------------------------------------------------------------- | | id | \`string\` | The id. | | keycode | \`int\` | \[virtual keycode\](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) | \`label\_struct\` \`set\_label(\`\`label\`\`)\` -> void Sets a new label. \`struct\` \`get\_state()\` -> bool Returns the current state from the structure, This can only be used on \`keybind\_struct\`. \`menu\` \`add\_color(\`\`name\`, \`color\`\`)\` -> color\\\_struct Self explanatory. \`struct\` \`change\_callback(\`\`callback\`\`)\` -> void This can used for every struct except \`button\_struct\`. \`struct\` \`get\_value()\` -> value\\\_type Returns the value from the structure. This cannot be used on \`textbox\_struct\`, \`color\_struct\`, \`button\_struct\`. \`checkbox\_struct\` \`bool\` \`slider\_struct\` \`float\` \`combo\_struct\` \`int\` \`struct\` \`get\_text()\` -> string Returns the current string from the structure, This can only be used on \`combo\_struct\`, \`textbox\_struct\`. \`struct\` \`get\_color()\` -> color Returns the current color from the structure, This can be only used on \`color\_struct\`. \*\*\* \`render\` \*\*\`setvalue(\`\*\*\*\*\`menu\`\*\*\*\*, \*\*\*\*\`label\`\*\*\*\*, \*\*\*\*\`value\`\*\*\*\*\`)\`\*\* -> void Sets the value of a widget inside a menu by its label. | Name | Type | | ----- | --------------------------------------------------------------- | | menu | \`string\` | | label | \`string\` | | value | \`float / bool / int / string\` | Supported widget types and accepted value types: | Widget | Value type | | -------- | ----------------------------------------------- | | slider | \`float\` | | checkbox | \`bool\` | | combo | \`int\` (index) | | textbox | \`string\` | \*\*\* \`render\` \*\*\`getvalue(\`\*\*\*\*\`menu\`\*\*\*\*, \*\*\*\*\`label\`\*\*\*\*\`)\` -> \*\*\*\*float / bool / int / string / nil\*\* Returns the current value of a widget inside a menu by its label. Returns \`nil\` if the menu or widget is not found. | Name | Type | | ----- | ------------------------------------------ | | menu | \`string\` | | label | \`string\` | ## Example \`\`\`lua local menu = gui.create("Example Menu", false) menu:set\_pos(100, 100) menu:set\_size(400, 300) local button = menu:add\_button("Remove", function() gui.remove("Example Menu") end) local checkbox = menu:add\_checkbox("Enable Feature", false) checkbox:change\_callback(function() print("Checkbox:", checkbox:get\_value()) end) local textbox = menu:add\_textbox("Enter Text") textbox:change\_callback(function() print("Textbox:", textbox:get\_text()) end) local slider = menu:add\_slider("Adjust Value", 0, 100, 50) slider:change\_callback(function() print("Slider:", slider:get\_value()) end) ui.setvalue("Example Menu", "Adjust Value", 99) print("Slider new:", ui.getvalue("Example Menu", "Adjust Value")) local combo = menu:add\_combo("Select Option", {"Option 1", "Option 2", "Option 3"}, 0) combo:change\_callback(function() print("Selected index:", combo:get\_value()) print("Selected option:", combo:get\_text()) end) local col = menu:add\_color("Color", color(1, 1, 1, 1)) col:change\_callback(function() local saved = col:get\_color() print("Color:", saved.r, saved.g, saved.b, saved.a) end) local label = menu:add\_label("test 123") label:set\_label("test 321") local mc = menu:add\_multicombo("Types", {"3","2","1"}, {1,3}) mc:change\_callback(function() local list = mc:get\_selected() for \_, v in pairs(list) do print("list", v) end end) local keybind = menu:add\_keybind("Keybind", 0x48) print(keybind:get\_state()) \`\`\` ## Result
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/gui.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # roblox | Photon For the complete documentation index, see [llms.txt](https://photon-4.gitbook.io/api/llms.txt) . This page is also available as [Markdown](https://photon-4.gitbook.io/api/documentation/roblox.md) . Certain functions may be works in progress and are subject to future modification, replacement, or removal as needed. Functions may occasionally have bugs or experience issues. If you notice any problems, please reach out to us for support. [PreviousIntroduction](https://photon-4.gitbook.io/api) [Nextuniversal](https://photon-4.gitbook.io/api/documentation/roblox/universal) Last updated 6 months ago --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/decal-texture.md). # decal/texture \`instance\` \`get\_texture()\` -> string gets the texture from the instance. \`instance\` \`image\_transparency\` -> float gets the transparency of the decal/texture instance --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/decal-texture.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/software/http.md). # http \`http\` \`get(\`\`website\`, \`function: body, statuscode\`\`)\` -> void Retrieves websites body. | Name | Type | Description | | ---------- | -------------------------------------------- | ------------------------------------ | | website | \`string\` | Website address. | | function | \`function\` | Callback function. | | body | \`string\` | Data returned by the website. | | statuscode | \`number\` | Status code returned by the website. | \`http\` \`post(\`\`website\`, \`payload\`, \`function: body, statuscode\`\`)\` -> void Sends a post to the website. | Name | Type | Description | | ---------- | ------------------------------------------ | ------------------------------------ | | website | \`string\` | Website address. | | payload | \`string\` | Data to post. | | body | \`string\` | Data returned by the website. | | statuscode | \`number\` | Status code returned by the website. | ## Example \`\`\`lua http.get("https://cataas.com/cat", function(body, stats) if stats == 200 then -- 200 = success, 500 = error local filename = "random\_cat.jfif" file.write(filename, body, "binary") end end) \`\`\` --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/software/http.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. --- # Unknown \> For the complete documentation index, see \[llms.txt\](https://photon-4.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending \`.md\` to page URLs; this page is available as \[Markdown\](https://photon-4.gitbook.io/api/documentation/roblox/memory.md). # 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\`) \`instance\` \`write\_memory(\`\`offset\`, \`type\`, \`value\`\`)\` -> void Writes the value to the address. | Name | Type | Description | | -------- | ----------------------------------------------- | -------------------------- | | \`offset\` | \`hex\` | Where it points to. | | \`type\` | \`string\` | Value type. | | \`value\` | \`number/bool\` | What it writes the memory. | \`instance\` \`read\_memory(\`\`offset\`, \`type\`\`)\` -> void Returns the value stored in the address. \`instance\` \`read\_string(\`\`offset\`, \`size\`\`)\` -> void Returns the string stored in the address. \`instance\` \`write\_string(\`\`offset\`, \`string\`, \`size\`\`)\` -> void Overwrites current string stored in the address. \`void\` \`game\_baseaddress()\` -> instance Returns the game base address. \`void\` \`get\_renderview()\` -> instance Returns the RenderView address. \`void\` \`get\_visualengine()\` -> instance Returns the VisualEngine address. ## Example
-- 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.

local players = game:get\_service("Players")
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
## How to start
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.
--- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the \`ask\` query parameter, and the optional \`goal\` query parameter: \`\`\` GET https://photon-4.gitbook.io/api/documentation/roblox/memory.md?ask=&goal= \`\`\` \`ask\` is the immediate question: it should be specific, self-contained, and written in natural language. \`goal\` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. ---