I'm currently am trying to make a dialog shop but it's not working i'm not sure if its the actually roblox function or just my code. here's my code

local dialog = script.Parent
local drinks = game.ServerStorage.Coffee
dialog.DialogChoiceSelected:connect(function(player,choice)
-- Check the player has a stats object
local stats = player:FindFirstChild('leaderstats')
if not stats then
	print('NO STAts')
end

-- And that the stats object contains a gold member
local Cash = stats:FindFirstChild('Cash')
if not Cash then 
	print('NO CASh')
end

-- Coffee's
if choice == script.Parent.DialogChoice.Coffee.Cocoa then
if Cash.Value >= 5 then -- 5 is the amount of gold you need to purchase this weapon
drinks.Cocoa:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5 -- subtract the amount of gold you need to purchase
end
elseif choice == script.Parent.DialogChoice.Coffee.Decaf then
if Cash.Value >= 5 then
drinks.Decaf:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5
end
elseif choice == script.Parent.DialogChoice.Coffee.Frappe then
if Cash.Value >= 5 then
drinks.Frappe:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5
end
elseif choice == script.Parent.DialogChoice.Coffee.Latte then
if Cash.Value >= 5 then
drinks.Latte:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5
end
elseif choice == script.Parent.DialogChoice.Coffee.Mocha then
if Cash.Value >= 5 then
drinks.Mocha:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5
end
elseif choice == script.Parent.DialogChoice.Coffee.Regular then
if Cash.Value >= 5 then
drinks.Regular:Clone().Parent = player.Backpack
Cash.Value = Cash.Value - 5
end
end
end)