mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-18 06:27:20 +00:00
33 lines
934 B
Lua
33 lines
934 B
Lua
-- Generated by AeThex Compiler v1.0.0
|
|
-- Target: Roblox (Lua)
|
|
|
|
local AeThex = require(game.ReplicatedStorage.AeThex.core)
|
|
|
|
local SecureLeaderboard = {
|
|
platforms = {"roblox"},
|
|
type = "compliance-exam",
|
|
}
|
|
|
|
local function SubmitScore(player, playerName, score)
|
|
if (not Compliance.isCOPPACompliant(player.age)) then
|
|
print("Players under 13 cannot submit scores publicly")
|
|
return
|
|
end
|
|
local nameValidation = SafeInput.validate(playerName)
|
|
if (not nameValidation.valid) then
|
|
print("Invalid name: contains PII")
|
|
return
|
|
end
|
|
local scoreValidation = SafeInput.validate(score)
|
|
if (not scoreValidation.valid) then
|
|
print("Invalid score: contains sensitive data")
|
|
return
|
|
end
|
|
print("Score submitted successfully!")
|
|
return { player = nameValidation.clean, score = scoreValidation.clean }
|
|
end
|
|
|
|
local function TestCompliance()
|
|
local player = { age = 15 }
|
|
SubmitScore(player, "PlayerOne", "1000")
|
|
end
|