Sign In to Your Account

Manual registration is temporarily disabled. Please use Discord, Google or GitHub to create an account.

CONTINUE WITH
Anti Tamper - Universal Script | Free Roblox Script

Anti Tamper

Universal 2 views 12 hours ago
Anti Tamper - Roblox Script
Mobile Mobile Friendly
Key Key Required

Description

Credits: Waylon

Simple anti tamper, place at the top of your script to use it fr.

138 Lines 3,769 Bytes
local function obf(f)
	return newcclosure(function(...)
		return f(...)
	end)
end

local mt = getrawmetatable(game)
local _nc = mt.__namecall
local _idx = mt.__index
setreadonly(mt, false)

mt.__index = obf(function(self, k)
	local src = debug.info(2, "s")
	if (k == "Source" or k == "Bytecode") and not checkcaller() and src ~= "[C]" then
		return ""
	end
	return _idx(self, k)
end)

mt.__namecall = obf(function(self, ...)
	local method = getnamecallmethod()
	local src = debug.info(2, "s")
	if not checkcaller() and src ~= "[C]" then
		if method == "require" then return nil end
		if method == "Clone" and (self:IsA("LocalScript") or self:IsA("ModuleScript")) then return nil end
		if method == "GetDescendants" or method == "GetChildren" then
			local res = _nc(self, ...)
			if type(res) == "table" then
				local clean = {}
				for _, obj in ipairs(res) do
					if not (obj:IsA("LocalScript") or obj:IsA("ModuleScript")) then
						table.insert(clean, obj)
					end
				end
				return clean
			end
			return res
		end
	end
	return _nc(self, ...)
end)

setreadonly(mt, true)

repeat task.wait() until game:IsLoaded()

local lp = game:GetService("Players").LocalPlayer
local run = game:GetService("RunService")
local mps = game:GetService("MarketplaceService")

local msg = "cheat detected, get rekt lol"
local function busted(why)
	warn("[!!] " .. msg .. " | " .. why)
end

local expectedTypes = {
	Name = "string",
	Description = "string",
	Creator = "table",
	CreatorType = "string",
	CreatorId = "number",
	AssetId = "number",
	IsForSale = "boolean",
	ProductType = "string",
	Updated = "string",
	Created = "string",
	IconImageAssetId = "number",
	IsPublicDomain = "boolean",
}

local gameInfo = mps:GetProductInfo(game.PlaceId)
local snap = {
	AssetId = gameInfo.AssetId,
	CreatorId = gameInfo.CreatorId,
	Name = gameInfo.Name,
}

local function chkGame()
	local ok, fresh = pcall(function() return mps:GetProductInfo(game.PlaceId) end)
	if not ok then busted("mps fetch failed") return end
	for key, expectedType in pairs(expectedTypes) do
		if fresh[key] ~= nil and type(fresh[key]) ~= expectedType then
			busted(key .. " wrong type")
		end
	end
	if fresh.AssetId ~= snap.AssetId then busted("AssetId flipped") end
	if fresh.CreatorId ~= snap.CreatorId then busted("CreatorId changed") end
	if fresh.Name ~= snap.Name then busted("game name changed") end
	if fresh.AssetId ~= game.PlaceId then busted("placeid mismatch") end
	if type(fresh.Creator) ~= "table" or fresh.Creator.Id ~= snap.CreatorId then
		busted("creator table weird")
	end
end

local function chkGc()
	local n = 0
	for _, f in ipairs(getgc()) do
		if type(f) == "function" and not islclosure(f) then n += 1 end
	end
	if n > 5000 then busted("gc flooded: " .. n) end
end

local function chkSpoofs()
	local dummy = Instance.new("Part")
	if typeof(dummy) ~= "Instance" then busted("typeof spoofed") end
	dummy:Destroy()
	if typeof(game) ~= "DataModel" then busted("game obj spoofed") end
	if type(print) ~= "function" then busted("type() spoofed") end
end

local function chkDebug()
	if not islclosure(debug.getupvalues) and not isexecutorclosure(debug.getupvalues) then
		busted("debug.getupvalues hooked")
	end
end

local function chkMt()
	local cur = getrawmetatable(game)
	if cur.__namecall ~= mt.__namecall then busted("__namecall swapped") end
	if cur.__index ~= mt.__index then busted("__index swapped") end
end

run.Heartbeat:Connect(obf(chkMt))

task.spawn(obf(function()
	while task.wait(5) do
		pcall(chkGc)
		pcall(chkSpoofs)
		pcall(chkDebug)
		pcall(chkGame)
	end
end))

pcall(chkSpoofs)
pcall(chkDebug)
pcall(chkGame)

warn("antitamper on")

Comments

Comments section coming soon...

Frequently Asked Questions

To use this script, you need a Roblox Executor. Simply copy the script from this page, paste it into your executor, and run it while you are in the Universal game.

This script may require a payment or subscription. Please check the script's description for more details.

Yes, this script has a key system. You may need to complete a task or join a Discord server to get a key.

Yes, this script is designed to be compatible with mobile executors.

Similar Scripts

Share Script

Share this script with others by copying the link or using your device's share options.

https://rbxscripts.net/scripts/anti-tamper/
or

Report Script

Help us maintain a safe community. Your report will be reviewed by our moderation team and appropriate action will be taken if needed.

Select a reason...
Malicious Code
Inappropriate Content
Copyright Infringement
Spam
Misleading Information
Other