Jump to content

[help] pcall problems


CrosRoad95

Recommended Posts

Hello, i have this code:

local env = {outputChatBox=outputChatBox}
function run(untrusted_code)
  if untrusted_code:byte(1) == 27 then return nil, "binary bytecode prohibited" end
  local untrusted_function, message = loadstring(untrusted_code)
  if not untrusted_function then return nil, message end
  setfenv(untrusted_function, env)
  return pcall(untrusted_function)
end

and i want to stop execution like stopResource

i want too limit execution function to example 10 per second, how can i do this?

Edited by CrosRoad95
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...