Skip to main content

Unsafe

Unsafe environments are those where the full functionality of the scripting API is available, including unrestricted access to all libraries, such as java

warning

In unsafe environments, some libraries are required to be defined with require(..)

Load scripts with an unsafe env.

Scripts can be loaded depending on wherever it's safe or unrestricted, to load script in unsafe environment you need to run .script load <scriptname> true in the chat and it is the same for reloading

scriptunsafeloading.png

Requiring unsafe

If your script your making requires being on an unsafe environment you should add @unsafe true in the metadata of the file

pluto
--[[
@unsafe true
]]

Example

unsafe-example.pluto
pluto
local http = require "http"
local json = require "json"
client.run_thread(function ()
local body, status_code, headers, status_text = http.request("https://api.kanye.rest/")
print(json.decode(body).quote)
end)