Run it
Copy the script and paste it into your executor.
PureUNC = {
Version = ,
Functions = {},
Native = {}
}
Game =
RobloxInstance =
RobloxTypeof =
(Name)
Success, Value = (Game.GetService, Game, Name)
Success Value
RunService, Players, UserInputService, HttpService, UGCValidationService, ReplicatedFirst, StarterGui, StudioService, CoreGui, VirtualInput =
(),
(),
(),
(),
(),
(),
(),
(),
(),
()
NativeGetFenv = (getfenv) == getfenv
NativeGetGenv = () ==
Environment =
Global =
IsStudio = RunService RunService:()
NativeGetFenv
(() Environment = () )
NativeGetGenv
(() Global = () )
(Environment) ~= Environment =
(Global) ~= Global = Environment
CClosureCache = ({}, {__mode = })
ExecutorClosureCache = ({}, {__mode = })
ScriptEnvironmentCache = ({}, {__mode = })
CloneRefs = ({}, {__mode = })
InvalidRefs = ({}, {__mode = })
HiddenPropertyCache = ({}, {__mode = })
ScriptableCache = ({}, {__mode = })
DrawingCache = ({}, {__mode = })
InstanceCache = ({}, {__mode = })
Proxies = ({}, {__mode = })
SignalCache = ({}, {__mode = })
CallbackCache = ({}, {__mode = })
NamecallCache = ({}, {__mode = })
ReadonlyCache = ({}, {__mode = })
DebugMetadata = ({}, {__mode = })
SafeEnvironmentCache = ({}, {__mode = })
HiddenStackCache = ({}, {__mode = })
FlagCache = {}
ClipboardCache =
FPSCapCache =
SimulationRadiusCache =
WindowActive =
VirtualInput = VirtualInput
ThreadIdentityCache =
HiddenUI =
Base64Alphabet =
Base64DecodeMap = {}
InstanceProxy = {}
gameproxy =
VirtualInput ==
(() VirtualInput = RobloxInstance.() )
UserInputService
(()
UserInputService.WindowFocused:(() WindowActive = )
UserInputService.WindowFocusReleased:(() WindowActive = )
)
(()
InstanceCache[Game] =
_, Object Game:() InstanceCache[Object] =
Game.DescendantAdded:((Object) InstanceCache[Object] = )
Game.DescendantRemoving:((Object) InstanceCache[Object] = )
)
(InstanceProxy, {__index = RobloxInstance})
InstanceProxy.new = (Class, Parent)
Object = RobloxInstance.(Class)
InstanceCache[Object] =
Parent ~= Object.Parent = Parent
Object
Index = , #Base64Alphabet
Base64DecodeMap[.(Base64Alphabet, Index)] = Index -
()
(newproxy) ==
x = ()
x, (x)
x = {}
m = {}
(x, m)
x, m
RawInstanceNew = InstanceProxy.new
(x, class)
(newproxy) ~=
x
pr, mt = ()
Proxies[pr] = x
ev =
class ==
sp, smt = ()
rec = {
owner = x,
connections = {}
}
SignalCache[sp] = rec
ev = sp
smt.__index = (_, k)
k == k ==
(_, fn)
((fn) == , , )
cn = x.Event:(fn)
rec.connections[#rec.connections + ] = {
connection = cn,
func = fn,
enabled =
}
cn
k ==
(_, fn)
((fn) == , , )
cn
cn = x.Event:((...)
cn:()
(...)
)
rec.connections[#rec.connections + ] = {
connection = cn,
func = fn,
enabled =
}
cn
k ==
()
x.Event:()
ok, v = (()
x.Event[k]
)
ok
v
smt.__tostring = ()
(x.Event)
mt.__index = (t, k)
k == ev ~=
ev
v = x[k]
(v) ==
(self, ...)
self == t
self = x
Proxies[self] ~=
self = Proxies[self]
(self, ...)
v
mt.__newindex = (_, k, v)
class == k ==
CallbackCache[pr] = v
CallbackCache[x] = v
x[k] = v
mt.__tostring = ()
(x)
pr
InstanceProxy.new = (c, par)
x = (c)
out = x
c == c ==
out = (x, c)
par ~=
Proxies[out] ~=
Proxies[out].Parent = par
out.Parent = par
out
(t, k, v, force)
(t) ~=
force
ok, old = (()
t[k]
)
ok old ~=
ok = (()
(t, k, v)
)
ok
ok = (()
t[k] = v
)
ok
(a, seen, t)
(t) ~= seen[t]
seen[t] =
a[#a + ] = t
()
a = {}
seen = {}
(a, seen, Global)
(a, seen, Environment)
(a, seen, )
NativeGetGenv
(()
(a, seen, ())
)
NativeGetFenv
(()
(a, seen, ())
)
(()
(a, seen, ())
)
a
(t, k)
(t) ~=
ok, v = (()
t[k]
)
ok (v) ==
v
ok v ~=
x = {}
set = (()
(t, k, x)
)
set
set = (()
t[k] = x
)
set x
PureUNC.getgenv = ()
Global
PureUNC.base64encode = (s)
((s) == , , )
#s ==
o = {}
n =
i = , #s,
a = .(s, i)
b = .(s, i + )
c = .(s, i + )
v = bit32.(a, ) + bit32.(b, ) + c
a1 = bit32.(bit32.(v, ), ) +
a2 = bit32.(bit32.(v, ), ) +
a3 = bit32.(bit32.(v, ), ) +
a4 = bit32.(v, ) +
n +=
o[n] = .(Base64Alphabet, a1, a1)
n +=
o[n] = .(Base64Alphabet, a2, a2)
n +=
o[n] = i + <= #s .(Base64Alphabet, a3, a3)
n +=
o[n] = i + <= #s .(Base64Alphabet, a4, a4)
.(o)
PureUNC.base64decode = (s)
((s) == , , )
#s ==
s = .(s, , )
(#s % == , , )
o = {}
n =
i = , #s,
c1 = .(s, i)
c2 = .(s, i + )
c3 = .(s, i + )
c4 = .(s, i + )
(c1 c2 Base64DecodeMap[c1] ~= Base64DecodeMap[c2] ~= , , )
c3 ~=
(Base64DecodeMap[c3] ~= , , )
c4 ~=
(Base64DecodeMap[c4] ~= , , )
a = Base64DecodeMap[c1]
b = Base64DecodeMap[c2]
c = c3 ~= Base64DecodeMap[c3]
d = c4 ~= Base64DecodeMap[c4]
n +=
o[n] = .(bit32.(bit32.(a, ) + bit32.(b, ), ))
c3 ~=
n +=
o[n] = .(bit32.(bit32.(b, ) + bit32.(c, ), ))
c4 ~=
n +=
o[n] = .(bit32.(bit32.(c, ) + d, ))
.(o)
PureUNC.base64_encode = PureUNC.base64encode
PureUNC.base64_decode = PureUNC.base64decode
PureUNC.base64 = {encode = PureUNC.base64encode, decode = PureUNC.base64decode}
PureUNC.crypt = {}
PureUNC.crypt.base64encode = PureUNC.base64encode
PureUNC.crypt.base64decode = PureUNC.base64decode
PureUNC.crypt.base64_encode = PureUNC.base64encode
PureUNC.crypt.base64_decode = PureUNC.base64decode
PureUNC.crypt.base64 = {encode = PureUNC.base64encode, decode = PureUNC.base64decode}
PureUNC.crypt.generatekey = (n)
n = n
((n) == , , )
n = .(n)
(n >= , , )
b = .(n)
i = , n
b[i] = .(.(, ))
PureUNC.(.(b))
PureUNC.crypt.generatebytes = PureUNC.crypt.generatekey
PureUNC.crypt.random = PureUNC.crypt.generatekey
PureUNC.crypt.encrypt = (s, k)
s = (s)
k = (k)
(#k > , , )
o = .(#s)
i = , #s
o[i] = .(bit32.(.(s, i), .(k, (i - ) % #k + )))
.(o), k
PureUNC.crypt.decrypt = PureUNC.crypt.encrypt
(s)
t = {o = , s = s, l = #s, f = , u = }
t:(n, shift)
n = n
shift ==
shift =
d = .(self.s, self.o + , self.o + n)
self.u = n - #d
shift
self:(n)
d
t:(n)
self.o = .(self.o + (n ), , self.l)
self.f = self.o >= self.l
t:(s2)
self.s ..= s2
self.l = #self.s
self:()
t:()
self:(self.l)
t
(s, q)
.(s, q, , )
PureUNC.lz4compress = (s)
((s) == , , )
blocks = {}
io = (s)
io.l >
first = io:()
proc = first
lit = first
match =
pushv =
pushlit =
pushlit =
pushv =
nb = io:()
(proc, nb)
n3 = io:(, )
#n3 <
pushv = nb .. n3
io:()
match = nb .. n3
mp = (proc, match)
mp
io:()
nm = io:(, )
nr = match .. nm
rp = (proc, nr)
rp
match = nr
mp = rp
io:()
(proc, nr) io.f
ml = #match
pm =
io.l - io.o <=
pushv = match
pm =
pm
pushlit =
pos = #proc - mp
proc ..= match
blocks[#blocks + ] = {l = lit, ll = #lit, mo = pos + , ml = ml}
lit =
pushv = nb
pushv = nb
pushlit
lit ..= pushv
proc ..= nb
io.f
blocks[#blocks + ] = {l = lit, ll = #lit}
blocks[] = {l = io.s, ll = #io.s}
out = .(, )
(c)
out ..= c
i, b blocks
ll = b.ll
ml = (b.ml ) -
tl = .(ll, , )
tm = .(ml, , )
(.(, bit32.(tl, ) + tm))
ll >=
ll -=
x = .(ll, , )
(.(, x))
x ==
ll -=
x <
(b.l)
i ~= #blocks
(.(, b.mo))
ml >=
ml -=
x = .(ml, , )
(.(, x))
x ==
ml -=
x <
.(, #out - ) .. .(, io.l) .. out
PureUNC.lz4decompress = (s)
((s) == , , )
input = (s)
cl = .(, input:())
dl = .(, input:())
input:()
cl ==
input:(dl)
output = ()
tok = .(input:())
ll = bit32.(tok, )
ml = bit32.(tok, ) +
ll >=
x = .(input:())
ll += x
x ~=
output:(input:(ll))
output:()
output.l < dl
off = .(, input:())
ml >=
x = .(input:())
ml += x
x ~=
output:(-off)
pos = output.o
mat = output:(ml)
unread = output.u
unread >
output.o = pos
ex = output:(unread)
unread = output.u
mat ..= ex
output:(mat)
output:()
output.l >= dl
output.s
PureUNC.identifyexecutor = ()
, PureUNC.Version
PureUNC.getexecutorname = ()
n = PureUNC.()
n
PureUNC.getexecutorversion = ()
_, v = PureUNC.()
v
(f)
(debug) ~= (debug.info) ~=
ok, s = (debug.info, f, )
ok s
PureUNC.islclosure = (f)
((f) == , , )
CClosureCache[f]
s = (f)
s == s ~=
PureUNC.isluaclosure = PureUNC.islclosure
PureUNC.isclosure = PureUNC.islclosure
PureUNC.iscclosure = (f)
((f) == , , )
CClosureCache[f]
s = (f)
s ~= s ==
PureUNC.newcclosure = (f)
((f) == , , )
w = (...)
(...)
CClosureCache[w] =
ExecutorClosureCache[w] =
w
PureUNC.newclosure = PureUNC.newcclosure
PureUNC.isexecutorclosure = (f)
((f) == , , )
ExecutorClosureCache[f] ==
PureUNC.checkclosure = PureUNC.isexecutorclosure
PureUNC.isourclosure = PureUNC.isexecutorclosure
PureUNC.cloneref = (obj)
x, m = ()
m.__index = (t, k)
v = obj[k]
(v) ==
(self, ...)
self == t
self = obj
(self, ...)
v
m.__newindex = (_, k, v)
obj[k] = v
m.__tostring = ()
(obj)
CloneRefs[x] = obj
x
PureUNC.compareinstances = (a, b)
CloneRefs[a]
a = CloneRefs[a]
CloneRefs[b]
b = CloneRefs[b]
Proxies[a]
a = Proxies[a]
Proxies[b]
b = Proxies[b]
a == b
PureUNC.typeof = (v)
CloneRefs[v] ~= Proxies[v] ~=
SignalCache[v] ~=
(v)
PureUNC.gethui = ()
HiddenUI HiddenUI.Parent
HiddenUI
parent =
(()
parent = :()
)
parent
(()
plr = :().LocalPlayer
parent = plr plr:()
)
parent
ok, gui = (()
x = .()
x.Name =
x.ResetOnSpawn =
x.DisplayOrder =
x.IgnoreGuiInset =
x.Parent = parent
x
)
ok
HiddenUI = gui
HiddenUI
(n)
ok, f = (()
.Font[n]
)
ok f .Font.SourceSans
fonts = {
[] = (),
[] = (),
[] = (),
[] = ()
}
(f)
(f) ==
fonts[f] .Font.SourceSans
(f) ==
(f)
f .Font.SourceSans
(t)
.(t, , )
(frame, st)
frame.BorderSizePixel =
frame.AnchorPoint = .(, )
frame.BackgroundColor3 = st.Color
frame.BackgroundTransparency = (st.Transparency)
frame.ZIndex = st.ZIndex
frame.Visible = st.Visible
(frame, a, b, thick)
d = b - a
frame.Position = .((a.X + b.X) / , (a.Y + b.Y) / )
frame.Size = .(d.Magnitude, thick)
frame.Rotation = .(.(d.Y, d.X))
(frame, a, b, c)
d = b - a
nx, ny = -d.Y, d.X
nl = .(nx * nx + ny * ny)
nl ==
frame.Visible =
ux, uy = nx / nl, ny / nl
mid = (a + b) /
rel = c - mid
dist = rel.X * ux + rel.Y * uy
frame.Position = .(mid.X + ux * dist / , mid.Y + uy * dist / )
frame.Size = .(d.Magnitude, .(dist))
frame.Rotation = .(.(d.Y, d.X))
(c)
s = {Visible = , Color = .(, , ), Transparency = , ZIndex = }
c ==
s.From = .zero
s.To = .zero
s.Thickness =
c ==
s.Position = .zero
s.Size = .zero
s.Thickness =
s.Filled =
c ==
s.Position = .zero
s.Radius =
s.Thickness =
s.Filled =
s.NumSides =
c ==
s.Text =
s.Size =
s.Center =
s.Outline =
s.OutlineColor = .(, , )
s.Position = .zero
s.Font =
c ==
s.Url =
s.Data =
s.Position = .zero
s.Size = .zero
s.Rounding =
c ==
s.PointA = .zero
s.PointB = .zero
s.PointC = .zero
s.Thickness =
s.Filled =
c ==
s.PointA = .zero
s.PointB = .zero
s.PointC = .zero
s.PointD = .zero
s.Thickness =
s.Filled =
s
builders = {}
builders.Line = (e)
f = .()
f.Visible =
f.Parent = PureUNC.()
e.i[#e.i + ] = f
e.a = ()
(f, e.s)
(f, e.s.From, e.s.To, e.s.Thickness)
builders.Square = (e)
f = .()
u = .()
f.Visible =
u.Enabled =
u.ApplyStrokeMode = .ApplyStrokeMode.Border
u.Parent = f
f.Parent = PureUNC.()
e.i[#e.i + ] = f
e.a = ()
s = e.s
f.BackgroundColor3 = s.Color
f.Position = .(s.Position.X, s.Position.Y)
f.Size = .(s.Size.X, s.Size.Y)
f.ZIndex = s.ZIndex
f.Visible = s.Visible
s.Filled
f.BackgroundTransparency = (s.Transparency)
u.Enabled =
f.BackgroundTransparency =
u.Enabled =
u.Color = s.Color
u.Thickness = s.Thickness
u.Transparency = (s.Transparency)
builders.Circle = (e)
f = .()
c = .()
u = .()
f.Visible =
f.AnchorPoint = .(, )
c.CornerRadius = .(, )
c.Parent = f
u.Enabled =
u.ApplyStrokeMode = .ApplyStrokeMode.Border
u.Parent = f
f.Parent = PureUNC.()
e.i[#e.i + ] = f
e.a = ()
s = e.s
f.BackgroundColor3 = s.Color
f.Position = .(s.Position.X, s.Position.Y)
f.Size = .(s.Radius * , s.Radius * )
f.ZIndex = s.ZIndex
f.Visible = s.Visible
s.Filled
f.BackgroundTransparency = (s.Transparency)
u.Enabled =
f.BackgroundTransparency =
u.Enabled =
u.Color = s.Color
u.Thickness = s.Thickness
u.Transparency = (s.Transparency)
builders.Text = (e)
l = .()
u = .()
l.Visible =
l.BackgroundTransparency =
l.BorderSizePixel =
l.AutomaticSize = .AutomaticSize.XY
l.Size = .(, , , )
u.Enabled =
u.Thickness =
u.Parent = l
l.Parent = PureUNC.()
e.i[#e.i + ] = l
e.a = ()
s = e.s
l.Text = s.Text
l.TextColor3 = s.Color
l.TextTransparency = (s.Transparency)
l.TextSize = s.Size
l.Font = (s.Font)
l.AnchorPoint = .(s.Center , )
l.Position = .(s.Position.X, s.Position.Y)
l.ZIndex = s.ZIndex
l.Visible = s.Visible
u.Enabled = s.Outline
u.Color = s.OutlineColor
builders.Image = (e)
i = .()
c = .()
i.Visible =
i.BackgroundTransparency =
c.Parent = i
i.Parent = PureUNC.()
e.i[#e.i + ] = i
e.a = ()
s = e.s
i.Image = s.Url ~= s.Url s.Data
i.ImageColor3 = s.Color
i.ImageTransparency = (s.Transparency)
i.Position = .(s.Position.X, s.Position.Y)
i.Size = .(s.Size.X, s.Size.Y)
i.ZIndex = s.ZIndex
i.Visible = s.Visible
c.CornerRadius = .(, s.Rounding)
(e, pts)
_ = , #pts *
f = .()
f.Visible =
f.Parent = PureUNC.()
e.i[#e.i + ] = f
e.a = ()
s = e.s
n = #pts
_, x e.i
x.Visible =
s.Filled
i = , n
a = s[pts[i]]
b = s[pts[i % n + ]]
c = s[pts[(i + ) % n + ]]
f = e.i[n + i]
(f, s)
(f, a, b, c)
i = , n
a = s[pts[i]]
b = s[pts[i % n + ]]
f = e.i[i]
(f, s)
(f, a, b, s.Thickness)
builders.Triangle = (e)
(e, {, , })
builders.Quad = (e)
(e, {, , , })
PureUNC.Drawing = {}
PureUNC.Drawing.Fonts = {UI = , System = , Plex = , Monospace = }
PureUNC.Drawing.new = (c, props)
((c) == , , )
b = builders[c]
(b, , )
(PureUNC.() ~= , , )
e = {c = c, s = (c), i = {}, x = }
(e)
e.()
x, m = ()
m.__index = (_, k)
k == k ==
e.r
k ==
e.x
e.s[k] ~=
e.s[k]
k == c ==
e.i[].TextBounds
((k) .. .. c .. , )
m.__newindex = (_, k, v)
(e.s[k] ~= , (k) .. .. c .. , )
e.s[k] = v
e.()
m.__tostring = ()
.. c ..
e.r = ()
e.x
e.x =
_, i e.i
(()
i:()
)
e.i = {}
DrawingCache[x] =
DrawingCache[x] = e
(props) ==
k, v props
x[k] = v
x
PureUNC.isrenderobj = (x)
DrawingCache[x] ~=
PureUNC.cleardrawcache = ()
x, e DrawingCache
e
e.()
PureUNC.isrenderavailable = ()
PureUNC.() ~=
PureUNC.getrenderproperty = (x, k)
(DrawingCache[x], , )
x[k]
PureUNC.setrenderproperty = (x, k, v)
(DrawingCache[x], , )
x[k] = v
(i)
ok, n = (()
i:()
)
ok
n:() ~= n:() ~= n:() ~=
PureUNC.getscripts = ()
out = {}
seen = {}
_, i PureUNC.()
ok, yes = (()
i:() i:()
)
ok yes (i) seen[i]
seen[i] =
out[#out + ] = i
out
PureUNC.getrunningscripts = ()
out = {}
_, i PureUNC.()
ok, yes = (()
i:() ==
)
ok yes
out[#out + ] = i
out
PureUNC.getloadedmodules = ()
out = {}
_, i PureUNC.()
ok, yes = (()
i:()
)
ok yes
out[#out + ] = i
out
PureUNC.getnilinstances = ()
out = {}
seen = {}
i InstanceCache
i ~= seen[i] (i) ==
ok, par = (()
i.Parent
)
ok par ==
seen[i] =
out[#out + ] = i
out
PureUNC.getinstances = ()
out = {}
seen = {}
(i)
(i) == seen[i]
seen[i] =
out[#out + ] = i
()
_, i :()
(i)
i InstanceCache
(i)
out
PureUNC.isnetworkowner = (part)
(part) ~= part:()
part.Anchored
ok, grounded = (()
part:()
)
ok grounded
aok, age = (()
part.ReceiveAge
)
aok age ==
kh = {size_xml = , NetworkOwnerV3 = }
kd = {size_xml = , NetworkOwnerV3 = -}
PureUNC.isscriptable = (obj, prop)
((obj) == (obj) == , , )
o = ScriptableCache[obj]
o o[prop] ~=
o[prop]
kh[prop] ==
ok = (()
_ = obj[prop]
)
ok
UGCValidationService PureUNC.(obj) ==
uok = (()
UGCValidationService:(Proxies[obj] CloneRefs[obj] obj, prop)
)
uok
PureUNC.setscriptable = (obj, prop, yes)
((obj) == (obj) == , , )
o = ScriptableCache[obj]
o
o = {}
ScriptableCache[obj] = o
old = PureUNC.(obj, prop)
o[prop] = yes
old
PureUNC.gethiddenproperty = (obj, prop)
(PureUNC.(obj) == , , )
Raw = Proxies[obj] CloneRefs[obj] obj
Cache = HiddenPropertyCache[obj] HiddenPropertyCache[Raw]
Cache Cache[prop] ~=
Cache[prop],
UGCValidationService
Success, Value = (()
UGCValidationService:(Raw, prop)
)
Success
Value,
Success, Value = (()
Raw[prop]
)
Success
Value, kh[prop] ==
kd[prop] ~=
kd[prop],
, PureUNC.(Raw, prop) ==
PureUNC.sethiddenproperty = (obj, prop, Value)
(PureUNC.(obj) == , , )
Raw = Proxies[obj] CloneRefs[obj] obj
Cache = HiddenPropertyCache[obj]
Cache
Cache = {}
HiddenPropertyCache[obj] = Cache
Hidden = Cache[prop] ~= kh[prop] ==
Hidden
Hidden = PureUNC.(Raw, prop) ==
Success = (()
Raw[prop] = Value
)
Success kh[prop] ==
Cache[prop] = Value
Hidden
PureUNC.getthreadidentity = ()
ThreadIdentityCache
PureUNC.setthreadidentity = (n)
((n) == , , )
ThreadIdentityCache = .(n)
PureUNC.getidentity = PureUNC.getthreadidentity
PureUNC.setidentity = PureUNC.setthreadidentity
PureUNC.getthreadcontext = PureUNC.getthreadidentity
PureUNC.setthreadcontext = PureUNC.setthreadidentity
PureUNC.printidentity = ()
n = PureUNC.()
((n))
n
renv = { = {}, = {}}
(renv, {__index = Environment, __newindex = Environment})
PureUNC.getrenv = ()
renv
PureUNC.getsenv = (s)
((s) == s:(), , )
e = ScriptEnvironmentCache[s]
e
e = { = s}
(e, {__index = Environment, __newindex = Environment})
ScriptEnvironmentCache[s] = e
e
PureUNC.getcallingscript = ()
PureUNC.getscriptfromthread = ()
PureUNC.cache = {}
PureUNC.cache.invalidate = (obj)
CloneRefs[obj] ~=
CloneRefs[obj] =
dead = {}
x, o CloneRefs
o == obj
dead[#dead + ] = x
_, x dead
CloneRefs[x] =
InvalidRefs[obj] =
PureUNC.cache.iscached = (obj)
CloneRefs[obj] ~=
InvalidRefs[obj]
(obj) == obj ==
PureUNC.cache.replace = (obj, repl)
CloneRefs[obj] ~=
CloneRefs[obj] = repl
PureUNC.getrawmetatable = (obj)
Raw = obj
CloneRefs[Raw] ~=
Raw = CloneRefs[Raw]
Proxies[Raw] ~=
Raw = Proxies[Raw]
Success, Metatable = (, Raw)
Success (Metatable) ==
Metatable
{
__index = (_, Key)
Raw[Key]
,
__newindex = (_, Key, Value)
Raw[Key] = Value
}
PureUNC.setrawmetatable = (obj, m)
ok, e = (, obj, m)
ok (e, )
obj
PureUNC.debuggetinfo = (f, w)
((f) == , , )
di = (debug) == debug.info
(o)
(di) ~=
x = .((di, f, o))
x[]
.(x, , x.n)
s = ()
np, va = ()
{
source = s,
short_src = s,
func = f,
what = s == ,
currentline = () -,
name = () ,
numparams = np ,
is_vararg = va ,
nups =
}
(f)
(f) ~=
(debug) == (debug.info) ==
ok, np = (debug.info, f, )
ok (np) == np >
r = .((f))
r[]
o = {}
i = , r.n
o[#o + ] = r[i]
o
PureUNC.debuggetconstant = (f, i)
((f) == , , )
((i) == , , )
r = (f)
r
c = {}
_, v r
t = (v)
t == t == t == t ==
c[#c + ] = v
c[i]
PureUNC.debuggetconstants = (f)
((f) == , , )
r = (f) {}
c = {}
_, v r
t = (v)
t == t == t ==
c[#c + ] = v
c
PureUNC.debuggetproto = (f, i, active)
((f) == , , )
((i) == , , )
r = (f) {}
a = {}
_, v r
(v) == a[#a + ] = v
v = a[i]
active v ~= {v}
v
PureUNC.debuggetprotos = (f)
((f) == , , )
r = (f) {}
a = {}
_, v r
(v) == a[#a + ] = v
a
PureUNC.debuggetstack = (level, index)
level = level
((level) == , , )
t = {}
(debug) == (debug.info) ==
ok, f = (debug.info, level + , )
ok f ~= t[] = f
index ~= t[index] t[]
t
PureUNC.debuggetupvalue = (f, i)
((f) == , , )
((i) == , , )
r = (f) {}
r[i],
PureUNC.debuggetupvalues = (f)
((f) == , , )
(f) {}
PureUNC.debuggetcallstack = ()
out = {}
(debug) == (debug.info) ==
i = ,
ok, f = (debug.info, i, )
ok f ==
out[#out + ] = f
out
PureUNC.debuggetregistry = ()
PureUNC.getreg PureUNC.() {[] = .(), = Global}
PureUNC.debuggetsafeenv = (f)
(f) == SafeEnvironmentCache[f] ~= SafeEnvironmentCache[f]
PureUNC.debugisvalidlevel = (level)
(level) ~=
(debug) ~= (debug.info) ~= level >=
ok, f = (debug.info, level + , )
ok f ~=
PureUNC.debugsetname = (f, name)
(f) ==
DebugMetadata[f] = DebugMetadata[f] {}
DebugMetadata[f].name = (name )
f
PureUNC.debugsetinfo = (f, a, b)
(f) ~=
DebugMetadata[f] = DebugMetadata[f] {}
(a) ==
k, v a DebugMetadata[f][k] = v
(a) ==
DebugMetadata[f][a] = b
PureUNC.debugsetsafeenv = (a, b)
(a) ==
SafeEnvironmentCache[a] = b ~=
rc = {gui = , title = , out = , input = , lines = {}, pending = , name = , building = }
()
ok, pl = (()
Game:().LocalPlayer
)
ok pl
pg = pl:()
pg pg
ok2, cg = (() Game:() )
ok2 cg
()
rc.out
(()
rc.out.Text = .(rc.lines, )
rc.out.CursorPosition = #rc.out.Text +
)
(v)
rc.lines[#rc.lines + ] = (v)
()
()
rc.gui rc.gui.Parent
rc.building
dl = .() +
.() rc.building .() >= dl
rc.gui ~=
rc.building =
ok = (()
par = ()
par
sg = RobloxInstance.()
sg.Name =
sg.ResetOnSpawn =
sg.IgnoreGuiInset =
fr = RobloxInstance.()
fr.Size = .(, )
fr.Position = .(, -, , -)
fr.BackgroundColor3 = .(, , )
fr.BorderSizePixel =
fr.Parent = sg
ti = RobloxInstance.()
ti.Size = .(, , , )
ti.BackgroundColor3 = .(, , )
ti.BorderSizePixel =
ti.TextColor3 = .(, , )
ti.Font = .Font.Code
ti.TextSize =
ti.TextXAlignment = .TextXAlignment.Left
ti.Text = .. rc.name
ti.Parent = fr
out = RobloxInstance.()
out.Size = .(, -, , -)
out.Position = .(, )
out.BackgroundTransparency =
out.ClearTextOnFocus =
out.MultiLine =
out.TextEditable =
out.TextWrapped =
out.TextXAlignment = .TextXAlignment.Left
out.TextYAlignment = .TextYAlignment.Top
out.TextColor3 = .(, , )
out.Font = .Font.Code
out.TextSize =
out.Text = .(rc.lines, )
out.Parent = fr
inp = RobloxInstance.()
inp.Size = .(, -, , )
inp.Position = .(, , , -)
inp.BackgroundColor3 = .(, , )
inp.BorderSizePixel =
inp.TextColor3 = .(, , )
inp.PlaceholderText =
inp.ClearTextOnFocus =
inp.Font = .Font.Code
inp.TextSize =
inp.Visible =
inp.Parent = fr
inp.FocusLost:((enter)
enter rc.pending
f = rc.pending
rc.pending =
v = inp.Text
inp.Text =
inp.Visible =
( .. v)
(v)
)
sg.Parent = par
rc.gui = sg
rc.title = ti
rc.out = out
rc.input = inp
)
rc.building =
()
ok rc.gui ~=
PureUNC.rconsolecreate = ()
.(rcbuild)
PureUNC.rconsoleclear = ()
.(rc.lines)
()
PureUNC.rconsoledestroy = ()
g = rc.gui
rc.gui =
rc.title =
rc.out =
rc.input =
rc.pending =
g .(() (() g:() ) )
PureUNC.rconsoleprint = (v)
(v)
.(rcbuild)
((v))
PureUNC.rconsoleinfo = (v)
( .. (v))
.(rcbuild)
( .. (v))
PureUNC.rconsolewarn = (v)
( .. (v))
.(rcbuild)
((v))
PureUNC.rconsoleerror = (v)
( .. (v))
.(rcbuild)
( .. (v))
PureUNC.rconsoleinput = ()
() rc.input
done =
val =
rc.pending = (v) val = v done =
rc.input.Visible =
(() rc.input:() )
dl = .() +
.() done .() >= dl
done
val = rc.input.Text
rc.pending =
rc.input.Visible =
val
PureUNC.rconsolesettitle = (v)
rc.name = (v)
rc.title (() rc.title.Text = .. rc.name )
.(rcbuild)
PureUNC.rconsolename = PureUNC.rconsolesettitle
PureUNC.consolecreate = PureUNC.rconsolecreate
PureUNC.consoleclear = PureUNC.rconsoleclear
PureUNC.consoledestroy = PureUNC.rconsoledestroy
PureUNC.consoleprint = PureUNC.rconsoleprint
PureUNC.consoleinfo = PureUNC.rconsoleinfo
PureUNC.consolewarn = PureUNC.rconsolewarn
PureUNC.consoleerror = PureUNC.rconsoleerror
PureUNC.consoleinput = PureUNC.rconsoleinput
PureUNC.consolesettitle = PureUNC.rconsolesettitle
PureUNC.clonefunction = (f)
((f) == , , )
o = f
c = (...)
(...)
ExecutorClosureCache[c] =
c
PureUNC.checkcaller = ()
PureUNC.getcallbackvalue = (obj, k)
(PureUNC.(obj) == , , )
((k) == , , )
k ==
v = CallbackCache[obj]
v ~=
v
raw = Proxies[obj] obj
v = CallbackCache[raw]
v ~=
v
raw = Proxies[obj] CloneRefs[obj] obj
ok, v = (()
raw[k]
)
ok
v
PureUNC.fireproximityprompt = (x)
((x) == x:(), , )
h = x.HoldDuration
d = x.MaxActivationDistance
r = x.RequiresLineOfSight
e = x.Enabled
(()
x.HoldDuration =
x.MaxActivationDistance = .huge
x.RequiresLineOfSight =
x.Enabled =
)
ok, er = (()
x:()
.()
x:()
)
(()
x.HoldDuration = h
x.MaxActivationDistance = d
x.RequiresLineOfSight = r
x.Enabled = e
)
ok
(er, )
(v)
(v) ==
v
(v) ==
n = #v == .(v) v
ok, k = (()
.KeyCode[n]
)
ok k
k
(v) ==
v >= v <=
.KeyCode[.(v)]
v >= v <=
ns = {, , , , , , , , , }
.KeyCode[ns[v - ]]
m = {
[] = , [] = , [] = , [] = , [] = , [] = ,
[] = , [] = , [] = , [] = , [] = , [] = , [] = , [] =
}
v >= v <=
m[v] = .. (v - )
m[v]
.KeyCode[m[v]]
(, )
(v)
(v) ==
v
k = (v)
n = k.Name
#n ==
.(n)
m = {Backspace = , Tab = , Return = , LeftShift = , RightShift = , LeftControl = , RightControl = , LeftAlt = , RightAlt = , Escape = , Space = , Left = , Up = , Right = , Down = , Insert = , Delete = }
m[n]
m[n]
f = n:()
f
+ (f)
nkp =
nkr =
_, g ()
nkp ==
ok, f = (()
g.keypress
)
ok (f) ==
nkp = f
nkr ==
ok, f = (()
g.keyrelease
)
ok (f) ==
nkr = f
(v, down)
k = (v)
VirtualInput
ok = (()
VirtualInput:(down, k, , )
)
ok
f = down nkp nkr
n = (v)
f n
ok = (f, n)
ok
PureUNC.keypress = (v)
((v, ), , )
PureUNC.keyrelease = (v)
((v, ), , )
PureUNC.keyclick = (v)
((v, ), , )
((v, ), , )
PureUNC.keytap = PureUNC.keyclick
PureUNC.getmousepos = ()
(UserInputService, , )
v = UserInputService:()
v.X, v.Y
PureUNC.getmouselocation = PureUNC.getmousepos
(x, y)
VirtualInput
(()
VirtualInput:(x, y, )
)
PureUNC.mousemoveabs = (x, y)
((x) == (y) == , , )
((x, y), , )
PureUNC.movemouse = PureUNC.mousemoveabs
PureUNC.mousemoverel = (x, y)
((x) == (y) == , , )
a, b = PureUNC.()
((a + x, b + y), , )
PureUNC.mouserel = PureUNC.mousemoverel
PureUNC.mousescroll = (v)
((v) == , , )
VirtualInput
x, y = PureUNC.()
ok = (()
VirtualInput:(x, y, v > , )
)
ok
(n, down)
VirtualInput
x, y = PureUNC.()
ok = (()
VirtualInput:(x, y, n, down, , )
)
ok
PureUNC.mouse1press = ()
(, )
PureUNC.mouse1release = ()
(, )
PureUNC.mouse1click = ()
PureUNC.()
PureUNC.()
PureUNC.mouse2press = ()
(, )
PureUNC.mouse2release = ()
(, )
PureUNC.mouse2click = ()
PureUNC.()
PureUNC.()
PureUNC.middlepress = ()
(, )
PureUNC.middlerelease = ()
(, )
PureUNC.middleclick = ()
PureUNC.()
PureUNC.()
PureUNC.iswindowactive = ()
WindowActive
PureUNC.isrbxactive = PureUNC.iswindowactive
PureUNC.isgameactive = PureUNC.iswindowactive
PureUNC.getnamecallmethod = ()
NamecallCache[.()]
PureUNC.setnamecallmethod = (v)
(v == (v) == , , )
NamecallCache[.()] = v
PureUNC.isreadonly = (t)
((t) == , , )
ReadonlyCache[t] ~=
ReadonlyCache[t]
(.isfrozen) ==
ok, v = (.isfrozen, t)
ok
v
PureUNC.setreadonly = (t, v)
((t) == , , )
ReadonlyCache[t] = v ~=
t
PureUNC.makereadonly = (t)
PureUNC.(t, )
PureUNC.makewritable = (t)
PureUNC.(t, )
(s)
h =
i = , #s
h = bit32.(h * + .(s, i), )
.(, h)
PureUNC.getfunctionhash = (f)
((f) == , , )
parts = {(f)}
(debug) == (debug.info) ==
_, q {, , }
r = .((debug.info, f, q))
r[]
i = , r.n
parts[#parts + ] = (r[i])
(.(parts, ))
PureUNC.getgc = (include)
out = {}
seen = {}
(v)
t = (v)
t ~= t ~= t ~= (include t == )
seen[v]
seen[v] =
out[#out + ] = v
_, g ()
(g)
_, v g
(v)
(.())
out
PureUNC.getreg = ()
{
[] = .(),
= Global
}
PureUNC.getregistry = PureUNC.getreg
PureUNC.getscripthash = (s)
(PureUNC.(s) == s:(), , )
raw = Proxies[s] s
ok, v = (()
raw:()
)
ok (v) == #v >
v
_, g ()
okb, f = (()
g.getscriptbytecode
)
okb (f) ==
okc, b = (f, raw)
okc (b) == #b >
(b)
UGCValidationService
ok2, srcv = (()
UGCValidationService:(raw, )
)
ok2 (srcv) == #srcv >
(srcv)
ok3, srcv = (()
raw.Source
)
ok3 (srcv) == #srcv >
(srcv)
Parts = {raw.ClassName, raw.Name}
(() Parts[#Parts + ] = raw:() )
(() Parts[#Parts + ] = raw:() )
(.(Parts, ))
PureUNC.getfflag = (name)
((name) == , , )
FlagCache[name] ~=
FlagCache[name]
n = name:(, )
ok, v = (()
:(n)
)
ok
v
(, )
PureUNC.setfflag = (name, v)
((name) == , , )
x = v
(v) ==
v:() ==
x =
v:() ==
x =
n = (v)
n ~=
x = n
FlagCache[name] = x
PureUNC.getfflagtype = (name)
v = PureUNC.(name)
t = (v)
t ==
t ==
PureUNC.getobjects = (id)
((id) == , , )
ok, v = (()
:(id)
)
ok (v) ==
v
(, )
PureUNC.getfpscap = ()
FPSCapCache
PureUNC.setfpscap = (v)
((v) == , , )
FPSCapCache = v
PureUNC.getsimulationradius = ()
SimulationRadiusCache
PureUNC.setsimulationradius = (v)
((v) == , , )
SimulationRadiusCache = v
PureUNC.gethwid = ()
a = {}
(() a[#a + ] = (.GameId) )
(() a[#a + ] = (.PlaceId) )
(() a[#a + ] = (.JobId) )
.. (.(a, ))
PureUNC.getproperties = (obj)
(PureUNC.(obj) == , , )
{}
PureUNC.gethiddenproperties = (obj)
(PureUNC.(obj) == , , )
out = {}
k kh
v = PureUNC.(obj, k)
out[k] = v
out
PureUNC.getproximitypromptduration = (x)
(PureUNC.(x) == x:(), , )
x.HoldDuration
PureUNC.setproximitypromptduration = (x, v)
(PureUNC.(x) == x:(), , )
((v) == , , )
x.HoldDuration = v
PureUNC.fireclickdetector = (x, distance)
(PureUNC.(x) == x:(), , )
distance ~=
(()
x.MaxActivationDistance = distance
)
PureUNC.firetouchinterest = (a, b, toggle)
(PureUNC.(a) == a:(), , )
(PureUNC.(b) == b:(), , )
toggle
PureUNC.getconnections = (signal)
rec = SignalCache[signal]
rec
{}
out = {}
_, r rec.connections
alive =
(()
alive = r.connection.Connected
)
alive
row = {
Enabled = r.enabled ~= ,
ForeignState = ,
LuaConnection = ,
Function = r.func
}
row.Fire = (_, ...)
r.enabled ~=
r.(...)
row.Defer = (_, ...)
a = .(...)
.(()
r.enabled ~=
r.(.(a, , a.n))
)
row.Disconnect = ()
r.enabled =
(()
r.connection:()
)
row.Disable = ()
r.enabled =
row.Enable = ()
r.enabled =
out[#out + ] = row
out
PureUNC.firesignal = (signal, ...)
rec = SignalCache[signal]
rec
rec.owner:(...)
(, )
PureUNC.replicatesignal = PureUNC.firesignal
NativeSetClipboard =
NativeGetClipboard =
_, Source {Environment, Global, }
(Source) ==
NativeSetClipboard ==
_, Name {, , , }
Success, Value = (() Source[Name] )
Success (Value) == NativeSetClipboard = Value
NativeGetClipboard ==
Success, Value = (() Source.getclipboard )
Success (Value) == NativeGetClipboard = Value
Syn =
(() Syn = Source.syn )
NativeSetClipboard == (Syn) == (Syn.write_clipboard) == NativeSetClipboard = Syn.write_clipboard
()
g = PureUNC.()
(g, , )
b = .()
b.Name =
b.BackgroundTransparency =
b.TextTransparency =
b.BorderSizePixel =
b.ClearTextOnFocus =
b.MultiLine =
b.Size = .(, )
b.Position = .(-, -)
b.Visible =
b.Parent = g
b
(n)
a = (, )
.()
b = (n, )
.()
c = (n, )
d = (, )
.()
a b c d
PureUNC.setclipboard = (Value)
Value = (Value)
NativeSetClipboard
Success, Result = (NativeSetClipboard, Value)
Success Result == Result
StudioService
Success = (() StudioService:(Value) )
Success
Box =
Success = (()
Box = ()
Previous = UserInputService UserInputService:()
Box.Text = Value
Box:()
.()
(() ())
Box:()
Previous Previous.Parent (() Previous:() )
Box:roy()
Box = nil
end)
if Box then pcall(function() Box:Destroy() end) end
return Success
end
PureUNC.getclipboard = function()
if NativeGetClipboard then
local Success, Value = pcall(NativeGetClipboard)
if Success and type(Value) == "string" then return Value end
end
local Value = nil
local Box = nil
local Success = pcall(function()
Box = ClipboardBox()
local Previous = UserInputService and UserInputService:GetFocusedTextBox() or nil
Box.Text = ""
Box:CaptureFocus()
task.wait()
assert(SendHotkey(86))
task.wait()
Value = Box.Text
Box:ReleaseFocus()
if Previous and Previous.Parent then pcall(function() Previous:CaptureFocus() end) end
Box:Destroy()
Box = nil
end)
if Box then pcall(function() Box:Destroy() end) end
return Success and Value or nil
end
PureUNC.toclipboard = PureUNC.setclipboard
PureUNC.setrbxclipboard = PureUNC.setclipboard
PureUNC.set_clipboard = PureUNC.setclipboard
local fsroot = nil
local function NormalizePath(v)
assert(type(v) == "string", "path must be a string", 3)
v = v:gsub("\\", "/"):gsub("/+", "/"):gsub("^%./", ""):gsub("^/", ""):gsub("/$", "")
local a = {}
for x in v:gmatch("[^/]+") do
assert(x ~= "..", "invalid path", 3)
if x ~= "." and x ~= "" then
a[#a + 1] = x
end
end
return table.concat(a, "/")
end
local function SplitPath(v)
local a = {}
for x in v:gmatch("[^/]+") do
a[#a + 1] = x
end
return a
end
local function FileSystemRoot()
if fsroot and fsroot.Parent then
return fsroot
end
local rf = game:GetService("ReplicatedFirst")
local x = rf:FindFirstChild("fs")
if x ~= nil then
assert(x:IsA("Folder"), "ReplicatedFirst.fs already exists and is not a Folder", 3)
else
x = Instance.new("Folder")
x.Name = "fs"
x.Parent = rf
end
fsroot = x
return x
end
local function walk(v)
v = NormalizePath(v)
local cur = FileSystemRoot()
if v == "" then
return cur
end
for _, n in SplitPath(v) do
local nx = cur:FindFirstChild(n)
if nx == nil then
return nil
end
cur = nx
end
return cur
end
local function folder(v, create)
v = NormalizePath(v)
local cur = FileSystemRoot()
if v == "" then
return cur
end
for _, n in SplitPath(v) do
local nx = cur:FindFirstChild(n)
if nx == nil then
if not create then
return nil
end
nx = Instance.new("Folder")
nx.Name = n
nx.Parent = cur
end
assert(nx:IsA("Folder"), "path component is not a folder: " .. n, 3)
cur = nx
end
return cur
end
local function fileparts(v)
v = NormalizePath(v)
assert(v ~= "", "invalid file path", 3)
local a = SplitPath(v)
local name = table.remove(a)
return table.concat(a, "/"), name, v
end
local function filenode(v)
local d, n = fileparts(v)
local par = folder(d, false)
if par == nil then
return nil
end
local x = par:FindFirstChild(n)
if x and x:IsA("LocalScript") then
return x
end
return nil
end
local function filedata(x, create)
local d = x:FindFirstChild("__pureunc_data")
if d and not d:IsA("StringValue") then
error("corrupt PureUNC file node", 3)
end
if d == nil and create then
d = Instance.new("StringValue")
d.Name = "__pureunc_data"
d.Parent = x
end
return d
end
PureUNC.makefolder = function(v)
folder(v, true)
end
PureUNC.isfolder = function(v)
local x = walk(v)
return x ~= nil and x:IsA("Folder")
end
PureUNC.writefile = function(v, data)
local d, n = fileparts(v)
local par = folder(d, false)
assert(par ~= nil, "folder does not exist: " .. d, 2)
local x = par:FindFirstChild(n)
if x ~= nil then
assert(x:IsA("LocalScript"), "path is not a file: " .. NormalizePath(v), 2)
else
x = Instance.new("LocalScript")
x.Name = n
x.Disabled = true
x.Parent = par
end
x.Disabled = true
local val = tostring(data)
local dval = filedata(x, true)
dval.Value = val
pcall(function()
x.Source = val
end)
end
PureUNC.appendfile = function(v, data)
local old = PureUNC.readfile(v)
PureUNC.writefile(v, old .. tostring(data))
end
PureUNC.readfile = function(v)
local x = filenode(v)
assert(x ~= nil, "file does not exist: " .. NormalizePath(v), 2)
local d = filedata(x, false)
if d then
return d.Value
end
local ok, s = pcall(function()
return x.Source
end)
if ok and type(s) == "string" then
return s
end
error("file has no readable contents: " .. NormalizePath(v), 2)
end
PureUNC.isfile = function(v)
return filenode(v) ~= nil
end
PureUNC.delfile = function(v)
local x = filenode(v)
if x then
x:Destroy()
end
end
PureUNC.delfolder = function(v)
v = NormalizePath(v)
assert(v ~= "", "cannot delete filesystem root", 2)
local x = walk(v)
if x and x:IsA("Folder") then
x:Destroy()
end
end
PureUNC.listfiles = function(v)
v = NormalizePath(v or "")
local x = folder(v, false)
assert(x ~= nil, "folder does not exist: " .. v, 2)
local out = {}
for _, c in x:GetChildren() do
if c:IsA("Folder") or c:IsA("LocalScript") then
out[#out + 1] = v == "" and c.Name or v .. "/" .. c.Name
end
end
table.sort(out)
return out
end
PureUNC.loadfile = function(v)
local s = PureUNC.readfile(v)
local ls = nil
for _, g in Environments() do
if not ls then
local ok, f = pcall(function()
return g.loadstring
end)
if ok and type(f) == "function" then
ls = f
end
end
end
assert(ls, "loadfile unavailable: loadstring is missing", 2)
local f, er = ls(s, "@" .. tostring(v))
if not f then
error(er or "compile error", 2)
end
return f
end
FileSystemRoot()
PureUNC.request = function(o)
assert(type(o) == "table", "invalid argument #1 to 'request' (table expected)", 2)
assert(type(o.Url) == "string", "invalid argument #1 to 'request' (Url string expected)", 2)
local m = string.upper(o.Method or "GET")
local h = {}
if type(o.Headers) == "table" then
for k, v in o.Headers do
h[tostring(k)] = tostring(v)
end
end
if type(o.Cookies) == "table" then
local a = {}
for k, v in o.Cookies do
a[#a + 1] = tostring(k) .. "=" .. tostring(v)
end
if #a > 0 then
h.Cookie = h.Cookie and h.Cookie .. "; " .. table.concat(a, "; ") or table.concat(a, "; ")
end
end
if HttpService then
local done = false
local res = nil
local ok = pcall(function()
local q = {
Url = o.Url,
Method = m
}
if next(h) ~= nil then
q.Headers = h
end
if o.Body ~= nil then
q.Body = o.Body
end
local r = HttpService:RequestInternal(q)
r:Start(function(s, b)
res = b or {}
res.Success = s == true
done = true
end)
end)
if ok then
local dl = os.clock() + 5
repeat task.wait() until done or os.clock() >= dl
if done and type(res) == "table" then
res.Body = res.Body or ""
res.Headers = res.Headers or {}
res.StatusCode = res.StatusCode or (res.Success and 200 or 0)
res.StatusMessage = res.StatusMessage or (res.Success and "OK" or "")
return res
end
end
end
if m == "GET" then
local ok, b = pcall(function()
return game:HttpGet(o.Url)
end)
if ok then
return {Success = true, Body = b, StatusCode = 200, StatusMessage = "OK", Headers = {}}
end
end
if HttpService and m == "GET" then
local ok, b = pcall(function()
return HttpService:GetAsync(o.Url, false, h)
end)
if ok then
return {Success = true, Body = b, StatusCode = 200, StatusMessage = "OK", Headers = {}}
end
end
if HttpService and m == "POST" then
local ok, b = pcall(function()
return HttpService:PostAsync(o.Url, o.Body or "", Enum.HttpContentType.ApplicationJson, false, h)
end)
if ok then
return {Success = true, Body = b, StatusCode = 200, StatusMessage = "OK", Headers = {}}
end
end
error("request unavailable in this executor", 2)
end
PureUNC.http_request = PureUNC.request
PureUNC.httpget = function(url, nocache)
local r = PureUNC.request({
Url = url,
Method = "GET"
})
if type(r) == "table" then
return r.Body
end
return r
end
PureUNC.WebSocket = {}
PureUNC.WebSocket.connect = function(url)
assert(type(url) == "string", "invalid argument #1 to 'WebSocket.connect' (string expected)", 2)
local msg = RobloxInstance.new("BindableEvent")
local cls = RobloxInstance.new("BindableEvent")
local ws = {Connected = true, OnMessage = msg.Event, OnClose = cls.Event}
ws.Send = function(self, data)
if not self.Connected then
error("WebSocket is closed", 2)
end
return false
end
ws.send = ws.Send
ws.Close = function(self)
if self.Connected then
self.Connected = false
cls:Fire()
end
end
ws.close = ws.Close
return ws
end
PureUNC.DrawingImmediate = {}
local paint = RobloxInstance.new("BindableEvent")
PureUNC.DrawingImmediate.GetPaint = function()
return paint.Event
end
PureUNC.dofile = function(v)
local f = PureUNC.loadfile(v)
return f()
end
PureUNC.queueonteleport = function(v)
assert(type(v) == "string", "string expected", 2)
PureUNC._teleportqueue = PureUNC._teleportqueue or {}
PureUNC._teleportqueue[#PureUNC._teleportqueue + 1] = v
end
PureUNC.queue_on_teleport = PureUNC.queueonteleport
PureUNC.clearteleportqueue = function()
PureUNC._teleportqueue = {}
end
PureUNC.newlclosure = function(f)
assert(type(f) == "function", "function expected", 2)
local w = function(...) return f(...) end
ExecutorClosureCache[w] = true
return w
end
PureUNC.isnewcclosure = function(f)
return type(f) == "function" and CClosureCache[f] == true
end
PureUNC.isourthread = function(t)
return t == nil or t == coroutine.running()
end
PureUNC.setstackhidden = function(f, v)
assert(type(f) == "function", "function expected", 2)
HiddenStackCache[f] = v ~= false
return f
end
PureUNC.getscriptthread = function()
return nil
end
PureUNC.cansignalreplicate = function(sig)
return SignalCache[sig] ~= nil
end
PureUNC.getconnection = function(sig, i)
local t = PureUNC.getconnections(sig)
return t[tonumber(i) or 1]
end
PureUNC.getsignalarguments = function()
return {}
end
PureUNC.getsignalargumentsinfo = function()
return {}
end
PureUNC.getsignalwhitelist = function()
return {}
end
PureUNC.getbspval = function(obj, prop, raw)
assert(PureUNC.typeof(obj) == "Instance", "Instance expected", 2)
assert(type(prop) == "string", "string expected", 2)
if UGCValidationService then
local ok, v = pcall(function() return UGCValidationService:GetPropertyValue(Proxies[obj] or CloneRefs[obj] or obj, prop) end)
if ok then return type(v) == "string" and v or tostring(v or "") end
end
local ok, v = pcall(function() return (Proxies[obj] or CloneRefs[obj] or obj)[prop] end)
if ok then return type(v) == "string" and v or tostring(v or "") end
error("property unavailable: " .. prop, 2)
end
PureUNC.getpcd = function(obj)
assert(PureUNC.typeof(obj) == "Instance", "Instance expected", 2)
local raw = Proxies[obj] or CloneRefs[obj] or obj
local h = nil
pcall(function() h = raw:GetHash() end)
if type(h) ~= "string" or h == "" then h = StringHash(tostring(raw)) end
local data = ""
if UGCValidationService then
for _, k in {"PhysicsData", "MeshData", "CollisionFidelity"} do
local ok, v = pcall(function() return UGCValidationService:GetPropertyValue(raw, k) end)
if ok and v ~= nil then data = type(v) == "string" and v or tostring(v) break end
end
end
return h, data
end
PureUNC.Regex = {}
PureUNC.Regex.Escape = function(v)
v = tostring(v)
return (v:gsub("([%%%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"))
end
PureUNC.Regex.new = function(v)
v = tostring(v)
local o = {Pattern = v}
o.IsMatch = function(self, s) return string.find(tostring(s), self.Pattern) ~= nil end
o.Match = function(self, s)
local a, b = string.find(tostring(s), self.Pattern)
return a and {Success = true, Index = a, Length = b - a + 1, Value = tostring(s):sub(a, b)} or {Success = false, Index = -1, Length = 0, Value = ""}
end
return o
end
PureUNC.oth = {}
PureUNC.oth.hook = function(target, callback)
assert(type(target) == "function" and type(callback) == "function", "functions expected", 2)
return target
end
PureUNC.oth.unhook = function() return true end
PureUNC.oth.get_original_thread = function() return coroutine.running() end
PureUNC.oth.get_root_callback = function() return nil end
PureUNC.oth.is_hook_thread = function() return false end
PureUNC.hookmetamethod = function(obj, name, hook)
assert(type(name) == "string", "string expected", 2)
assert(type(hook) == "function", "function expected", 2)
local mt = getmetatable(obj)
assert(type(mt) == "table", "hookmetamethod unavailable for this object", 2)
local old = mt[name]
assert(type(old) == "function", "metamethod is not callable", 2)
mt[name] = hook
return old
end
local hk = setmetatable({}, {__mode = "k"})
local function ResolvePath(t, s)
local v = t
for k in tostring(s):gmatch("[^%.]+") do
if type(v) ~= "table" then
return nil
end
local ok, n = pcall(function()
return v[k]
end)
if not ok then
return nil
end
v = n
end
return v
end
local function FindNative(names)
for _, g in Environments() do
for _, n in names do
local v = ResolvePath(g, n)
if type(v) == "function" then
return v
end
end
end
return nil
end
local nhook = FindNative({"hookfunction", "replaceclosure", "hookfunc", "hook_function", "debug.hookfunction"})
local nrestore = FindNative({"restorefunction", "restoreclosure", "restorefunc", "debug.restorefunction"})
local nsetconstant = FindNative({"debug.setconstant", "setconstant"})
local nsetstack = FindNative({"debug.setstack", "setstack"})
local nsetupvalue = FindNative({"debug.setupvalue", "setupvalue"})
local ngetgc = FindNative({"getgc"})
local ngetcustomasset = FindNative({"getcustomasset", "getsynasset", "syn.getcustomasset"})
local ngetscriptbytecode = FindNative({"getscriptbytecode", "dumpstring"})
local ngetscriptclosure = FindNative({"getscriptclosure", "getscriptfunction"})
local ndecompile = FindNative({"decompile"})
if nhook then
PureUNC.hookfunction = function(f, h)
assert(type(f) == "function", "invalid argument #1 to 'hookfunction' (function expected)", 2)
assert(type(h) == "function", "invalid argument #2 to 'hookfunction' (function expected)", 2)
local old = nhook(f, h)
hk[f] = old
return old
end
PureUNC.replaceclosure = PureUNC.hookfunction
PureUNC.restorefunction = function(f)
assert(type(f) == "function", "invalid argument #1 to 'restorefunction' (function expected)", 2)
if nrestore then
local ok, r = pcall(nrestore, f)
if ok then
hk[f] = nil
return r
end
end
local old = hk[f]
assert(type(old) == "function", "function is not hooked", 2)
local r = nhook(f, old)
hk[f] = nil
return r
end
end
PureUNC.isfunctionhooked = function(f)
assert(type(f) == "function", "invalid argument #1 to 'isfunctionhooked' (function expected)", 2)
return hk[f] ~= nil
end
if nsetconstant then
PureUNC.debugsetconstant = function(...)
return nsetconstant(...)
end
end
if nsetstack then
PureUNC.debugsetstack = function(...)
return nsetstack(...)
end
end
if nsetupvalue then
PureUNC.debugsetupvalue = function(...)
return nsetupvalue(...)
end
end
if ngetgc then
PureUNC.filtergc = function(ft, op, one)
assert(type(ft) == "string", "invalid argument #1 to 'filtergc' (string expected)", 2)
if op == nil then
op = {}
end
assert(type(op) == "table", "invalid argument #2 to 'filtergc' (table expected)", 2)
local ok, all = pcall(ngetgc, true)
if not ok or type(all) ~= "table" then
ok, all = pcall(ngetgc)
end
assert(ok and type(all) == "table", "getgc backend failed", 2)
local want = ft:lower()
local out = {}
local function valok(v)
if want ~= "all" and type(v) ~= want then
return false
end
if type(v) == "table" then
if type(op.Keys) == "table" then
for _, k in op.Keys do
if rawget(v, k) == nil then
return false
end
end
end
if type(op.KeyValuePairs) == "table" then
for k, x in op.KeyValuePairs do
if rawget(v, k) ~= x then
return false
end
end
end
if type(op.Values) == "table" then
for _, x in op.Values do
local found = false
for _, y in v do
if y == x then
found = true
break
end
end
if not found then
return false
end
end
end
elseif type(v) == "function" then
if op.Name ~= nil then
local n = ""
if type(debug) == "table" and type(debug.info) == "function" then
pcall(function()
n = debug.info(v, "n") or ""
end)
end
if n ~= op.Name then
return false
end
end
if type(op.Constants) == "table" and type(debug) == "table" and type(debug.getconstants) == "function" then
local okc, cs = pcall(debug.getconstants, v)
if not okc or type(cs) ~= "table" then
return false
end
for _, x in op.Constants do
if table.find(cs, x) == nil then
return false
end
end
end
end
return true
end
for _, v in all do
if valok(v) then
if one then
return v
end
out[#out + 1] = v
end
end
return one and nil or out
end
end
local function scripttext(s)
local raw = Proxies[s] or CloneRefs[s] or s
local d = nil
pcall(function()
d = raw:FindFirstChild("__pureunc_data")
end)
if d and d:IsA("StringValue") then
return d.Value
end
local ses = nil
pcall(function()
ses = Game:GetService("ScriptEditorService")
end)
if ses then
local ok, v = pcall(function()
return ses:GetEditorSource(raw)
end)
if ok and type(v) == "string" and #v > 0 then
return v
end
end
if UGCValidationService then
local ok, v = pcall(function()
return UGCValidationService:GetPropertyValue(raw, "Source")
end)
if ok and type(v) == "string" and #v > 0 then
return v
end
end
local ok, v = pcall(function()
return raw.Source
end)
if ok and type(v) == "string" and #v > 0 then
return v
end
return nil
end
PureUNC.getscriptbytecode = function(s)
assert(PureUNC.typeof(s) == "Instance" and s:IsA("LuaSourceContainer"), "invalid argument #1 to 'getscriptbytecode' (LuaSourceContainer expected)", 2)
local raw = Proxies[s] or CloneRefs[s] or s
if ngetscriptbytecode then
local ok, v = pcall(ngetscriptbytecode, raw)
if ok and type(v) == "string" and #v > 0 then
return v
end
end
local t = scripttext(raw)
if t then
return t
end
local a = {"PUREUNCBC", raw.ClassName, raw.Name}
pcall(function()
a[#a + 1] = raw:GetFullName()
end)
pcall(function()
a[#a + 1] = raw:GetHash()
end)
return table.concat(a, "\0")
end
PureUNC.getscriptclosure = function(s)
assert(PureUNC.typeof(s) == "Instance" and s:IsA("LuaSourceContainer"), "invalid argument #1 to 'getscriptclosure' (LuaSourceContainer expected)", 2)
local raw = Proxies[s] or CloneRefs[s] or s
if ngetscriptclosure then
local ok, v = pcall(ngetscriptclosure, raw)
if ok and type(v) == "function" then
return v
end
end
local t = scripttext(raw)
if t then
for _, g in Environments() do
local ok, ls = pcall(function()
return g.loadstring
end)
if ok and type(ls) == "function" then
local ok2, f = pcall(ls, t, "=" .. raw.Name)
if ok2 and type(f) == "function" then
return f
end
end
end
end
if raw:IsA("ModuleScript") then
return function(...)
local ok, v = pcall(require, raw)
if ok then
return v
end
return nil
end
end
return function(...)
return nil
end
end
PureUNC.getscriptfunction = PureUNC.getscriptclosure
PureUNC.getcustomasset = function(v)
assert(type(v) == "string", "invalid argument #1 to 'getcustomasset' (string expected)", 2)
if ngetcustomasset then
local ok, r = pcall(ngetcustomasset, v)
if ok and type(r) == "string" and #r > 0 then
return r
end
end
local data = ""
if type(PureUNC.isfile) == "function" and PureUNC.isfile(v) then
data = PureUNC.readfile(v)
end
return "rbxasset://pureunc/" .. StringHash(v .. "\0" .. data)
end
PureUNC.getsynasset = PureUNC.getcustomasset
PureUNC.decompile = function(s)
assert(PureUNC.typeof(s) == "Instance" and s:IsA("LuaSourceContainer"), "invalid argument #1 to 'decompile' (LuaSourceContainer expected)", 2)
local raw = Proxies[s] or CloneRefs[s] or s
if ndecompile then
local ok, v = pcall(ndecompile, raw)
if ok and type(v) == "string" then
return v
end
end
local t = scripttext(raw)
if t then
return t
end
local n = raw.Name
local f = n
pcall(function()
f = raw:GetFullName()
end)
return "-- PureUNC decompile fallback\n-- " .. tostring(f) .. "\n-- hash: " .. PureUNC.getscripthash(raw)
end
PureUNC.getrendersteppedlist = function()
return {}
end
PureUNC.messagebox = function(text, caption, flags)
text = tostring(text or "")
caption = tostring(caption or "PureUNC")
flags = tonumber(flags) or 0
local par = rcparent()
assert(par, "messagebox unavailable", 2)
local sg = RobloxInstance.new("ScreenGui")
sg.Name = "PureUNCMessageBox"
sg.ResetOnSpawn = false
sg.IgnoreGuiInset = true
local fr = RobloxInstance.new("Frame")
fr.Size = UDim2.fromOffset(460, 210)
fr.Position = UDim2.new(0.5, -230, 0.5, -105)
fr.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
fr.BorderSizePixel = 0
fr.Parent = sg
local ti = RobloxInstance.new("TextLabel")
ti.Size = UDim2.new(1, 0, 0, 34)
ti.BackgroundColor3 = Color3.fromRGB(34, 34, 34)
ti.BorderSizePixel = 0
ti.TextColor3 = Color3.new(1, 1, 1)
ti.Font = Enum.Font.Code
ti.TextSize = 16
ti.TextXAlignment = Enum.TextXAlignment.Left
ti.Text = " " .. caption
ti.Parent = fr
local tx = RobloxInstance.new("TextLabel")
tx.Size = UDim2.new(1, -24, 1, -92)
tx.Position = UDim2.fromOffset(12, 44)
tx.BackgroundTransparency = 1
tx.TextColor3 = Color3.fromRGB(235, 235, 235)
tx.Font = Enum.Font.Code
tx.TextSize = 14
tx.TextWrapped = true
tx.TextXAlignment = Enum.TextXAlignment.Left
tx.TextYAlignment = Enum.TextYAlignment.Top
tx.Text = text
tx.Parent = fr
local mode = bit32.band(flags, 15)
local sets = {
[0] = {{"OK", 1}},
[1] = {{"OK", 1}, {"Cancel", 2}},
[2] = {{"Abort", 3}, {"Retry", 4}, {"Ignore", 5}},
[3] = {{"Yes", 6}, {"No", 7}, {"Cancel", 2}},
[4] = {{"Yes", 6}, {"No", 7}},
[5] = {{"Retry", 4}, {"Cancel", 2}}
}
local buttons = sets[mode] or sets[0]
local done = false
local result = 1
local w = 92
local gap = 8
local total = #buttons * w + (#buttons - 1) * gap
for i, b in buttons do
local bt = RobloxInstance.new("TextButton")
bt.Size = UDim2.fromOffset(w, 30)
bt.Position = UDim2.new(0.5, -total / 2 + (i - 1) * (w + gap), 1, -40)
bt.BackgroundColor3 = Color3.fromRGB(46, 46, 46)
bt.BorderSizePixel = 0
bt.TextColor3 = Color3.new(1, 1, 1)
bt.Font = Enum.Font.Code
bt.TextSize = 14
bt.Text = b[1]
bt.Parent = fr
bt.MouseButton1Click:Connect(function() result = b[2] done = true end)
end
sg.Parent = par
repeat task.wait(0.03) until done or sg.Parent == nil
pcall(function() sg:Destroy() end)
return result
end
local sk = {
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
}
local function u32(...)
local s = 0
for i = 1, select("#", ...) do
s = bit32.band(s + select(i, ...), 0xffffffff)
end
return s
end
local function sha(s, raw)
s = tostring(s)
local l = #s * 8
local hi = math.floor(l / 4294967296)
local lo = l % 4294967296
local pad = 56 - ((#s + 1) % 64)
if pad < 0 then
pad += 64
end
s = s .. string.char(128) .. string.rep("\0", pad)
s = s .. string.char(
bit32.band(bit32.rshift(hi, 24), 255),
bit32.band(bit32.rshift(hi, 16), 255),
bit32.band(bit32.rshift(hi, 8), 255),
bit32.band(hi, 255),
bit32.band(bit32.rshift(lo, 24), 255),
bit32.band(bit32.rshift(lo, 16), 255),
bit32.band(bit32.rshift(lo, 8), 255),
bit32.band(lo, 255)
)
local h0,h1,h2,h3,h4,h5,h6,h7 = 0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19
for o = 1, #s, 64 do
local w = table.create(64, 0)
for i = 0, 15 do
local j = o + i * 4
w[i + 1] = u32(
bit32.lshift(string.byte(s, j), 24),
bit32.lshift(string.byte(s, j + 1), 16),
bit32.lshift(string.byte(s, j + 2), 8),
string.byte(s, j + 3)
)
end
for i = 17, 64 do
local a = w[i - 15]
local b = w[i - 2]
local s0 = bit32.bxor(bit32.rrotate(a, 7), bit32.rrotate(a, 18), bit32.rshift(a, 3))
local s1 = bit32.bxor(bit32.rrotate(b, 17), bit32.rrotate(b, 19), bit32.rshift(b, 10))
w[i] = u32(w[i - 16], s0, w[i - 7], s1)
end
local a,b,c,d,e,f,g,h = h0,h1,h2,h3,h4,h5,h6,h7
for i = 1, 64 do
local s1 = bit32.bxor(bit32.rrotate(e, 6), bit32.rrotate(e, 11), bit32.rrotate(e, 25))
local ch = bit32.bxor(bit32.band(e, f), bit32.band(bit32.bnot(e), g))
local t1 = u32(h, s1, ch, sk[i], w[i])
local s0 = bit32.bxor(bit32.rrotate(a, 2), bit32.rrotate(a, 13), bit32.rrotate(a, 22))
local maj = bit32.bxor(bit32.band(a, b), bit32.band(a, c), bit32.band(b, c))
local t2 = u32(s0, maj)
h = g
g = f
f = e
e = u32(d, t1)
d = c
c = b
b = a
a = u32(t1, t2)
end
h0,h1,h2,h3,h4,h5,h6,h7 = u32(h0,a),u32(h1,b),u32(h2,c),u32(h3,d),u32(h4,e),u32(h5,f),u32(h6,g),u32(h7,h)
end
local HttpService = {h0,h1,h2,h3,h4,h5,h6,h7}
if raw then
local a = table.create(8)
for i, v in HttpService do
a[i] = string.char(
bit32.band(bit32.rshift(v, 24), 255),
bit32.band(bit32.rshift(v, 16), 255),
bit32.band(bit32.rshift(v, 8), 255),
bit32.band(v, 255)
)
end
return table.concat(a)
end
local a = table.create(8)
for i, v in HttpService do
a[i] = string.format("%08x", v)
end
return table.concat(a)
end
PureUNC.crypt.hash = function(data, alg)
alg = tostring(alg or "sha256"):lower():gsub("[^%w]", "")
assert(alg == "sha256", "unsupported hash algorithm: " .. tostring(alg), 2)
return sha(tostring(data), false)
end
PureUNC.crypt.hmac = function(a, b, c)
local data = tostring(a or "")
local key = tostring(b or "")
local alg = c
if alg == nil then
alg = "sha256"
end
alg = tostring(alg):lower():gsub("[^%w]", "")
if alg ~= "sha256" then
if tostring(a):lower():gsub("[^%w]", "") == "sha256" then
alg = "sha256"
data = tostring(b or "")
key = tostring(c or "")
elseif tostring(c):lower():gsub("[^%w]", "") == "sha256" then
alg = "sha256"
else
error("unsupported hmac algorithm", 2)
end
end
if #key > 64 then
key = sha(key, true)
end
key = key .. string.rep("\0", 64 - #key)
local ip = table.create(64)
local op = table.create(64)
for i = 1, 64 do
local v = string.byte(key, i)
ip[i] = string.char(bit32.bxor(v, 0x36))
op[i] = string.char(bit32.bxor(v, 0x5c))
end
return sha(table.concat(op) .. sha(table.concat(ip) .. data, true), false)
end
PureUNC.crypt.custom = PureUNC.crypt.custom or {}
PureUNC.crypt.custom.hash = PureUNC.crypt.hash
local ngetreg = FindNative({"getreg", "getregistry", "debug.getregistry"})
local ngetconstant = FindNative({"debug.getconstant", "getconstant"})
local ngetconstants = FindNative({"debug.getconstants", "getconstants"})
local ngetproto = FindNative({"debug.getproto", "getproto"})
local ngetprotos = FindNative({"debug.getprotos", "getprotos"})
local ngetstack = FindNative({"debug.getstack", "getstack"})
local ngetupvalue = FindNative({"debug.getupvalue", "getupvalue"})
local ngetupvalues = FindNative({"debug.getupvalues", "getupvalues"})
PureUNC.WebSocket = nil
PureUNC.DrawingImmediate = nil
PureUNC.oth = nil
PureUNC.getrendersteppedlist = nil
PureUNC.fireclickdetector = nil
PureUNC.firetouchinterest = nil
PureUNC.getcallingscript = nil
PureUNC.getscriptfromthread = nil
PureUNC.setreadonly = nil
PureUNC.makewritable = nil
PureUNC.gethwid = nil
PureUNC.getproperties = nil
PureUNC.getsimulationradius = nil
PureUNC.setsimulationradius = nil
PureUNC.getfpscap = nil
PureUNC.setfpscap = nil
PureUNC.setfflag = nil
PureUNC.queueonteleport = nil
PureUNC.queue_on_teleport = nil
PureUNC.clearteleportqueue = nil
PureUNC.getscriptthread = nil
PureUNC.getsignalarguments = nil
PureUNC.getsignalargumentsinfo = nil
PureUNC.getsignalwhitelist = nil
PureUNC.setstackhidden = nil
PureUNC.debugsetname = nil
PureUNC.debugsetinfo = nil
PureUNC.debugsetsafeenv = nil
PureUNC.debuggetsafeenv = nil
PureUNC.debuggetconstant = ngetconstant
PureUNC.debuggetconstants = ngetconstants
PureUNC.debuggetproto = ngetproto
PureUNC.debuggetprotos = ngetprotos
PureUNC.debuggetstack = ngetstack
PureUNC.debuggetupvalue = ngetupvalue
PureUNC.debuggetupvalues = ngetupvalues
PureUNC.getcustomasset = ngetcustomasset
PureUNC.getsynasset = ngetcustomasset
PureUNC.getscriptbytecode = ngetscriptbytecode
PureUNC.getscriptclosure = ngetscriptclosure
PureUNC.getscriptfunction = ngetscriptclosure
PureUNC.decompile = ndecompile
if type(table.freeze) == "function" then
PureUNC.makereadonly = function(t)
assert(type(t) == "table", "table expected", 2)
return table.freeze(t)
end
else
PureUNC.makereadonly = nil
end
if type(PureUNC.filtergc) ~= "function" and type(PureUNC.getgc) == "function" then
PureUNC.filtergc = function(ft, op, one)
assert(type(ft) == "string", "string expected", 2)
op = op or {}
assert(type(op) == "table", "table expected", 2)
local want = ft:lower()
local out = {}
for _, v in PureUNC.getgc(true) do
local yes = want == "all" or type(v) == want
if yes and type(v) == "table" and type(op.Keys) == "table" then
for _, k in op.Keys do if rawget(v, k) == nil then yes = false break end end
end
if yes and type(v) == "table" and type(op.KeyValuePairs) == "table" then
for k, x in op.KeyValuePairs do if rawget(v, k) ~= x then yes = false break end end
end
if yes then
if one then return v end
out[#out + 1] = v
end
end
return one and nil or out
end
end
local Functions = {
getgenv = PureUNC.getgenv,
hookfunction = PureUNC.hookfunction,
replaceclosure = PureUNC.replaceclosure,
restorefunction = PureUNC.restorefunction,
isfunctionhooked = PureUNC.isfunctionhooked,
filtergc = PureUNC.filtergc,
getcustomasset = PureUNC.getcustomasset,
getsynasset = PureUNC.getsynasset,
getscriptbytecode = PureUNC.getscriptbytecode,
getscriptclosure = PureUNC.getscriptclosure,
getscriptfunction = PureUNC.getscriptfunction,
decompile = PureUNC.decompile,
getrendersteppedlist = PureUNC.getrendersteppedlist,
messagebox = PureUNC.messagebox,
newlclosure = PureUNC.newlclosure,
isnewcclosure = PureUNC.isnewcclosure,
isourthread = PureUNC.isourthread,
setstackhidden = PureUNC.setstackhidden,
getscriptthread = PureUNC.getscriptthread,
cansignalreplicate = PureUNC.cansignalreplicate,
getconnection = PureUNC.getconnection,
getsignalarguments = PureUNC.getsignalarguments,
getsignalargumentsinfo = PureUNC.getsignalargumentsinfo,
getsignalwhitelist = PureUNC.getsignalwhitelist,
getbspval = PureUNC.getbspval,
getpcd = PureUNC.getpcd,
base64encode = PureUNC.base64encode,
base64decode = PureUNC.base64decode,
base64_encode = PureUNC.base64_encode,
base64_decode = PureUNC.base64_decode,
lz4compress = PureUNC.lz4compress,
lz4decompress = PureUNC.lz4decompress,
identifyexecutor = PureUNC.identifyexecutor,
getexecutorname = PureUNC.getexecutorname,
getexecutorversion = PureUNC.getexecutorversion,
islclosure = PureUNC.islclosure,
isluaclosure = PureUNC.isluaclosure,
isclosure = PureUNC.isclosure,
iscclosure = PureUNC.iscclosure,
newcclosure = PureUNC.newcclosure,
newclosure = PureUNC.newclosure,
clonefunction = PureUNC.clonefunction,
clonefunc = PureUNC.clonefunction,
checkcaller = PureUNC.checkcaller,
getfunctionhash = PureUNC.getfunctionhash,
isexecutorclosure = PureUNC.isexecutorclosure,
checkclosure = PureUNC.checkclosure,
isourclosure = PureUNC.isourclosure,
iskrnlclosure = PureUNC.isourclosure,
issynclosure = PureUNC.isourclosure,
cloneref = PureUNC.cloneref,
compareinstances = PureUNC.compareinstances,
gethui = PureUNC.gethui,
isrenderobj = PureUNC.isrenderobj,
cleardrawcache = PureUNC.cleardrawcache,
isrenderavailable = PureUNC.isrenderavailable,
getrenderproperty = PureUNC.getrenderproperty,
setrenderproperty = PureUNC.setrenderproperty,
getscripts = PureUNC.getscripts,
getrunningscripts = PureUNC.getrunningscripts,
getloadedmodules = PureUNC.getloadedmodules,
getinstances = PureUNC.getinstances,
getnilinstances = PureUNC.getnilinstances,
getcallbackvalue = PureUNC.getcallbackvalue,
fireproximityprompt = PureUNC.fireproximityprompt,
fireclickdetector = PureUNC.fireclickdetector,
firetouchinterest = PureUNC.firetouchinterest,
firesignal = PureUNC.firesignal,
getconnections = PureUNC.getconnections,
replicatesignal = PureUNC.replicatesignal,
isnetworkowner = PureUNC.isnetworkowner,
isscriptable = PureUNC.isscriptable,
setscriptable = PureUNC.setscriptable,
gethiddenproperty = PureUNC.gethiddenproperty,
sethiddenproperty = PureUNC.sethiddenproperty,
getthreadidentity = PureUNC.getthreadidentity,
setthreadidentity = PureUNC.setthreadidentity,
getidentity = PureUNC.getidentity,
setidentity = PureUNC.setidentity,
getthreadcontext = PureUNC.getthreadcontext,
setthreadcontext = PureUNC.setthreadcontext,
printidentity = PureUNC.printidentity,
getrenv = PureUNC.getrenv,
getsenv = PureUNC.getsenv,
getcallingscript = PureUNC.getcallingscript,
getscriptfromthread = PureUNC.getscriptfromthread,
getnamecallmethod = PureUNC.getnamecallmethod,
setnamecallmethod = PureUNC.setnamecallmethod,
getrawmetatable = PureUNC.getrawmetatable,
isreadonly = PureUNC.isreadonly,
setreadonly = PureUNC.setreadonly,
makereadonly = PureUNC.makereadonly,
makewritable = PureUNC.makewritable,
getgc = PureUNC.getgc,
getreg = PureUNC.getreg,
getregistry = PureUNC.getregistry,
getscripthash = PureUNC.getscripthash,
setrawmetatable = PureUNC.setrawmetatable,
setclipboard = PureUNC.setclipboard,
toclipboard = PureUNC.toclipboard,
setrbxclipboard = PureUNC.setrbxclipboard,
set_clipboard = PureUNC.set_clipboard,
getclipboard = PureUNC.getclipboard,
keypress = PureUNC.keypress,
keyrelease = PureUNC.keyrelease,
keyclick = PureUNC.keyclick,
keytap = PureUNC.keytap,
mouse1click = PureUNC.mouse1click,
mouse1press = PureUNC.mouse1press,
mouse1release = PureUNC.mouse1release,
mouse2click = PureUNC.mouse2click,
mouse2press = PureUNC.mouse2press,
mouse2release = PureUNC.mouse2release,
middleclick = PureUNC.middleclick,
middlepress = PureUNC.middlepress,
middlerelease = PureUNC.middlerelease,
mousemoveabs = PureUNC.mousemoveabs,
movemouse = PureUNC.movemouse,
mousemoverel = PureUNC.mousemoverel,
mouserel = PureUNC.mouserel,
mousescroll = PureUNC.mousescroll,
getmousepos = PureUNC.getmousepos,
getmouselocation = PureUNC.getmouselocation,
iswindowactive = PureUNC.iswindowactive,
isrbxactive = PureUNC.isrbxactive,
isgameactive = PureUNC.isgameactive,
writefile = PureUNC.writefile,
appendfile = PureUNC.appendfile,
readfile = PureUNC.readfile,
isfile = PureUNC.isfile,
isfolder = PureUNC.isfolder,
delfile = PureUNC.delfile,
delfolder = PureUNC.delfolder,
makefolder = PureUNC.makefolder,
listfiles = PureUNC.listfiles,
loadfile = PureUNC.loadfile,
request = PureUNC.request,
http_request = PureUNC.http_request,
httpget = PureUNC.httpget,
dofile = PureUNC.dofile,
queueonteleport = PureUNC.queueonteleport,
queue_on_teleport = PureUNC.queue_on_teleport,
clearteleportqueue = PureUNC.clearteleportqueue,
getfflag = PureUNC.getfflag,
setfflag = PureUNC.setfflag,
getfflagtype = PureUNC.getfflagtype,
getobjects = PureUNC.getobjects,
getfpscap = PureUNC.getfpscap,
setfpscap = PureUNC.setfpscap,
getsimulationradius = PureUNC.getsimulationradius,
setsimulationradius = PureUNC.setsimulationradius,
gethwid = PureUNC.gethwid,
getproperties = PureUNC.getproperties,
gethiddenproperties = PureUNC.gethiddenproperties,
getproximitypromptduration = PureUNC.getproximitypromptduration,
setproximitypromptduration = PureUNC.setproximitypromptduration,
rconsolecreate = PureUNC.rconsolecreate,
rconsoleclear = PureUNC.rconsoleclear,
rconsoledestroy = PureUNC.rconsoledestroy,
rconsoleprint = PureUNC.rconsoleprint,
rconsoleinfo = PureUNC.rconsoleinfo,
rconsolewarn = PureUNC.rconsolewarn,
rconsoleerror = PureUNC.rconsoleerror,
rconsoleinput = PureUNC.rconsoleinput,
rconsolesettitle = PureUNC.rconsolesettitle,
rconsolename = PureUNC.rconsolename,
consolecreate = PureUNC.consolecreate,
consoleclear = PureUNC.consoleclear,
consoledestroy = PureUNC.consoledestroy,
consoleprint = PureUNC.consoleprint,
consoleinfo = PureUNC.consoleinfo,
consolewarn = PureUNC.consolewarn,
consoleerror = PureUNC.consoleerror,
consoleinput = PureUNC.consoleinput,
consolesettitle = PureUNC.consolesettitle
}
if IsStudio then
Functions.hookmetamethod = PureUNC.hookmetamethod
end
PureUNC.Functions = Functions
local function ExportNested(g, force)
local n = 0
local b = EnsureTable(g, "base64")
if b then
n += ExportValue(b, "encode", PureUNC.base64encode, force)
n += ExportValue(b, "decode", PureUNC.base64decode, force)
end
local c = EnsureTable(g, "crypt")
if c then
n += ExportValue(c, "base64encode", PureUNC.base64encode, force)
n += ExportValue(c, "base64decode", PureUNC.base64decode, force)
n += ExportValue(c, "base64_encode", PureUNC.base64encode, force)
n += ExportValue(c, "base64_decode", PureUNC.base64decode, force)
n += ExportValue(c, "generatekey", PureUNC.crypt.generatekey, force)
n += ExportValue(c, "generatebytes", PureUNC.crypt.generatebytes, force)
n += ExportValue(c, "random", PureUNC.crypt.random, force)
n += ExportValue(c, "encrypt", PureUNC.crypt.encrypt, force)
n += ExportValue(c, "decrypt", PureUNC.crypt.decrypt, force)
n += ExportValue(c, "hash", PureUNC.crypt.hash, force)
n += ExportValue(c, "hmac", PureUNC.crypt.hmac, force)
local cu = EnsureTable(c, "custom")
if cu then
n += ExportValue(cu, "hash", PureUNC.crypt.hash, force)
end
local cb = EnsureTable(c, "base64")
if cb then
n += ExportValue(cb, "encode", PureUNC.base64encode, force)
n += ExportValue(cb, "decode", PureUNC.base64decode, force)
end
end
local ca = EnsureTable(g, "cache")
if ca then
n += ExportValue(ca, "invalidate", PureUNC.cache.invalidate, force)
n += ExportValue(ca, "iscached", PureUNC.cache.iscached, force)
n += ExportValue(ca, "replace", PureUNC.cache.replace, force)
end
if g.Drawing == nil or force then
ExportValue(g, "Drawing", PureUNC.Drawing, force)
end
if type(PureUNC.DrawingImmediate) == "table" and (g.DrawingImmediate == nil or force) then
ExportValue(g, "DrawingImmediate", PureUNC.DrawingImmediate, force)
end
if type(PureUNC.WebSocket) == "table" and type(PureUNC.WebSocket.connect) == "function" then
local ws = EnsureTable(g, "WebSocket")
if ws then
n += ExportValue(ws, "connect", PureUNC.WebSocket.connect, force)
end
end
local ht = EnsureTable(g, "http")
if ht then
n += ExportValue(ht, "request", PureUNC.request, force)
end
local sy = EnsureTable(g, "syn")
if sy then
n += ExportValue(sy, "request", PureUNC.request, force)
n += ExportValue(sy, "write_clipboard", PureUNC.setclipboard, force)
end
local rg = EnsureTable(g, "Regex")
if rg then
n += ExportValue(rg, "Escape", PureUNC.Regex.Escape, force)
n += ExportValue(rg, "new", PureUNC.Regex.new, force)
end
if type(PureUNC.oth) == "table" then
local ot = EnsureTable(g, "oth")
if ot then
if type(PureUNC.oth.hook) == "function" then n += ExportValue(ot, "hook", PureUNC.oth.hook, force) end
if type(PureUNC.oth.unhook) == "function" then n += ExportValue(ot, "unhook", PureUNC.oth.unhook, force) end
if type(PureUNC.oth.get_original_thread) == "function" then n += ExportValue(ot, "get_original_thread", PureUNC.oth.get_original_thread, force) end
if type(PureUNC.oth.get_root_callback) == "function" then n += ExportValue(ot, "get_root_callback", PureUNC.oth.get_root_callback, force) end
if type(PureUNC.oth.is_hook_thread) == "function" then n += ExportValue(ot, "is_hook_thread", PureUNC.oth.is_hook_thread, force) end
end
end
local gd = nil
pcall(function() gd = g.debug end)
local df = {
getinfo = PureUNC.debuggetinfo,
getconstant = PureUNC.debuggetconstant,
getconstants = PureUNC.debuggetconstants,
getproto = PureUNC.debuggetproto,
getprotos = PureUNC.debuggetprotos,
getstack = PureUNC.debuggetstack,
getupvalue = PureUNC.debuggetupvalue,
getupvalues = PureUNC.debuggetupvalues,
getcallstack = PureUNC.debuggetcallstack,
getregistry = PureUNC.debuggetregistry,
getsafeenv = PureUNC.debuggetsafeenv,
isvalidlevel = PureUNC.debugisvalidlevel,
setinfo = PureUNC.debugsetinfo,
setname = PureUNC.debugsetname,
setsafeenv = PureUNC.debugsetsafeenv,
setconstant = PureUNC.debugsetconstant,
setstack = PureUNC.debugsetstack,
setupvalue = PureUNC.debugsetupvalue
}
if type(gd) == "table" then
local cp = nil
for k, v in df do
local exists = false
pcall(function() exists = type(gd[k]) == "function" end)
if force or not exists then
local ok = pcall(function() gd[k] = v end)
if not ok then
if cp == nil then
cp = {}
pcall(function() for a, b in gd do cp[a] = b end end)
end
cp[k] = v
end
end
end
if cp then pcall(function() rawset(g, "debug", cp) end) end
elseif type(debug) == "table" then
local cp = {}
pcall(function() for a, b in debug do cp[a] = b end end)
for k, v in df do cp[k] = v end
pcall(function() rawset(g, "debug", cp) end)
end
return n
end
local function ExportAliases(g)
local function get(t, k)
if type(t) ~= "table" then
return nil
end
local ok, v = pcall(function()
return t[k]
end)
return ok and v or nil
end
local function group(a, extra)
local f = nil
for _, k in a do
local v = get(g, k)
if type(v) == "function" then
f = v
break
end
end
if not f and type(extra) == "function" then
f = extra()
end
if f then
for _, k in a do
ExportValue(g, k, f, false)
end
end
return f
end
local sy = get(g, "syn")
local ht = get(g, "http")
group({"setclipboard", "toclipboard", "setrbxclipboard", "set_clipboard"}, function()
local v = get(sy, "write_clipboard")
return type(v) == "function" and v or nil
end)
group({"request", "http_request"}, function()
local a = get(ht, "request")
if type(a) == "function" then
return a
end
local b = get(sy, "request")
return type(b) == "function" and b or nil
end)
group({"getcustomasset", "getsynasset"}, function()
local v = get(sy, "getcustomasset")
return type(v) == "function" and v or nil
end)
group({"queue_on_teleport", "queueonteleport"}, function()
local v = get(sy, "queue_on_teleport")
return type(v) == "function" and v or nil
end)
group({"hookfunction", "replaceclosure", "hookfunc", "hook_function"})
group({"restorefunction", "restoreclosure", "restorefunc"})
group({"setfpscap", "set_fps_cap"})
group({"getfpscap", "get_fps_cap"})
end
local function ShadowInstance(g)
local gi = nil
pcall(function() gi = g.Instance end)
if gi == RobloxInstance or IsStudio then
pcall(function() rawset(g, "Instance", InstanceProxy) end)
end
if IsStudio then
if gameproxy == nil then gameproxy = PureUNC.cloneref(Game) end
pcall(function() rawset(g, "game", gameproxy) end)
pcall(function() rawset(g, "Game", gameproxy) end)
end
end
local function RepairEnvironment(g)
local function set(k, v)
pcall(function() rawset(g, k, v) end)
end
local gm = nil
pcall(function() gm = g.getrawmetatable end)
if type(gm) == "function" then
local ok, v = pcall(gm, game)
if not ok or type(v) ~= "table" then
set("getrawmetatable", PureUNC.getrawmetatable)
end
end
local is = nil
pcall(function() is = g.isscriptable end)
if type(is) == "function" then
local x = RobloxInstance.new("Fire")
local ok, v = pcall(is, x, "size_xml")
x:Destroy()
if not ok or type(v) ~= "boolean" then
set("isscriptable", PureUNC.isscriptable)
end
end
end
PureUNC.Install = function(Force)
local Count = 0
local Targets = Environments()
for _, Target in Targets do
ShadowInstance(Target)
ExportAliases(Target)
for Name, Function in Functions do
if type(Function) == "function" then Count += ExportValue(Target, Name, Function, Force == true) end
end
local CloneRef = nil
pcall(function() CloneRef = Target.cloneref end)
if CloneRef == PureUNC.cloneref then pcall(function() rawset(Target, "typeof", PureUNC.typeof) end) end
Count += ExportNested(Target, Force == true)
pcall(function() rawset(Target, "pureunc", PureUNC) end)
end
for Name, Function in Functions do
if type(Function) == "function" then
if Environment[Name] == nil then pcall(function() rawset(Environment, Name, Function) end) end
if Global[Name] == nil then pcall(function() rawset(Global, Name, Function) end) end
if _G[Name] == nil then pcall(function() rawset(_G, Name, Function) end) end
end
end
pcall(function() rawset(Environment, "pureunc", PureUNC) rawset(Global, "pureunc", PureUNC) rawset(_G, "pureunc", PureUNC) end)
return Count
end
local Installed = PureUNC.Install(false)
if type(debug) == "table" and type(debug.getinfo) ~= "function" then
local Success = pcall(function() debug.getinfo = PureUNC.debuggetinfo end)
if not Success then
for _, Target in Environments() do
local Copy = {}
for Name, Value in debug do Copy[Name] = Value end
Copy.getinfo = PureUNC.debuggetinfo
pcall(function() rawset(Target, "debug", Copy) end)
end
end
endLoads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted.
PureUNC, or pUNC, is a self contained Luau compatibility layer for Roblox executors with incomplete UNC or sUNC support. (Roblox Studio 69% UNC) It is not an executor. It is meant to be ran before scripts that expect common executor functions. PureUNC keeps native executor functions when they already exist, and fills missing ones with real Luau implementations or useful emulations. Fully implemented functions include Base64 encode and decode, SHA256 hashing, HMAC SHA256, LZ4 compression and decompression, identifyexecutor, getexecutorname, getexecutorversion, getobjects, mouse position helpers, proximity prompt duration helpers, and several utility functions. Emulated functions include Drawing using Roblox GUI objects, filesystem functions using an in game virtual filesystem, rconsole functions using a GUI console, clipboard helpers using native clipboard support or Roblox input methods, input functions, environment helpers, cloneref, cache functions, getgc, getreg, getsenv, getrenv, hidden property helpers, script enumeration, signal helpers, Regex, and other compatibility APIs. Some emulated functions are limited compared to native executor versions. For example getgc only s