Dark_Agent

MoreUNC-v2

Aug 10th, 2024
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 36.64 KB | Fixit | 0 0
  1. -- // MoreUNC V2.0.0, Have fun skidding devs!
  2. -- origin: https://scriptblox.com/script/Universal-Script-MoreUNC-V2-15902
  3.  
  4. local Operations = { -- Fixes executors that only use lua, not luau
  5.  Addition = {'(%w+)(%s*)%+=(%s*)(%w+)', '%1%2=%3%1%2+%3%4'}, -- v1+=v2 -> v1=v1+v2
  6.  Subtraction = {'(%w+)(%s*)%-=(%s*)(%w+)', '%1%2=%3%1%2-%3%4'}, -- v1-=v2
  7.  Multiplication = {'(%w+)(%s*)%*=(%s*)(%w+)', '%1%2=%3%1%2*%3%4'}, -- v1*=v2
  8.  Division = {'(%w+)(%s*)/=(%s*)(%w+)', '%1%2=%3%1%2/%3%4'}, -- v1/=v2
  9.  Modulus = {'(%w+)(%s*)%%=(%s*)(%w+)','%1%2=%3%1%2%%%3%4'}, -- v1%=v2
  10.  Concatenation = {'(%w+)(%s*)%.%.=(%s*)(%w+)', '%1%2=%3%1%2..%3%4'} -- v1..=v2
  11. }
  12. local forceoverride = {}
  13.  
  14. function replace(Code)
  15.  for _, t in next, Operations do
  16.   Code = string.gsub(Code, t[1], t[2])
  17.  end
  18.  return Code
  19. end
  20.  
  21. local Options = {
  22.     OverrideFunctions = false, -- If the executor Overrides already existing functions
  23.     enviroment = setmetatable({}, {__protected = 'This metatable is protected'}) -- i don't really care if you unprotect it.
  24. }
  25.  
  26. -- // Localization:
  27.  
  28. local rawget = rawget
  29. local loadstring = loadstring
  30. local oldLoadstring = loadstring
  31. local setmetatable = setmetatable
  32. local type = type
  33. local pairs = pairs
  34. local next = next
  35. local typeof = typeof
  36. local debug = debug
  37. local table = table
  38. local string = string
  39. local bit32 = bit32
  40. local require = require
  41.  
  42. local Queue = {}
  43. Queue.__index = Queue
  44. function Queue.new()
  45.     local self = setmetatable({}, Queue)
  46.     self.elements = {}
  47.     return self
  48. end
  49.  
  50. function Queue:Queue(element)
  51.     table.insert(self.elements, element)
  52. end
  53.  
  54. function Queue:Update()
  55.     if #self.elements == 0 then
  56.         return nil
  57.     end
  58.     return table.remove(self.elements, 1)
  59. end
  60.  
  61. function Queue:IsEmpty()
  62.     return #self.elements == 0
  63. end
  64. function Queue:Current()
  65.     return self.elements
  66. end
  67. local ClipboardQueue = Queue.new()
  68.  
  69. -- // Instances:
  70.  
  71. local Players = game:GetService("Players")
  72. local ScriptType = script.ClassName == 'Script' and 'Server' or script.ClassName == 'LocalScript' and 'Client' or script.ClassName == 'ModuleScript' and 'Module'
  73. local lp = ScriptType == 'Client' and Players.LocalPlayer or Players.PlayerAdded:Wait()
  74.  
  75. getgenv = getgenv or function()
  76.     return getfenv(0)
  77. end
  78.  
  79. -- // Variables
  80.  
  81. local hui = nil
  82.  
  83. local valid = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
  84.  
  85. local nilinstances, CachedInstances, DrawingCache = {Instance.new("LocalScript")}, {}, {}
  86.  
  87. local keys={[0x08]=Enum.KeyCode.Backspace,[0x09]=Enum.KeyCode.Tab,[0x0C]=Enum.KeyCode.Clear,[0x0D]=Enum.KeyCode.Return,[0x10]=Enum.KeyCode.LeftShift,[0x11]=Enum.KeyCode.LeftControl,[0x12]=Enum.KeyCode.LeftAlt,[0x13]=Enum.KeyCode.Pause,[0x14]=Enum.KeyCode.CapsLock,[0x1B]=Enum.KeyCode.Escape,[0x20]=Enum.KeyCode.Space,[0x21]=Enum.KeyCode.PageUp,[0x22]=Enum.KeyCode.PageDown,[0x23]=Enum.KeyCode.End,[0x24]=Enum.KeyCode.Home,[0x2D]=Enum.KeyCode.Insert,[0x2E]=Enum.KeyCode.Delete,[0x30]=Enum.KeyCode.Zero,[0x31]=Enum.KeyCode.One,[0x32]=Enum.KeyCode.Two,[0x33]=Enum.KeyCode.Three,[0x34]=Enum.KeyCode.Four,[0x35]=Enum.KeyCode.Five,[0x36]=Enum.KeyCode.Six,[0x37]=Enum.KeyCode.Seven,[0x38]=Enum.KeyCode.Eight,[0x39]=Enum.KeyCode.Nine,[0x41]=Enum.KeyCode.A,[0x42]=Enum.KeyCode.B,[0x43]=Enum.KeyCode.C,[0x44]=Enum.KeyCode.D,[0x45]=Enum.KeyCode.E,[0x46]=Enum.KeyCode.F,[0x47]=Enum.KeyCode.G,[0x48]=Enum.KeyCode.H,[0x49]=Enum.KeyCode.I,[0x4A]=Enum.KeyCode.J,[0x4B]=Enum.KeyCode.K,[0x4C]=Enum.KeyCode.L,[0x4D]=Enum.KeyCode.M,[0x4E]=Enum.KeyCode.N,[0x4F]=Enum.KeyCode.O,[0x50]=Enum.KeyCode.P,[0x51]=Enum.KeyCode.Q,[0x52]=Enum.KeyCode.R,[0x53]=Enum.KeyCode.S,[0x54]=Enum.KeyCode.T,[0x55]=Enum.KeyCode.U,[0x56]=Enum.KeyCode.V,[0x57]=Enum.KeyCode.W,[0x58]=Enum.KeyCode.X,[0x59]=Enum.KeyCode.Y,[0x5A]=Enum.KeyCode.Z,[0x5D]=Enum.KeyCode.Menu,[0x60]=Enum.KeyCode.KeypadZero,[0x61]=Enum.KeyCode.KeypadOne,[0x62]=Enum.KeyCode.KeypadTwo,[0x63]=Enum.KeyCode.KeypadThree,[0x64]=Enum.KeyCode.KeypadFour,[0x65]=Enum.KeyCode.KeypadFive,[0x66]=Enum.KeyCode.KeypadSix,[0x67]=Enum.KeyCode.KeypadSeven,[0x68]=Enum.KeyCode.KeypadEight,[0x69]=Enum.KeyCode.KeypadNine,[0x6A]=Enum.KeyCode.KeypadMultiply,[0x6B]=Enum.KeyCode.KeypadPlus,[0x6D]=Enum.KeyCode.KeypadMinus,[0x6E]=Enum.KeyCode.KeypadPeriod,[0x6F]=Enum.KeyCode.KeypadDivide,[0x70]=Enum.KeyCode.F1,[0x71]=Enum.KeyCode.F2,[0x72]=Enum.KeyCode.F3,[0x73]=Enum.KeyCode.F4,[0x74]=Enum.KeyCode.F5,[0x75]=Enum.KeyCode.F6,[0x76]=Enum.KeyCode.F7,[0x77]=Enum.KeyCode.F8,[0x78]=Enum.KeyCode.F9,[0x79]=Enum.KeyCode.F10,[0x7A]=Enum.KeyCode.F11,[0x7B]=Enum.KeyCode.F12,[0x90]=Enum.KeyCode.NumLock,[0x91]=Enum.KeyCode.ScrollLock,[0xBA]=Enum.KeyCode.Semicolon,[0xBB]=Enum.KeyCode.Equals,[0xBC]=Enum.KeyCode.Comma,[0xBD]=Enum.KeyCode.Minus,[0xBE]=Enum.KeyCode.Period,[0xBF]=Enum.KeyCode.Slash,[0xC0]=Enum.KeyCode.Backquote,[0xDB]=Enum.KeyCode.LeftBracket,[0xDD]=Enum.KeyCode.RightBracket,[0xDE]=Enum.KeyCode.Quote}
  88. local vim;
  89.  
  90. -- // Drawing:
  91.  
  92. local FakeFonts = setmetatable({
  93.     UI = 0,
  94.     System = 1,
  95.     Plex = 2,
  96.     Monospace = 3,
  97. }, {
  98.     __call = function(s) return s end
  99. })
  100. local Fonts = {
  101.     [0] = Enum.Font.Arial,
  102.     [1] = Enum.Font.BuilderSans,
  103.     [2] = Enum.Font.Gotham,
  104.     [3] = Enum.Font.RobotoMono
  105. }
  106.  
  107. local Base = {
  108.     Visible = false,
  109.     Color = Color3.new(0,0,0),
  110.     ClassName = nil,
  111.     Remove = function(self)
  112.         for i, v in next, DrawingCache do
  113.             if v == self then
  114.                 local a = i
  115.                 i:Destroy()
  116.                 DrawingCache[a] = nil
  117.             end
  118.         end
  119.     end
  120. }
  121. Base.Destroy = Base.Remove
  122.  
  123. local LineProps = {
  124.     From = Vector2.new(0, 0),
  125.     To = Vector2.new(0, 0),
  126.     Thickness = 0,
  127.     Transparency = 0,
  128.     Visible = false,
  129.     Color = Color3.new(0, 0, 0)
  130. }
  131.  
  132. local TextProps = {
  133.     Text = '',
  134.     Transparency = 0,
  135.     Size = 0,
  136.     Center = false,
  137.     Outline = false,
  138.     OutlineColor = Color3.new(0,0,0),
  139.     Position = Vector2.new(0,0),
  140.     Font = 3,
  141. }
  142.  
  143. -- // Drawing end
  144.  
  145. local function try(fn, ...)
  146.     return (pcall(fn, ...))
  147. end
  148.  
  149. local function newcclosure(f)
  150.     local a = coroutine.wrap(function(...)
  151.         local b = {coroutine.yield()}
  152.         while true do
  153.             b = {coroutine.yield(f(table.unpack(b)))}
  154.         end
  155.     end)
  156.     a()
  157.     return a
  158. end
  159.  
  160. local function getthreadidentity()
  161.     local securityChecks = {
  162.         {
  163.             name = "None",
  164.             number = 0,
  165.             canAccess = try(function() return game.Name end)
  166.         },
  167.         {
  168.             name = "PluginSecurity",
  169.             number = 1,
  170.             canAccess = try(function() return game:GetService("CoreGui").Name end)
  171.         },
  172.         {
  173.             name = "LocalUserSecurity",
  174.             number = 3,
  175.             canAccess = try(function() return game.DataCost end)
  176.         },
  177.         {
  178.             name = "WritePlayerSecurity",
  179.             number = 4,
  180.             canAccess = try(Instance.new, "Player")
  181.         },
  182.         {
  183.             name = "RobloxScriptSecurity",
  184.             number = 5,
  185.             canAccess = try(function() return game:GetService("CorePackages").Name end)
  186.         },
  187.         {
  188.             name = "RobloxSecurity",
  189.             number = 6,
  190.             canAccess = try(function() return Instance.new("SurfaceAppearance").TexturePack end)
  191.         },
  192.         {
  193.             name = "NotAccessibleSecurity",
  194.             number = 7,
  195.             canAccess = try(function() Instance.new("MeshPart").MeshId = "" end)
  196.         }
  197.     }
  198.     local lasti = 1
  199.     for i = 1, #securityChecks do
  200.         if securityChecks[i].canAccess then
  201.             lasti = i
  202.         else
  203.             return lasti
  204.         end
  205.     end
  206.     return lasti
  207. end
  208.  
  209. if getthreadidentity() >= 3 then
  210.     vim = Instance.new("VirtualInputManager")
  211. end
  212.  
  213. local RBXActive = true
  214.  
  215. local ClipboardUI = Instance.new("ScreenGui")
  216. local ClipboardBox = Instance.new('TextBox') -- For setclipboard
  217. ClipboardBox.Position = UDim2.new(100, 0, 100, 0) -- VERY off screen
  218. ClipboardBox.Parent = ClipboardUI
  219.  
  220. local HttpService, DrawingUI = game:GetService('HttpService'), Instance.new("ScreenGui")
  221.  
  222. -- // Libararies:
  223. local protected_guis = {}
  224.  
  225. -- // Events:
  226.  
  227. game.DescendantRemoving:Connect(function(d)
  228.     table.insert(nilinstances, d)
  229. end)
  230. game:FindFirstChildOfClass('UserInputService').WindowFocused:Connect(function()
  231.     RBXActive = true
  232. end)
  233. game:FindFirstChildOfClass('UserInputService').WindowFocusReleased:Connect(function()
  234.     RBXActive = false
  235. end)
  236.  
  237.  
  238. function shallowequals(t1, t2)
  239.     if t1 == nil or t2 == nil then
  240.         return false
  241.     end
  242.  
  243.     if type(t1) ~= 'table' or type(t2) ~= 'table' then
  244.         return false
  245.     end
  246.  
  247.     for key, value in next, t1 do
  248.         if t2[key] ~= value then
  249.             return false
  250.         end
  251.     end
  252.  
  253.     for key, value in next, t2 do
  254.         if t1[key] ~= value then
  255.             return false
  256.         end
  257.     end
  258.  
  259.     return true
  260. end
  261.  
  262. function SetAliases(func, aliases)
  263.     for _, Name in next, aliases do
  264.         Options.enviroment[Name] = getgenv()[func] or Options.enviroment[func]
  265.     end
  266. end
  267.  
  268. function AddElement(name, val, aliases, forcebypass)
  269.     if forcebypass == true then table.insert(forceoverride, name) end
  270.     Options.enviroment[name] = val
  271.     if typeof(aliases) == 'table' then
  272.         SetAliases(name, aliases)
  273.     end
  274.     return val
  275. end
  276.  
  277. function AddEnviroment()
  278.     local env = (getgenv and getgenv()) or getfenv(0)
  279.     for Name, Value in next, Options.enviroment do
  280.         if Options.OverrideFunctions or not env[Name] or table.find(forceoverride, Name) then
  281.             print("✅ Added",Name)
  282.             env[Name] = Value
  283.         elseif env[Name] and not table.find(forceoverride, Name) and not Options.OverrideFunctions then
  284.             print("❌",Name,'already exists.')
  285.         end
  286.     end
  287. end
  288.  
  289. local Base64 = AddElement('base64', {
  290.     encode = function(data)
  291.         local letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  292.         return ((data:gsub('.', function(x)
  293.             local r,b='',x:byte()
  294.             for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
  295.             return r;
  296.         end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
  297.             if (#x < 6) then return '' end
  298.             local c=0
  299.             for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
  300.             return letters:sub(c+1,c+1)
  301.         end)..({ '', '==', '=' })[#data%3+1])
  302.     end,
  303.     decode = function(data)
  304.         local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  305.         data = string.gsub(data, '[^'..b..'=]', '')
  306.         return (data:gsub('.', function(x)
  307.             if x == '=' then return '' end
  308.             local r, f = '', (b:find(x) - 1)
  309.             for i = 6, 1, -1 do
  310.                 r = r .. (f % 2^i - f % 2^(i - 1) > 0 and '1' or '0')
  311.             end
  312.             return r;
  313.         end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
  314.             if #x ~= 8 then return '' end
  315.             local c = 0
  316.             for i = 1, 8 do
  317.                 c = c + (x:sub(i, i) == '1' and 2^(8 - i) or 0)
  318.             end
  319.             return string.char(c)
  320.         end))
  321.     end
  322. })
  323. AddElement('base64encode', Base64.encode, {'base64_encode'})
  324. AddElement('base64decode', Base64.decode, {'base64_decode'})
  325. AddElement('debug', {
  326.     getinfo = function(f)
  327.         assert(type(f)=='number' or type(f) == 'function', 'invalid argument #1 to \'getinfo\', number or function expected, got ' .. tostring(typeof(f)))
  328.         local ParamCount, IsVararg = debug.info(f, 'a')
  329.         local n = debug.info(f, 'n') ~= '' and debug.info(f, 'n') or nil
  330.         local source = debug.info(f, 's')
  331.         return{
  332.             numparams = ParamCount,
  333.             is_vararg = IsVararg and 1 or 0,
  334.             name = n,
  335.             currentline = debug.info(f, 'l'),
  336.             source = source,
  337.             short_src = source:sub(1, 60),
  338.             what = source == '[C]' and 'C' or 'Lua',
  339.             func = f,
  340.             nups = 0
  341.         }
  342.     end
  343. })
  344.  
  345. -- // Sandboxing Game:
  346.  
  347. -- // HTTP Requests Support
  348.  
  349. function rqst(Options)
  350.     assert(type(Options) == 'table', 'Argument #1 to \'request\' must be a table, got ' .. typeof(Options))
  351.     if typeof(script) == 'Instance' and script.ClassName == 'Script' then
  352.         return HttpService:RequestAsync(Options)
  353.     end
  354.     local Timeout, Done, Time = 5, false, 0
  355.     local Return = {
  356.         Success = false,
  357.         StatusCode = 408,
  358.         StatusMessage = 'Request Timeout',
  359.         Headers = {},
  360.         Body = ''
  361.     }
  362.     local function Callback(Success, Response)
  363.         Done = true
  364.         Return.Success = Success
  365.         Return.StatusCode = Response.StatusCode
  366.         Return.StatusMessage = Response.StatusMessage
  367.         Return.Headers = Response.Headers
  368.         Return.Body = Response.Body
  369.     end
  370.     HttpService:RequestInternal(Options):Start(Callback)
  371.     while not Done and Time < Timeout do -- probably a bad approach?
  372.         Time = Time + .1
  373.         task.wait(.1)
  374.     end
  375.     return Return
  376. end
  377.  
  378. AddElement('http', {
  379.     request = rqst
  380. })
  381. local s, e = pcall(function()
  382.     return game.HttpGet
  383. end)
  384. local _game = game
  385. AddElement('request', rqst, {'http_request', 'syn_backup.request', 'syn.request'})
  386. if not s then
  387. AddElement('game', setmetatable({}, {
  388.     __index = function(self, key)
  389.         if key == 'HttpGet' then
  390.             return function(_, Url)
  391.                 return rqst({Url = Url, Method = "GET"}).Body
  392.             end
  393.         elseif key == 'HttpPost' then
  394.             return function(Url, Data, contentType)
  395.                 local Args = {Url = Url, Method = "POST", Body = Data}
  396.                 if contentType then
  397.                     Args.Headers = {['Content-Type'] = contentType}
  398.                 end
  399.                 return rqst(Args).Body
  400.             end
  401.         else
  402.             local k = _game[key]
  403.             if type(k) == 'function' then
  404.                 return function(_, ...)
  405.                     local args = {...}
  406.                     if (key == 'GetService' or key == 'FindFirstChildOfClass') and args[1] == 'Players' then
  407.                         return setmetatable({},
  408.                         {
  409.                             __index = function(_, t)
  410.                                 if t == 'LocalPlayer' then return lp end
  411.                                 local p = Players[t]
  412.                                 if type(p) == 'function' then
  413.                                     return function(_, ...)
  414.                                         return Players[t](Players, ...)
  415.                                     end
  416.                                 else
  417.                                     return p
  418.                                 end
  419.                             end,
  420.                         })
  421.                     end
  422.                     return k(_game, ...)
  423.                 end
  424.             else
  425.                 return k
  426.             end
  427.         end
  428.     end,
  429.     __tostring = function() return tostring(game) end
  430. }))
  431. end
  432. if ScriptType == 'Server' then
  433.     game.Players = game:GetService("Players") -- adds localplayer n shi
  434. end
  435.  
  436. local LoadSuccess, HashCode = pcall((not s and Options.enviroment.game.HttpGet or game.HttpGet), (not s and _game or game), "https://pastebin.com/raw/Am65KFRH", true)
  437. local LoadSuccessV2, rconsolecode = pcall((not s and Options.enviroment.game.HttpGet or game.HttpGet), (not s and _game or game), "https://pastebin.com/raw/haqApsFE", true)
  438. local rconsole
  439.  
  440. if not LoadSuccess then
  441.     Hash = {}
  442. else
  443.     Hash = loadstring(HashCode)()
  444. end
  445. if LoadSuccessV2 then
  446.     rconsole = loadstring(rconsolecode)()
  447. else
  448.     warn("Hey! rconsole did not successfully load, This could be due to an HTTP error, Message:",rconsolecode)
  449. end
  450.  
  451. local HashLib = setmetatable({}, {
  452.     __metatable = 'HashLib // Protected',
  453.     __index = function(self, key) -- Make it work for both _ and -
  454.         local k1 = key:gsub('_', '-')
  455.         local k2 = key:gsub('%-', '_')
  456.         local m1, m2 = Hash[k1], Hash[k2]
  457.         if m1 then return m1 end
  458.         if m2 then return m2 end
  459.         return rawget(self, key)
  460.     end
  461. })
  462.  
  463. -- // crypt library
  464.  
  465. AddElement('crypt', {
  466.     hex = {
  467.         encode = function(data)
  468.             assert(type(data)=='string', 'argument #1 to \'hex.encode\' must be of type string, Received ' .. typeof(data))
  469.             local hex = ''
  470.             for i = 1, #data do
  471.                 hex = hex .. string.format("%02x", string.byte(data, i))
  472.             end
  473.             return hex
  474.         end,
  475.         decode = function(data)
  476.             assert(type(data)=='string', 'argument #1 to \'hex.decode\' must be of type string, Received ' .. typeof(data))
  477.             local text = ""
  478.             for i = 1, #data, 2 do
  479.                 local byte_str = string.sub(data, i, i+1)
  480.                 local byte = tonumber(byte_str, 16)
  481.                 text = text .. string.char(byte)
  482.             end
  483.             return text
  484.         end
  485.     },
  486.     custom = {
  487.         hash = function(data, alg)
  488.             local v1 = HashLib[alg]
  489.             local v2 = HashLib[data]
  490.             if not v1 and not v2 then
  491.                 error(string.format("No algorithm found with name '%s' or '%s'", alg, data))
  492.             end
  493.             if v1 then
  494.                 return v1(data)
  495.             elseif v2 then
  496.                 return v2(alg)
  497.             end
  498.         end
  499.     },
  500.     hash = function(data, alg)
  501.         local v1 = HashLib[alg]
  502.         local v2 = HashLib[data]
  503.         if not v1 and not v2 then
  504.             error(string.format("No algorithm found with name '%s' or '%s'", alg, data))
  505.         end
  506.         if v1 then
  507.             return v1(data)
  508.         elseif v2 then
  509.             return v2(alg)
  510.         end
  511.     end,
  512.     url = {
  513.         encode = function(data)
  514.             return game:GetService("HttpService"):UrlEncode(data)
  515.         end,
  516.         decode = function(data)
  517.             -- replace + with space
  518.             data = string.gsub(data, '%+', ' ')
  519.             -- replace hexadecimals with the character for them
  520.             data = string.gsub(data, "%%(%x%x)", function(hex)
  521.                 return string.char(tonumber(hex, 16))
  522.             end)
  523.             data = string.gsub(data, "\r\n", "\n") -- obvious
  524.             return data
  525.         end
  526.     },
  527.     base64 = Base64,
  528.     base64_encode = Base64.encode,
  529.     base64_decode = Base64.decode,
  530.     base64encode = Base64.encode,
  531.     base64decode = Base64.decode,
  532.     random = function(len)
  533.         assert(type(len) == 'number', 'Argument #1 to \'random\' must be a number, got ' .. typeof(len))
  534.         assert(len > 0 and len < 1025, 'Argument #1 to \'random\' must be over 0 and must not exceed 1024.')
  535.         local a = {}
  536.         for _=1,len do local r=math.random(1, #valid)table.insert(a,valid:sub(r,r))end;return table.concat(a)
  537.     end,
  538.     generatekey = function(len)
  539.         len = len or 32
  540.         local key = ''
  541.         local Valid = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  542.         for _ = 1, len do local n = math.random(1, #Valid) key = key .. string.sub(Valid, n, n) end
  543.         return Base64.encode(key)
  544.     end,
  545.     generatebytes = function(len)
  546.         assert(type(len) == 'number', 'Argument #1 to \'generatebytes\' must be a number, got ' .. typeof(len))
  547.         local key = ''
  548.         local Valid = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  549.         for _ = 1, len do local n = math.random(1, #Valid) key = key .. string.sub(Valid, n, n) end
  550.         return Base64.encode(key)
  551.     end
  552. }, {'crypto', 'syn.crypto', 'syn_backup.crypto'})
  553.  
  554. -- // syn Library
  555.  
  556. AddElement('syn', {
  557.     is_beta = function() return true end, -- ???? i do not know why this is needed
  558.     protect_gui = function(gui) -- Unofficial protect
  559.         protected_guis[gui] = { Parent = gui.Parent, Name = gui.Name }
  560.         gui.Parent = gethui()
  561.         gui.Name = randomstring(math.random(8, 16))
  562.     end,
  563.     unprotect_gui = function(gui)
  564.         local Gui = rawget(protected_guis, gui)
  565.         if not Gui then return error(`GUI {gui.Name} does not exist in the protected guis list.`, 1) end
  566.         gui.Name = Gui.Name
  567.         gui.Parent = Gui.Parent
  568.         protected_guis[gui] = nil
  569.     end,
  570.     request = rqst,
  571.     get_thread_identity = getthreadidentity,
  572.     crypto = Options.enviroment.crypt
  573. }, {'syn_backup'})
  574.  
  575. -- // cache Library
  576.  
  577. AddElement('cache', {
  578.     iscached = function(d)
  579.         return CachedInstances[d] ~= 'invalid'
  580.     end,
  581.     invalidate = function(d)
  582.         CachedInstances[d] = 'invalid'
  583.         d.Parent = nil
  584.     end,
  585.     replace = function(a, b)
  586.         CachedInstances[a] = b
  587.         b.Name = a.Name
  588.         b.Parent = a.Parent
  589.         a.Parent = nil
  590.     end
  591. })
  592. -- // Drawing Library
  593.  
  594. AddElement('Drawing', {
  595.     Fonts = FakeFonts,
  596.     new = function(Type)
  597.         local function SetBase(tbl)
  598.             local baseProps = {
  599.                 Visible = false,
  600.                 Color = Color3.new(0,0,0),
  601.                 ClassName = nil,
  602.                 ZIndex = 1,
  603.                 Remove = function(self)
  604.                     for i, v in next, DrawingCache do
  605.                         if v == self then
  606.                             local a = i
  607.                             i:Destroy()
  608.                             DrawingCache[a] = nil
  609.                         end
  610.                     end
  611.                 end
  612.             }
  613.             baseProps.Destroy = baseProps.Remove
  614.             for i, v in next, baseProps do
  615.                 rawset(tbl.__index, i, v)
  616.             end
  617.         end
  618.         if Type == 'Line' then
  619.             local a = Instance.new("Frame", DrawingUI)
  620.             a.Visible = false
  621.             a.Size = UDim2.new(0, 0, 0, 0)
  622.             a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  623.             a.BackgroundTransparency = 1
  624.             a.BorderSizePixel = 0
  625.  
  626.             local meta = {}
  627.             meta.ClassName = Type
  628.             meta.__index = {
  629.                 Thickness = 1,
  630.                 From = Vector2.new(0, 0),
  631.                 To = Vector2.new(0, 0),
  632.                 Transparency = 0,
  633.                 updateLine = function(self)
  634.                     if not a then return end
  635.                     local from = self.From
  636.                     local to = self.To
  637.                     local distance = (to - from).Magnitude
  638.                     local angle = math.deg(math.atan2(to.Y - from.Y, to.X - from.X))
  639.  
  640.                     a.Size = UDim2.new(0, distance, 0, self.Thickness)
  641.                     a.Position = UDim2.new(0, from.X, 0, from.Y)
  642.                     a.Rotation = angle
  643.                     a.BackgroundTransparency = 1 - self.Transparency
  644.                     a.BackgroundColor3 = self.Color
  645.                     a.Visible = self.Visible
  646.                     a.ZIndex = self.ZIndex
  647.                 end
  648.             }
  649.             SetBase(meta)
  650.             meta.__newindex = function(self, key, value)
  651.                 if not self then return end
  652.                 if typeof(meta.__index[key]) == typeof(value) then
  653.                     rawset(self, key, value)
  654.                     self:updateLine()
  655.                 end
  656.             end
  657.             meta.__metatable = 'This metatable is protected.'
  658.             local meta1 = setmetatable({}, meta)
  659.             DrawingCache[a] = meta1
  660.             return meta1
  661.         elseif Type == 'Square' then
  662.             local a = Instance.new("Frame", DrawingUI)
  663.             a.Visible = false
  664.             a.Size = UDim2.new(0, 0, 0, 0)
  665.             a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  666.             a.BackgroundTransparency = 1
  667.             a.BorderSizePixel = 0
  668.             local b = Instance.new("UIStroke", a)
  669.             b.Color = Color3.fromRGB(255, 255, 255)
  670.             b.Enabled = true
  671.  
  672.             local meta = {}
  673.             meta.ClassName = Type
  674.             meta.__index = {
  675.                 Size = Vector2.new(0,0),
  676.                 Position = Vector2.new(0, 0),
  677.                 Filled = false,
  678.                 updateSquare = function(self)
  679.                     if not a then return end
  680.                     a.Size = UDim2.new(0, self.Size.X, 0, self.Size.Y)
  681.                     a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  682.                     b.Enabled = self.Filled
  683.                     b.Color = self.Color
  684.                     a.BackgroundColor3 = self.Color
  685.                     a.ZIndex = self.ZIndex
  686.                 end
  687.             }
  688.             SetBase(meta)
  689.  
  690.             meta.__newindex = function(self, key, value)
  691.                 if not self then return end
  692.                 if typeof(self[key]) == typeof(value) then
  693.                     rawset(self, key, value)
  694.                     self:updateSquare()
  695.                 end
  696.             end
  697.             local meta1 = setmetatable({}, meta)
  698.             DrawingCache[a] = meta1
  699.             return meta1
  700.         elseif Type == 'Circle' then
  701.             local a = Instance.new("Frame", DrawingUI)
  702.             a.Visible = false
  703.             a.Size = UDim2.new(0, 0, 0, 0)
  704.             a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  705.             a.BackgroundTransparency = 1
  706.             a.BorderSizePixel = 0
  707.             local b = Instance.new("UIStroke", a)
  708.             b.Color = Color3.fromRGB(255, 255, 255)
  709.             b.Enabled = false
  710.             b.Thickness = 1
  711.             local c = Instance.new("UICorner", a)
  712.             c.CornerRadius = UDim.new(1, 0)
  713.  
  714.             local meta = {}
  715.             meta.ClassName = Type
  716.             meta.__index = {
  717.                 Thickness = 1,
  718.                 Filled = false,
  719.                 NumSides = 0,
  720.                 Radius = 1,
  721.                 Position = Vector2.new(0, 0),
  722.                 Transparency = 0,
  723.                 updateCircle = function(self)
  724.                     if not b or not a then return end
  725.                     a.Visible = self.Visible
  726.                     a.BackgroundTransparency = self.Transparency - 1
  727.                     a.Size = UDim2.new(0, self.Radius, 0, self.Radius)
  728.                     a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  729.                     b.Enabled = not self
  730.                     b.Color = self.Color
  731.                     a.ZIndex = self.ZIndex
  732.                 end
  733.             }
  734.  
  735.             SetBase(meta)
  736.  
  737.             meta.__newindex = function(self, key, value)
  738.                 if not self then return end
  739.                 if typeof(self[key]) == typeof(value) then
  740.                     rawset(self, key, value)
  741.                     self:updateCircle()
  742.                 end
  743.             end
  744.  
  745.             local meta1 = setmetatable({}, meta)
  746.             DrawingCache[a] = meta1
  747.             return meta1
  748.         elseif Type == 'Text' then
  749.             local a = Instance.new("TextLabel", DrawingUI)
  750.             a.Visible = false
  751.             a.Size = UDim2.new(0, 0, 0, 0)
  752.             a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  753.             a.BackgroundTransparency = 1
  754.             a.BorderSizePixel = 0
  755.             a.TextStrokeColor3 = Color3.new(0,0,0)
  756.             a.TextStrokeTransparency = 1
  757.  
  758.             local meta = {}
  759.             meta.ClassName = Type
  760.             meta.__index = {
  761.                 Text = '',
  762.                 Transparency = 0,
  763.                 Size = 0,
  764.                 Center = false,
  765.                 Outline = false,
  766.                 OutlineColor = Color3.new(0,0,0),
  767.                 Position = Vector2.new(0,0),
  768.                 Font = 3,
  769.                 updateText = function(self)
  770.                     if not a then return end
  771.                     a.TextScaled = true
  772.                     a.Size = UDim2.new(0, self.Size * 3, 0, self.Size / 2)
  773.                     a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  774.                     a.Text = self.Text
  775.                     a.Font = Fonts[self.Font]
  776.                     a.Visible = self.Visible
  777.                     a.TextColor3 = self.Color
  778.                     a.BackgroundTransparency = 1 - self.Transparency
  779.                     a.BorderSizePixel = self.Outline and 1 or 0
  780.                     if self.Center then
  781.                         a.TextXAlignment = Enum.TextXAlignment.Center
  782.                         a.TextYAlignment = Enum.TextYAlignment.Center
  783.                     else
  784.                         a.TextXAlignment = Enum.TextXAlignment.Left
  785.                         a.TextYAlignment = Enum.TextYAlignment.Top
  786.                     end
  787.                     a.TextStrokeTransparency = self.Outline and 0 or 1
  788.                     a.TextStrokeColor3 = self.OutlineColor
  789.                     a.ZIndex = self.ZIndex
  790.                 end
  791.             }
  792.  
  793.             SetBase(meta)
  794.  
  795.             meta.__newindex = function(self, key, value)
  796.                 if not self then return end
  797.                 if typeof(self[key]) == typeof(value) then
  798.                     rawset(self, key, value)
  799.                     self:updateText()
  800.                 end
  801.             end
  802.  
  803.             local meta1 = setmetatable({}, meta)
  804.             DrawingCache[a] = meta1
  805.             return meta1
  806.         end
  807.     end})
  808. local old = Options.enviroment.Drawing.new
  809. Options.enviroment.Drawing.new = function(Type)
  810.     if Type ~= 'Image' then
  811.         return old(Type)
  812.     else
  813.         return old('Circle')
  814.     end
  815. end
  816. AddElement('loadstring', function(code)
  817.  local test = oldLoadstring('local result=3;result+=1;return result')()
  818.  local test2 = oldLoadstring('local result="h";result..="i";return result')()
  819.  if test ~= 4 or test2 ~= 'hi' then
  820.   return oldLoadstring(replace(code))
  821.  elseif test == 4 and test2 == 'hi' then
  822.   return oldLoadstring(code)
  823.  end
  824. end, {}, true)
  825. AddElement('getrenderproperty', function(drawing, prop)
  826.     return drawing[prop]
  827. end)
  828. AddElement('setrenderproperty', function(a, b, c)
  829.     if Options.enviroment.isrenderobj(a) then
  830.         a[b] = c
  831.     end
  832. end)
  833. AddElement('isrenderobj', function(a)
  834.     for c, b in next, DrawingCache do
  835.         if b == a then
  836.             return true
  837.         end
  838.     end
  839.     return false
  840. end)
  841.  
  842. AddElement('gethui', function()
  843.     if not hui then
  844.         local s, _ = pcall(function()
  845.             local Path1 = _game:FindFirstChildOfClass('CoreGui')
  846.             hui = Instance.new("Folder", Path1)
  847.             hui.Name = 'hidden_ui\0'
  848.         end)
  849.         if not s then
  850.             if lp then
  851.                 hui = Instance.new("Folder", lp:FindFirstChildOfClass("PlayerGui"))
  852.                 hui.Name = 'hidden_ui\0'
  853.             else
  854.                 if #Players:GetChildren() == 0 then
  855.                     repeat task.wait() until #Players:GetChildren() > 0
  856.                 end
  857.                 local random_player = Players:GetChildren()[math.random(1, #Players:GetChildren())]
  858.                 hui = Instance.new("Folder", random_player:FindFirstChild("PlayerGui")) -- Add it into a random player's PlayerGui if there isn't a local player
  859.                 hui.Name = 'hidden_ui\0'
  860.             end
  861.         end
  862.     end
  863.     return hui
  864. end, {'get_hidden_ui', 'gethiddenui'})
  865. AddElement('randomstring', function(length)
  866.     length = length or 32
  867.     local str = {}
  868.     for i = 1, length do
  869.         local r = math.random(1, #valid)
  870.         str[i] = valid:sub(r, r)
  871.     end
  872.     return table.concat(str)
  873. end)
  874. AddElement('iscclosure', function(a)
  875.     return debug.info(a, 's') == '[C]'
  876. end, {'is_c_closure'})
  877. AddElement('islclosure', function(a)
  878.     return debug.info(a, 's') ~= '[C]'
  879. end, {'is_l_closure'})
  880. AddElement('isourclosure', function(a) -- Credits to empereans for this
  881.     return debug.info(a, 's') == debug.info(1, 's')
  882. end, {'isexecclosure', 'isexeclosure', 'is_executor_closure', 'isexecutorclosure', 'checkclosure'})
  883. AddElement('getinstances', function() return game:GetDescendants() end)
  884. AddElement('getnilinstances', function() return nilinstances end)
  885. AddElement('isreadonly', function(t)
  886.     return table.isfrozen(t)
  887. end)
  888. AddElement('isscriptable', function(instance, prop)
  889.     assert(typeof(instance) == 'Instance', 'Argument #1 to \'setscriptable\' must be an Instance, got ' .. typeof(instance))
  890.     return select(1, pcall(function()
  891.         return instance[prop]
  892.     end))
  893. end, {'is_scriptable'})
  894. AddElement('getscripts', function()
  895.     local a = {}for _, v in next, game:GetDescendants() do if v.ClassName == 'ModuleScript' or v.ClassName == 'LocalScript' then table.insert(a, v) end end;return a
  896. end)
  897. AddElement('getloadedmodules', function()
  898.     local a = {}for _, v in next, game:GetDescendants() do if v.ClassName == 'ModuleScript' then table.insert(a, v) end end;return a
  899. end)
  900. AddElement('getcallingscript', function()
  901.     local Source = debug.info(1, 's')
  902.     for i, v in next, game:GetDescendants() do if v:GetFullName() == Source then return v end end
  903. end, {'get_calling_script'})
  904. AddElement('isrbxactive', function()
  905.     return RBXActive
  906. end, {'isgameactive'})
  907. AddElement('newcclosure', newcclosure) -- Credits to empereans and myworld for this
  908. AddElement('getthreadidentity', getthreadidentity, {'getthreadcontext', 'getidentity'})
  909. AddElement('getrunningscripts', function() -- Purposely made ugly code to make it a 1 liner.
  910.     local a={}for _,v in next,game:GetDescendants()do if v.ClassName=='LocalScript'or v.ClassName=='ModuleScript'then table.insert(a,v)end;end;return a
  911. end)
  912. AddElement('getexecutorname', function()
  913.     return 'MoreUNC', '2.0.0'
  914. end, {'identifyexecutor'})
  915. AddElement('cleardrawcache', function()
  916.     for _, m in next, DrawingCache do m:Remove() end
  917. end)
  918.  
  919. -- // File System:
  920. local Files = {}
  921. local function startswith(a, b)
  922.     return a:sub(1, #b) == b
  923. end
  924. local function endswith(hello, lo)
  925.     return hello:sub(#hello - #lo + 1, #hello) == lo
  926. end
  927. AddElement('writefile', function(path, content)
  928.     local Path = path:split('/')
  929.     local CurrentPath = {}
  930.     for i = 1, #Path do
  931.         local a = Path[i]
  932.         CurrentPath[i] = a
  933.         if not Files[a] and i ~= #Path then
  934.             Files[table.concat(CurrentPath, '/')] = {}
  935.             Files[table.concat(CurrentPath, '/') .. '/'] = Files[table.concat(CurrentPath, '/')]
  936.         elseif i == #Path then
  937.             Files[table.concat(CurrentPath, '/')] = tostring(content)
  938.         end
  939.     end
  940. end)
  941. AddElement('makefolder', function(path)
  942.     Files[path] = {}
  943.     Files[path .. '/'] = Files[path]
  944. end)
  945. AddElement('isfolder', function(path)
  946.     return type(Files[path]) == 'table'
  947. end)
  948. AddElement('isfile', function(path)
  949.     return type(Files[path]) == 'string'
  950. end)
  951. AddElement('readfile', function(path)
  952.     return Files[path]
  953. end)
  954. AddElement('appendfile', function(path, text2)
  955.     writefile(path, readfile(path) .. text2)
  956. end)
  957. AddElement('loadfile', function(path)
  958.     local content = readfile(path)
  959.     if not content then error('File \'' .. tostring(path) .. '\' does not exist.') return '' end
  960.     local s, func = pcall(function()
  961.         return loadstring(content)
  962.     end)
  963.     return func, not s and func or nil
  964. end)
  965. AddElement('delfolder', function(path)
  966.     local f = Files[path]
  967.     if type(f) == 'table' then Files[path] = nil end
  968. end)
  969. AddElement('delfile', function(path)
  970.     local f = Files[path]
  971.     if type(f) == 'string' then Files[path] = nil end
  972. end)
  973. AddElement('listfiles', function(path)
  974.     if not path or path == '' then
  975.         local Files = {}
  976.         for i, v in pairs(Files) do
  977.             if #i:split('/') == 1 then table.insert(Files, i) end
  978.         end
  979.         return Files
  980.     end
  981.     if type(Files[path]) ~= 'table' then return error(path .. ' is not a folder.') end
  982.     local Files_2 = {}
  983.     for i, v in pairs(Files) do
  984.         if startswith(i, path .. '/') and not endswith(i, '/') and i ~= path and #i:split('/') == (#path:split('/') + 1) then table.insert(Files_2, i) end
  985.     end
  986.     return Files_2
  987. end)
  988. AddElement('checkcaller', function()
  989.     local info = debug.info(getgenv, 'slnaf')
  990.     return debug.info(1, 'slnaf')==info
  991. end)
  992. AddElement('clonefunction', function(f)
  993.     return function(...) -- Probably a bad way to do this...
  994.         return f(...)
  995.     end
  996. end, {'newlclosure'})
  997. AddElement('getscriptclosure', function(module)
  998.     assert(typeof(module) ~= 'Instance', 'Argument #1 to \'getscriptclosure\' must be an Instance.')
  999.     return require(module)
  1000. end, {'getscriptfunction'})
  1001. AddElement('getgenv', function()
  1002.     return getfenv(0)
  1003. end)
  1004. if vim then
  1005.     AddElement('mouse1click', function(x, y)
  1006.         x = x or 0
  1007.         y = y or 0
  1008.         vim:SendMouseButtonEvent(x, y, 0, true, game, false)
  1009.         task.wait()
  1010.         vim:SendMouseButtonEvent(x, y, 0, false, game, false)
  1011.     end)
  1012.  
  1013.     AddElement('mouse2click', function(x, y)
  1014.         x = x or 0
  1015.         y = y or 0
  1016.         vim:SendMouseButtonEvent(x, y, 1, true, game, false)
  1017.         task.wait()
  1018.         vim:SendMouseButtonEvent(x, y, 1, false, game, false)
  1019.     end)
  1020.  
  1021.     AddElement('mouse1press', function(x, y)
  1022.         x = x or 0
  1023.         y = y or 0
  1024.         vim:SendMouseButtonEvent(x, y, 0, true, game, false)
  1025.     end)
  1026.  
  1027.     AddElement('mouse1release', function(x, y)
  1028.         x = x or 0
  1029.         y = y or 0
  1030.         vim:SendMouseButtonEvent(x, y, 0, false, game, false)
  1031.     end)
  1032.  
  1033.     AddElement('mouse2press', function(x, y)
  1034.         x = x or 0
  1035.         y = y or 0
  1036.         vim:SendMouseButtonEvent(x, y, 1, true, game, false)
  1037.     end)
  1038.  
  1039.     AddElement('mouse2release', function(x, y)
  1040.         x = x or 0
  1041.         y = y or 0
  1042.         vim:SendMouseButtonEvent(x, y, 1, false, game, false)
  1043.     end)
  1044.  
  1045.     AddElement('mousescroll', function(x, y, a)
  1046.         x = x or 0
  1047.         y = y or 0
  1048.         a = a and true or false
  1049.         vim:SendMouseWheelEvent(x, y, a, game)
  1050.     end)
  1051.  
  1052.     AddElement('keyclick', function(key)
  1053.         if typeof(key) == 'number' then
  1054.             if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  1055.             vim:SendKeyEvent(true, keys[key], false, game)
  1056.             task.wait()
  1057.             vim:SendKeyEvent(false, keys[key], false, game)
  1058.         elseif typeof(key) == 'EnumItem' then
  1059.             vim:SendKeyEvent(true, key, false, game)
  1060.             task.wait()
  1061.             vim:SendKeyEvent(false, key, false, game)
  1062.         end
  1063.     end)
  1064.  
  1065.     AddElement('keypress', function(key)
  1066.         if typeof(key) == 'number' then
  1067.             if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  1068.             vim:SendKeyEvent(true, keys[key], false, game)
  1069.         elseif typeof(key) == 'EnumItem' then
  1070.             vim:SendKeyEvent(true, key, false, game)
  1071.         end
  1072.     end)
  1073.  
  1074.     AddElement('keyrelease', function(key)
  1075.         if typeof(key) == 'number' then
  1076.             if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  1077.             vim:SendKeyEvent(false, keys[key], false, game)
  1078.         elseif typeof(key) == 'EnumItem' then
  1079.             vim:SendKeyEvent(false, key, false, game)
  1080.         end
  1081.     end)
  1082.  
  1083.     AddElement('mousemoverel', function(relx, rely)
  1084.         local Pos = workspace.CurrentCamera.ViewportSize
  1085.         relx = relx or 0
  1086.         rely = rely or 0
  1087.         local x = Pos.X * relx
  1088.         local y = Pos.Y * rely
  1089.         vim:SendMouseMoveEvent(x, y, game)
  1090.     end)
  1091.  
  1092.     AddElement('mousemoveabs', function(x, y)
  1093.         x = x or 0
  1094.         y = y or 0
  1095.         vim:SendMouseMoveEvent(x, y, game)
  1096.     end)
  1097.     AddElement('setclipboard', function(data)
  1098.         repeat task.wait() until ClipboardQueue:Current()[1] == data or ClipboardQueue:IsEmpty()
  1099.         ClipboardQueue:Queue(data)
  1100.         local old = game:GetService("UserInputService"):GetFocusedTextBox()
  1101.         local copy = ClipboardQueue:Current()[1]
  1102.         ClipboardBox:CaptureFocus()
  1103.         ClipboardBox.Text = copy
  1104.  
  1105.         local KeyCode = Enum.KeyCode
  1106.         local Keys = {KeyCode.RightControl, KeyCode.A}
  1107.         local Keys2 = {KeyCode.RightControl, KeyCode.C, KeyCode.V}
  1108.  
  1109.         for _, v in ipairs(Keys) do
  1110.             vim:SendKeyEvent(true, v, false, game)
  1111.             task.wait()
  1112.         end
  1113.         for _, v in ipairs(Keys) do
  1114.             vim:SendKeyEvent(false, v, false, game)
  1115.             task.wait()
  1116.         end
  1117.         for _, v in ipairs(Keys2) do
  1118.             vim:SendKeyEvent(true, v, false, game)
  1119.             task.wait()
  1120.         end
  1121.         for _, v in ipairs(Keys2) do
  1122.             vim:SendKeyEvent(false, v, false, game)
  1123.             task.wait()
  1124.         end
  1125.         ClipboardBox.Text = ''
  1126.         if old then old:CaptureFocus() end
  1127.         task.wait(.18)
  1128.         ClipboardQueue:Update()
  1129.     end, {'toclipboard', 'writeclipboard', 'setrbxclipboard', 'syn.write_clipboard'})
  1130. else
  1131.     warn("Your executor is not high level enough to support input functions (Including setclipboard)")
  1132. end
  1133. local Consoles = {}
  1134. AddElement('rconsolecreate', function()
  1135.     local cnsl = rconsole:init()
  1136.     table.insert(Consoles, cnsl)
  1137.     cnsl.Parent = gethui()
  1138. end, {'consolecreate'})
  1139. AddElement('rconsoledestroy', function()
  1140.     for i, v in next, Consoles do v:Destroy() end
  1141. end, {'consoledestroy'})
  1142. AddElement('rconsoleprint', function(msg)
  1143.     assert(type(msg) == 'string', 'Argument #1 to \'rconsoleprint\' must be a string, not ' .. type(msg))
  1144.     rconsole:addmessage(msg)
  1145. end, {'consoleprint'})
  1146. AddElement('rconsoleinput', function(text)
  1147.     assert(type(text) == 'string', 'Argument #1 to \'rconsoleinput\' must be a string, not ' .. type(text))
  1148.     return rconsole:addinput(text)
  1149. end, {'rconsoleinputasync', 'consoleinput'})
  1150. AddElement('rconsoleclear', function()
  1151.     local v = Consoles[#Consoles]
  1152.     if not v then return end
  1153.     if v:FindFirstChild('MainFrame') and v.MainFrame:FindFirstChild('Messages') then
  1154.         for _, q in next, v.MainFrame:FindFirstChild('Messages'):GetChildren() do
  1155.             if q.ClassName ~= 'UIListLayout' then
  1156.                 q:Destroy()
  1157.             end
  1158.         end
  1159.     end
  1160. end, {'consoleclear'})
  1161. AddElement("rconsolesettitle", function(title)
  1162.     assert(type(title) == 'string', 'Argument #1 to \'rconsoleinput\' must be a string, not ' .. type(title))
  1163.     local v = Consoles[#Consoles]
  1164.     if not v then return end
  1165.     v:FindFirstChild("MainFrame"):FindFirstChild("TopBar"):FindFirstChild("Title").Text = title
  1166. end, {"rconsolename", "consolesettitle"})
  1167. AddElement('getscripthash', function(scr)
  1168.     assert(typeof(scr) == 'Instance', 'Argument #1 to \'getscripthash\' must be an Instance, not ' .. typeof(scr))
  1169.     assert(scr.ClassName ~= 'LocalScript' or scr.ClassName ~= 'Script', 'Argument #1 to \'getscripthash\' must be a LocalScript or Script')
  1170.     return scr:GetHash()
  1171. end)
  1172. AddElement('saveinstance', function() -- Not mine, But still wanted to add it
  1173.     local Params = {
  1174.         RepoURL = "https://raw.githubusercontent.com/luau/SynSaveInstance/main/",
  1175.         SSI = "saveinstance",
  1176.     }
  1177.     local synsaveinstance = loadstring(game:HttpGet(Params.RepoURL .. Params.SSI .. ".luau", true), Params.SSI)()
  1178.     local SaveOptions = {
  1179.         ReadMe = true,
  1180.         IsolatePlayers = true,
  1181.         FilePath = string.format("%d", tick())
  1182.     }
  1183.     synsaveinstance(SaveOptions)
  1184. end)
  1185.  
  1186. -- Finalize:
  1187. if not getgenv().MoreUNCV2 then
  1188.     AddEnviroment()
  1189.     getgenv().MoreUNCV2 = true
  1190.     syn.protect_gui(DrawingUI)
  1191.     syn.protect_gui(ClipboardUI)
  1192. end
Tags: Roblox V2 MORE UNC
Add Comment
Please, Sign In to add comment