Code Executer Help (Not For Virus)

I want to fire code in a client

I do not know how to fire code in a client without a virus module.

I have tried devforum.roblox.com and youtube.com

I just need help with making code fire kinda like using loadstring() but in the client. (Sorry for not much detail)

elseif LocalScriptCode.Text ~= "" then
	--// I do not know what to add here	
end
1 Like

So you’re trying to fire code, as in run code on the server from the client? I’m a bit confused.

1 Like

I already did server now I want it to fire from the client to act like localscript

1 Like

I am trying to make a serverscript and localscript code executer but I do not know how to fire code in a client with no events since loadstring() is not valid for localscript

1 Like
--localscript
elseif LocalScriptCode.Text ~= "" then
	--// I do not know what to add here	
end
--this may help
1 Like

A localscript runs on the client. So, are you asking how to run code to be ran on all the clients (AKA in a localscript)?

1 Like

You can’t use loadstring() in ClientScripts. There is no other possible way to run lua code from a string.

Also, instead of constantly replying to your own post, you should edit it instead. That way it doesn’t spam the category.

1 Like

Yes I am I am trying to make it run on the client not server

I do that to see the views sorry :grinning_face_with_smiling_eyes:

1 Like

Actually, there are many alternatives to loadstring. It’s how Adonis and other admin systems allow users to run code, even when loadstring is disabled.

1 Like

What about the modules? I do not know safe ones though so the Wrappers

1 Like

I just need to know how that is it becuase I tried and I couldnt figure it out :frowning:

You will need to convert the string into bytecode, which can be run by an interpreter like Rerubi or FiOne. If you want a simplified version, just use something like this.

Here’s a function that uses the module linked above:

local loadstringModule = require(script.Loadstring)

function customLoadstring(code, ...)
    local result, data = loadstringModule(code)
    if result then
        result(...)
    end
end
1 Like

I do not use github though and that link one seems sus

@OptimisticSide :grinning_face_with_smiling_eyes: Incase you never got my msg

1 Like

In that case, I’m not sure what you should do. It might help to refer to this DevForum article explaining this: How does the :s command in Adonis work?

IS the link one a virus though?

None of the links that I have sent are a virus.

1 Like

Would i require it becuase I do not know any of the functions in it :frowning:

And it will not let me call require in a localscript