Colyn_

Dark Dex

Mar 27th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. if game:GetService'CoreGui':FindFirstChild'Dex' then
  2. game:GetService'CoreGui'.Dex:Destroy();
  3. end
  4.  
  5. math.randomseed(tick())
  6.  
  7. local charset = {}
  8. for i = 48, 57 do table.insert(charset, string.char(i)) end
  9. for i = 65, 90 do table.insert(charset, string.char(i)) end
  10. for i = 97, 122 do table.insert(charset, string.char(i)) end
  11. function RandomCharacters(length)
  12. if length > 0 then
  13. return RandomCharacters(length - 1) .. charset[math.random(1, #charset)]
  14. else
  15. return ""
  16. end
  17. end
  18.  
  19. local Dex = game:GetObjects("rbxassetid://3567096419")[1]
  20. syn.protect_gui(Dex)
  21. Dex.Name = RandomCharacters(math.random(5, 20))
  22. Dex.Parent = game:GetService("CoreGui")
  23.  
  24. local function Load(Obj, Url)
  25. local function GiveOwnGlobals(Func, Script)
  26. local Fenv = {}
  27. local RealFenv = {script = Script}
  28. local FenvMt = {}
  29. FenvMt.__index = function(a,b)
  30. if RealFenv[b] == nil then
  31. return getfenv()[b]
  32. else
  33. return RealFenv[b]
  34. end
  35. end
  36. FenvMt.__newindex = function(a, b, c)
  37. if RealFenv[b] == nil then
  38. getfenv()[b] = c
  39. else
  40. RealFenv[b] = c
  41. end
  42. end
  43. setmetatable(Fenv, FenvMt)
  44. setfenv(Func, Fenv)
  45. return Func
  46. end
  47.  
  48. local function LoadScripts(Script)
  49. if Script.ClassName == "Script" or Script.ClassName == "LocalScript" then
  50. spawn(function()
  51. GiveOwnGlobals(loadstring(Script.Source, "=" .. Script:GetFullName()), Script)()
  52. end)
  53. end
  54. for i,v in pairs(Script:GetChildren()) do
  55. LoadScripts(v)
  56. end
  57. end
  58.  
  59. LoadScripts(Obj)
  60. end
  61.  
  62. Load(Dex)
Add Comment
Please, Sign In to add comment