here's the Dialog script
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) -- Check the player has a stats object local stats = player:FindFirstChild('leaderstats') if not stats then return end
local KOs = stats:FindFirstChild('KOs')
)') if not gold then return end
if choice == script.Parent.DialogChoice.Throwing BOMB(10 KOs) then if KOs.Value >= 10 then game.ReplicatedStorage.Weapon1:Clone().Parent = player.Backpack KOs.Value = KOs.Value - 10 end elseif choice == dialog.DialogChoice.Darkheart(100 KOs) then if KOs.Value >= 100 then game.ReplicatedStorage.Weapon2:Clone().Parent = player.Backpack KOs.Value = KOs.Value - 100 end elseif choice == dialog.DialogChoice.Heat seeking missile launcher(500 KOs) then if KOs.Value >= 500 then game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack KOs.Value = KOs.Value - 500 end elseif choice == dialog.DialogChoice.Red scythe(50 KOs) then if KOs.Value >= 50 then game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack KOs.Value = KOs.Value - 50 end elseif choice == dialog.DialogChoice.Knife(100 KOs) then if gold.Value >= 100 then game.ReplicatedStorage.Weapon3:Clone().Parent = player.Backpack gold.Value = KOs.Value - 100 end end
end)