-- Press the "Home" or "Right shift" key to toggle it
-- Sadly never made an editor, maybe someone can improve this
-- An api (not mine) was used to make syntax highlighting work since my way was
stupid
-- Yeas this ui is just like dnspy i did that on purpose
local version = "1.4.15"
local changelog = [[
-- Expect a value editor and other implementations in a future update!!
[v 1.4.15]
-- Modified for public release yaaay
-- Deobfuscated
-- Final update?? Who knows??
[v 1.4.14]
-- Updated to use Synapse X's new decompiler
[v 1.4.13]
-- Removed tostring hook
[v 1.4.12]
-- The source is now obfuscated
[v 1.4.11]
-- "Operators" are now highlighted
[v 1.4.10]
-- UI color changes
-- Environment editor sneak peek
[v 1.4.8 - 9]
-- Internal changes
-- CoreGui check updates
[v 1.4.7]
-- UI title updates
-- Login instructions
-- New CoreGui detection bypass
-- Changes with name handling
[v 1.4.3]
-- Improved whitelist
[v 1.4.2]
-- Internal fixes
-- New CoreGui detection bypass
-- New toolbar functionality
-- New whitelist & login UI!
[v 1.2.3]
-- Internal fixes
-- Slightly faster decompiling
[v 1.2.1]
-- UI total recolor
-- Fixed empty lines not appearing
[v 1.1.4]
-- New syntax highlighting API
-- Optimized decompiling
-- Detects services containing scripts
-- Fixed horizontal scrolling bug]]
--============================================================--
--local screenGui = [Link]
local screenGui = game:GetObjects("rbxassetid://2971927607")[1]
local backdrop = [Link]
local cSource, cName = "", ""
local localPlayer = game:GetService("Players").LocalPlayer
local meta = getrawmetatable(game)
setreadonly(meta, false)
[Link] = [Link]
[Link] = game:GetService("CoreGui")
setreadonly(meta, true)
[Link] = [Link](0.5, 0, 1, 2)
[Link] = [Link](0.25, 0, 0.25, 0)
--// for new users
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("SendNotification", {
Title = "ScriptView loaded",
Text = "Press the Home button or Right Shift to open!",
})
--\\ the stuff
local loginGui = [Link]
local blank = [Link]
local UIS = game:GetService("UserInputService")
local localPlayer = game:GetService("Players").LocalPlayer
local m = localPlayer:GetMouse()
local debuggerFrame = [Link]
local scriptList = [Link]
local debugScrollUp = [Link]
local debugScrollDown = [Link]
local debugScrollLeft = [Link]
local debugScrollRight = [Link]
local debugTemplate = [Link]; [Link] = nil;
local toolbarFrame = [Link]
local Edit = [Link]
local File = [Link]
local toolbarArea = [Link]
local scriptFrame = [Link]
local sourceFrame = [Link]
local scriptScrollUp = [Link]
local scriptScrollDown = [Link]
local scriptScrollLeft = [Link]
local scriptScrollRight = [Link]
local lineTemplate = [Link]; [Link] = nil;
local wordTemplate = [Link]; [Link] = nil;
local tabsFrame = [Link]
local tabTemplate = [Link]; [Link] =
nil
local ttemp = [Link]; [Link] = nil
--// explorer icons
local textures = {
['folder'] = "2950788693";
['localscript'] = "99340858";
['modulescript'] = "413367412";
['function'] = "2759601950";
['variable'] = "2759602224";
['table'] = "2757039628";
['constant'] = "2717878542";
['upvalue'] = "2717876089";
}
--// customization for u guys
local operators = {
['bracket'] = [Link](204, 104, 147); -- () {} []
['math'] = [Link](204, 104, 147); -- + - * /
['compare'] = [Link](204, 104, 147); -- = == > <
['misc'] = [Link](204, 104, 147); -- other symbols
}
local highlight = {
['builtin'] = [Link](255, 255, 255); -- wait, workspace
['keyword'] = [Link](79, 117, 255); -- true, function
['string'] = [Link](152, 203, 248); -- "hi"
['number'] = [Link](69, 255, 187); -- 123
['comment'] = [Link](85, 85, 85); -- --comment
['('] = [Link];
[')'] = [Link];
['['] = [Link];
[']'] = [Link];
['{'] = [Link];
['}'] = [Link];
['+'] = [Link];
['-'] = [Link];
['/'] = [Link];
['*'] = [Link];
['='] = [Link];
['=='] = [Link];
['>='] = [Link];
['<='] = [Link];
['~='] = [Link];
['<'] = [Link];
['>'] = [Link];
['.'] = [Link];
[','] = [Link];
['#'] = [Link];
['%'] = [Link];
['^'] = [Link];
[';'] = [Link];
['~'] = [Link];
}
--============================================================--
local aa = " " -- storing the tab button because its annoying
local otherdone = 1 -- idk what to name it
local syntax = true -- syntax highlight toggle
local module = game:GetObjects('rbxassetid://2798231692')[1]
local lexer = loadstring([Link])()
function GVT(v, def) --getValueType
return (type(v) == "function" and "function") or (type(v) == "table" and
"table") or def or "variable"
end
function getEnv(scr)
if getsenv and not getmenv then
return getsenv(scr)
elseif getsenv and getmenv then
return (scr:IsA("LocalScript") and getsenv(scr)) or getmenv(scr)
else
return {SCRIPT_ENVIRONMENT_ERROR = true}
end
end
function getTextSize(label)
local service = game:GetService("TextService")
local vec2 = service:GetTextSize([Link], [Link], [Link],
[Link](10000, 25))
return vec2
end
function replacestr(str, old, new)
return str:gsub(old, new)
end
function c3(r,g,b)
return [Link](r/255,g/255,b/255)
end
function selection(tab)
local sName = tab:FindFirstChild("ScriptName")
if not sName then return end
Tween(tab, "Out", "Sine", 0.1, {
BackgroundColor3 = ttemp.BackgroundColor3;
BorderColor3 = ttemp.BackgroundColor3
})
Tween(sName, "Out", "Sine", 0.1, {
TextColor3 = [Link].TextColor3;
})
end
function deselection(tab)
local sName = tab:FindFirstChild("ScriptName")
if not sName then return end
Tween(tab, "Out", "Sine", 0.15, {
BackgroundColor3 = tabTemplate.BackgroundColor3;
BorderColor3 = tabTemplate.BackgroundColor3
})
Tween(sName, "Out", "Sine", 0.15, {
TextColor3 = [Link].TextColor3;
})
end
function bumpTabs(num)
for i, v in pairs(tabsFrame:GetChildren()) do
if v:IsA("TextButton") then
[Link] = [Link] + num
end
end
end
function createTab(info, key)
for i, v in pairs(tabsFrame:GetChildren()) do
deselection(v)
end
local class = [Link]:lower()
local identity = ([Link] and [Link]:lower()) or [Link]:lower()
local name = [Link]
local value = [Link]
local obj = [Link]
local tab = tabTemplate:Clone()
local selected = false
[Link] = " "..name:gsub("\n", ""):gsub("\r", ""):gsub(" ", "
")
[Link] = tostring(key)
local x = getTextSize([Link])
[Link] = [Link](0, ((x.X < 400 and x.X) or 400) + 20, 1, 0)
bumpTabs(1)
[Link] = tabsFrame
tab.MouseButton1Click:Connect(function()
for i, v in pairs(tabsFrame:GetChildren()) do
deselection(v)
end
selection(tab)
loadSourceFromInfo(info, key)
end)
[Link].MouseButton1Click:Connect(function()
if #tabsFrame:GetChildren() <= 2 then
loadSource("")
return
end
--bumpTabs(1)
tab:Destroy()
if otherdone == key then
for i, v in pairs(sourceFrame:GetChildren()) do
if [Link] == "Line" then
v:Destroy()
end
end
end
end)
selection(tab)
end
function sortString(str)
str = str:gsub(aa, blank .. "")
local lines = {}
local newLine, curLine, tblLine = 1, 1, {}
local lex = [Link](str)
local num = 0
local gm = str:gmatch("[^\n]+")
for typ, word in ( ( syntax and [Link](str) ) or gm ) do
num = num + 1
if not syntax then
word = typ
newLine = newLine + 1
end
if word:find("\n") then
word = word:gsub("\n", "")
if word == "" then word = " " end
newLine = newLine + 1
end
local wordTable = {typ, word}
[Link](tblLine, wordTable)
if newLine ~= curLine then
curLine = newLine
[Link](lines, tblLine)
tblLine = {}
end
end
[Link](lines, tblLine)
return lines
end
function arrayToString(t, a, b)
local s = ""
for i = 1, #t do
s = s..tostring(t[i])
end
return s:sub(a, b)
end
function loadSource(source)
cSource = source
for i, v in pairs(sourceFrame:GetChildren()) do
if [Link] == "Line" then
v:Destroy()
end
end
local linesDictionary = sortString(source)
local uilistlayout = [Link]
[Link] = nil
for num = 1, #linesDictionary do
local lineTable = linesDictionary[num]
local line = lineTemplate:Clone()
local wordLayout = [Link]
[Link] = tostring(num).." "
[Link] = sourceFrame
[Link] = nil
for i = 1, #lineTable do
local wordTable = lineTable[i]
local typ, str = wordTable[1], wordTable[2]
local word = wordTemplate:Clone()
[Link] = line
[Link] = str
local txtSize = getTextSize([Link])
[Link] = [Link](0, txtSize.X, 1, 0)
[Link] = [Link]
[Link] = [Link](0, [Link] + txtSize.X, 0, 25)
if syntax then
local col = highlight[typ]
if col then
[Link].TextColor3 = highlight[typ]
end
end
end
[Link] = line
end
[Link] = sourceFrame
end
function loadSourceFromInfo(info, k)
pcall(function()
otherdone = k
local class = [Link]:lower()
local identity = ([Link] and [Link]:lower()) or
[Link]:lower()
local name = [Link]
local value = [Link]
local obj = [Link]
cName = name
if class == "localscript" or class == "modulescript" then
loadSource(decompile(obj), "new")
elseif class == "function" then
loadSource(decompile(value), "new")
elseif class == "folder" then
loadSource("-- Container for scripts parented to "..
tostring(obj))
elseif class == "text" then
loadSource(value)
elseif class == "constant" then
loadSource("<"..identity.."> "..value)
else
loadSource("<"..identity.."> "..name.." = <"..type(value)..">
"..tostring(value))
end
end)
end
function Tween(Obj, Dir, Style, Duration, Goal)
local tweenService = game:GetService("TweenService")
local tweenInfo = [Link](
Duration,
[Link][Style],
[Link][Dir]
)
local tween = tweenService:Create(Obj,tweenInfo,Goal)
tween:Play()
return tween
end
function updateScrollingFrame(frame)
local elementSize = [Link]
local canvasSize = elementSize + [Link](50,50)
local f = function(n) return [Link]:FindFirstChild(n,true) end
local Up, Down, Left, Right =
f("ScrollUp"),f("ScrollDown"),f("ScrollLeft"),f("ScrollRight")
if Up and Down and canvasSize.Y <= [Link].Y then
[Link], [Link] = 0.5, 0.5
[Link], [Link] = false, false
else
[Link], [Link] = 0, 0
[Link], [Link] = true, true
end
if Left and Right and canvasSize.X <= [Link].X then
[Link], [Link] = 0.5, 0.5
[Link], [Link] = false, false
else
[Link], [Link] = 0, 0
[Link], [Link] = true, true
end
end
function getScriptsOfParent(p)
local list = {}
local objs = (p == nil and getnilinstances and getnilinstances()) or
p:GetDescendants()
if p == game then objs = (getscripts and getscripts()) or
game:GetDescendants() end
for i = 1, #objs do
local v = objs[i]
if ([Link] == "LocalScript" or [Link] == "ModuleScript") then
if [Link] == "ModuleScript" then
pcall(function()
unlockmodulescript(v)
end)
end
[Link](list, v)
end
end
return list
end
old = decompile
function createButton(parent, info)
local key = [Link](10000000,99999999)
local expand = false
local button = debugTemplate:Clone()
local par = (parent:FindFirstChild("Contents")) or parent
local class = [Link]:lower()
local identity = ([Link] and [Link]:lower()) or [Link]:lower()
local name = [Link]
local value = [Link]
local obj = [Link]
[Link] = name:gsub("\n", ""):gsub("\r", ""):gsub(" ", " ")
[Link] = "rbxassetid://"..textures[class:lower()]
[Link] = par
[Link] = name
[Link] = #par:GetChildren()
[Link].MouseButton1Click:Connect(function()
if tabsFrame:FindFirstChild(tostring(key)) then
for i, v in pairs(tabsFrame:GetChildren()) do
deselection(v)
end
selection(tabsFrame[tostring(key)])
else
createTab(info, key)
end
loadSourceFromInfo(info)
end)
[Link]:Connect(function()
Tween([Link], "Out", "Quint", 0.25, {
Transparency = 0.9
})
end)
[Link]:Connect(function()
Tween([Link], "Out", "Quint", 0.25, {
Transparency = 1
})
end)
[Link].MouseButton1Down:Connect(function()
pcall(function()
expand = not expand
[Link] = expand
if expand then
[Link] = "rbxassetid://2757012309"
else
[Link] = "rbxassetid://2757012592"
end
local contents = [Link]:GetChildren()
for i = 1, #contents do
local v = contents[i]
if v:IsA("Frame") then
v:Destroy()
end
end
if not expand then return end
if class == "folder" then
for i, v in pairs(getScriptsOfParent(obj)) do
createButton(button, {
Name = [Link],
Type = [Link],
Obj = v
})
end
elseif class == "table" then
for i, v in pairs(value) do
createButton(button, {
Name = i,
Type = GVT(v),
Value = v
})
end
elseif class == "localscript" or class == "modulescript" then
pcall(function()
local env = getEnv(obj)
for i, v in pairs(env) do
createButton(button, {
Name = i,
Type = GVT(v),
Value = v
})
end
end)
elseif class == "function" then
pcall(function() --getupvalues
local env = ([Link] and
[Link](value)) or {ERROR_GETTING_UPVALUES = true}
for i, v in pairs(env) do
createButton(button, {
Name = i,
Type = GVT(v, "upvalue"),
Class = "upvalue",
Value = v
})
end
end)
pcall(function() --getconstants
local env = ([Link] and
[Link](value)) or {ERROR_GETTING_CONSTANTS = true}
for i, v in pairs(env) do
createButton(button, {
Name = tostring(v),
Type = GVT(v, "constant"),
Class = "constant",
Value = v
})
end
end)
end
end)
end)
local UILL = [Link]
[Link]:Connect(function(p)
local a = [Link]
[Link] = [Link](0, 300, 0, 25 + a.Y)
end)
return button
end
--============================================================--
do
local function bindToButton(button, func)
button.MouseButton1Click:Connect(func)
[Link]:Connect(function()
Tween(button, "Out", "Sine", 0.1, {
BackgroundColor3 = [Link](20, 20, 20)
})
end)
[Link]:Connect(function()
Tween(button, "Out", "Sine", 0.1, {
BackgroundColor3 = [Link](27, 27, 27)
})
end)
end
local function openToolbar(toolbar)
Tween([Link], "InOut", "Sine", 0.25, {
Size = [Link](0, 183, 0, 50)
})
Tween(toolbar, "InOut", "Sine", 0.25, {
BackgroundTransparency = 0
})
end
local function shutToolbar(toolbar)
Tween([Link], "InOut", "Sine", 0.25, {
Size = [Link](0, 183, 0, 0)
})
Tween(toolbar, "InOut", "Sine", 0.25, {
BackgroundTransparency = 1
})
end
local function bindToolbar(bar)
bar.MouseButton1Down:Connect(function()
for i, v in pairs(toolbarFrame:GetChildren()) do
if [Link] ~= "UIListLayout" then
shutToolbar(v)
end
end
openToolbar(bar)
end)
end
bindToButton([Link], function()
syntax = not syntax
[Link] = (syntax and
"rbxassetid://2762412562") or "rbxassetid://2762412069"
end)
bindToButton([Link], function()
loadSource("")
end)
bindToButton([Link], function()
setclipboard(cSource)
end)
bindToButton([Link], function()
writefile(tostring(cName) .. ".lua", cSource)
end)
[Link]:Connect(function()
for i, v in pairs(toolbarFrame:GetChildren()) do
if [Link] ~= "UIListLayout" then
shutToolbar(v)
end
end
end)
for i, v in pairs(toolbarFrame:GetChildren()) do
if [Link] ~= "UIListLayout" then
bindToolbar(v)
end
end
end
do
scriptScrollUp.MouseButton1Down:Connect(function()
local sF, canvas = sourceFrame, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X, canvas.Y - 25)
})
end)
scriptScrollDown.MouseButton1Down:Connect(function()
local sF, canvas = sourceFrame, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X, canvas.Y + 25)
})
end)
scriptScrollLeft.MouseButton1Down:Connect(function()
local sF, canvas = sourceFrame, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X + 25, canvas.Y)
})
end)
scriptScrollRight.MouseButton1Down:Connect(function()
local sF, canvas = sourceFrame, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X - 25, canvas.Y)
})
end)
debugScrollUp.MouseButton1Down:Connect(function()
local sF, canvas = scriptList, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X, canvas.Y - 25)
})
end)
debugScrollDown.MouseButton1Down:Connect(function()
local sF, canvas = scriptList, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X, canvas.Y + 25)
})
end)
debugScrollLeft.MouseButton1Down:Connect(function()
local sF, canvas = scriptList, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X + 25, canvas.Y)
})
end)
debugScrollRight.MouseButton1Down:Connect(function()
local sF, canvas = scriptList, [Link]
Tween(sF, "Out", "Sine", 0.25, {
CanvasPosition = [Link](canvas.X - 25, canvas.Y)
})
end)
end
--============================================================--
local open = false
local about = "--\ ScriptView " .. version .. "\--\n--\ Developed by
Litten \--".."\n\n"..changelog
[Link] = "ScriptView "..version
local aboutinfo = {Name="About", Type="Text", Obj=nil, Value=about}
createButton(scriptList,
{Name="Active Scripts", Type="Folder", Obj=game}
)
createButton(scriptList,
{Name="LocalPlayer", Type="Folder",
Obj=game:GetService("Players").LocalPlayer}
)
createButton(scriptList,
{Name="Nil", Type="Folder", Obj=nil}
)
for i, v in pairs(game:GetChildren()) do
pcall(function()
if v:FindFirstChildWhichIsA("LocalScript", true) or
v:FindFirstChildWhichIsA("ModuleScript", true) then
createButton(scriptList,
{Name=[Link], Type="Folder", Obj=v}
)
end
end)
end
local aboutButton = createTab(aboutinfo, 1)
loadSourceFromInfo(aboutinfo)
game:GetService("RunService").RenderStepped:Connect(function()
do
[Link] = [Link](0, m.X, 0, m.Y)
[Link] = open
end
do
updateScrollingFrame(scriptList)
local elementSize = [Link]
local canvasSize = elementSize + [Link](25,25)
[Link] = [Link](0, canvasSize.X, 0, canvasSize.Y)
end
do
updateScrollingFrame(sourceFrame)
local elementSize = [Link]
local canvasSize = elementSize + [Link](50,50)
[Link] = [Link](0, canvasSize.X, 0, canvasSize.Y)
end
end)
function Close()
Tween(backdrop, "Out", "Sine", 0.2, {
Position = [Link](0.5, 0, 1, 2),
Size = [Link](0.25, 0, 0.25, 0),
})
end
function Open()
Tween(backdrop, "Out", "Sine", 0.2, {
Position = [Link](0.5, 0, 0, -35),
Size = [Link](1, -2, 1, -2 + 36),
})
end
--======--
[Link]:Connect(function(input)
if [Link] == [Link] or [Link] ==
[Link] then
open = not open
if open then
Open()
else
Close()
end
end
end)
while wait() do
do
if [Link] == [Link](0.5, 0, 1, 2) then
[Link] = game:GetService("CoreGui")
else
[Link] = screenGui
end
end
end