script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.Choice1) then if (player.leaderstats["????"].Value >= 10) then player.leaderstats["????"].Value = player.leaderstats["????"].Value - 10 player.leaderstats["????"].Value = player.leaderstats["????"].Value + 50 script.Parent.Choice1.ResponseDialog = "Transaction complete." else script.Parent.Choice1.ResponseDialog = "Insufficient Funds." end return end end)
This is inside a dialog for a gem trading machine, it only works when FE is turned off The dialog choices are named Choice1 Choice2 Choice3 and Choice4