script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
if not script.Parent:FindFirstChild("SelectionBox") then
local SelectionBox = Instance.new("SelectionBox")
SelectionBox.Adornee = script.Parent
SelectionBox.Parent = script.Parent
SelectionBox.Color3 = Color3.new(1, 1, 1)
SelectionBox.Transparency = 0.8
end
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
if script.Parent:FindFirstChild("SelectionBox") then
script.Parent.SelectionBox:Destroy()
end
end)
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player.Money.Value >= 5 then
game.ServerStorage.Foods.Sandwich:Clone().Parent = player.Backpack
end
end)