local PizzaBox = script.Parent
local ServerStorage = game:GetService("ServerStorage")
for i, Pizza in pairs(PizzaBox:GetChildren()) do
if Pizza:IsA("BasePart") then
local ClickDetector = Instance.new("ClickDetector", Pizza)
ClickDetector.MaxActivationDistance = 16
ClickDetector.MouseClick:Connect(function(player)
if player and player.Character then
local Backpack = player:WaitForChild("Backpack")
local Tool = ServerStorage:WaitForChild("Pizza")
Pizza:Destroy()
Tool:Clone().Parent = player.Backpack
end
end)
end
end