diff --git a/README.md b/README.md index 4cbb79b1..9faf15e0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Script ```lua -local owner = "Upbolt" +local owner = "syn-developmentlabs" local branch = "revision" local function webImport(file) diff --git a/init.lua b/init.lua index 3e319356..93a45b2a 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,7 @@ if oh then end local web = true -local user = "Upbolt" -- change if you're using a fork +local user = "syn-developmentlabs" -- change if you're using a fork local branch = "revision" local importCache = {} diff --git a/modules/RemoteSpy.lua b/modules/RemoteSpy.lua index 0cbb0df9..ea59f408 100644 --- a/modules/RemoteSpy.lua +++ b/modules/RemoteSpy.lua @@ -11,7 +11,7 @@ local requiredMethods = { ["getMetatable"] = true, ["setClipboard"] = true, ["getNamecallMethod"] = true, - ["getCallingScript"] = true, + ["getCallingScript"] = true } local remoteMethods = { @@ -23,6 +23,7 @@ local remoteMethods = { local remotesViewing = { RemoteEvent = true, + UnreliableRemoteEvent = true, RemoteFunction = false, BindableEvent = false, BindableFunction = false @@ -30,6 +31,7 @@ local remotesViewing = { local methodHooks = { RemoteEvent = Instance.new("RemoteEvent").FireServer, + UnreliableRemoteEvent = Instance.new('UnreliableRemoteEvent').FireServer, RemoteFunction = Instance.new("RemoteFunction").InvokeServer, BindableEvent = Instance.new("BindableEvent").Fire, BindableFunction = Instance.new("BindableFunction").Invoke @@ -50,8 +52,8 @@ end local nmcTrampoline nmcTrampoline = hookMetaMethod(game, "__namecall", function(...) - local instance = ... - + local instance = ... + if typeof(instance) ~= "Instance" then return nmcTrampoline(...) end @@ -63,11 +65,11 @@ nmcTrampoline = hookMetaMethod(game, "__namecall", function(...) elseif method == "invokeServer" then method = "InvokeServer" end - + if remotesViewing[instance.ClassName] and instance ~= remoteDataEvent and remoteMethods[method] then local remote = currentRemotes[instance] local vargs = {select(2, ...)} - + if not remote then remote = Remote.new(instance) currentRemotes[instance] = remote @@ -102,7 +104,8 @@ end) local pcall = pcall local function checkPermission(instance) - if (instance.ClassName) then end + if (instance.ClassName) then + end end for _name, hook in pairs(methodHooks) do @@ -113,10 +116,12 @@ for _name, hook in pairs(methodHooks) do if typeof(instance) ~= "Instance" then return originalMethod(...) end - + do local success = pcall(checkPermission, instance) - if (not success) then return originalMethod(...) end + if (not success) then + return originalMethod(...) + end end if instance.ClassName == _name and remotesViewing[instance.ClassName] and instance ~= remoteDataEvent then @@ -128,16 +133,16 @@ for _name, hook in pairs(methodHooks) do currentRemotes[instance] = remote end - local remoteIgnored = remote.Ignored + local remoteIgnored = remote.Ignored local argsIgnored = remote:AreArgsIgnored(vargs) - + if eventSet and (not remoteIgnored and not argsIgnored) then local call = { script = getCallingScript((PROTOSMASHER_LOADED ~= nil and 2) or nil), args = vargs, func = getInfo(3).func } - + remote:IncrementCalls(call) remoteDataEvent:Fire(instance, call) end @@ -146,7 +151,7 @@ for _name, hook in pairs(methodHooks) do return end end - + return originalMethod(...) end)) diff --git a/ui/modules/RemoteSpy.lua b/ui/modules/RemoteSpy.lua index b179ca60..b4268546 100644 --- a/ui/modules/RemoteSpy.lua +++ b/ui/modules/RemoteSpy.lua @@ -61,6 +61,7 @@ local icons = { ignore = "rbxassetid://4842578510", unignore = "rbxassetid://4842578818", RemoteEvent = "rbxassetid://4229806545", + UnreliableRemoteEvent = "rbxassetid://86005437639724", RemoteFunction = "rbxassetid://4229810474", BindableEvent = "rbxassetid://4229809371", BindableFunction = "rbxassetid://4229807624" @@ -116,11 +117,15 @@ local removeContextSelected = ContextMenuButton.new("rbxassetid://4702831188", " local removeConditionContextSelected = ContextMenuButton.new("rbxassetid://4702831188", "Remove Conditions") -local remoteListMenu = ContextMenu.new({ pathContext, conditionContext, clearContext, ignoreContext, blockContext, removeContext }) -local remoteListMenuSelected = ContextMenu.new({ pathContextSelected, clearContextSelected, ignoreContextSelected, unignoreContextSelected, blockContextSelected, unblockContextSelected, removeContextSelected }) -local remoteLogsMenu = ContextMenu.new({ scriptContext, callingScriptContext, spyClosureContext, repeatCallContext, viewAsHexContext }) -local remoteConditionMenu = ContextMenu.new({ removeConditionContext }) -local remoteConditionMenuSelected = ContextMenu.new({ removeConditionContextSelected }) +local remoteListMenu = ContextMenu.new({pathContext, conditionContext, clearContext, ignoreContext, blockContext, + removeContext}) +local remoteListMenuSelected = ContextMenu.new({pathContextSelected, clearContextSelected, ignoreContextSelected, + unignoreContextSelected, blockContextSelected, unblockContextSelected, + removeContextSelected}) +local remoteLogsMenu = ContextMenu.new({scriptContext, callingScriptContext, spyClosureContext, repeatCallContext, + viewAsHexContext}) +local remoteConditionMenu = ContextMenu.new({removeConditionContext}) +local remoteConditionMenuSelected = ContextMenu.new({removeConditionContextSelected}) local function checkCurrentIgnored() local selectedRemote = (selected.remoteLog or selected.logContext).Remote @@ -128,7 +133,8 @@ local function checkCurrentIgnored() LogsButtons.Ignore.Label.Text = (selectedRemote.Ignored and "Unignore") or "Ignore" LogsButtons.Ignore.Icon.Image = (selectedRemote.Ignored and icons.unignore) or icons.ignore - local newWidth = TextService:GetTextSize((selectedRemote.Ignored and "Unignore") or "Ignore", 18, "SourceSans", constants.textWidth).X + 30 + local newWidth = TextService:GetTextSize((selectedRemote.Ignored and "Unignore") or "Ignore", 18, "SourceSans", + constants.textWidth).X + 30 LogsButtons.Ignore.Size = UDim2.new(0, newWidth, 0, 20) end @@ -139,7 +145,8 @@ local function checkCurrentBlocked() LogsButtons.Block.Label.Text = (selectedRemote.Blocked and "Unblock") or "Block" LogsButtons.Block.Icon.Image = (selectedRemote.Blocked and icons.unblock) or icons.block - local newWidth = TextService:GetTextSize((selectedRemote.Blocked and "Unblock") or "Block", 18, "SourceSans", constants.textWidth).X + 30 + local newWidth = TextService:GetTextSize((selectedRemote.Blocked and "Unblock") or "Block", 18, "SourceSans", + constants.textWidth).X + 30 LogsButtons.Block.Size = UDim2.new(0, newWidth, 0, 20) end @@ -147,7 +154,7 @@ end local Condition = {} function Condition.new(remote, status, index, value, type) local condition = {} - local instance = Assets.ConditionPod:Clone() + local instance = Assets.ConditionPod:Clone() local content = instance.Content local identifiers = instance.Identifiers local button = ListButton.new(instance, remoteConditions) @@ -181,11 +188,11 @@ function Condition.new(remote, status, index, value, type) table.insert(selected.conditions, condition) end end) - + if byType then instance.Identifiers.ByType.Visible = false - end - + end + identifiers.ByType.Visible = type ~= nil identifiers.Status.Image = (status == "Ignore" and icons.ignore) or icons.block identifiers.Status.Border.Image = identifiers.Status.Image @@ -281,10 +288,16 @@ function Log.new(remote) local remoteInstanceName = remoteInstance.Name local remoteClassName = remoteInstance.ClassName local listButton = ListButton.new(button, remoteList) - - local normalAnimation = TweenService:Create(button.Label, constants.fadeLength, { TextColor3 = constants.normalColor }) - local blockAnimation = TweenService:Create(button.Label, constants.fadeLength, { TextColor3 = constants.blockedColor }) - local ignoreAnimation = TweenService:Create(button.Label, constants.fadeLength, { TextColor3 = constants.ignoredColor }) + + local normalAnimation = TweenService:Create(button.Label, constants.fadeLength, { + TextColor3 = constants.normalColor + }) + local blockAnimation = TweenService:Create(button.Label, constants.fadeLength, { + TextColor3 = constants.blockedColor + }) + local ignoreAnimation = TweenService:Create(button.Label, constants.fadeLength, { + TextColor3 = constants.ignoredColor + }) button.Name = remoteInstanceName button.Label.Text = remoteInstanceName @@ -294,9 +307,9 @@ function Log.new(remote) if selected.remoteLog then remoteLogs:Clear() end - + local nameLength = TextService:GetTextSize(remoteInstanceName, 18, "SourceSans", constants.textWidth).X + 20 - + selected.remoteLog = log for _i, call in pairs(remote.Logs) do @@ -319,8 +332,7 @@ function Log.new(remote) if #remote.Logs > 400 then MessageBox.Show("Warning", "This remote seems to have a lot of calls, opening this may cause your game to freeze for a few seconds.\n\nContinue?", - MessageType.YesNo, - viewLogs) + MessageType.YesNo, viewLogs) else viewLogs() end @@ -370,13 +382,13 @@ local function createArg(instance, index, value) arg.Icon.Image = oh.Constants.Types[valueType] arg.Index.Text = index - + if valueType == "table" then arg.Label.Text = toString(value) else arg.Label.Text = dataToString(value) end - + arg.Label.TextColor3 = oh.Constants.Syntax[valueType] arg.Name = tostring(index) arg.Parent = instance.Contents @@ -413,7 +425,7 @@ function ArgsLog.new(log, callInfo) button.Instance.Size = button.Instance.Size + UDim2.new(0, 0, 0, height) - return button + return button end function Log.playIgnore(log) @@ -434,11 +446,14 @@ function Log.adjust(log) local logIcon = logInstance.Icon local callWidth = TextService:GetTextSize(logInstance.Calls.Text, 18, "SourceSans", constants.textWidth).X + 10 - local iconPosition = callWidth - (((remoteClassName == "RemoteEvent" or remoteClassName == "BindableEvent") and 4) or 0) + local iconPosition = callWidth - + (((remoteClassName == "RemoteEvent" or remoteClassName == "UnreliableRemoteEvent" or + remoteClassName == "BindableEvent") and 4) or 0) local labelWidth = iconPosition + 21 logInstance.Calls.Size = UDim2.new(0, callWidth, 1, 0) - logIcon.Position = UDim2.new(0, iconPosition, 0.5, (remoteClassName == "RemoteEvent" and -9) or -7) + logIcon.Position = UDim2.new(0, iconPosition, 0.5, ((remoteClassName == "RemoteEvent" or remoteClassName == + "UnreliableRemoteEvent") and -9) or -7) logInstance.Label.Position = UDim2.new(0, labelWidth, 0, 0) logInstance.Label.Size = UDim2.new(1, -labelWidth, 1, 0) end @@ -464,7 +479,7 @@ function Log.incrementCalls(log, callInfo) buttonInstance.Calls.Text = (calls < 10000 and calls) or "..." log:Adjust() - + if selected.remoteLog == log then ArgsLog.new(log, callInfo) remoteLogs:Recalculate() @@ -499,7 +514,7 @@ local function refreshLogs() remoteList:Recalculate() end -for _i,flag in pairs(ListFlags:GetChildren()) do +for _i, flag in pairs(ListFlags:GetChildren()) do if flag:IsA("Frame") then local check = CheckBox.new(flag) @@ -620,7 +635,7 @@ NewConditionButtons.Add.MouseButton1Click:Connect(function() else return MessageBox.Show("Error", "Your input does not match the type you selected", MessageType.OK) end - else + else local success, result = pcall(loadstring("return " .. value)) if valueType == "Value" then @@ -720,7 +735,7 @@ blockContext:SetCallback(function() selected.logContext.Remote:Block() checkCurrentBlocked() - + if selectedRemote.Blocked then selected.logContext:PlayBlock() elseif selectedRemote.Ignored then @@ -837,7 +852,7 @@ scriptContext:SetCallback(function() local remotePath = getInstancePath(selectedRemote) local method - if remoteClassName == "RemoteEvent" then + if remoteClassName == "RemoteEvent" or remoteClassName == "UnreliableRemoteEvent" then method = "FireServer" elseif remoteClassName == "RemoteFunction" then method = "InvokeServer" @@ -872,7 +887,7 @@ scriptContext:SetCallback(function() v = toString(v) end - script = script .. ("local oh%s%d = %s\n"):format(variableName, i, v) + script = script .. ("local oh%s%d = %s\n"):format(variableName, i, v) args = args .. ("oh%s%d, "):format(variableName, i) end @@ -901,7 +916,8 @@ spyClosureContext:SetCallback(function() if result == false then MessageBox.Show("Already hooked", "You are already spying " .. selectedClosure.Name) elseif result == nil then - MessageBox.Show("Cannot hook", ('Cannot hook "%s" because there are no upvalues'):format(selectedClosure.Name)) + MessageBox.Show("Cannot hook", + ('Cannot hook "%s" because there are no upvalues'):format(selectedClosure.Name)) end end end) @@ -909,9 +925,9 @@ end) repeatCallContext:SetCallback(function() local remoteInstance = selected.remoteLog.Remote.Instance local remoteClassName = remoteInstance.ClassName - local method + local method - if remoteClassName == "RemoteEvent" then + if remoteClassName == "RemoteEvent" or remoteClassName == "UnreliableRemoteEvent" then method = "FireServer" elseif remoteClassName == "RemoteFunction" then method = "InvokeServer" @@ -969,24 +985,24 @@ end) conditionStatus:SetCallback(function(_dropdown, selected) local iconCondition = (selected.Name == "Ignore" and icons.ignore) or icons.block - local icon = NewConditionContent.Status.Icon + local icon = NewConditionContent.Status.Icon icon.Image = iconCondition icon.Border.Image = iconCondition end) conditionType:SetCallback(function(_dropdown, selected) - local icon = NewConditionContent.Type.Icon + local icon = NewConditionContent.Type.Icon local typeIcons = oh.Constants.Types local iconCondition = typeIcons[selected.Name] or typeIcons["userdata"] - + icon.Image = iconCondition icon.Border.Image = iconCondition end) conditionValueType:SetCallback(function(_dropdown, selected) local iconCondition = (selected.Name == "Type" and icons.type) or oh.Constants.Types["integral"] - local icon = NewConditionContent.ValueType.Icon + local icon = NewConditionContent.ValueType.Icon icon.Image = iconCondition icon.Border.Image = iconCondition