mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
39 lines
943 B
Text
39 lines
943 B
Text
import { SafeInput, Compliance } from "@aethex.os/core"
|
|
|
|
reality SecureLeaderboard {
|
|
platforms: [roblox]
|
|
type: "compliance-exam"
|
|
}
|
|
|
|
journey SubmitScore(player, playerName, score) {
|
|
platform: roblox
|
|
|
|
when !Compliance.isCOPPACompliant(player.age) {
|
|
notify "Players under 13 cannot submit scores publicly"
|
|
return
|
|
}
|
|
|
|
let nameValidation = SafeInput.validate(playerName)
|
|
|
|
when !nameValidation.valid {
|
|
notify "Invalid name: contains PII"
|
|
return
|
|
}
|
|
|
|
let scoreValidation = SafeInput.validate(score)
|
|
|
|
when !scoreValidation.valid {
|
|
notify "Invalid score: contains sensitive data"
|
|
return
|
|
}
|
|
|
|
notify "Score submitted successfully!"
|
|
reveal { player: nameValidation.clean, score: scoreValidation.clean }
|
|
}
|
|
|
|
journey TestCompliance() {
|
|
platform: roblox
|
|
|
|
let player = { age: 15 }
|
|
SubmitScore(player, "PlayerOne", "1000")
|
|
}
|