Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- SUPER RADIO CONFIG
- -- Make sure you put this script in game.ServerScriptService
- local DEFAULT_SONG = 198289443 -- The ID of the default song that plays when no radio is set
- local NATURE_SOUNDS = true -- By default Super Radio comes with some chill nature sounds.
- local ANNOUNCE_RADIO = true -- Announce via hint whenever a user changes the song on the radio?
- local PRODUCT_ID = 27695909 -- Set this to the id of the product you want players to buy to activate radio.
- -- You can make developer products your place's config page. (PRODUCT MUST BE IN SAME GAME TO WORK!)
- local PROCESS_RECEIPT = true -- Set this to true ONLY IF YOU DON'T HAVE ANOTHER SCRIPT THAT PROCESSES
- -- PRODUCT PURCHASES. ONLY ONE SCRIPT CAN PROCESS PURCHASES PER GAME. Setting this to true means you
- -- don't have any other developer products in your game and you want this script to handle purchases.
- -- If PROCESS_RECEIPT is set as false, integrate the radio into your purchase handler script like this:
- --[[
- function getPlayerFromId(id)
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.userId == id then
- return v
- end
- end
- end
- game.MarketplaceService.ProcessReceipt = function(receiptInfo)
- local player = getPlayerFromId(receiptInfo.PlayerId)
- if player ~= nil then
- if receiptInfo.ProductId == PRODUCT_ID then -- radio
- game.ServerStorage.ChangeRadio:Invoke(player)
- end
- end
- return Enum.ProductPurchaseDecision.PurchaseGranted
- end
- --]]
- -- (Make sure you auctually manually set what PRODUCT_ID is if you copy the above code)
- -- Don't touch this or nothing will work at all
- require(402795746)(DEFAULT_SONG,NATURE_SOUNDS,ANNOUNCE_RADIO,PRODUCT_ID,PROCESS_RECEIPT)
Advertisement
Add Comment
Please, Sign In to add comment