How to make a pop-up shop GUI

Have you debugged the concerned conditions yet?

Buy.MouseButton1Down:connect(function()
    print("Clicked")
    if Player:IsInGroup(CurrentGroup) then
        mon = Player.leaderstats.Wallet
        print("Value:", mon.Value)
        if mon.Value >= Guns[CurrentValue].Amount then
            print("Passed condition...")
            mon.Value = mon.Value - Guns[CurrentValue].Amount
            game.ServerStorage:FindFirstChild(CurrentValue):Clone().Parent = Player.Backpack
            print("Parented tool")
        end
    end
end)
Some comments
  • Please indent your code properly and format it in separate codeblocks:
    ```lua
    print("Hello world”)
    ```

  • mon is underlined as it is a global variable, defining it as local mon should fix the warning.

  • Don’t use Instance.new() with parent argument