Loadstring from pastebin

How to make a Pastebin Loadstring easily?

In its simplicity, you can enable the loadstring function in ServerScriptService, and then use HTTPService to fetch the pastebin contents.

local http = game:GetService("HttpService")
local link = "link to pastebin here"

--given game.ServerScriptService.LoadStringEnabled == true

:warning: HOWEVER, you should be EXTREMELY cautious when using loadstring() in your game. Misuse of it can lead to potentially destructive consequences - hackers would be able to execute any code they want in your game, serverside. Especially in your case, where you’re using a Pastebin link fetched from the web and executing it. If the pastebin link is given or set by the player, then you should either heavily sandbox the function or just come up with a different solution if you don’t want your game destroyed.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.