Fps Counter For TopBarPlus

Hey, Im Using Hd admins Top Bar Plus, Which is used to make icons in the top bar.
Its Very Usefull as it allows the main screen of the player not to get filled up by other guis.
Now with that being said, Let me get into my problem.
Im trying to have an Fps Counter on one of the buttons, and im having a hard time doing so.
There is one really accurate and good fps script

local Heartbeat = game:GetService("RunService").Heartbeat
local LastIteration, Start
local FrameUpdateTable = { }
local function HeartbeatUpdate()
LastIteration = tick()
for Index = #FrameUpdateTable, 1, -1 do
FrameUpdateTable[Index + 1] = (FrameUpdateTable[Index] >= LastIteration - 1) and FrameUpdateTable[Index] or nil
FrameUpdateTable[1] = LastIteration
local CurrentFPS = (tick() - Start >= 1 and #FrameUpdateTable) or (#FrameUpdateTable / (tick() - Start))
CurrentFPS = math.floor(CurrentFPS )
FpsLabel.Text = "" .. CurrentFPS .. " FPS"
Start = tick()
Anyway if you dont know already topbarplus has funtions made by ForeverDev, So the functions like :setlabel or something can be used.
However im not really sure how to go about this, any help will be appreciated thanks.

Can you format your code by selecting it all and click this button in the editor Screenshot by Lightshot please.


Select your code and click the button inside the red square.


Now in regards to your post, you could have the button toggle a GUI in for example the bottom left corner that shows the players FPS. Constantly setting a label in Topbar+ is not an option from experience using it.