RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a gui gamepass store"
-- server script local gamepasses = { ["Gamepass1"] = 12345, ["Gamepass2"] = 54321 } game.Players.PlayerAdded:Connect(function(player) local store = Instance.new("ScreenGui") store.Parent = player.PlayerGui local frame = Instance.new("Frame") frame.Parent = store frame.Size = UDim2.new(0.5, 0, 0.5, 0) frame.Position = UDim2.new(0.25, 0, 0.25, 0) for name, id in pairs(gamepasses) do local button = Instance.new("TextButton") button.Parent = frame button.Size = UDim2.new(0.9, 0, 0.2, 0) button.Position = UDim2.new(0.05, 0, 0, 0) button.Text = name button.MouseButton1Click:Connect(function() if player:GetGamePassInfo(id).Owned then -- do something end end) end end)