Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 42 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
debug.lua
selene.toml
roblox.toml
.vscode
/user
```
# Compiled files
*.pyc
*.class
*.o
*.obj
*.out

# Dependencies
node_modules/
venv/
.venv/
__pycache__/
.mypy_cache/
.pytest_cache/
target/
.gradle/

# Build artifacts
dist/
build/
coverage/
htmlcov/
.coverage

# Editor/IDE files
.vscode/
.idea/
*.swp
*.swo
*.tmp

# System files
.DS_Store
Thumbs.db
.env
.env.local
*.env.*

# Logs
*.log
```
1 change: 1 addition & 0 deletions Hydroxide

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not understand the point of this file

Submodule Hydroxide added at 15db25

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't understand why these images are in directly in the repository

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ if oh then
end

local web = true
local user = "Upbolt" -- change if you're using a fork
local user = "Upbolt"
local branch = "revision"
local importCache = {}

local pairs = pairs
local type = type
local unpack = unpack
local getfenv = getfenv
local rawget = rawget
local pcall = pcall

local function hasMethods(methods)
for name in pairs(methods) do
if not environment[name] then
Expand Down
51 changes: 51 additions & 0 deletions loader.lua

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant file, caching is already done here

Hydroxide/init.lua

Lines 190 to 286 in 91327d0

if readFile and writeFile then
local hasFolderFunctions = (isFolder and makeFolder) ~= nil
local ran, result = pcall(readFile, "__oh_version.txt")
if not ran or releaseInfo.tag_name ~= result then
if hasFolderFunctions then
local function createFolder(path)
if not isFolder(path) then
makeFolder(path)
end
end
createFolder("hydroxide")
createFolder("hydroxide/user")
createFolder("hydroxide/user/" .. user)
createFolder("hydroxide/user/" .. user .. "/methods")
createFolder("hydroxide/user/" .. user .. "/modules")
createFolder("hydroxide/user/" .. user .. "/objects")
createFolder("hydroxide/user/" .. user .. "/ui")
createFolder("hydroxide/user/" .. user .. "/ui/controls")
createFolder("hydroxide/user/" .. user .. "/ui/modules")
end
function environment.import(asset)
if importCache[asset] then
return unpack(importCache[asset])
end
local assets
if asset:find("rbxassetid://") then
assets = { game:GetObjects(asset)[1] }
elseif web then
if readFile and writeFile then
local file = (hasFolderFunctions and "hydroxide/user/" .. user .. '/' .. asset .. ".lua") or ("hydroxide-" .. user .. '-' .. asset:gsub('/', '-') .. ".lua")
local content
if (isFile and not isFile(file)) or not importCache[asset] then
content = game:HttpGetAsync("https://raw.githubusercontent.com/" .. user .. "/Hydroxide/" .. branch .. '/' .. asset .. ".lua")
writeFile(file, content)
else
local ran, result = pcall(readFile, file)
if (not ran) or not importCache[asset] then
content = game:HttpGetAsync("https://raw.githubusercontent.com/" .. user .. "/Hydroxide/" .. branch .. '/' .. asset .. ".lua")
writeFile(file, content)
else
content = result
end
end
assets = { loadstring(content, asset .. '.lua')() }
else
assets = { loadstring(game:HttpGetAsync("https://raw.githubusercontent.com/" .. user .. "/Hydroxide/" .. branch .. '/' .. asset .. ".lua"), asset .. '.lua')() }
end
else
assets = { loadstring(readFile("hydroxide/" .. asset .. ".lua"), asset .. '.lua')() }
end
importCache[asset] = assets
return unpack(assets)
end
writeFile("__oh_version.txt", releaseInfo.tag_name)
elseif ran and releaseInfo.tag_name == result then
function environment.import(asset)
if importCache[asset] then
return unpack(importCache[asset])
end
if asset:find("rbxassetid://") then
assets = { game:GetObjects(asset)[1] }
elseif web then
local file = (hasFolderFunctions and "hydroxide/user/" .. user .. '/' .. asset .. ".lua") or ("hydroxide-" .. user .. '-' .. asset:gsub('/', '-') .. ".lua")
local ran, result = pcall(readFile, file)
local content
if not ran then
content = game:HttpGetAsync("https://raw.githubusercontent.com/" .. user .. "/Hydroxide/" .. branch .. '/' .. asset .. ".lua")
writeFile(file, content)
else
content = result
end
assets = { loadstring(content, asset .. '.lua')() }
else
assets = { loadstring(readFile("hydroxide/" .. asset .. ".lua"), asset .. '.lua')() }
end
importCache[asset] = assets
return unpack(assets)
end
end
useMethods({ import = environment.import })
end

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
local owner = "Yuki-1224-nazz"
local branch = "revision"

-- Cache frequently used functions for performance
local pairs = pairs
local type = type
local unpack = unpack or table.unpack
local pcall = pcall
local loadstring = loadstring
local game = game

-- Optimized web import with caching and error handling
local importCache = {}

local function webImport(file)
-- Return cached result if available
if importCache[file] then
return unpack(importCache[file])
end

local success, result = pcall(function()
local url = ("https://raw.githubusercontent.com/%s/Hydroxide/%s/%s.lua"):format(owner, branch, file)
local content = game:HttpGetAsync(url)

if not content or content == "" then
return nil
end

local func = loadstring(content, file .. '.lua')
if func then
return func()
end

return nil
end)

if success and result ~= nil then
importCache[file] = {result}
return result
end

return nil
end

-- Load main module first (initializes oh environment)
local initResult = webImport("init")

-- Load UI module
if initResult then
webImport("ui/main")
end
27 changes: 24 additions & 3 deletions modules/ClosureSpy.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
local ClosureSpy = {}

local hookFunction = hookFunction
local newCClosure = newcclosure
local isLClosure = islclosure
local getProtos = getprotos
local getUpvalues = getupvalues
local getUpvalue = getupvalue
local getContext = getthreadcontext
local setContext = setthreadcontext
local setUpvalue = setupvalue
local getConstants = getconstants
local getConstant = getconstant
local setConstant = setconstant
local getCallingScript = getcallingscript
local pairs = pairs
local type = type
local table_insert = table.insert
local table_remove = table.remove
local table_find = table.find
local typeof = typeof
local getInfo = debug.getinfo or getinfo

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we still localizing globals in 2026

local requiredMethods = {
["hookFunction"] = true,
["newCClosure"] = true,
Expand Down Expand Up @@ -38,7 +59,7 @@ end

local Hook = {}
local hookMap = {}
hookCache = {}
local hookCache = {}

function Hook.new(closure)
local hook = {}
Expand Down Expand Up @@ -175,14 +196,14 @@ end

function Hook.incrementCalls(hook, vargs)
hook.Calls = hook.Calls + 1
table.insert(hook.Logs, vargs)
table_insert(hook.Logs, vargs)
end

function Hook.decrementCalls(hook, vargs)
local logs = hook.Logs

hook.Calls = hook.Calls - 1
table.remove(logs, table.find(logs, vargs))
table_remove(logs, table_find(logs, vargs))
end

ClosureSpy.Hook = Hook
Expand Down
11 changes: 11 additions & 0 deletions modules/ConstantScanner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ local ConstantScanner = {}
local Closure = import("objects/Closure")
local Constant = import("objects/Constant")

local getGc = getGc or get_gc_objects
local getInfo = debug.getinfo or getinfo
local isXClosure = isXClosure
local isLClosure = islclosure
local getConstant = getconstant
local setConstant = setconstant
local getConstants = getconstants
local type = type
local pairs = pairs
local toString = toString

local requiredMethods = {
["getGc"] = true,
["getInfo"] = true,
Expand Down
7 changes: 7 additions & 0 deletions modules/ModuleScanner.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
local ModuleScanner = {}
local ModuleScript = import("objects/ModuleScript")

local getMenv = getmenv or getsenv
local getProtos = getprotos
local getConstants = getconstants
local getScriptClosure = getscriptclosure
local getLoadedModules = getloadedmodules
local pairs = pairs

local requiredMethods = {
["getMenv"] = true,
["getProtos"] = true,
Expand Down
29 changes: 22 additions & 7 deletions modules/RemoteSpy.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
local RemoteSpy = {}
local Remote = import("objects/Remote")

local checkCaller = checkcaller
local newCClosure = newcclosure
local hookFunction = hookFunction
local isReadOnly = isreadonly
local setReadOnly = setreadonly
local getInfo = debug.getinfo or getinfo
local getMetatable = getrawmetatable or debug.getmetatable
local setClipboard = setclipboard
local getNamecallMethod = getnamecallmethod
local getCallingScript = getcallingscript
local pairs = pairs
local type = type
local select = select
local typeof = typeof
local pcall = pcall
local Instance_new = Instance.new

local requiredMethods = {
["checkCaller"] = true,
["newCClosure"] = true,
Expand Down Expand Up @@ -29,15 +46,15 @@ local remotesViewing = {
}

local methodHooks = {
RemoteEvent = Instance.new("RemoteEvent").FireServer,
RemoteFunction = Instance.new("RemoteFunction").InvokeServer,
BindableEvent = Instance.new("BindableEvent").Fire,
BindableFunction = Instance.new("BindableFunction").Invoke
RemoteEvent = Instance_new("RemoteEvent").FireServer,
RemoteFunction = Instance_new("RemoteFunction").InvokeServer,
BindableEvent = Instance_new("BindableEvent").Fire,
BindableFunction = Instance_new("BindableFunction").Invoke
}

local currentRemotes = {}

local remoteDataEvent = Instance.new("BindableEvent")
local remoteDataEvent = Instance_new("BindableEvent")
local eventSet = false

local function connectEvent(callback)
Expand Down Expand Up @@ -99,8 +116,6 @@ end)

-- vuln fix

local pcall = pcall

local function checkPermission(instance)
if (instance.ClassName) then end
end
Expand Down
12 changes: 12 additions & 0 deletions modules/ScriptScanner.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
local ScriptScanner = {}
local LocalScript = import("objects/LocalScript")

local getGc = getGc or get_gc_objects
local getSenv = getsenv
local getProtos = getprotos
local getConstants = getconstants
local getScriptClosure = getscriptclosure
local isXClosure = isXClosure
local getfenv = getfenv
local rawget = rawget
local type = type
local pairs = pairs
local typeof = typeof

local requiredMethods = {
["getGc"] = true,
["getSenv"] = true,
Expand Down
15 changes: 13 additions & 2 deletions modules/UpvalueScanner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ local UpvalueScanner = {}
local Closure = import("objects/Closure")
local Upvalue = import("objects/Upvalue")

local getGc = getGc or get_gc_objects
local isXClosure = isXClosure
local getUpvalue = getUpvalue or getupvalue
local setUpvalue = setUpvalue or setupvalue
local getUpvalues = getUpvalues or getupvalues
local type = type
local pairs = pairs
local typeof = typeof
local getInfo = getInfo or debug.getinfo
local toString = toString

local requiredMethods = {
["getGc"] = true,
["getInfo"] = true,
Expand All @@ -18,7 +29,7 @@ local function compareUpvalue(query, upvalue, ignore)
local numberCheck = not ignore and upvalueType == "number" and not isTableIndex and (tonumber(query) == upvalue or ("%.2f"):format(upvalue) == query)

if upvalueType == "userdata" then
if typeof(upvalueType) == "Instance" then
if typeof(upvalue) == "Instance" then
local instanceName = upvalue.Name
return (instanceName == query or instanceName:find(query))
end
Expand All @@ -29,7 +40,7 @@ local function compareUpvalue(query, upvalue, ignore)
return query == closureName or closureName:lower():find(query:lower())
end

return stringCheck or numberCheck or userDataCheck
return stringCheck or numberCheck
end

local function scan(query, deepSearch)
Expand Down
4 changes: 2 additions & 2 deletions objects/Constant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function Constant.new(closure, index, value)
end

function Constant.set(constant, value)
setConstant(constant.Closure, constant.Index, value)
oh.Methods.setConstant(constant.Closure, constant.Index, value)
constant.Value = value
end

function Constant.update(constant)
constant.Value = getConstant(constant.Closure, constant.Index)
constant.Value = oh.Methods.getConstant(constant.Closure, constant.Index)
end

return Constant
2 changes: 1 addition & 1 deletion objects/LocalScript.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function LocalScript.new(instance)

localScript.Instance = instance
localScript.Environment = getSenv(instance)
localScript.Constants = getConstants(closure)
localScript.Constants = oh.Methods.getConstants(closure)
localScript.Protos = getProtos(closure)

return localScript
Expand Down
2 changes: 1 addition & 1 deletion objects/ModuleScript.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function ModuleScript.new(instance)
local closure = getScriptClosure(instance)

moduleScript.Instance = instance
moduleScript.Constants = getConstants(closure)
moduleScript.Constants = oh.Methods.getConstants(closure)
moduleScript.Protos = getProtos(closure)
--moduleScript.ReturnValue = require(instance) // causes detection

Expand Down
15 changes: 13 additions & 2 deletions objects/Remote.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
local Remote = {}

local pairs = pairs
local type = type
local table_insert = table.insert
local table_remove = table.remove
local table_find = table.find
local typeof = typeof

function Remote.new(instance)
local remote = {}

Expand Down Expand Up @@ -85,6 +92,8 @@ function Remote.areArgsBlocked(remote, args)
return true
end
end

return false
end

function Remote.areArgsIgnored(remote, args)
Expand All @@ -97,18 +106,20 @@ function Remote.areArgsIgnored(remote, args)
return true
end
end

return false
end

function Remote.incrementCalls(remote, vargs)
remote.Calls = remote.Calls + 1
table.insert(remote.Logs, vargs)
table_insert(remote.Logs, vargs)
end

function Remote.decrementCalls(remote, vargs)
local logs = remote.Logs

remote.Calls = remote.Calls - 1
table.remove(logs, table.find(logs, vargs))
table_remove(logs, table_find(logs, vargs))
end

return Remote
Loading