local program = script.Parent
local sandwhich = game.ReplicatedStorage:WaitForChild("Sandwich")
local cake = game.ReplicatedStorage:WaitForChild("Cake")
local pizza = game.ReplicatedStorage:WaitForChild("Pizza")
local pizzaDia = program:WaitForChild("Dialog"):WaitForChild("DialogChoice"):WaitForChild("PIZZA")
local SandDia = program:WaitForChild("Dialog"):WaitForChild("DialogChoice"):WaitForChild("SANDWICH")
local CakeDia = program:WaitForChild("Dialog"):WaitForChild("DialogChoice"):WaitForChild("CAKE")
local dialog = script.Parent:WaitForChild("Dialog")
dialog.DialogChoiceSelected:Connect(function(player, choice)
if choice == pizzaDia then
if not player.Backpack:FindFirstChild("Pizza") then
pizzaDia.ResponseDialog = "HERE YA GO WITH EXTRA CHEESE"
local new = pizza:Clone()
new.Parent = player.Backpack
elseif player.Backpack:FindFirstChild("pizza") then
pizzaDia.ResponseDialog = "YA ALREADY GOT PIZZA! DONT BE GREEDY"
end
end
if choice == SandDia then
if not player.Backpack:FindFirstChild("Sandwich") then
SandDia.ResponseDialog = "HERES YA SANDWICH"
local new = sandwhich:Clone()
new.Parent = player.Backpack
elseif player.Backpack:FindFirstChild("Sandwich") then
SandDia.ResponseDialog = "YA GOT IT ALREADY!"
end
end
if choice == CakeDia then
if not player.Backpack:FindFirstChild("Cake") then
CakeDia.ResponseDialog = "HERES SOME YUMMY CAKE!"
local new = cake:Clone()
new.Parent = player.Backpack
elseif player.Backpack:FindFirstChild("Cake") then
CakeDia.ResponseDialog = "I AINT GIVING YA ANOTHER ONE PAL"
end
end
end)
** You are now Level 1! **