Dark_Agent

Supporting-UNC-1

Aug 10th, 2024
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 55.83 KB | Fixit | 0 0
  1. --[[ hello very cool incognito / solara (mostly incognito because solara has most of these functions, just not all) script showcase!!
  2. pls dont steal source code :(
  3. also join https://discord.gg/gYhqMRBeZV because yes    
  4. ]]
  5. --[[
  6.  math support update because math is kewl
  7.  new update:
  8.  table loop update!!
  9. ]]
  10. if getgenv and getgenv().MoreUNC then return end
  11.  
  12. -- Definitions
  13. local table = table.clone(table) -- Prevent modifications from other scripts
  14. local debug = table.clone(debug) -- ^^^^
  15. local bit32 = table.clone(bit32)
  16. local bit = bit32
  17. local os = table.clone(os)
  18. local math = table.clone(math)
  19. local utf8 = table.clone(utf8)
  20. local string = table.clone(string)
  21. local task = table.clone(task)
  22.  
  23. local game = game -- game is game
  24. local oldGame = game
  25.  
  26. local Version = '1.1.6'
  27.  
  28. local isDragging = false -- rconsole
  29. local dragStartPos = nil -- rconsole
  30. local frameStartPos = nil -- rconsole
  31.  
  32. local Data = game:GetService("TeleportService"):GetLocalPlayerTeleportData()
  33. local TeleportData
  34. if Data and Data.MOREUNCSCRIPTQUEUE then
  35.     TeleportData = Data.MOREUNCSCRIPTQUEUE
  36. end
  37. if TeleportData then
  38.     local func = loadstring(TeleportData)
  39.     local s, e = pcall(func)
  40.     if not s then task.spawn(error, e) end
  41. end
  42.  
  43.  
  44. print = print
  45. warn = warn
  46. error = error
  47. pcall = pcall
  48. printidentity = printidentity
  49. ipairs = ipairs
  50. pairs = pairs
  51. tostring = tostring
  52. tonumber = tonumber
  53. setmetatable = setmetatable
  54. rawget = rawget
  55. rawset = rawset
  56. getmetatable = getmetatable
  57. type = type
  58. version = version
  59.  
  60. -- Services / Instances
  61. local HttpService = game:GetService('HttpService');
  62. local Log = game:GetService('LogService');
  63.  
  64. local vim = Instance.new("VirtualInputManager");
  65.  
  66. local DrawingDict = Instance.new("ScreenGui") -- For drawing.new
  67.  
  68. local ClipboardUI = Instance.new("ScreenGui") -- For setclipboard
  69.  
  70. local hui = Instance.new("Folder") -- For gethui
  71. hui.Name = '\0'
  72.  
  73. local ClipboardBox = Instance.new('TextBox', ClipboardUI) -- For setclipboard
  74. ClipboardBox.Position = UDim2.new(100, 0, 100, 0) -- VERY off screen
  75.  
  76. -- All the following are for rconsole
  77. local Console = Instance.new("ScreenGui")
  78. local ConsoleFrame = Instance.new("Frame")
  79. local Topbar = Instance.new("Frame")
  80. local _CORNER = Instance.new("UICorner")
  81. local ConsoleCorner = Instance.new("UICorner")
  82. local CornerHide = Instance.new("Frame")
  83. local DontModify = Instance.new("Frame")
  84. local UICorner = Instance.new("UICorner")
  85. local CornerHide2 = Instance.new("Frame")
  86. local Title = Instance.new("TextLabel")
  87. local UIPadding = Instance.new("UIPadding")
  88. local ConsoleIcon = Instance.new("ImageLabel")
  89. local Holder = Instance.new("ScrollingFrame")
  90. local MessageTemplate = Instance.new("TextLabel")
  91. local InputTemplate = Instance.new("TextBox")
  92. local UIListLayout = Instance.new("UIListLayout")
  93. local HolderPadding = Instance.new("UIPadding")
  94.  
  95. Console.Name = "Console"
  96. Console.Parent = nil
  97. Console.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  98.  
  99. ConsoleFrame.Name = "ConsoleFrame"
  100. ConsoleFrame.Parent = Console
  101. ConsoleFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  102. ConsoleFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  103. ConsoleFrame.BorderSizePixel = 0
  104. ConsoleFrame.Position = UDim2.new(0.0963890627, 0, 0.220791712, 0)
  105. ConsoleFrame.Size = UDim2.new(0, 888, 0, 577)
  106.  
  107. Topbar.Name = "Topbar"
  108. Topbar.Parent = ConsoleFrame
  109. Topbar.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  110. Topbar.BorderColor3 = Color3.fromRGB(0, 0, 0)
  111. Topbar.BorderSizePixel = 0
  112. Topbar.Position = UDim2.new(0, 0, -0.000463640812, 0)
  113. Topbar.Size = UDim2.new(1, 0, 0, 32)
  114.  
  115. _CORNER.Name = "_CORNER"
  116. _CORNER.Parent = Topbar
  117.  
  118. ConsoleCorner.Name = "ConsoleCorner"
  119. ConsoleCorner.Parent = ConsoleFrame
  120.  
  121. CornerHide.Name = "CornerHide"
  122. CornerHide.Parent = ConsoleFrame
  123. CornerHide.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  124. CornerHide.BorderColor3 = Color3.fromRGB(0, 0, 0)
  125. CornerHide.BorderSizePixel = 0
  126. CornerHide.Position = UDim2.new(0, 0, 0.0280000009, 0)
  127. CornerHide.Size = UDim2.new(1, 0, 0, 12)
  128.  
  129. DontModify.Name = "DontModify"
  130. DontModify.Parent = ConsoleFrame
  131. DontModify.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  132. DontModify.BorderColor3 = Color3.fromRGB(0, 0, 0)
  133. DontModify.BorderSizePixel = 0
  134. DontModify.Position = UDim2.new(0.98169291, 0, 0.0278581586, 0)
  135. DontModify.Size = UDim2.new(-0.00675675692, 21, 0.972141862, 0)
  136.  
  137. UICorner.Parent = DontModify
  138.  
  139. CornerHide2.Name = "CornerHide2"
  140. CornerHide2.Parent = ConsoleFrame
  141. CornerHide2.AnchorPoint = Vector2.new(1, 0)
  142. CornerHide2.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  143. CornerHide2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  144. CornerHide2.BorderSizePixel = 0
  145. CornerHide2.Position = UDim2.new(1, 0, 0.0450000018, 0)
  146. CornerHide2.Size = UDim2.new(0, 9, 0.955023408, 0)
  147.  
  148. Title.Name = "Title"
  149. Title.Parent = ConsoleFrame
  150. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  151. Title.BackgroundTransparency = 1.000
  152. Title.BorderColor3 = Color3.fromRGB(0, 0, 0)
  153. Title.BorderSizePixel = 0
  154. Title.Position = UDim2.new(0.0440017432, 0, 0, 0)
  155. Title.Size = UDim2.new(0, 164, 0, 30)
  156. Title.Font = Enum.Font.GothamMedium
  157. Title.Text = "rconsole title"
  158. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  159. Title.TextSize = 17.000
  160. Title.TextXAlignment = Enum.TextXAlignment.Left
  161.  
  162. UIPadding.Parent = Title
  163. UIPadding.PaddingTop = UDim.new(0, 5)
  164.  
  165. ConsoleIcon.Name = "ConsoleIcon"
  166. ConsoleIcon.Parent = ConsoleFrame
  167. ConsoleIcon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  168. ConsoleIcon.BackgroundTransparency = 1.000
  169. ConsoleIcon.BorderColor3 = Color3.fromRGB(0, 0, 0)
  170. ConsoleIcon.BorderSizePixel = 0
  171. ConsoleIcon.Position = UDim2.new(0.00979213417, 0, 0.000874322082, 0)
  172. ConsoleIcon.Size = UDim2.new(0, 31, 0, 31)
  173. ConsoleIcon.Image = "http://www.roblox.com/asset/?id=11843683545"
  174.  
  175. Holder.Name = "Holder"
  176. Holder.Parent = ConsoleFrame
  177. Holder.Active = true
  178. Holder.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  179. Holder.BackgroundTransparency = 1.000
  180. Holder.BorderColor3 = Color3.fromRGB(0, 0, 0)
  181. Holder.BorderSizePixel = 0
  182. Holder.Position = UDim2.new(0, 0, 0.054600548, 0)
  183. Holder.Size = UDim2.new(1, 0, 0.945399463, 0)
  184. Holder.ScrollBarThickness = 8
  185. Holder.CanvasSize = UDim2.new(0,0,0,0)
  186. Holder.AutomaticCanvasSize = Enum.AutomaticSize.XY
  187.  
  188. MessageTemplate.Name = "MessageTemplate"
  189. MessageTemplate.Parent = Holder
  190. MessageTemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  191. MessageTemplate.BackgroundTransparency = 1.000
  192. MessageTemplate.BorderColor3 = Color3.fromRGB(0, 0, 0)
  193. MessageTemplate.BorderSizePixel = 0
  194. MessageTemplate.Size = UDim2.new(0.9745, 0, 0.030000001, 0)
  195. MessageTemplate.Visible = false
  196. MessageTemplate.Font = Enum.Font.RobotoMono
  197. MessageTemplate.Text = "TEMPLATE"
  198. MessageTemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
  199. MessageTemplate.TextSize = 20.000
  200. MessageTemplate.TextXAlignment = Enum.TextXAlignment.Left
  201. MessageTemplate.TextYAlignment = Enum.TextYAlignment.Top
  202. MessageTemplate.RichText = true
  203.  
  204. UIListLayout.Parent = Holder
  205. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  206. UIListLayout.Padding = UDim.new(0, 4)
  207.  
  208. HolderPadding.Name = "HolderPadding"
  209. HolderPadding.Parent = Holder
  210. HolderPadding.PaddingLeft = UDim.new(0, 15)
  211. HolderPadding.PaddingTop = UDim.new(0, 15)
  212.  
  213. InputTemplate.Name = "InputTemplate"
  214. InputTemplate.Parent = nil
  215. InputTemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  216. InputTemplate.BackgroundTransparency = 1.000
  217. InputTemplate.BorderColor3 = Color3.fromRGB(0, 0, 0)
  218. InputTemplate.BorderSizePixel = 0
  219. InputTemplate.Size = UDim2.new(0.9745, 0, 0.030000001, 0)
  220. InputTemplate.Visible = false
  221. InputTemplate.RichText = true
  222. InputTemplate.Font = Enum.Font.RobotoMono
  223. InputTemplate.Text = ""
  224. InputTemplate.PlaceholderText = ''
  225. InputTemplate.TextColor3 = Color3.fromRGB(255, 255, 255)
  226. InputTemplate.TextSize = 20.000
  227. InputTemplate.TextXAlignment = Enum.TextXAlignment.Left
  228. InputTemplate.TextYAlignment = Enum.TextYAlignment.Top
  229.  
  230. -- Variables
  231. local Identity = -1
  232. local active = true
  233. -- Others
  234. local oldLoader = loadstring
  235. -- Empty Tables
  236. local clonerefs = {}
  237. local protecteduis = {}
  238. local gc = {}
  239. local Instances = {} -- for nil instances
  240. local funcs = {} -- main table
  241. local names = {} -- protected gui names
  242. local Cache = {} -- for cached instances
  243. local Drawings = {} -- for cleardrawcache
  244. -- Non empty tables
  245. local colors = {
  246.     BLACK = Color3.fromRGB(50, 50, 50),
  247.     BLUE = Color3.fromRGB(0, 0, 204),
  248.     GREEN = Color3.fromRGB(0, 255, 0),
  249.     CYAN = Color3.fromRGB(0, 255, 255),
  250.     RED = Color3.fromHex('#5A0101'),
  251.     MAGENTA = Color3.fromRGB(255, 0, 255),
  252.     BROWN = Color3.fromRGB(165, 42, 42),
  253.     LIGHT_GRAY = Color3.fromRGB(211, 211, 211),
  254.     DARK_GRAY = Color3.fromRGB(169, 169, 169),
  255.     LIGHT_BLUE = Color3.fromRGB(173, 216, 230),
  256.     LIGHT_GREEN = Color3.fromRGB(144, 238, 144),
  257.     LIGHT_CYAN = Color3.fromRGB(224, 255, 255),
  258.     LIGHT_RED = Color3.fromRGB(255, 204, 203),
  259.     LIGHT_MAGENTA = Color3.fromRGB(255, 182, 193),
  260.     YELLOW = Color3.fromRGB(255, 255, 0),
  261.     WHITE = Color3.fromRGB(255, 255, 255),
  262.     ORANGE = Color3.fromRGB(255, 186, 12)
  263. }
  264. local patterns = {
  265.     { pattern = '(%w+)%s*%+=%s*(%w+)', format = "%s = %s + %s" },
  266.     { pattern = '(%w+)%s*%-=%s*(%w+)', format = "%s = %s - %s" },
  267.     { pattern = '(%w+)%s*%*=%s*(%w+)', format = "%s = %s * %s" },
  268.     { pattern = '(%w+)%s*/=%s*(%w+)', format = "%s = %s / %s" }
  269. }
  270. local patterns2 = {
  271.     { pattern = 'for%s+(%w+)%s*,%s*(%w+)%s*in%s*(%w+)%s*do', format = "for %s, %s in pairs(%s) do" }
  272. }
  273. local renv = {
  274.     print, warn, error, assert, collectgarbage, load, require, select, tonumber, tostring, type, xpcall, pairs, next, ipairs,
  275.     newproxy, rawequal, rawget, rawset, rawlen, setmetatable, PluginManager,
  276.     coroutine.create, coroutine.resume, coroutine.running, coroutine.status, coroutine.wrap, coroutine.yield,
  277.     bit32.arshift, bit32.band, bit32.bnot, bit32.bor, bit32.btest, bit32.extract, bit32.lshift, bit32.replace, bit32.rshift, bit32.xor,
  278.     math.abs, math.acos, math.asin, math.atan, math.atan2, math.ceil, math.cos, math.cosh, math.deg, math.exp, math.floor, math.fmod, math.frexp, math.ldexp, math.log, math.log10, math.max, math.min, math.modf, math.pow, math.rad, math.random, math.randomseed, math.sin, math.sinh, math.sqrt, math.tan, math.tanh,
  279.     string.byte, string.char, string.find, string.format, string.gmatch, string.gsub, string.len, string.lower, string.match, string.pack, string.packsize, string.rep, string.reverse, string.sub, string.unpack, string.upper,
  280.     table.concat, table.insert, table.pack, table.remove, table.sort, table.unpack,
  281.     utf8.char, utf8.charpattern, utf8.codepoint, utf8.codes, utf8.len, utf8.nfdnormalize, utf8.nfcnormalize,
  282.     os.clock, os.date, os.difftime, os.time,
  283.     delay, elapsedTime, require, spawn, tick, time, typeof, UserSettings, version, wait,
  284.     task.defer, task.delay, task.spawn, task.wait,
  285.     debug.traceback, debug.profilebegin, debug.profileend
  286. }
  287. 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} -- for keypress
  288. local Fonts = { -- Drawing.Fonts
  289.     [0] = Enum.Font.Arial,
  290.     [1] = Enum.Font.BuilderSans,
  291.     [2] = Enum.Font.Gotham,
  292.     [3] = Enum.Font.RobotoMono
  293. }
  294. -- rconsole
  295. local MessageColor = colors['WHITE']
  296. local ConsoleClone = nil
  297. -- functions
  298. local function Descendants(tbl)
  299.     local descendants = {}
  300.  
  301.     local function process_table(subtbl, prefix)
  302.         for k, v in pairs(subtbl) do
  303.             local index = prefix and (prefix .. "." .. tostring(k)) or tostring(k)
  304.             descendants[index] = v
  305.             if type(v) == 'table' then
  306.                 process_table(v, index)
  307.             else
  308.                 descendants[index] = v
  309.             end
  310.         end
  311.     end
  312.  
  313.     if type(tbl) ~= 'table' then
  314.         descendants[tostring(1)] = tbl
  315.     else
  316.         process_table(tbl, nil)
  317.     end
  318.  
  319.     return descendants
  320. end
  321.  
  322. local function rawlength(tbl)
  323.     local a = 0
  324.     for i, v in pairs(tbl) do
  325.         a = a + 1
  326.     end
  327.     return a
  328. end
  329.  
  330. local function ToPairsLoop(code)
  331.     for _, p in ipairs(patterns2) do
  332.         code = code:gsub(p.pattern, function(var1, var2, tbl)
  333.             return p.format:format(var1, var2, tbl)
  334.         end)
  335.     end
  336.     return code
  337. end
  338.  
  339. local function SafeOverride(a, b, c) --[[ Index, Data, Should override ]]
  340.     if getgenv()[a] and not c then return 1 end
  341.     getgenv()[a] = b
  342.  
  343.     return 2
  344. end
  345.  
  346. local function toluau(code)
  347.     for _, p in ipairs(patterns) do
  348.         code = code:gsub(p.pattern, function(var, value)
  349.             return p.format:format(var, var, value)
  350.         end)
  351.     end
  352.     code = ToPairsLoop(code)
  353.     return code
  354. end
  355.  
  356. local function handleInput(input, Object)
  357.     if isDragging then
  358.         local delta = input.Position - dragStartPos
  359.         Object.Position = UDim2.new(
  360.             frameStartPos.X.Scale,
  361.             frameStartPos.X.Offset + delta.X,
  362.             frameStartPos.Y.Scale,
  363.             frameStartPos.Y.Offset + delta.Y
  364.         )
  365.     end
  366. end
  367.  
  368. local function startDrag(input, Object)
  369.     isDragging = true
  370.     dragStartPos = input.Position
  371.     frameStartPos = Object.Position
  372.     input.UserInputState = Enum.UserInputState.Begin
  373. end
  374.  
  375. local function stopDrag(input)
  376.     isDragging = false
  377.     input.UserInputState = Enum.UserInputState.End
  378. end
  379.  
  380. -- Main Functions
  381. function QueueGetIdentity()
  382.     printidentity()
  383.     task.wait(.1)
  384.     local messages = Log:GetLogHistory()
  385.     local message;
  386.     if not messages[#messages].message:match("Current identity is") then
  387.         for i = #messages, 1, -1 do
  388.             if messages[i].message:match("Current identity is %d") then
  389.                 message = messages[i].message
  390.                 break
  391.             end
  392.         end
  393.     else
  394.         message = messages[#messages].message:match('Current identity is %d'):gsub("Current identity is ", '')
  395.     end
  396.     Identity = tonumber(message)
  397. end
  398. local Queue = {}
  399. Queue.__index = Queue
  400. function Queue.new()
  401.     local self = setmetatable({}, Queue)
  402.     self.elements = {}
  403.     return self
  404. end
  405.  
  406. function Queue:Queue(element)
  407.     table.insert(self.elements, element)
  408. end
  409.  
  410. function Queue:Update()
  411.     if #self.elements == 0 then
  412.         return nil
  413.     end
  414.     return table.remove(self.elements, 1)
  415. end
  416.  
  417. function Queue:IsEmpty()
  418.     return #self.elements == 0
  419. end
  420. function Queue:Current()
  421.     return self.elements
  422. end
  423.  
  424. -- Events
  425. game.DescendantRemoving:Connect(function(des)
  426.     table.insert(Instances, des)
  427.     Cache[des] = 'REMOVE'
  428. end)
  429. game.DescendantAdded:Connect(function(des)
  430.     Cache[des] = true
  431. end)
  432. game:GetService("UserInputService").WindowFocused:Connect(function()
  433.     active = true
  434. end)
  435.  
  436. game:GetService("UserInputService").WindowFocusReleased:Connect(function()
  437.     active = false
  438. end)
  439.  
  440. game:GetService("UserInputService").InputChanged:Connect(function(input)
  441.     if not input then return end
  442.     if isDragging and input.UserInputType == Enum.UserInputType.MouseMovement and ConsoleClone then
  443.         handleInput(input, ConsoleClone.ConsoleFrame)
  444.     end
  445. end)
  446.  
  447. game:GetService("UserInputService").InputEnded:Connect(function(input)
  448.     if not input then return end
  449.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  450.         stopDrag(input)
  451.     end
  452. end)
  453. -- Libraries
  454. funcs.base64 = {}
  455. funcs.crypt = {hex={},url={}}
  456. funcs.syn = {}
  457. funcs.syn_backup = {}
  458. funcs.http = {}
  459. funcs.Drawing = {}
  460. funcs.cache = {}
  461. funcs.string = string
  462. funcs.debug = debug
  463. funcs.debug.getinfo = function(t)
  464.     local CurrentLine = tonumber(debug.info(t, 'l'))
  465.     local Source = debug.info(t, 's')
  466.     local name = debug.info(t, 'n')
  467.     local numparams, isvrg = debug.info(t, 'a')
  468.     if #name == 0 then name = nil end
  469.     local a, b = debug.info(t, 'a')
  470.     return {
  471.         ['currentline'] = CurrentLine,
  472.         ['source'] = Source,
  473.         ['name'] = tostring(name),
  474.         ['numparams'] = tonumber(numparams),
  475.         ['is_vararg'] = isvrg and 1 or 0,
  476.         ['short_src'] = tostring(Source:sub(1, 60)),
  477.         ['what'] = Source == '[C]' and 'C' or 'Lua',
  478.         ['func'] = t,
  479.         ['nups'] = 0 -- i CANNOT make an upvalue thingy
  480.     }
  481. end
  482.  
  483. funcs.Drawing.Fonts = {
  484.     ['UI'] = 0,
  485.     ['System'] = 1,
  486.     ['Plex'] = 2,
  487.     ['Monospace'] = 3
  488. }
  489.  
  490.  
  491. local ClipboardQueue = Queue.new()
  492. local ConsoleQueue = Queue.new()
  493. local getgenv = getgenv or function() return getfenv(1) end
  494. getgenv().getgenv = getgenv
  495.  
  496. -- [[ Functions ]]
  497.  
  498. --[[funcs.cloneref = function(a)
  499.     if not clonerefs[a] then clonerefs[a] = {} end
  500.     local Clone = {}
  501.  
  502.     local mt = {__type='Instance'} -- idk if this works ;(
  503.  
  504.     mt.__tostring = function()
  505.         return a.Name
  506.     end
  507.  
  508.     mt.__index = function(_, key)
  509.         local thing = funcs.debug.getmetatable(a)[key]
  510.         if type(thing) == 'function' then
  511.             return function(...)
  512.                 return thing(a, ...)
  513.             end
  514.         else
  515.             return thing
  516.         end
  517.     end
  518.     mt.__newindex = function(_, key, value)
  519.      a[key] = value
  520.     end
  521.     mt.__metatable = getmetatable(a)
  522.     mt.__len = function(_)
  523.      return error('attempt to get length of a userdata value')
  524.     end
  525.  
  526.     setmetatable(Clone, mt)
  527.  
  528.     table.insert(clonerefs[a], Clone)
  529.  
  530.     return Clone
  531. end
  532. TEMPORARY REMOVED UNTIL WE FIND A FIX
  533. ]]
  534. -- // The rest is made by me.
  535.  
  536. funcs.compareinstances = function(a, b)
  537.     if not clonerefs[a] then
  538.         return a == b
  539.     else
  540.         if table.find(clonerefs[a], b) then return true end
  541.     end
  542.     return false
  543. end
  544.  
  545. funcs.clonefunction = function(a)
  546.     assert(type(a)=='function', 'Invalid parameter 1 to \'clonefunction\', function expected got ' .. typeof(a))
  547.  
  548.     return function(...)
  549.         local Copy = Sandbox(a, {}, {}, {}, 0, {...})
  550.         return Copy.return_value
  551.     end
  552. end
  553.  
  554. funcs.cache.iscached = function(thing)
  555.     return Cache[thing] ~= 'REMOVE' and thing:IsDescendantOf(game) or false -- If it's cache isnt 'REMOVE' and its a des of game (Usually always true) or if its cache is 'REMOVE' then its false.
  556. end
  557. funcs.cache.invalidate = function(thing)
  558.     Cache[thing] = 'REMOVE'
  559.     thing.Parent = nil
  560. end
  561. funcs.cache.replace = function(a, b)
  562.     if Cache[a] then
  563.         Cache[a] = b
  564.     end
  565.     local n, p = a.Name, a.Parent -- name, parent
  566.     b.Parent = p
  567.     b.Name = n
  568.     a.Parent = nil
  569. end
  570. funcs.deepclone = function(a)
  571.     local Result = {}
  572.     for i, v in pairs(a) do
  573.         if type(v) == 'table' then
  574.             Result[i] = funcs.deepclone(v)
  575.         end
  576.         Result[i] = v
  577.     end
  578.     return Result
  579. end
  580. --[[ The base64 functions were made by https://scriptblox.com/u/yofriendfromschool1 , Credits to him.]]
  581. funcs.base64.encode = function(data)
  582.     local letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  583.     return ((data:gsub('.', function(x)
  584.         local r,b='',x:byte()
  585.         for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
  586.         return r;
  587.     end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
  588.         if (#x < 6) then return '' end
  589.         local c=0
  590.         for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
  591.         return letters:sub(c+1,c+1)
  592.     end)..({ '', '==', '=' })[#data%3+1])
  593. end
  594. funcs.base64.decode = function(data)
  595.     local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  596.     data = string.gsub(data, '[^'..b..'=]', '')
  597.     return (data:gsub('.', function(x)
  598.         if x == '=' then return '' end
  599.         local r, f = '', (b:find(x) - 1)
  600.         for i = 6, 1, -1 do
  601.             r = r .. (f % 2^i - f % 2^(i - 1) > 0 and '1' or '0')
  602.         end
  603.         return r;
  604.     end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
  605.         if #x ~= 8 then return '' end
  606.         local c = 0
  607.         for i = 1, 8 do
  608.             c = c + (x:sub(i, i) == '1' and 2^(8 - i) or 0)
  609.         end
  610.         return string.char(c)
  611.     end))
  612. end
  613.  
  614. funcs.loadstring = function(code)
  615.     local s1, val1 = pcall(function()
  616.         return loadstring('local v1=15;v1+=1;return v1')()
  617.     end)
  618.     local s2, val2 = pcall(function()
  619.         return loadstring('local v1={"a"};for i, v in v1 do return v end')()
  620.     end)
  621.     if val1 ~= 16 and val2 ~= 'a' then
  622.         return oldLoader(toluau(code))
  623.     else
  624.         return oldLoader(code)
  625.     end
  626. end
  627. funcs.getgenv = getgenv
  628. funcs.crypt.base64 = funcs.base64
  629. funcs.crypt.base64encode = funcs.base64.encode
  630. funcs.crypt.base64decode = funcs.base64.decode
  631. funcs.crypt.base64_encode = funcs.base64.encode
  632. funcs.crypt.base64_decode = funcs.base64.decode
  633. funcs.base64_encode = funcs.base64.encode
  634. funcs.base64_decode = funcs.base64.decode
  635.  
  636. funcs.crypt.hex.encode = function(txt)
  637.     txt = tostring(txt)
  638.     local hex = ''
  639.     for i = 1, #txt do
  640.         hex = hex .. string.format("%02x", string.byte(txt, i))
  641.     end
  642.     return hex
  643. end
  644. funcs.crypt.hex.decode = function(hex)
  645.     hex = tostring(hex)
  646.     local text = ""
  647.     for i = 1, #hex, 2 do
  648.         local byte_str = string.sub(hex, i, i+1)
  649.         local byte = tonumber(byte_str, 16)
  650.         text = text .. string.char(byte)
  651.     end
  652.     return text
  653. end
  654. funcs.crypt.url.encode = function(a)
  655.     return game:GetService("HttpService"):UrlEncode(a)
  656. end
  657. funcs.crypt.url.decode = function(a)
  658.     a = tostring(a)
  659.     a = string.gsub(a, "+", " ")
  660.     a = string.gsub(a, "%%(%x%x)", function(hex)
  661.         return string.char(tonumber(hex, 16))
  662.     end)
  663.     a = string.gsub(a, "\r\n", "\n")
  664.     return a
  665. end
  666. funcs.crypt.generatekey = function(optionalSize)
  667.     local key = ''
  668.     local a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  669.     for i = 1, optionalSize or 32 do local n = math.random(1, #a) key = key .. a:sub(n, n) end
  670.     return funcs.base64.encode(key)
  671. end
  672. funcs.crypt.generatebytes = function(size)
  673.     if type(size) ~= 'number' then return error('missing arguement #1 to \'generatebytes\' (number expected)') end
  674.     return funcs.crypt.generatekey(size)
  675. end
  676. funcs.crypt.encrypt = function(a, b)
  677.     local result = {}
  678.     a = tostring(a) b = tostring(b)
  679.     for i = 1, #a do
  680.         local byte = string.byte(a, i)
  681.         local keyByte = string.byte(b, (i - 1) % #b + 1)
  682.         table.insert(result, string.char(bit32.bxor(byte, keyByte)))
  683.     end
  684.     return table.concat(result)
  685. end
  686. funcs.crypt.decrypt = funcs.crypt.encrypt
  687. funcs.crypt.random = function(len)
  688.     return funcs.crypt.generatekey(len)
  689. end
  690.  
  691. funcs.isrbxactive = function()
  692.     return active
  693. end
  694. funcs.isgameactive = funcs.isrbxactive
  695. funcs.gethui = function()
  696.     local s, H = pcall(function()
  697.         return game:GetService("CoreGui").RobloxGui
  698.     end)
  699.     if H then
  700.         if not hui.Parent then
  701.             hui.Parent = H.Parent
  702.         end
  703.         return hui
  704.     else
  705.         if not hui.Parent then
  706.             hui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  707.         end
  708.     end
  709.     return hui
  710. end
  711. if getgenv().getrenv and #getgenv().getrenv() == 0 or not getgenv().getrenv then
  712.     getgenv().getrenv = nil
  713.     getgenv().getrenv = function() -- Override incognito's getrenv
  714.         return renv -- couldn't think of a better way to implement it
  715.     end
  716. end
  717. funcs.setclipboard = function(data)
  718.     repeat task.wait() until ClipboardQueue:Current()[1] == data or ClipboardQueue:IsEmpty()
  719.     ClipboardQueue:Queue(data)
  720.     local old = game:GetService("UserInputService"):GetFocusedTextBox()
  721.     local copy = ClipboardQueue:Current()[1]
  722.     ClipboardBox:CaptureFocus()
  723.     ClipboardBox.Text = copy
  724.  
  725.     local KeyCode = Enum.KeyCode
  726.     local Keys = {KeyCode.RightControl, KeyCode.A}
  727.     local Keys2 = {KeyCode.RightControl, KeyCode.C, KeyCode.V}
  728.  
  729.     for _, v in ipairs(Keys) do
  730.         vim:SendKeyEvent(true, v, false, game)
  731.         task.wait()
  732.     end
  733.     for _, v in ipairs(Keys) do
  734.         vim:SendKeyEvent(false, v, false, game)
  735.         task.wait()
  736.     end
  737.     for _, v in ipairs(Keys2) do
  738.         vim:SendKeyEvent(true, v, false, game)
  739.         task.wait()
  740.     end
  741.     for _, v in ipairs(Keys2) do
  742.         vim:SendKeyEvent(false, v, false, game)
  743.         task.wait()
  744.     end
  745.     ClipboardBox.Text = ''
  746.     if old then old:CaptureFocus() end
  747.     task.wait(.18)
  748.     ClipboardQueue:Update()
  749. end
  750. funcs.syn.write_clipboard = funcs.setclipboard
  751. funcs.toclipboard = funcs.setclipboard
  752. funcs.writeclipboard = funcs.setclipboard
  753. funcs.setrbxclipboard = funcs.setclipboard
  754.  
  755. funcs.isrenderobj = function(thing)
  756.     return Drawings[thing] ~= nil
  757. end
  758. funcs.getrenderproperty = function(thing, prop)
  759.     return thing[prop]
  760. end
  761. funcs.setrenderproperty = function(thing, prop, val)
  762.     local success, err = pcall(function()
  763.         thing[prop] = val
  764.     end)
  765.     if not success and err then warn(err) end
  766. end
  767.  
  768. funcs.syn.protect_gui = function(gui)
  769.     names[gui] = {name=gui.Name,parent=gui.Parent}
  770.     protecteduis[gui] = gui
  771.     gui.Name = funcs.crypt.random(64) -- 64 byte string, removed hashing cuz its useless lmao
  772.     gui.Parent = gethui()
  773. end
  774. funcs.syn.unprotect_gui = function(gui)
  775.     if names[gui] then gui.Name = names[gui].name gui.Parent = names[gui].parent end protecteduis[gui] = nil
  776. end
  777. funcs.syn.protectgui = funcs.syn.protect_gui
  778. funcs.syn.unprotectgui = funcs.syn.unprotect_gui
  779. funcs.syn.secure_call = function(func) -- Does not do a secure call, just pcalls it.
  780.     return pcall(func)
  781. end
  782.  
  783.  
  784. funcs.isreadonly = function(tbl)
  785.     if type(tbl) ~= 'table' then return false end
  786.     return table.isfrozen(tbl)
  787. end
  788. funcs.setreadonly = function(tbl, cond)
  789.     if cond then
  790.         table.freeze(tbl)
  791.     else
  792.         return funcs.deepclone(tbl)
  793.     end
  794. end
  795. funcs.httpget = function(url)
  796.     return game:HttpGet(url)
  797. end
  798. funcs.httppost = function(url, body, contenttype)
  799.     return game:HttpPostAsync(url, body, contenttype)
  800. end
  801. funcs.request = function(args)
  802.     local Body = nil
  803.     local Timeout = 0
  804.     local function callback(success, body)
  805.         Body = body
  806.         Body['Success'] = success
  807.     end
  808.     HttpService:RequestInternal(args):Start(callback)
  809.     while not Body and Timeout < 10 do
  810.         task.wait(.1)
  811.         Timeout = Timeout + .1
  812.     end
  813.     return Body
  814. end
  815. funcs.mouse1click = function(x, y)
  816.     x = x or 0
  817.     y = y or 0
  818.     vim:SendMouseButtonEvent(x, y, 0, true, game, false)
  819.     task.wait()
  820.     vim:SendMouseButtonEvent(x, y, 0, false, game, false)
  821. end
  822. funcs.mouse2click = function(x, y)
  823.     x = x or 0
  824.     y = y or 0
  825.     vim:SendMouseButtonEvent(x, y, 1, true, game, false)
  826.     task.wait()
  827.     vim:SendMouseButtonEvent(x, y, 1, false, game, false)
  828. end
  829. funcs.mouse1press = function(x, y)
  830.     x = x or 0
  831.     y = y or 0
  832.     vim:SendMouseButtonEvent(x, y, 0, true, game, false)
  833. end
  834. funcs.mouse1release = function(x, y)
  835.     x = x or 0
  836.     y = y or 0
  837.     vim:SendMouseButtonEvent(x, y, 0, false, game, false)
  838. end
  839. funcs.mouse2press = function(x, y)
  840.     x = x or 0
  841.     y = y or 0
  842.     vim:SendMouseButtonEvent(x, y, 1, true, game, false)
  843. end
  844. funcs.mouse2release = function(x, y)
  845.     x = x or 0
  846.     y = y or 0
  847.     vim:SendMouseButtonEvent(x, y, 1, false, game, false)
  848. end
  849. funcs.mousescroll = function(x, y, a)
  850.     x = x or 0
  851.     y = y or 0
  852.     a = a and true or false
  853.     vim:SendMouseWheelEvent(x, y, a, game)
  854. end
  855. funcs.keyclick = function(key)
  856.     if typeof(key) == 'number' then
  857.         if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  858.         vim:SendKeyEvent(true, keys[key], false, game)
  859.         task.wait()
  860.         vim:SendKeyEvent(false, keys[key], false, game)
  861.     elseif typeof(Key) == 'EnumItem' then
  862.         vim:SendKeyEvent(true, key, false, game)
  863.         task.wait()
  864.         vim:SendKeyEvent(false, key, false, game)
  865.     end
  866. end
  867. funcs.keypress = function(key)
  868.     if typeof(key) == 'number' then
  869.         if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  870.         vim:SendKeyEvent(true, keys[key], false, game)
  871.     elseif typeof(Key) == 'EnumItem' then
  872.         vim:SendKeyEvent(true, key, false, game)
  873.     end
  874. end
  875. funcs.keyrelease = function(key)
  876.     if typeof(key) == 'number' then
  877.         if not keys[key] then return error("Key "..tostring(key) .. ' not found!') end
  878.         vim:SendKeyEvent(false, keys[key], false, game)
  879.     elseif typeof(Key) == 'EnumItem' then
  880.         vim:SendKeyEvent(false, key, false, game)
  881.     end
  882. end
  883. funcs.mousemoverel = function(relx, rely)
  884.     local Pos = workspace.CurrentCamera.ViewportSize
  885.     relx = relx or 0
  886.     rely = rely or 0
  887.     local x = Pos.X * relx
  888.     local y = Pos.Y * rely
  889.     vim:SendMouseMoveEvent(x, y, game)
  890. end
  891. funcs.mousemoveabs = function(x, y)
  892.     x = x or 0 y = y or 0
  893.     vim:SendMouseMoveEvent(x, y, game)
  894. end
  895.  
  896. funcs.newcclosure = function(f)
  897.     local a = coroutine.wrap(function(...)
  898.         local b = {coroutine.yield()}
  899.         while true do
  900.             b = {coroutine.yield(f(table.unpack(b)))}
  901.         end
  902.     end)
  903.     a()
  904.     return a
  905. end -- Credits to myworld AND EMPER for this
  906. funcs.iscclosure = function(fnc) return debug.info(fnc, 's') == '[C]' end
  907. funcs.islclosure = function(func) return not funcs.iscclosure(func) end
  908. funcs.isexecutorclosure = function(fnc)
  909.     local found = false
  910.     for i, v in pairs(getgenv()) do
  911.         if v == fnc then return true end
  912.     end
  913.     for i = 1, math.huge do
  914.         local s, env = pcall(getfenv, i)
  915.         if not s or found then break end
  916.         if type(env) == "table" then
  917.             for _, v in pairs(env) do
  918.                 if v == fnc then
  919.                     found = true
  920.                     break
  921.                 end
  922.             end
  923.         end
  924.         if found then break end
  925.     end
  926.  
  927.     return found
  928. end
  929. funcs.newlclosure = function(fnc)
  930.     return function(...) return fnc(...) end
  931. end
  932. funcs.clonefunction = funcs.newlclosure
  933. funcs.is_l_closure = funcs.islclosure
  934. funcs.is_executor_closure = funcs.isexecutorclosure
  935. funcs.isourclosure = funcs.isexecutorclosure
  936. funcs.isexecclosure = funcs.isexecutorclosure
  937. funcs.checkclosure = funcs.isourclosure
  938.  
  939. --[[ File system is something i do not know how to implement in roblox lua.
  940. UPDATE AT 18/5/2024:
  941. I figured out i can use temp file system with tables.
  942. ]]
  943. local files = {}
  944.  
  945. local function startswith(a, b)
  946.     return a:sub(1, #b) == b
  947. end
  948. local function endswith(hello, lo)
  949.     return hello:sub(#hello - #lo + 1, #hello) == lo
  950. end
  951.  
  952. funcs.writefile = function(path, content)
  953.     local Path = path:split('/')
  954.     local CurrentPath = {}
  955.     for i = 1, #Path do
  956.         local a = Path[i]
  957.         CurrentPath[i] = a
  958.         if not files[a] and i ~= #Path then
  959.             files[table.concat(CurrentPath, '/')] = {}
  960.             files[table.concat(CurrentPath, '/') .. '/'] = files[table.concat(CurrentPath, '/')]
  961.         elseif i == #Path then
  962.             files[table.concat(CurrentPath, '/')] = tostring(content)
  963.         end
  964.     end
  965. end
  966. funcs.makefolder = function(path)
  967.     files[path] = {}
  968.     files[path .. '/'] = files[path]
  969. end
  970. funcs.isfolder = function(path)
  971.     return type(files[path]) == 'table'
  972. end
  973. funcs.isfile = function(path)
  974.     return type(files[path]) == 'string'
  975. end
  976. funcs.readfile = function(path)
  977.     return files[path]
  978. end
  979. funcs.appendfile = function(path, text2)
  980.     funcs.writefile(path, funcs.readfile(path) .. text2)
  981. end
  982. funcs.loadfile = function(path)
  983.     local content = funcs.readfile(path)
  984.     if not content then error('File \'' .. tostring(path) .. '\' does not exist.') return '' end
  985.     local s, func = pcall(function()
  986.         return loadstring(content)
  987.     end)
  988.     return func, not s and func or nil
  989. end
  990. funcs.delfolder = function(path)
  991.     local f = files[path]
  992.     if type(f) == 'table' then files[path] = nil end
  993. end
  994. funcs.delfile = function(path)
  995.     local f = files[path]
  996.     if type(f) == 'string' then files[path] = nil end
  997. end
  998. funcs.listfiles = function(path)
  999.     if not path or path == '' then
  1000.         local Files = {}
  1001.         for i, v in pairs(files) do
  1002.             if #i:split('/') == 1 then table.insert(Files, i) end
  1003.         end
  1004.         return Files
  1005.     end
  1006.     if type(files[path]) ~= 'table' then return error(path .. ' is not a folder.') end
  1007.     local Files = {}
  1008.     for i, v in pairs(files) do
  1009.         if startswith(i, path .. '/') and not endswith(i, '/') and i ~= path and #i:split('/') == (#path:split('/') + 1) then table.insert(Files, i) end
  1010.     end
  1011.     return Files
  1012. end
  1013.  
  1014. funcs.http.request = funcs.request
  1015. funcs.syn.crypt = funcs.crypt
  1016. funcs.syn.crypto = funcs.crypt
  1017. funcs.syn_backup = funcs.syn
  1018.  
  1019.  
  1020. funcs.getexecutorname = function()
  1021.     return 'MoreUNC', Version
  1022. end
  1023. funcs.identifyexecutor = funcs.getexecutorname
  1024. funcs.http_request = getgenv().request or funcs.request
  1025. funcs.getscripts = function()
  1026.     local a = {};for i, v in pairs(game:GetDescendants()) do if v:IsA("LocalScript") or v:IsA("ModuleScript") then table.insert(a, v) end end return a
  1027. end
  1028. funcs.get_scripts = function()
  1029.     local a = {};for i, v in pairs(game:GetDescendants()) do if v:IsA("LocalScript") or v:IsA("ModuleScript") then table.insert(a, v) end end return a
  1030. end
  1031. funcs.getmodules = function()
  1032.     local a = {};for i, v in pairs(game:GetDescendants()) do if v:IsA("ModuleScript") then table.insert(a, v) end end return a
  1033. end
  1034. funcs.getloadedmodules = funcs.getmodules
  1035. funcs.make_readonly = funcs.setreadonly
  1036. funcs.makereadonly = funcs.setreadonly
  1037. funcs.base64encode = funcs.crypt.base64encode
  1038. funcs.base64decode = funcs.crypt.base64decode
  1039. funcs.clonefunc = funcs.clonefunction
  1040. funcs.setsimulationradius = function(Distance, MaxDistance)
  1041.     local LocalPlayer = game:GetService("Players").LocalPlayer
  1042.     assert(type(Distance)=='number','Invalid arguement #1 to \'setsimulationradius\', Number expected got ' .. type(Distance))
  1043.     LocalPlayer.SimulationRadius = type(Distance) == 'number' and Distance or LocalPlayer.SimulationRadius
  1044.     if MaxDistance then
  1045.         assert(type(MaxDistance)=='number','Invalid arguement #2 to \'setsimulationradius\', Number expected got ' .. type(MaxDistance))
  1046.         LocalPlayer.MaxSimulationDistance = MaxDistance
  1047.     end
  1048. end
  1049. funcs.getinstances = function()
  1050.     return game:GetDescendants()
  1051. end
  1052. funcs.getnilinstances = function()
  1053.     return Instances
  1054. end
  1055. funcs.iswriteable = function(tbl)
  1056.     return not table.isfrozen(tbl)
  1057. end
  1058. funcs.makewriteable = function(tbl)
  1059.     return funcs.setreadonly(tbl, false)
  1060. end
  1061. funcs.isscriptable = function(self, prop)
  1062.     return table.find(Hidden, prop) == nil
  1063. end
  1064. funcs.getrunningscripts = function()
  1065.     local scripts = {}
  1066.     for _, v in pairs(funcs.getinstances()) do
  1067.         if v:IsA("LocalScript") and v.Enabled then table.insert(scripts, v) end
  1068.     end
  1069.     return scripts
  1070. end
  1071. funcs.fireproximityprompt = function(p)
  1072.     local Hold, Distance, Enabled, Thing, CFrame1= p.HoldDuration, p.MaxActivationDistance, p.Enabled, p.RequiresLineOfSight, nil
  1073.     -- Make it activatable from anywhere
  1074.     p.MaxActivationDistance = math.huge
  1075.     -- Make it take 0 seconds to activate
  1076.     p.HoldDuration = 0
  1077.     -- Make it enabled (so you can activate it)
  1078.     p.Enabled = true
  1079.     -- Disable RequiresLineOfSight
  1080.     p.RequiresLineOfSight = false
  1081.     -- Show the thingy
  1082.     local function get()
  1083.         local classes = {'BasePart', 'Part', 'MeshPart'}
  1084.         for _, v in pairs(classes) do
  1085.             if p:FindFirstAncestorOfClass(v) then
  1086.                 return p:FindFirstAncestorOfClass(v)
  1087.             end
  1088.         end
  1089.     end
  1090.     local a = get()
  1091.     if not a then
  1092.         local parent = p.Parent
  1093.         p.Parent = Instance.new("Part", workspace)
  1094.         a = p.Parent
  1095.     end
  1096.     CFrame1 = a.CFrame
  1097.     a.CFrame = game:GetService("Players").LocalPlayer.Character.Head.CFrame + game:GetService("Players").LocalPlayer.Character.Head.CFrame.LookVector * 2
  1098.     task.wait()
  1099.     p:InputHoldBegin()
  1100.     task.wait()
  1101.     p:InputHoldEnd()
  1102.     p.HoldDuration = Hold
  1103.     p.MaxActivationDistance = Distance
  1104.     p.Enabled = Enabled
  1105.     p.RequiresLineOfSight = Thing
  1106.     a.CFrame = CFrame1
  1107.     p.Parent = parent or p.Parent
  1108. end
  1109. funcs.firetouchinterest = function(toTouch, TouchWith, on)
  1110.     if on == 0 then return end
  1111.     if toTouch.ClassName == 'TouchTransmitter' then
  1112.         local function get()
  1113.             local classes = {'BasePart', 'Part', 'MeshPart'}
  1114.             for _, v in pairs(classes) do
  1115.                 if toTouch:FindFirstAncestorOfClass(v) then
  1116.                     return toTouch:FindFirstAncestorOfClass(v)
  1117.                 end
  1118.             end
  1119.         end
  1120.         toTouch = get()
  1121.     end
  1122.     local cf = toTouch.CFrame
  1123.     local anc = toTouch.CanCollide
  1124.     toTouch.CanCollide = false
  1125.     toTouch.CFrame = TouchWith.CFrame
  1126.     task.wait()
  1127.     toTouch.CFrame = cf
  1128.     toTouch.CanCollide = anc
  1129. end -- i admit its kinda bad dont f***ing attack me
  1130.  
  1131. -- SHA256 Hashing
  1132. local function str2hexa(a)return string.gsub(a,".",function(b)return string.format("%02x",string.byte(b))end)end;local function num2s(c,d)local a=""for e=1,d do local f=c%256;a=string.char(f)..a;c=(c-f)/256 end;return a end;local function s232num(a,e)local d=0;for g=e,e+3 do d=d*256+string.byte(a,g)end;return d end;local function preproc(h,i)local j=64-(i+9)%64;i=num2s(8*i,8)h=h.."\128"..string.rep("\0",j)..i;assert(#h%64==0)return h end;local function k(h,e,l)local m={}local n={0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2}for g=1,16 do m[g]=s232num(h,e+(g-1)*4)end;for g=17,64 do local o=m[g-15]local p=bit.bxor(bit.rrotate(o,7),bit.rrotate(o,18),bit.rshift(o,3))o=m[g-2]local q=bit.bxor(bit.rrotate(o,17),bit.rrotate(o,19),bit.rshift(o,10))m[g]=(m[g-16]+p+m[g-7]+q)%2^32 end;local r,s,b,t,u,v,w,x=l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8]for e=1,64 do local p=bit.bxor(bit.rrotate(r,2),bit.rrotate(r,13),bit.rrotate(r,22))local y=bit.bxor(bit.band(r,s),bit.band(r,b),bit.band(s,b))local z=(p+y)%2^32;local q=bit.bxor(bit.rrotate(u,6),bit.rrotate(u,11),bit.rrotate(u,25))local A=bit.bxor(bit.band(u,v),bit.band(bit.bnot(u),w))local B=(x+q+A+n[e]+m[e])%2^32;x=w;w=v;v=u;u=(t+B)%2^32;t=b;b=s;s=r;r=(B+z)%2^32 end;l[1]=(l[1]+r)%2^32;l[2]=(l[2]+s)%2^32;l[3]=(l[3]+b)%2^32;l[4]=(l[4]+t)%2^32;l[5]=(l[5]+u)%2^32;l[6]=(l[6]+v)%2^32;l[7]=(l[7]+w)%2^32;l[8]=(l[8]+x)%2^32 end;funcs.crypt.hash=function(h)h=preproc(h,#h)local l={0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19}for e=1,#h,64 do k(h,e,l)end;return str2hexa(num2s(l[1],4)..num2s(l[2],4)..num2s(l[3],4)..num2s(l[4],4)..num2s(l[5],4)..num2s(l[6],4)..num2s(l[7],4)..num2s(l[8],4))end
  1133.  
  1134. funcs.Drawing.new = function(Type) -- Drawing.new
  1135.     local baseProps = {
  1136.         Visible = false,
  1137.         Color = Color3.new(0,0,0),
  1138.         ClassName = nil
  1139.     }
  1140.     if Type == 'Line' then
  1141.         local a = Instance.new("Frame", Instance.new("ScreenGui", DrawingDict))
  1142.         a.Visible = false
  1143.         a.Size = UDim2.new(0, 0, 0, 0)
  1144.         a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1145.         a.BackgroundTransparency = 1
  1146.         a.BorderSizePixel = 0
  1147.  
  1148.         local meta = baseProps
  1149.         meta.ClassName = Type
  1150.         meta.__index = {
  1151.             Thickness = 1,
  1152.             From = Vector2.new(0, 0),
  1153.             To = Vector2.new(0, 0),
  1154.             Transparency = 0,
  1155.             Remove = function()
  1156.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1157.                 a:Destroy()
  1158.             end,
  1159.             Destroy = function()
  1160.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1161.                 a:Destroy()
  1162.             end,
  1163.             updateLine = function(self)
  1164.                 if not a then return end
  1165.                 local from = self.From
  1166.                 local to = self.To
  1167.                 local distance = (to - from).Magnitude
  1168.                 local angle = math.deg(math.atan2(to.Y - from.Y, to.X - from.X))
  1169.  
  1170.                 a.Size = UDim2.new(0, distance, 0, self.Thickness)
  1171.                 a.Position = UDim2.new(0, from.X, 0, from.Y)
  1172.                 a.Rotation = angle
  1173.             end
  1174.         }
  1175.  
  1176.         meta.__newindex = function(self, key, value)
  1177.             if not self then return end
  1178.             if key == 'Thickness' and typeof(value) == 'number' then
  1179.                 rawset(self, key, value)
  1180.                 a.Size = UDim2.new(0, (self.To - self.From).Magnitude, 0, value)
  1181.             elseif key == 'Visible' and typeof(value) == 'boolean' then
  1182.                 rawset(self, key, value)
  1183.                 a.Visible = value
  1184.             elseif key == 'Color' and typeof(value) == 'Color3' then
  1185.                 rawset(self, key, value)
  1186.                 a.BackgroundColor3 = value
  1187.             elseif key == 'Transparency' and typeof(value) == 'number' and value <= 1 then
  1188.                 rawset(self, key, value)
  1189.                 a.BackgroundTransparency = 1 - value
  1190.             elseif key == 'From' and typeof(value) == 'Vector2' then
  1191.                 rawset(self, key, value)
  1192.                 self:updateLine()
  1193.             elseif key == 'To' and typeof(value) == 'Vector2' then
  1194.                 rawset(self, key, value)
  1195.                 self:updateLine()
  1196.             end
  1197.         end
  1198.         local meta1 = setmetatable({}, meta)
  1199.         Drawings[meta1] = meta1
  1200.         return meta1
  1201.     elseif Type == 'Square' then
  1202.         local a = Instance.new("Frame", DrawingDict)
  1203.         a.Visible = false
  1204.         a.Size = UDim2.new(0, 0, 0, 0)
  1205.         a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1206.         a.BackgroundTransparency = 1
  1207.         a.BorderSizePixel = 0
  1208.         local b = Instance.new("UIStroke", a)
  1209.         b.Color = Color3.fromRGB(255, 255, 255)
  1210.         b.Enabled = true
  1211.  
  1212.         local meta = baseProps
  1213.         meta.ClassName = Type
  1214.         meta.__index = {
  1215.             Size = Vector2.new(0,0),
  1216.             Position = Vector2.new(0, 0),
  1217.             Remove = function()
  1218.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1219.                 a:Destroy()
  1220.             end,
  1221.             Destroy = function()
  1222.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1223.                 a:Destroy()
  1224.             end,
  1225.             updateSquare = function(self)
  1226.                 if not a then return end
  1227.                 a.Size = UDim2.new(0, self.Size.X, 0, self.Size.Y)
  1228.                 a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  1229.             end
  1230.         }
  1231.  
  1232.         meta.__newindex = function(self, key, value)
  1233.             if not self then return end
  1234.             if key == 'Filled' and typeof(value) == 'boolean' then
  1235.                 rawset(self, key, value)
  1236.                 b.Enabled = not value
  1237.                 a.BackgroundTransparency = value and 0 or 1
  1238.             elseif key == 'Visible' and typeof(value) == 'boolean' then
  1239.                 rawset(self, key, value)
  1240.                 a.Visible = value
  1241.             elseif key == 'Color' and typeof(value) == 'Color3' then
  1242.                 rawset(self, key, value)
  1243.                 a.BackgroundColor3 = value
  1244.                 b.Color = value
  1245.             elseif key == 'Position' and typeof(value) == 'Vector2' then
  1246.                 rawset(self, key, value)
  1247.                 self:updateSquare()
  1248.             elseif key == 'Size' and typeof(value) == 'Vector2' then
  1249.                 rawset(self, key, value)
  1250.                 self:updateSquare()
  1251.             end
  1252.         end
  1253.         local meta1 = setmetatable({}, meta)
  1254.         Drawings[meta1] = meta1
  1255.         return meta1
  1256.     elseif Type == 'Circle' then
  1257.         local a = Instance.new("Frame", Instance.new("ScreenGui", DrawingDict))
  1258.         a.Visible = false
  1259.         a.Size = UDim2.new(0, 0, 0, 0)
  1260.         a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1261.         a.BackgroundTransparency = 1
  1262.         a.BorderSizePixel = 0
  1263.         local b = Instance.new("UIStroke", a)
  1264.         b.Color = Color3.fromRGB(255, 255, 255)
  1265.         b.Enabled = false
  1266.         b.Thickness = 1
  1267.         local c = Instance.new("UICorner", a)
  1268.         c.CornerRadius = UDim.new(1, 0)
  1269.  
  1270.         local meta = baseProps
  1271.         meta.ClassName = Type
  1272.         meta.__index = {
  1273.             Thickness = 1,
  1274.             Filled = false,
  1275.             NumSides = 0,
  1276.             Radius = 1,
  1277.             Position = Vector2.new(0, 0),
  1278.             Transparency = 0,
  1279.             Remove = function()
  1280.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1281.                 a:Destroy()
  1282.             end,
  1283.             Destroy = function()
  1284.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1285.                 a:Destroy()
  1286.             end,
  1287.             updateCircle = function(self)
  1288.                 if not b or not a then return end
  1289.                 a.Size = UDim2.new(0, self.Radius, 0, self.Radius)
  1290.                 a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  1291.                 b.Enabled = not self
  1292.                 b.Color = self.Color
  1293.             end
  1294.         }
  1295.  
  1296.         meta.__newindex = function(self, key, value)
  1297.             if not self then return end
  1298.             if key == 'Thickness' and typeof(value) == 'number' then
  1299.                 rawset(self, key, value)
  1300.                 b.Thickness = value
  1301.             elseif key == 'Visible' and typeof(value) == 'boolean' then
  1302.                 rawset(self, key, value)
  1303.                 a.Visible = value
  1304.             elseif key == 'Color' and typeof(value) == 'Color3' then
  1305.                 rawset(self, key, value)
  1306.                 a.BackgroundColor3 = value
  1307.                 a.Color = value
  1308.             elseif key == 'Transparency' and typeof(value) == 'number' then
  1309.                 rawset(self, key, value)
  1310.                 a.BackgroundTransparency = 1 - value
  1311.             elseif key == 'Position' and typeof(value) == 'Vector2' then
  1312.                 rawset(self, key, value)
  1313.                 self:updateCircle()
  1314.             elseif key == 'Radius' and typeof(value) == 'number' then
  1315.                 rawset(self, key, value)
  1316.                 self:updateCircle()
  1317.             elseif key == 'NumSides' and typeof(value) == 'number' then
  1318.                 rawset(self, key, value)
  1319.             elseif key == 'Filled' and typeof(value) == 'boolean' then
  1320.                 rawset(self, key, value)
  1321.                 self:updateCircle()
  1322.             end
  1323.         end
  1324.         local meta1 = setmetatable({}, meta)
  1325.         Drawings[meta1] = meta1
  1326.         return meta1
  1327.     elseif Type == 'Text' then
  1328.         local a = Instance.new("TextLabel", DrawingDict)
  1329.         a.Visible = false
  1330.         a.Size = UDim2.new(0, 0, 0, 0)
  1331.         a.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1332.         a.BackgroundTransparency = 1
  1333.         a.BorderSizePixel = 0
  1334.         a.TextStrokeColor3 = Color3.new(0,0,0)
  1335.         a.TextStrokeTransparency = 1
  1336.  
  1337.         local meta = baseProps
  1338.         meta.ClassName = Type
  1339.         meta.__index = {
  1340.             Text = '',
  1341.             Transparency = 0,
  1342.             Size = 0,
  1343.             Center = false,
  1344.             Outline = false,
  1345.             OutlineColor = Color3.new(0,0,0),
  1346.             Position = Vector2.new(0,0),
  1347.             Font = 3,
  1348.             Remove = function()
  1349.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1350.                 a:Destroy()
  1351.             end,
  1352.             Destroy = function()
  1353.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1354.                 a:Destroy()
  1355.             end,
  1356.             updateText = function(self)
  1357.                 if not a then return end
  1358.                 a.TextScaled = true
  1359.                 a.Size = UDim2.new(0, self.Size * 3, 0, self.Size / 2)
  1360.                 a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  1361.                 a.Text = self.Text
  1362.                 a.Font = Fonts[self.Font]
  1363.                 a.Visible = self.Visible
  1364.                 a.TextColor3 = self.Color
  1365.                 a.TextTransparency = 1 - self.Transparency
  1366.                 a.BorderSizePixel = self.Outline and 1 or 0
  1367.                 if self.Center then
  1368.                     a.TextXAlignment = Enum.TextXAlignment.Center
  1369.                     a.TextYAlignment = Enum.TextYAlignment.Center
  1370.                 else
  1371.                     a.TextXAlignment = Enum.TextXAlignment.Left
  1372.                     a.TextYAlignment = Enum.TextYAlignment.Top
  1373.                 end
  1374.                 a.TextStrokeTransparency = self.Outline and 0 or 1
  1375.                 a.TextStrokeColor3 = self.OutlineColor
  1376.             end
  1377.         }
  1378.  
  1379.         meta.__newindex = function(self, key, value)
  1380.             if not self then return end
  1381.             if key == 'Text' and typeof(value) == 'string' then
  1382.                 rawset(self, key, value)
  1383.             elseif key == 'Visible' and typeof(value) == 'boolean' then
  1384.                 rawset(self, key, value)
  1385.                 a.Visible = value
  1386.             elseif key == 'Color' and typeof(value) == 'Color3' then
  1387.                 rawset(self, key, value)
  1388.             elseif key == 'Transparency' and typeof(value) == 'number' then
  1389.                 rawset(self, key, value)
  1390.             elseif key == 'Position' and typeof(value) == 'Vector2' then
  1391.                 rawset(self, key, value)
  1392.             elseif key == 'Size' and typeof(value) == 'number' then
  1393.                 rawset(self, key, value)
  1394.             elseif key == 'Outline' and typeof(value) == 'boolean' then
  1395.                 rawset(self, key, value)
  1396.             elseif key == 'Center' and typeof(value) == 'boolean' then
  1397.                 rawset(self, key, value)
  1398.             elseif key == 'OutlineColor' and typeof(value) == 'Color3' then
  1399.                 rawset(self, key, value)
  1400.             elseif key == 'Font' and typeof(value) == 'number' then
  1401.                 rawset(self, key, value)
  1402.             end
  1403.             self:updateText()
  1404.         end
  1405.  
  1406.         local meta1 = setmetatable({}, meta)
  1407.         Drawings[meta1] = meta1
  1408.         return meta1
  1409.     elseif Type == 'Image' then
  1410.         local a = Instance.new("ImageLabel", DrawingDict)
  1411.         a.Visible = false
  1412.         a.Size = UDim2.new(0, 0, 0, 0)
  1413.         a.ImageColor3 = Color3.fromRGB(255,255,255)
  1414.         a.BackgroundTransparency = 1
  1415.         a.BorderSizePixel = 0
  1416.  
  1417.         local meta = baseProps
  1418.         meta.ClassName = 'Image'
  1419.         meta.__index = {
  1420.             Text = '',
  1421.             Transparency = 0,
  1422.             Size = Vector2.new(0, 0),
  1423.             Position = Vector2.new(0,0),
  1424.             Color = Color3.fromRGB(255, 255, 255),
  1425.             Image = '',
  1426.             Remove = function()
  1427.                 for i, v in pairs(Drawings) do if v == meta then Drawings[i] = nil end end
  1428.                 a:Destroy()
  1429.             end,
  1430.             Destroy = function()
  1431.                 for i, v in pairs(Drawings) do
  1432.                     if v == meta then Drawings[i] = nil end
  1433.                 end
  1434.                 a:Destroy()
  1435.             end,
  1436.             updateImage = function(self)
  1437.                 if not a then return end
  1438.                 a.Size = UDim2.new(0, self.Size.X, 0, self.Size.Y)
  1439.                 a.Position = UDim2.new(0, self.Position.X, 0, self.Position.Y)
  1440.                 a.Visible = self.Visible
  1441.                 a.ImageColor3 = self.Color
  1442.                 a.ImageTransparency = 1 - self.Transparency
  1443.                 a.BorderSizePixel = self.Outline and 1 or 0
  1444.                 a.Image = self.Image
  1445.             end
  1446.         }
  1447.  
  1448.         meta.__newindex = function(self, key, value)
  1449.             if not self then return end
  1450.             if key == 'Visible' and typeof(value) == 'boolean' then
  1451.                 rawset(self, key, value)
  1452.             elseif key == 'Color' and typeof(value) == 'Color3' then
  1453.                 rawset(self, key, value)
  1454.             elseif key == 'Transparency' and typeof(value) == 'number' then
  1455.                 rawset(self, key, value)
  1456.             elseif key == 'Position' and typeof(value) == 'Vector2' then
  1457.                 rawset(self, key, value)
  1458.             elseif key == 'Size' and typeof(value) == 'number' then
  1459.                 rawset(self, key, value)
  1460.             elseif key == 'Image' and typeof(value) == 'string' then
  1461.                 rawset(self, key, value)
  1462.             else
  1463.                 return
  1464.             end
  1465.             self:updateImage()
  1466.         end
  1467.  
  1468.         local meta1 = setmetatable({}, meta)
  1469.         Drawings[meta1] = meta1
  1470.         return meta1
  1471.     end
  1472. end
  1473.  
  1474. funcs.randomstring = funcs.crypt.random
  1475. funcs.getprotecteduis = function()
  1476.     return protecteduis
  1477. end
  1478. funcs.getprotectedguis = funcs.getprotecteduis
  1479. funcs.cleardrawcache = function()
  1480.     for _, v in pairs(Drawings) do
  1481.         v:Remove()
  1482.     end
  1483.     table.clear(Drawings)
  1484. end
  1485. funcs.checkcaller = function()
  1486.     local info = debug.info(getgenv, 'slnaf')
  1487.     return debug.info(1, 'slnaf')==info
  1488. end
  1489. funcs.getthreadcontext = function() -- funny little way of getting this
  1490.     if coroutine.isyieldable(coroutine.running()) then -- check if u can use task.wait or not
  1491.         QueueGetIdentity()
  1492.         task.wait(.1)
  1493.         return tonumber(Identity)
  1494.     else
  1495.         if Identity == -1 then
  1496.             task.spawn(QueueGetIdentity)
  1497.             return 1
  1498.         else
  1499.             return tonumber(Identity)
  1500.         end
  1501.     end
  1502. end
  1503. funcs.getthreadidentity = funcs.getthreadcontext
  1504. funcs.getidentity = funcs.getthreadcontext
  1505. funcs.rconsolecreate = function()
  1506.     local Clone = Console:Clone()
  1507.     Clone.Parent = gethui()
  1508.     ConsoleClone = Clone
  1509.     ConsoleClone.ConsoleFrame.Topbar.InputBegan:Connect(function(input)
  1510.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1511.             startDrag(input, ConsoleClone.ConsoleFrame)
  1512.         end
  1513.     end)
  1514. end
  1515. funcs.rconsoledestroy = function()
  1516.     if ConsoleClone then ConsoleClone:Destroy() end
  1517.     ConsoleClone = nil
  1518. end
  1519. funcs.rconsoleprint = function(msg, cc)
  1520.     local CONSOLE = ConsoleClone or Console
  1521.     repeat task.wait() until ConsoleQueue:IsEmpty()
  1522.     msg = tostring(msg)
  1523.     local last_color = nil
  1524.  
  1525.     msg = msg:gsub('@@(%a+)@@', function(color)
  1526.         local colorName = color:upper()
  1527.         local rgbColor = colors[colorName]
  1528.         if rgbColor then
  1529.             local fontTag = string.format('<font color="rgb(%d,%d,%d)">', rgbColor.R * 255, rgbColor.G * 255, rgbColor.B * 255)
  1530.             local result = last_color and '</font>' .. fontTag or fontTag
  1531.             last_color = colorName
  1532.             return result
  1533.         else
  1534.             return '@@' .. color .. '@@'
  1535.         end
  1536.     end)
  1537.  
  1538.     if last_color then
  1539.         msg = msg .. '</font>'
  1540.     end
  1541.  
  1542.     if msg:match('<font color=".+">.+</font>') then
  1543.         if msg:match('<font color=".+"></font>') == msg then MessageColor = colors[last_color] return end
  1544.     end
  1545.  
  1546.     local tmp = MessageTemplate:Clone()
  1547.     tmp.Parent = CONSOLE.ConsoleFrame.Holder
  1548.     tmp.Text = msg
  1549.     tmp.Visible = true
  1550.     tmp.TextColor3 = cc and cc or MessageColor
  1551. end
  1552. funcs.rconsoleinput = function()
  1553.     local CONSOLE = ConsoleClone or Console
  1554.     repeat task.wait() until ConsoleQueue:IsEmpty()
  1555.     ConsoleQueue:Queue('input')
  1556.     local box = InputTemplate:Clone()
  1557.     local val
  1558.     box.Parent = CONSOLE.ConsoleFrame.Holder
  1559.     box.Visible = true
  1560.     box.TextEditable = true
  1561.     box.TextColor3 = MessageColor
  1562.  
  1563.     box.FocusLost:Connect(function(a)
  1564.         if not a then return end
  1565.         val = box.Text
  1566.         ConsoleQueue:Update()
  1567.     end)
  1568.  
  1569.     local FOCUSED = false
  1570.     while true do
  1571.         if box.Text:sub(#box.Text, #box.Text) == '_' or box.Text == '' or not box:IsFocused() then
  1572.             box.TextColor3 = Color3.fromRGB(255, 255, 255)
  1573.             box.Text = box.Text .. '_'
  1574.  
  1575.             for _ = 1, 100 do
  1576.                 task.wait(1/2)
  1577.                 if box:IsFocused() then
  1578.                     FOCUSED = true
  1579.                     box.TextColor3 = MessageColor
  1580.                     break
  1581.                 end
  1582.                 box.Text = box.Text:sub(#box.Text, #box.Text) == '_' and box.Text:sub(#box.Text-1, #box.Text-1) or box.Text .. '_'
  1583.             end
  1584.             if FOCUSED then break end
  1585.         else
  1586.             task.wait(0.1)
  1587.         end
  1588.     end
  1589.     repeat task.wait() until val
  1590.     return val
  1591. end
  1592. funcs.rconsolename = function(a)
  1593.     if ConsoleClone then
  1594.         ConsoleClone.ConsoleFrame.Title.Text = a
  1595.     else
  1596.         Console.ConsoleFrame.Title.Text = a
  1597.     end
  1598. end
  1599. funcs.printconsole = function(msg, r, g, b)
  1600.     r = r or 0
  1601.     g = g or 0
  1602.     b = b or 0
  1603.     rconsoleprint(msg, Color3.fromRGB(r, g, b))
  1604. end
  1605. funcs.rconsoleclear = function()
  1606.     if ConsoleClone then
  1607.         for i, v in pairs(ConsoleClone.ConsoleFrame.Holder:GetChildren()) do
  1608.             if v.ClassName == 'TextLabel' or v.ClassName == 'TextBox' then v:Destroy() end
  1609.         end
  1610.     else
  1611.         for i, v in pairs(Console.ConsoleFrame.Holder:GetChildren()) do
  1612.             if v.ClassName == 'TextLabel' or v.ClassName == 'TextBox' then v:Destroy() end
  1613.         end
  1614.     end
  1615. end
  1616. funcs.rconsoleinfo = function(a)
  1617.     rconsoleprint('[INFO]: ' .. tostring(a))
  1618. end
  1619. funcs.rconsolewarn = function(a)
  1620.     rconsoleprint('[*]: ' .. tostring(a))
  1621. end
  1622. funcs.rconsoleerr = function(a)
  1623.     local clr = MessageColor
  1624.     local oldColor
  1625.     for i, v in pairs(colors) do
  1626.         if clr == v then oldColor = i break end
  1627.     end
  1628.     rconsoleprint(string.format('[@@RED@@*@@%s@@]: %s', oldColor, tostring(a)))
  1629. end
  1630. funcs.rconsoleinputasync = funcs.rconsoleinput
  1631. funcs.consolecreate = funcs.rconsolecreate
  1632. funcs.consoleclear = funcs.rconsoleclear
  1633. funcs.consoledestroy = funcs.rconsoledestroy
  1634. funcs.consoleinput = funcs.rconsoleinput
  1635. funcs.rconsolesettitle = funcs.rconsolename
  1636. funcs.consolesettitle = funcs.rconsolename
  1637.  
  1638. funcs.queue_on_teleport = function(scripttoexec) -- WARNING: MUST HAVE MOREUNC IN AUTO EXECUTE FOR THIS TO WORK.
  1639.     local newTPService = {
  1640.         __index = function(self, key)
  1641.             if key == 'Teleport' then
  1642.                 return function(gameId, player, teleportData, loadScreen)
  1643.                     teleportData = {teleportData, MOREUNCSCRIPTQUEUE=scripttoexec}
  1644.                     return oldGame:GetService("TeleportService"):Teleport(gameId, player, teleportData, loadScreen)
  1645.                 end
  1646.             end
  1647.         end
  1648.     }
  1649.     local gameMeta = {
  1650.         __index = function(self, key)
  1651.             if key == 'GetService' then
  1652.                 return function(name)
  1653.                     if name == 'TeleportService' then return newTPService end
  1654.                 end
  1655.             elseif key == 'TeleportService' then return newTPService end
  1656.             return game[key]
  1657.         end,
  1658.         __metatable = 'The metatable is protected'
  1659.     }
  1660.     getgenv().game = setmetatable({}, gameMeta)
  1661. end
  1662. funcs.queueonteleport = funcs.queue_on_teleport
  1663.  
  1664. local Count = 0
  1665. local Total = 0
  1666. print('Running MoreUNC | Roblox', version(), ' | Discord https://discord.gg/gYhqMRBeZV')
  1667.  
  1668. local funcs2 = {}
  1669. for i, _ in pairs(funcs) do
  1670.     table.insert(funcs2, i)
  1671. end
  1672. table.sort(funcs2, function(a, b)
  1673.     return string.byte(a:lower())<string.byte(b:lower())
  1674. end)
  1675.  
  1676. for i, v in pairs(funcs2) do
  1677.     if not getgenv()[i] then
  1678.         Total = Total + 1
  1679.     end
  1680. end
  1681.  
  1682. for _, i in pairs(funcs2) do
  1683.     local v = funcs[i]
  1684.     local Result = SafeOverride(i, v)
  1685.     if Result == 2 then Count = Count + 1 end
  1686.     local str = Result == 1 and ('[⛔] %s already exists.'):format(i) or Result == 2 and ("[✅] Added %s%s to the global environment. (%d/%d)"):format(i, type(v)=='function' and '()' or '', Count, Total) or Result ~= 1 and Result ~= 2 and ("[⛔] Unknown result for %s."):format(i)
  1687.     --print(str)
  1688. end
  1689.  
  1690. getgenv().syn.protect_gui(DrawingDict)
  1691. getgenv().syn.protect_gui(ClipboardUI)
  1692. print('Done adding functions!')
  1693. QueueGetIdentity()
  1694. getgenv().MoreUNC = true
Add Comment
Please, Sign In to add comment