Thanks for the suggestion! I just finished adding it to the plugin and updating it. The only thing is that you need to go to your files and add a list
setting into your settings.json
file.
Your settings.json
file path should look something like this:
C:\Users\****\AppData\Local\Roblox\{YOUR_USER_ID}\InstalledPlugins\{PLUGIN_ID}\settings.json
The plugin ID is 13110608582
.
Inside the settings file, it probably looks something like this.
{ "ViewSelector_PositionY":0.010544806975006716307, "ViewSelector_Active":false, "Toolbox_SelectedCategoryName":"FreeMeshes", "PlayerEmulator_CountryRegionSetting":"PH", "ACE_SnapMode":"Keyframes", "Toolbox_SelectedSearchTerm":"bonesaw", "Toolbox_SelectedSortIndex":1, "ViewSelector_PositionX":0.9818818063446970168, "ACE_ShowAsSeconds":true, "userRequestedRenameDialogNeverShow":true, "ACE_RotationType":"EulerAngles", "ACE_EulerAnglesOrder":"XYZ", "CoreDraggersSummonHintHidden":true, "PlayerEmulator_PluginWidgetState":false, "breakpointsWindowConfigs":{ "ColumnFilter":[ ], "ColumnSize":[ 0.28571429848670959473,0.57142859697341918945,0.14285714924335479736 ] }, "callstackWindowConfigs":{ "ColumnFilter":[ "FrameColumn","SourceColumn","FunctionColumn","LineColumn" ], "ColumnSize":[ 0.125,0.125,0.375,0.25,0.125 ] }, "watchWindowConfigs":{ "Tab":"Watches", "ScopeFilter":[ "Local","Upvalue","Global" ], "WatchVariables":[ "part:GetAttribute('Player')" ], "ColumnSizeVariables":[ 0.25,0.25,0.25,0.25 ], "ColumnSizeMyWatches":[ 0.3333333432674407959,0.3333333432674407959,0.3333333432674407959 ] }, "PlayerEmulator_IsEnabled":false, "hello world":"print('Hello, World!')", "basic datastore script":"local DS = game:GetService('DataStoreService')\nlocal HS = game:GetService('HttpService')\n\nlocal DataStore = DS:GetDataStore('PlayerStats')\n\nlocal Leaderstats:{{ Name:string, Type:string, InitialValue:any }} = {\n\t{ Name = 'Money', Type = 'IntValue', InitialValue = 125 };\n\t{ Name = 'Level', Type = 'IntValue', InitialValue = 0 };\n}\n\nfunction playerAdded(player:Player)\n\tlocal data:string?\n\t\n\tlocal success, err = pcall(function()\n\t\tdata = DataStore:GetAsync(player.UserId)\n\tend)\n\t\n\tlocal folder = Instance.new('Folder')\n\tfolder.Name = 'leaderstats'\n\tfolder.Parent = player\n\t\n\tfor i, v in Leaderstats do\n\t\tlocal objectValue:ValueBase = Instance.new(v.Type)\n\t\tobjectValue.Value = v.InitialValue\n\t\tobjectValue.Name = v.Name\n\t\tobjectValue.Parent = folder\n\tend\n\t\n\tif success then\n\t\tlocal decodedData:{ [string]: any } = HS:JSONDecode(data)\n\t\t\n\t\tfor name, value in decodedData do\n\t\t\tif folder:FindFirstChild(name) then\n\t\t\t\tfolder[name].Value = value\n\t\t\tend\n\t\tend\n\telse\n\t\tplayer:Kick('Failed to load data for key {player.UserId}, please rejoin.')\n\tend\nend\n\nfunction playerRemoving(player:Player)\n\tlocal folder = player:FindFirstChild('leaderstats')\n\t\n\tlocal dataToSave = { }\n\t\n\tfor i, v:ValueBase in folder:GetChildren() do\n\t\tdataToSave[v.Name] = v.Value\n\tend\n\t\n\tlocal encodedData = HS:JSONEncode(dataToSave)\n\t\n\tlocal success, err = pcall(function()\n\t\tDataStore:SetAsync(player.UserId, encodedData)\n\tend)\n\t\n\tif success then\n\t\tprint('Successfully saved data for player {player.Name}!')\n\telse\n\t\twarn('Could not successfully save data for player {player.Name}! Error: {err}')\n\tend\nend\n\ngame.Players.PlayerAdded:Connect(playerAdded)\ngame.Players.PlayerRemoving:Connect(playerRemoving)", "SaveData":"{\"enabled\":false,\"sources\":{\"LocalScript\":\"\",\"Script\":\"aaa\",\"ModuleScript\":\"local module = { }<br><br>function module.test(parameters)<br>\\t<br>end<br><br>return module\"}}", "scripting tools plugin":"assert(plugin, 'This script is for a plugin, not for a game!')\n\nlocal toolbar\n\nif game.CoreGui:FindFirstChild('ScriptingToolsTB') and game.CoreGui.ScriptingToolsTB.Value then\n\ttoolbar = game.CoreGui.ScriptingToolsTB.Value\nelse\n\tif game.CoreGui:FindFirstChild('ScriptingToolsTB') then game.CoreGui.ScriptingToolsTB:Destroy() end\n\t\n\ttoolbar = plugin:CreateToolbar('Scripting Tools')\n\t\n\tlocal value = Instance.new('ObjectValue')\n\tvalue.Value = toolbar\n\tvalue.Name = 'ScriptingToolsTB'\n\tvalue.Parent = game.CoreGui\n\t\n\tlocal owner = Instance.new('ObjectValue')\n\towner.Value = plugin\n\towner.Name = 'owner'\n\towner.Parent = value\nend\n\nplugin.Unloading:Once(function()\n\tlocal value = game.CoreGui.ScriptingToolsTB\n\tlocal owner = value:FindFirstChild('owner').Value\n\t\n\tif owner.Value == plugin then\n\t\tvalue:Destroy()\n\tend\nend)\n\nlocal pButton = toolbar:CreateButton('Comment Scripter', '', 'rbxassetid://11570895459')\npButton.ClickableWhenViewportHidden = true\n\n-------------------------------------------------------- Main Code --------------------------------------------------------\n\n"}
In the middle, you will start seeing your saved lines of code with their names, like this:
"hello world":"print('Hello, World!')"
Try to find the first save you did (In my case, that’s the one above). Then, try to get all of the names of your saves and put it in a JSON table. Like this:
...or_IsEnabled":false, "list":"[ \"hello world\", \"basic datastore script\", \"scripting tools plugin\" ]", "hello wor...
Make sure to surround the JSON table with double quotes and put back slashes before each double quote inside each item in the table.
After that, you’re pretty much done! The plugin should handle the rest.