[Q] Executing a script from pastebin

Hello everyone! This is my first post on the DevForums! :smile:

What I’m trying to achieve is to manage to execute a script from a pastebin link. This is what I’ve tried so far:

local u = "https://pastebin.com/raw/PC4jTWrY"
local http = game:GetService('HttpService')
local script = http:GetAsync(u, true)

I’ve tried that, and it just comes with |HTTP 404 (Not Found).

I’m sure the pastebin is up, I’ve set it as public too.

Any help would be appreciated! :smiley:

1 Like

I can’t access the pastebin link so it’s certainly not public

I’ve just checked myself, and it shows me that it’s public, I’ve entered it through incognito, and a different device. What did it show you when you entered it? :thinking:

I think the problem here is that there is a check mark that says to make it public and you probably didnt click it, also did you make sure you put the right link?

1 Like

Oh my bad… The C was supposed to be uppercase. Thanks for helping though! :smile:

I’ve just checked, it seems to be printing the actual link rather then the content…

You can use the loadstring module and use its params and execute it if that’s what you want.

1 Like

I don’t know how to do that, sorry. Could you leave a small example? I’m new to scripting (I’m not asking for the exact script, but something along the lines)

Sure thing!

It goes something like this

local module = require(5689116012)
module(script)() -- this runs your script and script is the pastebin raw data
2 Likes

Where would you put the link though? Like would it be something like

local module = {}

local function link()

end

return module

What would be in the link function?

Well the module is the loadstring module

but you wouldnt need to make it because its public so you wouldnt have to do it like that

Maybe elaborate more?

1 Like

I guess I’ll just leave it here, and try look on Google, lol. I’ll probably find a way somehow. Thanks for the help though! :smile:

1 Like