Running Pastebin Script From Client Side

As the title says, I’m looking for a way to run code from Pastebin on a client-sided LocalScript. I know that one can do it via a global Script, however I wanted to know if anybody knows of a work-around or way to do it so that you can run code from Pastebin in a LocalScript as well.

1 Like

i don’t fully get it, are you trying to copy paste code online to a localscript and make it work?

I want to run a HTTP request to get code from Pastebin, although I know that this would have to be done through a server-sided Script. Therefore, I guess my question then is is there a way to send code from a server-sided Script to a client-sided LocalScript for that LocalScript to then run said code.

Yes, to get the code from Pastebin on server script, is by using HTTP Service and use GetAsync on the Pastebin URL and return the response, then with a Remote Event, fire the response to the client remote:FireClient(player,code), then receive that response on client and load the code with loadstring(reponse here).

Does loadstring() work in LocalScripts?

After i searched, i knew it doesn’t work on client, but i found this module which is suggested.
vLua: Loadstring reimplemented in Lua - (roblox.com)

Yeah, I just wanted to see if there was a different method from that module. Do you know if loadstring() works in ModuleScripts?

I think it depends where are you using it from (Server or local).