local Player = game.Players.LocalPlayer
local Part = (refer to your part here)
local uis = game:GetService("UserInputService")
local MenuGui = Player:WaitForChild("PlayerGui"):WaitForChild(put your screengui name here)
uis.InputBegan:Connect(function(input, process)
if input.KeyCode == Enum.KeyCode.E and not process then
local char = Player.Character
if (Part.Position - char:GetPivot().Position).Magnitude < 15 then
MenuGui.Enabled = not MenuGui.Enabled -- Toggles the menu on and off
end
end
end)