01 | --Server script in serverscriptservice |
02 | rs = game:GetService( "ReplicatedStorage" ) |
03 | ms = game:GetService( "MarketplaceService" ) |
04 | remotes = rs.Remotes |
05 | pp = remotes:WaitForChild( "Prompt_Purchase" ) |
06 | pp.OnServerEvent:connect( function (player, id) |
07 | print (player.Name.. ", " ..id) |
08 | ms:PromptPurchase(player, id) |
09 | end ) |
10 |
11 | --Local script in startergui |
12 | rs = game:GetService( "ReplicatedStorage" ) |
13 | player = game:GetService( "Players" ).LocalPlayer |
14 | mouse = player:GetMouse() |
15 | remotes = rs.Remotes |