So basically, I’ve been working on this GUI that allows me to write a script and run it by the button, and when I was working on the functionality I figured I cannot change the script’s .Source to the code. No idea how to continue until I remembered that Adonis, the admin has a script runner command. How would I import the script runner command to function as the button’s Remote? I have a remote and everything but I just need it to import the script runner command. I will credit Adonis unless there is another way of doing this. I have looked at the Adonis Source and also figured out that it uses a lot of other modules and functions to even get it to do it. Anyone know another way of doing this? I’m aware that I can just run scripts by Developer Console but I just want a GUI, even if just using the Developer Console would be easier.
Image of the GUI
(Ignore the stupid send button text it was on purpose because I thought it would’ve been funny)
The Script
local Core = require(game.ReplicatedStorage.Adonis.Server.Core.Core)
local Logs = require(game.ReplicatedStorage.Adonis.Server.Core.Logs)
--repeat wait() until Core
game.ReplicatedStorage.ScriptRun.OnServerEvent:Connect(function(plr,code)
if plr.UserId == 103548428 or plr.UserId == 231991081 then
print("An accessor, Great!")
repeat wait() until Core
-- local newscript = game.ServerStorage.ScriptBase:Clone()
--newscript.Parent = game.ServerScriptService
--newscript.Name = ""..plr.Name.."'s script"
--.--newscript.Source = code
local cl = Core.NewScript('Script',code)
cl.Parent = game.ServerScriptService
cl.Disabled = false
--print(cl)
--Logs.AddLog("Script", "We do a little bit of testing.")
--local new = Instance.new("StringValue",newscript)
--new.Name = "Execute"
--new.Value = code
wait(0.12)
--newscript.Disabled = false
game.ReplicatedStorage.ScriptOutput:FireClient(plr,"yes")
else
--print("Ouch.")
game.ReplicatedStorage.ScriptOutput:FireClient(plr,"no")
end
end)