Module 11 · In Studio · challenge 3 of 3 in this lesson

canOfferPaidRandomItem is true only when ArePaidRandomItemsRestricted is explicitly false

A test in Studio grades it and prints a pass code.

Open

Level 3, Professional

Challenge

Start from the m14-ship tag in the game repo, then make both gates fail closed in challenges/safety_compliance_work.luau.

Press Play and run this in the server command bar:

luau
game.ServerScriptService.RunGameTests:Invoke("safety-compliance")
Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("safety-compliance") in the server command bar. Copy the pass code from Output.

Done means

  • canOfferPaidRandomItem is true only when ArePaidRandomItemsRestricted is explicitly false
  • canTradePaidItems is true only when IsPaidItemTradingAllowed is explicitly true
  • A nil policy and a missing field both fail closed
  • challenges/safety-compliance.luau prints TEST PASS for all eight cases

The Course Runner prints this code when the test passes.