Advertisement
spidey_v6

Untitled

Nov 15th, 2020
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. local PARENT = game.CoreGui
  2. if PARENT:FindFirstChild'Dex' then
  3. PARENT.Dex:Destroy();
  4. end
  5. local Dex = game:GetObjects("rbxassetid://3567096419")[1]
  6. Dex.Name = 'Dex'
  7. Dex.Parent = PARENT
  8.  
  9. local function Load(Obj, Url)
  10. local function GiveOwnGlobals(Func, Script)
  11. local Fenv = {}
  12. local RealFenv = {script = Script}
  13. local FenvMt = {}
  14. FenvMt.__index = function(a,b)
  15. if RealFenv[b] == nil then
  16. return getfenv()[b]
  17. else
  18. return RealFenv[b]
  19. end
  20. end
  21. FenvMt.__newindex = function(a, b, c)
  22. if RealFenv[b] == nil then
  23. getfenv()[b] = c
  24. else
  25. RealFenv[b] = c
  26. end
  27. end
  28. setmetatable(Fenv, FenvMt)
  29. setfenv(Func, Fenv)
  30. return Func
  31. end
  32. local function LoadScripts(Script)
  33. if Script.ClassName == "Script" or Script.ClassName == "LocalScript" then
  34. spawn(function()
  35. GiveOwnGlobals(loadstring(Script.Source, "=" .. Script:GetFullName()), Script)()
  36. end)
  37. end
  38. for i,v in pairs(Script:GetChildren()) do
  39. LoadScripts(v)
  40. end
  41. end
  42. LoadScripts(Obj)
  43. end
  44.  
  45. Load(Dex)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement