I want the players to see it first, then they can remove it. Sorry I had to add this, every time I have asked before people have just said "delete them if you don't want them" so I just need to say that.

I have the image button already, I want it to be able to hide the image and text when pressed and turn off a script. Here is the script im using for my image button:


local button = script.Parent
local toggled = false
 
local function onButtonActivated()
	if toggled == false then
		button.Image = "rbxgameasset://Images/on"
		toggled = true
	else		
		button.Image = "rbxgameasset://Images/off"
		toggled = false
	end
end
 
button.Activated:Connect(onButtonActivated)

and here is the script I want turned off if you need it in order to help (its in a local script):

wait()
pcall(function()
	local starterGui = game:GetService('StarterGui')
	starterGui:SetCore("TopbarEnabled", false)
end)