I need help. I went to another post made 3 years ago and it had this important line. Let me make it my way.
script1.Source = script1code
Full code:
btn1_1.MouseButton1Click:connect(function()
local script1 = Instance.new("Script",workspace)
local script2 = Instance.new("LocalScript",script1)
script1.Name = "Shift to Run"
script2.Name = "SprintScript"
script2.Disabled = true
local script1code = [[ … ]]
local script2code = [[ … ]]
script1.Source = script1code
script2.Source = script2code
end)
I haven't tested it yet so I do not know the results but if you have any better ideas please let me know!
- CrastificeDude612 :)

7 comments
No help after 2 minutes? ;c
... 10 minutes 0_0
Well you're out of luck. Scripts cannot do this. The ServerScriptService is inaccessible by clients. Also, the parent argument to Instance.new is deprecated
I dont mean scripts in DataModel (game), I mean plugin scripts. So I don't really believe you.
Plugin scripts cannot do this. This is because a user can download a malicious plugin that sets all of the game's scripts to blank source/source that runs malicious code. Simple as that.
Okay, I see what you mean. Thanks a lot.
http://wiki.roblox.com/index.php?title=API:Class/Plugin/OpenScript