Studio Date Plugin


Studio Date is a plugin that prints some os.date functions like year and more.
If you have an idea or a feedback for the plugin, write it here.
Plugin

Source:

local toolbar = plugin:CreateToolbar("Studio Date")

local button = toolbar:CreateButton("Studio Date Widget", "Studio Date", "rbxassetid://10861475043")

button.ClickableWhenViewportHidden = true
local opened = false

local widgetInfo = DockWidgetPluginGuiInfo.new(
	Enum.InitialDockState.Float,  
	true,
	false,
	200,    
	300,    
	150,    
	150     
)

local widget = plugin:CreateDockWidgetPluginGui("Studio Date", widgetInfo)


button.Click:Connect(function()
	if opened then
		widget.Title = "Studio Date"
		local Label = Instance.new("TextLabel")
		Label.BorderSizePixel = 0
		Label.TextSize = 20
		Label.TextColor3 = Color3.new(0.243137, 0.243137, 0.243137)
		Label.AnchorPoint = Vector2.new(0.5,0.5)
		Label.Size = UDim2.new(1,0,1,0)
		Label.Position = UDim2.new(0.5,0,0.5,0)
		Label.SizeConstraint = Enum.SizeConstraint.RelativeYY
		Label.Parent = widget
			Label.Text = "Studio Date: Year: "..os.date("%Y")..", Weekday: "..os.date("%A")..", Month: "..os.date("%B")..", Date and time: "..os.date("%c")..", Timezone: "..os.date("%Z")
		Label.TextScaled = true
		widget.Enabled = false
		opened = false
	else
		widget.Title = "Studio Date"
		local Label = Instance.new("TextLabel")
		Label.BorderSizePixel = 0
		Label.TextSize = 20
		Label.TextColor3 = Color3.new(0.243137, 0.243137, 0.243137)
		Label.AnchorPoint = Vector2.new(0.5,0.5)
		Label.Size = UDim2.new(1,0,1,0)
		Label.Position = UDim2.new(0.5,0,0.5,0)
		Label.SizeConstraint = Enum.SizeConstraint.RelativeYY
		Label.Parent = widget
		Label.Text = "Studio Date: Year: "..os.date("%Y")..", Weekday: "..os.date("%A")..", Month: "..os.date("%B")..", Date and time: "..os.date("%c")..", Timezone: "..os.date("%Z")
		Label.TextScaled = true
		opened = true
		widget.Enabled = true
	end
end)
1 Like

atleast make it a widget with a guy showing the time. dont force us to clog our outputs

Made with the help of @EmbatTheHybrid

So what’s the purpose of the plugin? To tell the date?

Print os.date functions in a widget

That was not what I was saying in your original scripting support post, create and initalize the properties of the widget and the label outside of the click event since this would make multiple textlabels and prevent having to change the properties of something for no reason, the click event should only be responsible with showing the date and possibly also toggling the widget though I don’t think that’s needed