Ads in the game: rewarded video and immersive ads

Earn from players who never spend Robux by adding a rewarded video ad and an immersive ad billboard to Beacon Yard, with the reward routed through the same safe receipt handler as the Coin Pack.

Project lesson, about 70 minutes, 11 steps

By the end you can

  • Add a rewarded video ad for a double-coin round to Beacon Yard, with the reward granted once through the existing receipt handler
  • Explain who decides whether an ad can show, and which rules a reward, a button and a placement must follow
  • Place an immersive ad billboard in the lobby and measure ad views as their own economy source

Before this: Monetization: products, passes, subscriptions, economy, The round loop: a state machine

Step 1 of 11

A button for the player who never pays

Most players never spend Robux. In Beacon Yard they earn coins, buy Speed and a Shield, and never touch the Coin Pack. A rewarded video ad lets them support the game anyway: they choose to watch a short video, and they get something for it.

Here is the button this lesson adds to the quartermaster's shop, between drills: "Watch an ad: double coins next drill". The player clicks it, a 6 to 30 second video plays full screen, and the next drill pays twice for every coin pickup1. The advertiser pays Roblox, Roblox pays you in Robux, and the player paid nothing.

Roblox has two ways to show ads inside a game. Rewarded video is the one the player starts. Immersive ads sit in the world: a billboard that shows an image or a video, or a portal that teleports to an advertiser's game2. This lesson builds both, starting with the button.

Match the pairs

Match each ad format to what the player does.

Link to this step · This confused me

Step 2 of 11

Who decides whether an ad shows

Server sideRewarded video ads is a sponsored sample stall at the shop counter.
In the pictureIn Roblox
The sponsor who pays the shopThe advertiser, who pays Roblox for impressions
The short demo you agree to watchA 6 to 30 second rewarded video, started only by the player's own click
The free sample of something the shop sellsA developer product that is also on sale in the shop, granted after the full view
The sign that says what you getThe disclosure on the button: what the reward is and what to do for it

See the whole analogy cast

A rewarded ad is a sponsored sample stall at the shop counter. A sponsor pays the shop. A customer who agrees to watch a short demo gets a free sample of something the shop already sells, and the sign says exactly what they will get.

Think of it as A sponsored sample stall at the shop counter

The stall does not run itself. Before the button may appear, the client asks AdService:GetAdAvailabilityNowAsync(Enum.AdFormat.RewardedVideo). The answer is an Enum.AdAvailabilityResult3:

ResultWhat it means
IsAvailableAn ad is ready for this player now
NoFillNo advertiser wants this player right now, or a frequency limit was hit
PlayerIneligibleThis player cannot get ads this session, for example under 13 or in a blocked region
PublisherIneligible, ExperienceIneligibleYou or your game do not meet the requirements
DeviceIneligibleThis device cannot show the ad

The game has to qualify too. It must be public and unrestricted, have an approved content questionnaire, and average at least 2,000 unique visitors a month. You must be 13 or older, ID-verified, with two-step verification on. Then you switch on Serving enabled under Monetization, Ads, Settings in Creator Hub1.

Choose one

You publish your copy of Beacon Yard as a private experience to build along with this course. Can it earn from rewarded video ads today?

You publish your copy of Beacon Yard as a private experience to build along with this course. Can it earn from rewarded video ads today?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 3 of 11

Client asks, server shows, receipt grants

Two calls, two sides. GetAdAvailabilityNowAsync may only run on the client, because the answer is about this player and this device. ShowRewardedVideoAdAsync(player, reward) may only run on the server4. Its reward is an AdReward made by AdService:CreateAdRewardFromDevProductId(productId).

The rewarded video round tripFour boxes in a loop. The client shop asks whether an ad is ready and fires WatchAd to the server. The server shows the ad. Roblox plays it. Roblox then sends a receipt to ProcessReceipt on the server, which grants the double round.WatchAdreceiptShop opensad available now?AdRewardServiceshows the adRobloxplays 6 to 30 sProcessReceiptchannel AdReward
The reward never comes back from ShowRewardedVideoAdAsync. It arrives as a receipt.

When the player watches to the end, Roblox grants the developer product through MarketplaceService.ProcessReceipt, the same callback that grants the Coin Pack. The receipt's ProductPurchaseChannel is Enum.ProductPurchaseChannel.AdReward instead of InExperience5. The value ShowRewardedVideoAdAsync returns is only for your UI. The docs say plainly not to grant from it4.

Put in order

Put one rewarded ad view in order.

  1. Roblox calls ProcessReceipt with the Double Round product and channel AdReward
  2. The player watches the video to the end
  3. The server checks its rules and calls ShowRewardedVideoAdAsync with the AdReward
  4. The button shows, the player clicks it and the client fires WatchAd
  5. The player opens the shop and the client calls GetAdAvailabilityNowAsync

Link to this step · This confused me

Step 4 of 11

Choosing the reward: a Double Round

Roblox puts rules on the reward. It must be a developer product that is also on sale for Robux in your shop. It must not inflate the currency or unbalance the economy, must not be random, and must be granted as soon as the ad finishes. The ad must never be a gate the player has to pass to keep playing, and it must not hurt their character1.

So the reward is a new developer product, Double Round: the next drill pays twice for every coin pickup. The shop sells it for a few Robux and the ad gives it free. It is useful, it is not random, and it is small. How small?

Luau
Ctrl Enter runs the cell. Checked against the expected output

An ad is worth 20 coins in a normal drill, less than half a Coin Pack. That is a real reward that does not flood the shop.

Choose all that apply

Which of these rewards or placements break Roblox's rewarded video rules?

Which of these rewards or placements break Roblox's rewarded video rules?

Press 1 to 5 to choose, Enter to check.

Link to this step · This confused me

Step 5 of 11

One receipt handler, two products

Open MonetizationService.process at m14-ship. It was written for one product.

function MonetizationService.process(raw: unknown): Enum.ProductPurchaseDecision
	local receipt = readReceipt(raw)
	if receipt == nil or Ids.COIN_PACK_PRODUCT_ID <= 0 or receipt.ProductId ~= Ids.COIN_PACK_PRODUCT_ID then
		return Enum.ProductPurchaseDecision.NotProcessedYet

Any receipt whose product is not the Coin Pack gets NotProcessedYet. Add a Double Round product and change nothing else, and every ad reward is refused.

Choose one

A player finishes an ad. Roblox calls the m14-ship handler with a Double Round receipt. What happens?

A player finishes an ad. Roblox calls the m14-ship handler with a Double Round receipt. What happens?

Press 1 to 4 to choose, Enter to check.

Server sideRemember: Rewarded video ads is a sponsored sample stall at the shop counter.

The fix is a lookup by product id, the same "check, grant, record, save" order as the Coin Pack, and one new profile field, doubleRounds. The id goes into recentPurchaseIds with the grant, so a redelivered ad receipt grants once. The Run above showed the boost math. Now look at where the stall picture stops being true.

Where does it break?“A sponsored sample stall at the shop counter” is a good picture of rewarded video ads. Where does it stop being true?

It breaks here. The shop decides neither who may watch nor how the sample is handed over: Roblox decides eligibility (age, region, fill, frequency), and the reward arrives later as a ProcessReceipt receipt, not across the counter.

The true model. The client asks AdService:GetAdAvailabilityNowAsync when the shop opens. The server calls ShowRewardedVideoAdAsync with an AdReward made from a developer product. When the ad plays to the end, Roblox delivers a receipt for that product through ProcessReceipt with ProductPurchaseChannel AdReward. You earn Robux per impression, not per reward.

Choose one

At a sample stall, the shopkeeper decides who may watch and hands the sample across the counter. In Beacon Yard, which part of that is still true?

At a sample stall, the shopkeeper decides who may watch and hands the sample across the counter. In Beacon Yard, which part of that is still true?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 6 of 11

Measuring ads

Ad coins should not hide among drill pickups. Roblox's economy events accept your own transaction type names besides the built-in ones6, and there is no built-in type for ads. So the coins a boosted drill adds are logged as a source with the type RewardedAd, and the Economy page shows them as their own row.

The rest lives in Creator Hub under Monetization, Ads, Analytics: impressions, fill rateFill rateThe share of ad requests that came back with an ad to show.Think of it as how often the vending machine actually has something in the slot you picked., EPMEPMEarnings per mille: the Robux an ad format earns for every 1,000 impressions.Think of it as the price per thousand views that advertisers end up paying you., opt-in rate and frequency. Earnings are Robux: EPM times impressions, divided by 1,0001. Roblox's optimization guide gives targets of a 10 to 20 percent opt-in rate and two to four ads per user a day, and asks for a cap of at least two or three prompts per session7. Beacon Yard's cap is three a session.

Two more habits. Register the button with AdService:RegisterAdOpportunityAsync so Creator Hub counts how often the offer was seen against how often it was taken. And roll a new placement out to part of your players with an Experiment first1.

Luau
Ctrl Enter runs the cell. Checked against the expected output
Choose one

Beacon Yard's opt-in rate comes out at 12 percent and frequency at 0.6 ads per player a day. Which number should you work on first?

Beacon Yard's opt-in rate comes out at 12 percent and frequency at 0.6 ads per player a day. Which number should you work on first?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 7 of 11

Immersive ads in the lobby

The lobby has players standing around between matches, which suits a billboard. An immersive billboard is a block part with an AdGui on one face8. The face must be at least 8 by 4.5 studs and at most 32 by 18, with no other surface GUI on it. Tick EnableVideoAds to allow video; without it the billboard shows images only2.

You earn when a click-to-play video is watched for at least 15 seconds, when an image or autoplay video counts as a viewable impression, and for each player a portal ad sends to an advertiser's game. Portal ads come from the BasePortal package in the Creator Store's Ads category, and you may only move, rotate and scale them. Roblox pays on the 25th of the month after you inserted the ad units2.

Ineligible players see a fallback image. To hide the units for them instead, read AreAdsAllowed from PolicyService:GetPolicyInfoForPlayerAsync29. Beacon Yard's PolicyProbe already calls it for paid random items, so it can store this answer too. Faking impressions or teleports breaks the advertising standards and can cost the payout or the game.

Choose one

You add a lobby billboard in LobbyBuilder. Which part face can carry an AdGui?

You add a lobby billboard in LobbyBuilder. Which part face can carry an AdGui?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 11

How studios think about ads

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Rewarded videoAn opt-in full-screen video that grants a developer product.Games with many non-paying players and a natural pause, such as a shop between rounds.Needs a public game with 2,000 monthly visitors; a badly placed or too generous reward hurts retention or the economy.
Immersive billboards and portalsAdGui billboards and BasePortal doors placed in the world.Lobbies, hubs and long walks where players look around anyway.Earns per view or teleport with no player choice; portals send players away to another game.
No adsEarn only from products, passes, subscriptions and Creator Rewards.Young audiences, competitive games, or a game below the eligibility bar.Leaves the non-paying majority earning you nothing directly.
Buying ads (Ads Manager)The other side: you pay to advertise your own game.Growth, covered in the marketing lesson.Costs money; it does not earn.
Choose one

Double Round is sold in the shop and offered as an ad reward. Should Beacon Yard turn on Exclude your most likely purchasers?

Double Round is sold in the shop and offered as an ad reward. Should Beacon Yard turn on Exclude your most likely purchasers?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 9 of 11

Build along: the Double Round ad

This extends the finished game. Start a branch from m14-ship, do the level 3 challenge's rules first, then wire them in. Ads will not serve until the game is eligible, so check each step with the expected Output, not a real ad.

Build along

m14-ship

  • challenges/work/ad_reward.luau
  • src/shared/Ids.luau
  • src/shared/Config.luau
  • src/server/DataMigration.luau
  • src/server/MonetizationService.luau
  • src/server/AdRewardService.luau
  • src/server/CoinService.luau
  • src/client/ShopApp.luau
  1. Write the five rules in challenges/work/ad_reward.luau: offer, grant, transactionType, multiplier and startRound. Then copy the module to src/shared/AdRules.luau so the game can require it.

    You should see The level 3 challenge prints TEST PASS for all 21 checks.

  2. Create the Double Round developer product in Creator Hub and put its id only in Ids.local.luau. Add doubleRounds = 0 to DataMigration.template() and to the ProfileData type.

    You should see Ids.luau has DOUBLE_ROUND_PRODUCT_ID = 0, Config has AD_SESSION_CAP = 3, and a new profile shows doubleRounds = 0 after Reconcile.

  3. In MonetizationService.process, replace the Coin Pack check with AdRules.grant: answer NotProcessedYet for "unknown", PurchaseGranted for "duplicate", and save before granting for the rest. Log coins with AdRules.transactionType(receipt.ProductPurchaseChannel.Name).

    You should see A Coin Pack test purchase in Studio still grants 50 coins once, and the Output shows no [Monetization] warning.

  4. Create AdRewardService with a WatchAd remote. Check AdRules.offer on the server with the RoundPhase attribute and a per-session view count, then call CreateAdRewardFromDevProductId and ShowRewardedVideoAdAsync in pcall.

    You should see With the id at 0, pressing the button prints one [Ids] warning and the server answers with a deny message instead of an ad.

  5. At the start of a drill, spend one round with AdRules.startRound and set a DoubleRound player attribute. In CoinService, pay AdRules.multiplier(boosted, FlagService.coinMultiplier(), Config.EVENT_MAX_MULTIPLIER). In ShopApp, show the button only when the client's GetAdAvailabilityNowAsync says IsAvailable, with the reward written on it.

    You should see During a drill after a double round was granted, each coin pickup adds 10 coins instead of 5, and the next drill is back to 5.

Browser
Creator Hub, Monetization, Ads, Eligibility for a private course experience, cropped to three unmet requirements: make the experience public, complete the content rating questionnaire, and 2K monthly active users.

Select a numbered pin, or a row below, to read what it marks.

Creator Hub's ads eligibility page for a private build copy, cropped to the experience requirements. The pins mark the three it does not meet yet.

Link to this step · This confused me

Step 10 of 11

Challenges

Level 3, Professional

Challenge

Start from the m14-ship tag in the game repo and fill in challenges/work/ad_reward.luau. Run it in Play with game.ServerScriptService.RunGameTests:Invoke("ads", "ads-reward-rules"). The written solution is challenges/solutions/ads.md.

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

Done means

  • offer returns ok only for an available ad outside a drill, with no double round held and under the session cap, and names the first rule that fails otherwise
  • grant routes the Coin Pack and Double Round by product id, grants a purchase id once, refuses unknown and 0 ids, and keeps the newest 50 ids
  • transactionType marks ad receipts as RewardedAd and everything else as IAP
  • multiplier doubles the Scrap Rush multiplier and never passes the cap; startRound spends one held round
  • challenges/ads.luau prints TEST PASS for all 21 checks

The Course Runner prints this code when the test passes.

Level 2, Builder

Challenge

Add the immersive billboard to the lobby. There is no automated test: check each criterion in Studio and in the Explorer during Play.

Start from
m14-ship, with the game published as a private test experience

Done means

  • LobbyBuilder makes an anchored 16 by 9 stud block named LobbyBillboard facing the spawn, with one AdGui on its front face and EnableVideoAds on
  • The AdGui has a FallbackImage you own, so ineligible players see your art, not a blank face
  • PolicyProbe also stores AreAdsAllowed as a player attribute, and a client script hides the billboard for a player whose attribute is false
  • Self-check: you can say why the billboard serves no ads in your private copy

Meet the criteria above, then record your own result. No test grades this check.

Predict the output

A player watched three ads this session and holds no double round. The phase is Cooldown and an ad is available. What does offer return?

print(AdRules.offer("Cooldown", "IsAvailable", 0, 3, Config.AD_SESSION_CAP))
A player watched three ads this session and holds no double round. The phase is Cooldown and an ad is available. What does offer return?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 11 of 11

Recap

Retiring the analogy

You no longer need “a sponsored sample stall at the shop counter”. The client asks AdService:GetAdAvailabilityNowAsync when the shop opens. The server calls ShowRewardedVideoAdAsync with an AdReward made from a developer product. When the ad plays to the end, Roblox delivers a receipt for that product through ProcessReceipt with ProductPurchaseChannel AdReward. You earn Robux per impression, not per reward.

Recap

  1. Rewarded video is opt-in: the client asks GetAdAvailabilityNowAsync, the server calls ShowRewardedVideoAdAsync with an AdReward made from a developer product, and the reward arrives through ProcessReceipt with channel AdReward.
  2. The reward must be a developer product also sold in the shop, not random, not inflating, granted right away, never a gate and never shown mid-drill; Beacon Yard's Double Round adds about 20 coins.
  3. Immersive billboards and portals earn from views and teleports; only public games with 2,000 monthly visitors earn from ads, and ad coins get their own RewardedAd economy source.

Rewarded video ads is a sponsored sample stall at the shop counter, until the shop decides neither who may watch nor how the sample is handed over: Roblox decides eligibility (age, region, fill, frequency), and the reward arrives later as a ProcessReceipt receipt, not across the counter.

Next Recurring revenue: subscriptions and a season pass

Link to this step · This confused me