Gamepass door script not working anymore since Roblox changed the "storage system" for gamepasses?
So... I have an old gamepass door script, but since Roblox changed the "storage system" for gamepasses, the script and the gamepass id are not working anymore. Can someone help me out with changing the script so it does work? I've read the wiki, but I'm kinda confused now...
13 | Serv = game:GetService( "BadgeService" ) |
14 | MServ = game:GetService( "MarketplaceService" ) |
16 | _G.Players = { [ ItemID ] = { } } |
17 | elseif not _G.Players [ ItemID ] then |
18 | _G.Players [ ItemID ] = { } |
21 | Table = _G.Players [ ItemID ] |
23 | function CheckPlayer(player 2 ) |
25 | if Table [ i ] = = player 2 then |
32 | Door.Touched:connect( function (hit) |
33 | if game.Players:GetPlayerFromCharacter(hit.Parent) then |
34 | player = game.Players:GetPlayerFromCharacter(hit.Parent) |
35 | if Serv:UserHasBadge(player.userId,ItemID) or CheckPlayer(player) then |
36 | Door.CanCollide = false Door.Transparency = OpenTrans |
38 | Door.CanCollide = true Door.Transparency = CloseTrans |
40 | Door.CanCollide = true Door.Transparency = CloseTrans |
41 | if BuyGUI = = true then |
42 | MServ:PromptGamePassPurchase(player,ItemID) |
43 | h = player.Character:FindFirstChild( "Humanoid" ) |
47 | con = MServ.PromptGamePassPurchaseFinished:connect( function (ply,asset,purch) |
48 | if ply = = player and asset = = ItemID then |
53 | table.insert(Table,player) |
54 | elseif KillOnTouch = = true then |
55 | Door.CanCollide = true Door.Transparency = CloseTrans |
56 | player.Character:BreakJoints() |
60 | elseif KillOnTouch = = true then |
61 | Door.CanCollide = true Door.Transparency = CloseTrans |
62 | player.Character:BreakJoints() |