Universal Script 📌
553 Views
74 Executions

Require tester

Universal Script 📌
Joyful_PizzaPartyl
Joyful_PizzaPartylPublished 50
10 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Basically warns you what is accessible in require and is not.

View Raw
-- LocalScript only

local ServicesToScan = {
	game:GetService("ReplicatedStorage"),
	game:GetService("ReplicatedFirst"),
	game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"),
	game:GetService("Players").LocalPlayer:WaitForChild("PlayerScripts"),
	game:GetService("Players").LocalPlayer:WaitForChild("Backpack"),
}

local results = {}

local function tryRequire(module)
	local ok, result = pcall(function()
		return require(module)
	end)

	results[module:GetFullName()] = {
		Success = ok,
		ResultType = ok and typeof(result) or nil,
		Error = ok and nil or tostring(result)
	}

	if ok then
		warn("can be Require:", module:GetFullName(), "->", typeof(result))
	else
		warn("no Require:", module:GetFullName(), "->", result)
	end
end

for _, root in ipairs(ServicesToScan) do
	for _, obj in ipairs(root:GetDescendants()) do
		if obj:IsA("ModuleScript") then
			tryRequire(obj)
			task.wait() -- prevents freeze
		end
	end
end

print("result bro what do you expact")


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script 📌
48.4k
46.5k
Bumped 2 hours ago
Universal Script 📌
1.4k
1.3k
Bumped 4 hours ago
Universal Script 📌
4.2k
56.4k
Bumped 5 hours ago
Universal Script 📌
7.1k
71.4k
Bumped 6 hours ago
Script hub
3.5M
1.2M
Bumped 7 hours ago
Key System
Universal Script 📌
5.0k
92.0k
Bumped 12 hours ago