A lot of games have a store where you can talk with a humanoid to prompt some sort of purchase of a gamepass. The gamepass can also be continuously purchased even if it has been bought before. I'm trying to find a script to work like this but there's no luck. Does anyone know a good script for this?
The best script I could find and tweak was this, but it doesn't even work:
local id = 134889473 -- insert id here, I used the Minion lol it's cheap and good. local Dialog = script.Parent.Parent player = game.Players.LocalPlayer Dialog.DialogChoiceSelected:connect(function(player,Choice) if not player then return end if Choice.Name == "DialogChoice" then game:GetService("GamepassService"):PromptPurchase(player,id) end end)
I have the problem! Right here: local Dialog = script.Parent.Parent
Since the script is in Workspace, Dialog = game. You put this script 2 layers down from the dialog you want to use.