As you may have already realized, Notepad is a notepad for Roblox Studio where you can take notes about your experience or something else about development.
Why should I install the plugin?
There is no need to open the built-in Notepad app on your computer, just hit the “Open Notepad” button in the plugin section of Roblox Studio.
Special thanks to @HugeCoolboy2007 for helping me with text automatic saving
Commands:
tRed = red textcolor
tBlue = Blue textcolor
tYellow = yellow textcolor
tGreen = green textcolor
tPurple = purple textcolor
bRed, bBlue, bYellow, bGreen, bPurple = change background color to red, blue, yellow, green or purple color.
Note: To execute these commands delete the text on the textbox and just write the command and then press enter.
I made a few modifications to your plugin’s source code:
local toolbar = plugin:CreateToolbar("Notepad")
local button = toolbar:CreateButton("Open Notepad", "Notepad", "rbxassetid://10886215059")
button.ClickableWhenViewportHidden = true
local widgetInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, false, 200, 300, 150, 150)
local widget = plugin:CreateDockWidgetPluginGui("Notepad", widgetInfo)
widget.Name = "Notepad" -- Set the widget's name to 'Notepad' for easy identification in the PluginGuiService
widget.Title = "Notepad"
local saveSettingKey = "notepad_save"
-- Create the box by default, you don't have to wait for the widget to be clicked
local Box = Instance.new("TextBox")
Box.BorderSizePixel = 0
Box.TextSize = 20
Box.TextColor3 = Color3.new(0.243137, 0.243137, 0.243137)
Box.AnchorPoint = Vector2.new(0.5, 0.5)
Box.Size = UDim2.new(1, 0, 1, 0)
Box.Position = UDim2.new(0.5, 0, 0.5, 0)
Box.SizeConstraint = Enum.SizeConstraint.RelativeYY
Box.ClearTextOnFocus = false -- So that user progress isn't erased when they click on the widget (textbox) again
Box.TextScaled = true
Box.TextXAlignment = Enum.TextXAlignment.Left
Box.TextYAlignment = Enum.TextYAlignment.Top
Box.Text = plugin:GetSetting(saveSettingKey) or "" -- Load the setting key or blank text
Box.Parent = widget
local function savecontent()
plugin:SetSetting(saveSettingKey, Box.Text) -- Save the box's text
end
button.Click:Connect(function()
-- No need for a variable, just set the Enabled state to opposite of its current state
widget.Enabled = not widget.Enabled
savecontent()
end)
widget:BindToClose(function()
-- Disable widget when it's closed
widget.Enabled = false
savecontent()
end)
Press Win+R and then type in “notepad”. When you’re done, press CTRL+S and then type a name, then press enter. Optionally press Alt+F4 after saving (Or alt then x) to close the window.