local Player = game.Players.LocalPlayer
local MarketPlace = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage:WaitForChild("Events").Server_Events.Purchase_Vip:FireServer(
{
Type = MarketPlace.PromptGamePassPurchase, ID = "6372308532"
}
)
end)
local Player = game.Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
script.Parent.MouseButton1Click:Connect(function()
Events.Server_Events.Purchase_Vip:FireServer(6372308532)
end)
Server Script:
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Events = ReplicatedStorage:WaitForChild("Events")
Events.Server_Events.Purchase_Vip.OnServerEvent:Connect(function(Player, gamePassID)
MarketplaceService:PromptGamePassPurchase(Player, gamePassID)
end)
(I did 1 edit, feel free to use the little improved code by copy pasting again)
Aaaaand just double check your GamePassID again so it is valid.