put this local script inside the gui, and call the brick "ShowGui"
local lp = game.Players.LocalPlayer
local mouse= lp:GetMouse()
script.Parent.Visible = false
mouse.Move:Connect(function()
local targ = mouse.Target
if targ and targ.Name == "ShowGui" then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
end) |