From 191d0cfc1a554bed3a768bf03f32f8a0a0431853 Mon Sep 17 00:00:00 2001 From: tul <27+tul@noreply.localhost> Date: Sat, 1 Aug 2026 01:53:42 +0000 Subject: [PATCH] executor test built in loader --- scripts/loader.lua | 87 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/scripts/loader.lua b/scripts/loader.lua index 7f7a7a9..313995f 100644 --- a/scripts/loader.lua +++ b/scripts/loader.lua @@ -1,18 +1,71 @@ ---[[ - _ _ _ - __ | |___ _ __ __| |__ _ ___ __ _ __ _(_) ___ __ _ - \ \| |__ \| '_ \ / _` |__` |/ _ |__` |__` | |/ _ ' _` | - > |__) | |_) | | | | | | (_) | | | | | | | | | | | - /_/|_|___/|_.__/|_| |_| |_|\___/ |_| |_|_|_| |_| |_| - - mirrorhack | universal loader - -]] - -if game.GameId == 4827308727 then - loadstring(game:HttpGet("https://git.nfa.re/tul/mirrorhack/raw/branch/main/games/havoc.lua"))() -elseif game.GameId == 8307114974 then - loadstring(game:HttpGet("https://git.nfa.re/tul/mirrorhack/raw/branch/main/games/operation-one.lua"))() -elseif game.GameId == 5091490171 then - loadstring(game:HttpGet("https://git.nfa.re/tul/mirrorhack/raw/branch/main/games/jailbird.lua"))() +--[[ + _ _ _ + __ | |___ _ __ __| |__ _ ___ __ _ __ _(_) ___ __ _ + \ \| |__ \| '_ \ / _` |__` |/ _ |__` |__` | |/ _ ' _` | + > |__) | |_) | | | | | | (_) | | | | | | | | | | | + /_/|_|___/|_.__/|_| |_| |_|\___/ |_| |_|_|_| |_| |_| + + mirrorhack | loader + +]] + +-- > variables + +local local_player = game:GetService("Players").LocalPlayer +local functions = {} + +-- > functions + +functions.functions = function() + local missing = {} + for _, name in ipairs({"loadstring","getgenv","getrenv","getgc","newcclosure","hookfunction","hookmetamethod","getnamecallmethod","gethui","getcustomasset","setfflag","readfile","writefile","isfile","isfolder","makefolder","listfiles","delfile"}) do + if type(getfenv()[name]) ~= "function" then table.insert(missing, name) end + end + if not (game.HttpGet or game.HttpGetAsync) then table.insert(missing, "game:HttpGet") end + if #missing > 0 then local_player:Kick("executor is missing: " .. table.concat(missing, ", ")) return false end + return true +end + +functions.actors = function() + if type(run_on_actor) ~= "function" then local_player:Kick("executor is missing: run_on_actor") return false end + local actor = local_player:FindFirstChildWhichIsA("Actor", true) + if not actor then local_player:Kick("executor is not supported: no actor found on character") return false end + local relay = Instance.new("Configuration", workspace) + relay.Name = "mh_actor_test" + local sent = pcall(run_on_actor, actor, [[ + pcall(task.synchronize) + pcall(function() workspace.mh_actor_test:SetAttribute("ok", type(hookfunction) == "function") end) + ]]) + if not sent then relay:Destroy() local_player:Kick("executor is missing: run_on_actor") return false end + local ok, done = nil, false + relay:GetAttributeChangedSignal("ok"):Once(function() ok = relay:GetAttribute("ok") done = true end) + task.delay(3, function() done = true end) + repeat task.wait() until done + relay:Destroy() + if not ok then local_player:Kick("executor is missing: run_on_actor") return false end + return true +end + +functions.load = function(file) + local success, src = pcall(game.HttpGet, game, "https://git.nfa.re/tul/mirrorhack/raw/branch/main/games/" .. file) + if not success or not src or #src == 0 then local_player:Kick("failed to fetch " .. file) return end + loadstring(src)() +end + +-- > redirect + +do + if game.GameId == 4827308727 then + if not functions.functions() then return end + functions.load("havoc.lua") + elseif game.GameId == 5091490171 then + if not functions.functions() then return end + functions.load("jailbird.lua") + elseif game.GameId == 8307114974 then + if not functions.functions() then return end + if not functions.actors() then return end + functions.load("operation-one.lua") + else + local_player:Kick("mirrorhack does not support this game") + end end \ No newline at end of file