[v3!] TopbarPlus v3.0.0 | Construct intuitive topbar icons; customise them with themes, dropdowns, captions, labels and much more

Bug?

So this is the only script for top bar v3.0.2, only one icon.new() and it duplicates?

local Icon = require(game:GetService("ReplicatedStorage").Icon)


Icon.new()
	:setName("hi")
		
local function MilitaryToStandard(hour)
	return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end

local function ConvertTo2Digit(digit)
	return if #tostring(digit) < 2 then 0 .. digit else digit
end
local res

local icon = Icon.getIcon("hi")
while true do
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
 res = result
	icon:setLabel(result)
	icon:align("Right")
	icon:lock()
wait(.000001)
end

I really need this fixed, feel free to message me or reply if you have a fix or question!

I can’t see why it would. But maybe (until it’s fixed) assign a variable at the point of creation (although I’ve used RunService here instead of a loop, because task.wait is better than wait, but Runservice will go at the fastest possible refresh - rather than defining such a small wait time).

local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)

local icon = Icon.new()
    :align("Right")
    :lock()

local res
	
local function MilitaryToStandard(hour)
    return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end

local function ConvertTo2Digit(digit)
    return if #tostring(digit) < 2 then 0 .. digit else digit
end

RunService.Heartbeat:Connect(function()
    local date = os.date("!*t", os.time() + (3600 * -4))
    local min = ConvertTo2Digit(date.min)
    local hour, isPM = MilitaryToStandard(date.hour)
    local sec = ConvertTo2Digit(date.sec)
    local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
    res = result
    icon:setLabel(:setLabel(toHMS(DateTime.now().UnixTimestamp-events.TimeStamp.Value), "deselected") )
end)

I’ve tried this and it works.

However, I would suggest you use DateTime. For example this code (which is much simpler) gives the user the time in their local time:

local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)

local icon = Icon.new()
	:align("Right")
	:lock()

RunService.Heartbeat:Connect(function()
	local dt = DateTime.now()
	icon:setLabel(dt:FormatLocalTime("hh:mm:ss", "en-us"), "deselected") 
end)

I just need to be EST time which I got. The code is correct. I just need to know why it shows duel.

Obviously a bug. But if you change it to my first set of code, that will remove the bug.


can u send the toHMS function? and the event

Even if i used heart beat it still shows the dual gui of the time.

Fixed? Had to make new script

Does the same thing with this
@ForeverHD
BUG, script still has its package
image

Icon.new()
     :setImage(shopImageId)
    :setLabel("Shop")
    :bindEvent("deselected", function()
        shop.Visible = not shop.Visible
    end)
    :oneClick()

Full script:


--[[
local Icon = require(game:GetService("ReplicatedStorage").Icon)


Icon.new()
	:setName("hi")
		
local function MilitaryToStandard(hour)
	return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end

local function ConvertTo2Digit(digit)
	return if #tostring(digit) < 2 then 0 .. digit else digit
end
local res

local icon = Icon.getIcon("hi")
while true do
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME: ".. hour .. ":" .. min ..":" .. sec
 res = result
	icon:setLabel(result)
	icon:align("Right")
	icon:lock()
wait(.000001)
end
--]]

local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)

local icon = Icon.new()
	:align("Center")
	:lock()

local res

local function MilitaryToStandard(hour)
	return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end

local function ConvertTo2Digit(digit)
	return if #tostring(digit) < 2 then 0 .. digit else digit
end

RunService.Heartbeat:Connect(function()
	local date = os.date("!*t", os.time() + (3600 * -4))
	local min = ConvertTo2Digit(date.min)
	local hour, isPM = MilitaryToStandard(date.hour)
	local sec = ConvertTo2Digit(date.sec)
	local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
	res = result
	icon:setLabel(result, "deselected")
end)
wait(.5)
local shop = game.Players.LocalPlayer.PlayerGui.time
Icon.new()
	:setLabel("Session times")
	:bindEvent("deselected", function()
		shop.Enabled = not shop.Enabled
	end)
	:oneClick()
	:align("Right")

Im not getting a duplicate so i think there is something else going on. My script worked fine.

Sorry ignore the HMS function, that should have just had your result in it.

It did just the same as the better datetime tolocalformat(). So as you want EST youre better leaving it.

What is this small empty space that I cant get rid of
image

Was using script wrong, apologies

is there anyway to get the old smooth dropdown in topbarV3?

Hey i have v3 mostly working but i have an issue, lets say i notify on an topbar button in this case my rules button and then the core gui gets disabled, the notify icon shifts and looks weird:

Heres what it looks like:

image

i am pretty sure im using the latest version since i updated a few days ago, is there any way to prevent this from happening or am i out of luck?

Hi! I’m constructing a custom notice graphic and was wondering if it was possible to achieve what’s shown in the image. I cannot seem to get the outline of the circle to be white, is there a way to make that happen?
image

Wally release appears to be broken, if you attempt to build this happens
image

image
looking pretty ugly!

My thoughts exactly, they should stop messing around with the topbar so much and just stick to one finalized version

1 Like

How would I make Ui Sounds work with topbar?

I’ve tried tons of stuuf but none of it works

Is it just me or is the set caption breaking?
image

1 Like

Dude.

This is so awesome.

Time to figure out how it works!

99 years later…