Skip to content
Roblox API Reference

AdService

The service responsible for in-experience advertising.
  • Not creatable
  • Service
Memory category
Instances
Own members
41
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods63

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byAdService21
  • AdService:CreateAdRewardFromDevProductId(devProductId: number): AdReward
    Creates an AdReward to give users who watch a video ad.
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    devProductId: number
    The ID of the developer product you want to grant as a reward.
    Returns
    TypeDescription
    AdReward
    An AdReward configured as a developer product reward for the specified product.
  • AdService:GetAdAvailabilityNowAsync(adFormat: Enum.AdFormat): { [string]: any }
    Checks if an ad with the specified format is available to be shown to the LocalPlayer.
    • Yields
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    adFormat: Enum.AdFormat
    The format of the requested ad. For example, AdFormat.RewardedVideo.
    Returns
    TypeDescription
    { [string]: any }
    A dictionary that looks like { AdAvailabilityResult: Enum.AdAvailabilityResult }.
  • AdService:GetAdAvailabilityNowForUniverseAsync(adFormat: Enum.AdFormat,universeId: number,isUniversalAppDM: boolean,): { [string]: any }
    • Yields
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    adFormat: Enum.AdFormat
    universeId: number
    isUniversalAppDM: boolean
  • AdService:GetAdTeleportInfo(): ...any
    • Roblox script security
    • Capabilities: Monetization
    Returns
    Type
    ...any
  • AdService:GetCampaignEligibilityAsync(campaignId: string,player: Player? = nil,): { [string]: any }
    Checks a Player's eligibility to be shown an ad integration (opens in a new tab) campaign.
    • Yields
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    campaignId: string
    The ID of the campaign that you want to check a Player's eligibility for.
    player: Player? = nil
    The Player you want to check eligibility for. If omitted, it will default to the LocalPlayer. On the server, player argument is required.
    Returns
    TypeDescription
    { [string]: any }
    A dictionary that looks like { IsEligible: boolean }.
  • AdService:GetReportAdInfo(): { any }
    • Roblox script security
    • Capabilities: Monetization
    Returns
    Type
    { any }
  • AdService:GetUniversalAppAdsEligibility(): { [string]: any }
    • Roblox script security
    • Capabilities: Monetization
  • AdService:HandleWhyThisAdClicked(advertiserName: string, payerName: string)
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    advertiserName: string
    payerName: string
  • AdService:HideEudsaDisclosure()
    • Roblox script security
    • Capabilities: Monetization
  • AdService:IsAdLoaded(adFormat: Enum.AdFormat): boolean
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    adFormat: Enum.AdFormat
    Returns
    Type
    boolean
  • AdService:OnDemandVideoCompleteFromUI(result: Enum.ShowAdResult,encryptedAdTrackingData: string,encryptionMetadata: string,rewardDetails: string,)
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    result: Enum.ShowAdResult
    encryptedAdTrackingData: string
    encryptionMetadata: string
    rewardDetails: string
  • AdService:RegisterAdOpportunityAsync(instance: Instance, placementId: number?)
    Tracks how many times a user had the chance to watch a video ad and the rate at which they actually watched the ad.
    • Yields
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    instance: Instance
    The GuiButton to track as a rewarded video ad opportunity. Must be a descendant of a ScreenGui.
    placementId: number?
    The ID of the placement of the rewarded video ad inside the experience. Allows for reporting on the performance of individual ad placements.
  • AdService:RegisterDisclosureButton(disclosureButton: GuiButton,adIntegrationPlacementId: string,)
    Registers an ad disclosure button for an ad integration (opens in a new tab).
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    disclosureButton: GuiButton
    The GuiButton you want to mark as an ad integration disclosure. The GuiButton must follow labeling guidelines outlined here (opens in a new tab).
    adIntegrationPlacementId: string
    The ID of the placement that this disclosure is attached to.
  • AdService:RegisterImpressionSource(instance: Instance,adIntegrationPlacementId: string,)
    • Capabilities: Monetization
    Parameters
    Parameter
    instance: Instance
    adIntegrationPlacementId: string
  • AdService:ReturnToPublisherExperience(adTeleportMethod: Enum.AdTeleportMethod)
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    adTeleportMethod: Enum.AdTeleportMethod
  • AdService:SetAdGuiInteractivityHandlerInitialized()
    • Roblox script security
    • Capabilities: Monetization
  • AdService:ShowRewardedVideoAdAsync(player: Player,reward: AdReward,placementId: number?,): Enum.ShowAdResult
    Plays the video ad to the current user inside the experience.
    • Yields
    • Capabilities: Monetization + UI
    Parameters
    ParameterDescription
    player: Player
    The Player to trigger a rewarded video ad play for.
    reward: AdReward
    The AdReward to grant the user after they view the ad.
    placementId: number?
    The ID of the placement of the rewarded video ad inside the experience. Allows for reporting on the performance of individual ad placements.
    Returns
    TypeDescription
    Enum.ShowAdResult
    The ShowAdResult of the client's ad presentation. You should not use this result to grant the reward. Instead, you should grant the reward from your ProcessReceipt implementation. For developer products (opens in a new tab) earned through rewarded video ads, the ProductPurchaseChannel will be ProductPurchaseChannel.AdReward.
  • AdService:ShowRewardedVideoAdAtClientAsync(universeId: number): Enum.ShowAdResult
    • Yields
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    universeId: number
  • AdService:SubmitAdNotification(universeId: number,isShowAdSuccessful: boolean,earnedReward: boolean,rewardProductName: string,rewardProductImageAssetId: number,)
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    universeId: number
    isShowAdSuccessful: boolean
    earnedReward: boolean
    rewardProductName: string
    rewardProductImageAssetId: number
  • AdService:UnregisterAdOpportunity(instance: Instance)
    Stops tracking an instance that was previously registered with RegisterAdOpportunityAsync.
    • Capabilities: Monetization
    Parameters
    ParameterDescription
    instance: Instance
    The instance to stop tracking. This should be an instance that you previously passed to RegisterAdOpportunityAsync().
  • AdService:ShowVideoAd()
    Deprecated:ShowVideoAd has been decommissioned and is no longer operational.
    Show mobile video advertisements.
    • Deprecated
    • Capabilities: Monetization

Events28

Inherited fromObject1
Inherited fromInstance9
Defined byAdService18
  • AdService.AdTeleportEnded: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Monetization
  • AdService.AdTeleportInitiated: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Monetization
  • AdService.CampaignEligibilityResponseFailureSignalFromClient: RBXScriptSignal<(campaignId: string,error: string,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    campaignId: string
    error: string
  • AdService.CampaignEligibilityResponseSuccessSignalFromClient: RBXScriptSignal<(campaignId: string,response: { [string]: any },)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    campaignId: string
    response: { [string]: any }
  • AdService.GetCampaignEligibilitySignalFromServer: RBXScriptSignal<(campaignId: string)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    campaignId: string
  • AdService.ReportImpressionSignal: RBXScriptSignal<(ad_instance_name: string,encrypted_ad_tracking_data: string,encryption_metadata: string,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    ad_instance_name: string
    encrypted_ad_tracking_data: string
    encryption_metadata: string
  • AdService.ReportTeleportSignal: RBXScriptSignal<(ad_instance_name: string,encrypted_ad_tracking_data: string,encryption_metadata: string,teleport_type: string,teleport_source_universe_id: number,teleport_source_place_id: number,teleport_dest_place_id: number,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    ad_instance_name: string
    encrypted_ad_tracking_data: string
    encryption_metadata: string
    teleport_type: string
    teleport_source_universe_id: number
    teleport_source_place_id: number
    teleport_dest_place_id: number
  • AdService.RewardedVideoAdEnded: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Monetization
  • AdService.RewardedVideoAdStarted: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Monetization
  • AdService.ServeAdResponseSignal: RBXScriptSignal<(uuid: string,response: string,isError: boolean,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    uuid: string
    response: string
    isError: boolean
  • AdService.ServeAdSignal: RBXScriptSignal<(uuid: string, request: string)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    uuid: string
    request: string
  • AdService.ShowDynamicEudsaDisclosure: RBXScriptSignal<(advertiserName: string,payerName: string,)>
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    advertiserName: string
    payerName: string
  • AdService.ShowReportAdPopup: RBXScriptSignal<(adInfo: { [string]: any })>
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    adInfo: { [string]: any }
  • AdService.adGuiRegisterUI: RBXScriptSignal<(adGui: Instance)>
    • Roblox script security
    • Capabilities: Monetization
    Parameters
    Parameter
    adGui: Instance
  • AdService.rewardedVideoAdPlayServerToClient: RBXScriptSignal<(rewardDetails: string)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    rewardDetails: string
  • AdService.rewardedVideoAdPlayServerToClientWithPlacement: RBXScriptSignal<(rewardDetails: string,placementId: number,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    rewardDetails: string
    placementId: number
  • AdService.rewardedVideoAdResultClientToServer: RBXScriptSignal<(result: Enum.ShowAdResult,encryptedAdTrackingData: string,encryptionMetadata: string,)>
    • Hidden
    • Roblox engine security
    • Capabilities: Monetization
    Parameters
    Parameter
    result: Enum.ShowAdResult
    encryptedAdTrackingData: string
    encryptionMetadata: string
  • AdService.VideoAdClosed: RBXScriptSignal<(adShown: boolean)>
    Deprecated:VideoAdClosed has been decommissioned and is no longer operational.
    Fires when an AdService video closes.
    • Deprecated
    • Capabilities: Monetization
    Parameters
    Parameter
    adShown: boolean

Callbacks2

Defined byAdService2