How to check a player's device trust level in Roblox

Device trust checks that only block None let Pending devices into ranked play and trading. How to use an allow list on the server and where to assign EvaluatePlayerDeviceTrust.

warningLuaudit check: loose-device-trust-checks

What it looks like

The game uses Roblox's device trust level to keep ranked play, trading or other sensitive features to trusted devices, but the check lets through the devices it was meant to stop. It blocks only None and so lets Pending in, compares levels as numbers, trusts the measures table instead of the level, or believes what the client says about its own level.

Luau
if player.DeviceTrustLevel == Enum.PlayerDeviceTrustLevel.None then
	return
end

What an exploiter could do

They play from the emulators, modified apps and tampered devices the game meant to keep out. A player whose device never finishes the check stays at Pending and passes a check that only blocks None, as does anyone who uses the feature before their level arrives. They join ranked matches, trade and climb leaderboards that the game promised were limited to trusted devices, which is exactly where cheating does the most harm to other players.

How to fix it

  • Read Player.DeviceTrustLevel on the server, at the moment the feature is used, and look it up in a table of allowed levels. Leave Pending and None out. Decide on purpose whether Unknown is in. The guide says iOS, macOS, Windows, Xbox and PlayStation report it until Roblox supports them.
  • Use the measures table only to find measures that failed, never to decide that a device is trusted.
  • Have the server tell the client which features are open, and check the level again on the server before the action happens.
  • Assign EvaluatePlayerDeviceTrust in every place that should be limited to trusted devices, not only in the place that teleports players there.
  • Keep validating everything else on the server. The guide says exploits that rely on weak server-side validation "still work on trusted devices".

Vulnerable example

Vulnerable
local IntegrityService = game:GetService("IntegrityService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local trusted: { [Player]: boolean } = {}

IntegrityService.EvaluatePlayerDeviceTrust = function(player: Player, measures: { [string]: any })
	trusted[player] = measures.IsPlatformVersionSecure == true and measures.IsPlatformBootSecure == true and measures.IsAppSecure == true
	return { Action = Enum.PlayerDeviceTrustDecision.Accept }
end

ReplicatedStorage.Remotes.StartTrade.OnServerEvent:Connect(function(player: Player, target: unknown)
	if typeof(target) ~= "Instance" or not target:IsA("Player") or target == player or target.Parent ~= Players then
		return
	end
	if trusted[player] == false or trusted[target] == false then
		return
	end
	ReplicatedStorage.Remotes.TradeOffered:FireClient(target, player)
end)

Players.PlayerRemoving:Connect(function(player)
	trusted[player] = nil
end)

Fixed example

Fixed
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local tradeLevels: { [Enum.PlayerDeviceTrustLevel]: boolean } = {
	[Enum.PlayerDeviceTrustLevel.Unknown] = true,
	[Enum.PlayerDeviceTrustLevel.Standard] = true,
	[Enum.PlayerDeviceTrustLevel.Full] = true,
}

local function canTrade(player: Player): boolean
	return tradeLevels[player.DeviceTrustLevel] == true
end

ReplicatedStorage.Remotes.StartTrade.OnServerEvent:Connect(function(player: Player, target: unknown)
	if typeof(target) ~= "Instance" or not target:IsA("Player") or target == player or target.Parent ~= Players then
		return
	end
	if not canTrade(player) or not canTrade(target) then
		return
	end
	ReplicatedStorage.Remotes.TradeOffered:FireClient(target, player)
end)

How to spot this in your own scripts, and the cases that only look like it, are part of the Luaudit check your AI runs.