Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How do games like void script builder create scripts from pastebin links? [closed]

Asked by 6 years ago

How do I get text from pastebin and automatically put it in a script. I think its httpservice but im retarded so please help. Thanks

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Amiaa16 3227 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

To run a server script from a pastebin url, you can use HttpService:GetAsync() and loadstring()

local url = "http://pastebin.com/raw/blabla"
local content = game:GetService("HttpService"):GetAsync(url, true)
local f,e = loadstring(content)
if f and not e then
    spawn(f)
else
    warn("Syntax error:",e)
end

However, in order to run a custom LocalScript at runtime, you can't use loadstring()

What Void SB does is they made an API which uses an alt account on roblox and makes it upload the LocalScript with the specified source as a model, which is then loaded via require() (or InsertService:LoadAssetVersion(), not sure, would have to ask tusk) and ran on the player.

0
Ok thx andrewcooke582 -52 — 6y
Ad