Is there a way to make script content via gui?

So I want to make a GUI (plugin) where when you click a button it writes text inside of a script.

Lemme explain.
I click the button
Button makes an Instance that is a script. (Instance.new(“Script”)
It should be in ServerScriptStorage and have code in it for leaderboard script for example

I have tried to do this

local content = --script
content.Parent = ServerScriptService

script.Parent.MouseButton1Down:Connect(function()
content.

And there I stopped cause I didn’t know what to do.

Is there any way to make this one possible?

You can’t edit the source of a script with another script, you have to create it beforehand and store it in ServerStorage, then clone it when you need it

1 Like