How to make a client side executor?

Hi!I’m making a game to learn how to bypass different types of noclips.I put some walls and add different noclip bypasser I wrote into them.I also tried to make an executor to make player run that command from client but the code I wrote didn’t work.Can you please help me?Execute script is in a GUI button.Code:

local Code = script.Parent.Parent.TextBox.Text
local Button = script.Parent

Button.MouseButton1Click:Connect(function()
	loadstring(Code)
end)

add an extra parenthesis to the loadstring().

loadstring(Code)()

loadstring does not work in clients and there are so many things wrong with this code.

local Code = script.Parent.Parent.TextBox.Text -- This will get the code before pressing the button.
local Button = script.Parent

Button.MouseButton1Click:Connect(function()
	loadstring(Code) -- This will never work as loadstring returns a function.
end)

Actually working code:

Client Code:

local Code = script.Parent.Parent.TextBox
local Button = script.Parent
local RemoteEvent = game.ReplicatedStorage.RunCode

Button.MouseButton1Click:Connect(function()
	RemoteEvent:FireServer(Code.Text)
end)

Server Code:

local RemoteEvent = game.ReplicatedStorage.RunCode
RemoteEvent.OnServerEvent:Connect(function(player,code)
	loadstring(code)()
end)