✓ Accepted answer
Insert a screen GUI in to starter GUI. Then insert a frame into the screen GUI. Place it wherever you want. Then insert a text button in the frame. Go on to the properties of the text button and make sure text scaled is on. Put the text to 0. Then insert a number value in the frame. Name the number value "ClickCounter". Now for scripting.
Put a local script in to the text button. Call it whatever you want. In the local script, do this:
script.Parent.MouseButton1Down:Connect(function()
local ClickCounter = script.Parent.Parent:WaitForChild("ClickCounter")
ClickCounter.Value = ClickCounter.Value + 1
script.Parent.Text = ClickCounter.Value.."Clicks"
end)
Now for explaining.
MouseButton1 is left click
MouseButton2 is right click
MouseButton3 is the scroll wheel.
MouseButton1Down just detects if someone clicks.
Then we just set the text to be whatever the amount of clicks a person has had with the word "Clicks", at the end.
If you want, you could even add a click sound.
script.Parent.MouseButton1Down:Connect(function()
local ClickCounter = script.Parent.Parent:WaitForChild("ClickCounter")
ClickCounter.Value = ClickCounter.Value + 1 script.Parent.Text = ClickCounter.Value.." Clicks"
local Sound = Instance.new("Sound")
Sound.SoundId = "rbxassetid://876939830"
Sound.Parent = workspace
Sound.PlaybackSpeed = 0.8
Sound.Volume = 10
Sound.MaxDistance = 300
Sound:Play()
end)