Advertisement
Potato228

Dark Dex v3

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