Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[--
- claude.ai & Discord: jor.sowb (684910725336268807) & Me (Farhat).
- --]]--
- local game = cloneref(game)
- if not game:IsLoaded() then game.Loaded:Wait() end
- if getgenv().RakNetSpyExecuted and type(getgenv().RakNetSpyShutdown) == "function" then
- getgenv().RakNetSpyShutdown()
- end
- local Players = cloneref(game:GetService("Players"))
- local RunService = cloneref(game:GetService("RunService"))
- local UserInputService = cloneref(game:GetService("UserInputService"))
- local TweenService = cloneref(game:GetService("TweenService"))
- local TextService = cloneref(game:GetService("TextService"))
- local CoreGui = cloneref(game:GetService("CoreGui"))
- local GuiInset = cloneref(game:GetService("GuiService")):GetGuiInset()
- local autoexecscript = true
- local cloneref = cloneref or function(x) return x end
- local gethui = gethui or function() return CoreGui end
- local setclipboard = setclipboard or toclipboard or set_clipboard or function() end
- local RN, RN_REAL = nil, false
- do
- local function canCall(obj, field)
- if obj == nil then return false end
- local ok, v = pcall(function() return obj[field] end)
- return ok and v ~= nil
- end
- local function tryGet(fn)
- local ok, v = pcall(fn)
- if not ok or v == nil then return nil end
- if canCall(v, "add_send_hook") or canCall(v, "add_recv_hook") then return v end
- return nil
- end
- RN = tryGet(function() return raknet end)
- or tryGet(function() return getgenv().raknet end)
- or tryGet(function() return getrenv and getrenv().raknet end)
- or tryGet(function() return Raknet end)
- or tryGet(function() return RakNet end)
- or tryGet(function() return getgenv().RakNet end)
- or tryGet(function() return syn and syn.raknet end)
- if RN then
- RN_REAL = true
- else
- RN = {
- add_send_hook = function() end,
- add_recv_hook = function() end,
- remove_send_hook = function() end,
- remove_recv_hook = function() end,
- }
- end
- end
- local function tryInject(buf, priority, reliability, channel)
- if not RN_REAL then return false end
- local ok
- ok = pcall(function() RN.send(buf, priority, reliability, channel) end); if ok then return true end
- ok = pcall(function() RN.send_packet(buf) end); if ok then return true end
- ok = pcall(function() RN:send_packet(buf) end); if ok then return true end
- ok = pcall(function() raknet.send(buf, priority, reliability, channel) end); if ok then return true end
- return false
- end
- local function readPacket(p)
- if p == nil then return nil, nil end
- do
- local id, buf
- if pcall(function() id = p.PacketId; buf = p.AsBuffer end) and id ~= nil and buf ~= nil then
- return id, buf
- end
- end
- do
- local id, buf
- if pcall(function() id = p.Id; buf = p.Data end) and id ~= nil and buf ~= nil then
- return id, buf
- end
- end
- do
- local id, buf
- if pcall(function() buf = p; id = buffer.readu8(buf, 0) end) and id ~= nil then
- return id, buf
- end
- end
- if type(p) == "string" and #p >= 1 then
- local id = string.byte(p, 1)
- local buf = buffer.create(#p)
- for i = 1, #p do buffer.writeu8(buf, i - 1, string.byte(p, i)) end
- return id, buf
- end
- return nil, nil
- end
- local PKTNAME = {
- [0x00] = "CONNECTED_PING",
- [0x01] = "UNCONNECTED_PING",
- [0x02] = "UNCONNECTED_PING_OPEN",
- [0x03] = "CONNECTED_PONG",
- [0x04] = "DETECT_LOST_CONN",
- [0x05] = "OPEN_CONN_REQ_1",
- [0x06] = "OPEN_CONN_REPLY_1",
- [0x07] = "OPEN_CONN_REQ_2",
- [0x08] = "OPEN_CONN_REPLY_2",
- [0x09] = "CONNECTION_REQUEST",
- [0x10] = "CONN_REQ_ACCEPTED",
- [0x11] = "CONN_ATTEMPT_FAILED",
- [0x12] = "ALREADY_CONNECTED",
- [0x13] = "NEW_INCOMING_CONN",
- [0x14] = "NO_FREE_INCOMING",
- [0x15] = "DISCONNECT_NOTIF",
- [0x16] = "CONNECTION_LOST",
- [0x17] = "CONNECTION_BANNED",
- [0x18] = "INVALID_PASSWORD",
- [0x19] = "INCOMPATIBLE_PROTOCOL",
- [0x1A] = "IP_RECENTLY_CONNECTED",
- [0x1B] = "TIMESTAMP",
- [0x1C] = "UNCONNECTED_PONG",
- [0x1D] = "ADVERTISE_SYSTEM",
- [0x20] = "DOWNLOAD_PROGRESS",
- [0x51] = "MTU_PING_1",
- [0x52] = "MTU_PING_2",
- [0x53] = "MTU_PING_3",
- [0x54] = "MTU_PONG_1",
- [0x55] = "MTU_PONG_2",
- [0x56] = "MTU_PONG_3",
- [0x81] = "SET_GLOBALS",
- [0x82] = "TEACH_DESCRIPTORS",
- [0x83] = "DATA",
- [0x84] = "MARKER",
- [0x85] = "PHYSICS",
- [0x86] = "TOUCHES",
- [0x87] = "CHAT_ALL",
- [0x88] = "CHAT_TEAM",
- [0x89] = "REPORT_ABUSE",
- [0x8A] = "SUBMIT_TICKET",
- [0x8B] = "CHAT_GAME",
- [0x8C] = "CHAT_PLAYER",
- [0x8D] = "CLUSTER",
- [0x8E] = "PROTOCOL_MISMATCH",
- [0x8F] = "PREFERRED_SPAWN_NAME",
- [0x90] = "PROTOCOL_SYNC",
- [0x91] = "SCHEMA_SYNC",
- [0x92] = "PLACEID_VERIFICATION",
- [0x93] = "DICTIONARY_FORMAT",
- [0x94] = "HASH_MISMATCH",
- [0x95] = "SECURITYKEY_MISMATCH",
- [0x96] = "REQUEST_STATS",
- [0x97] = "NEW_SCHEMA",
- [0x98] = "KICK_MESSAGE",
- [0x9B] = "LUAU_CHALLENGE",
- [0xA2] = "DATA_PING",
- [0xA3] = "DATA_PING_BACK",
- [0xA4] = "UNRELIABLE_DATA_PING",
- [0xA7] = "EARLY_DATA_PING",
- }
- local DATA_SUBNAMES = {
- [0x01] = "DELETE_INST",
- [0x02] = "NEW_INST",
- [0x03] = "PROP",
- [0x04] = "MARKER",
- [0x05] = "PING",
- [0x06] = "PING_BACK",
- [0x07] = "EVENT",
- [0x08] = "REQ_CHAR",
- [0x09] = "ROCKY",
- [0x0A] = "CFRAME_ACK",
- [0x0B] = "JOIN_DATA",
- [0x0C] = "CLIENT_QUOTA",
- [0x0D] = "STREAM_DATA",
- [0x0E] = "REGION_REMOVAL",
- [0x0F] = "INST_REMOVAL",
- [0x10] = "TAG",
- [0x11] = "STATS",
- [0x12] = "HASH",
- [0x13] = "ATOMIC",
- [0x14] = "STREAM_DATA_INFO",
- [0x16] = "SCHEMA_DATA",
- }
- local function getPktName(id)
- return PKTNAME[id] or string.format("UNKNOWN_%02X", id)
- end
- local function bufToBytes(buf)
- local t = {}
- for i = 0, buffer.len(buf) - 1 do t[i + 1] = buffer.readu8(buf, i) end
- return t
- end
- local function hexStrToBytes(str)
- local t = {}
- for tok in str:gmatch("[%da-fA-F]+") do
- local n = tonumber(tok, 16)
- if n then t[#t + 1] = math.clamp(n, 0, 255) end
- end
- return t
- end
- local function bytesToHexStr(t)
- local out = {}
- for _, v in ipairs(t) do out[#out + 1] = string.format("%02X", v) end
- return table.concat(out, " ")
- end
- local function fmtHexDump(buf)
- local n, lines = buffer.len(buf), {}
- local i = 0
- while i < n do
- local hex, asc = {}, {}
- for col = 0, 15 do
- if i + col < n then
- local b = buffer.readu8(buf, i + col)
- hex[#hex + 1] = string.format("%02X", b)
- asc[#asc + 1] = (b >= 32 and b <= 126) and string.char(b) or "."
- else
- hex[#hex + 1] = " "
- asc[#asc + 1] = " "
- end
- end
- lines[#lines + 1] = string.format("%04X %-47s |%s|", i, table.concat(hex, " "), table.concat(asc))
- i = i + 16
- end
- return table.concat(lines, "\n")
- end
- local function tryDecodeDataSubs(buf)
- if buffer.len(buf) < 2 then return nil end
- local subId = buffer.readu8(buf, 1)
- local subName = DATA_SUBNAMES[subId]
- if subName then
- return string.format(" DATA sub: 0x%02X %s", subId, subName)
- end
- return nil
- end
- local function Create(class, props, children)
- local obj = Instance.new(class)
- for k, v in next, props or {} do obj[k] = v end
- for _, c in next, children or {} do c.Parent = obj end
- return obj
- end
- local MAX_LOG = 500
- local MIN_W = 460
- local MIN_H = 280
- local layoutOrder = 999999999
- local remoteLogs = {}
- local selected = nil
- getgenv().blacklist = {}
- getgenv().blocklist = {}
- local connections = {}
- local mainClosing = false
- local closed = false
- local sideClosing = false
- local sideClosed = false
- local capturing = true
- local ScreenGui = Create("ScreenGui", {
- ResetOnSpawn = false,
- Enabled = false,
- ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
- IgnoreGuiInset = false,
- })
- local Background = Create("Frame", {
- Parent = ScreenGui,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 460, 0, 180),
- Size = UDim2.new(0, 460, 0, 280),
- ClipsDescendants = false,
- })
- local TopBar = Create("Frame", {
- Parent = Background,
- BackgroundColor3 = Color3.fromRGB(37, 35, 38),
- BorderSizePixel = 0,
- Size = UDim2.new(0, 460, 0, 19),
- })
- local TitleBtn = Create("TextButton", {
- Parent = TopBar,
- BackgroundTransparency = 1,
- AutoButtonColor = false,
- Position = UDim2.new(0, 6, 0, 0),
- Size = UDim2.new(0, 110, 1, 0),
- Font = Enum.Font.SourceSansBold,
- Text = "RakNet Spy",
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 14,
- TextXAlignment = Enum.TextXAlignment.Left,
- })
- local CloseButton = Create("TextButton", {
- Parent = TopBar,
- BackgroundColor3 = Color3.fromRGB(37, 36, 38),
- BorderSizePixel = 0,
- Position = UDim2.new(1, -19, 0, 0),
- Size = UDim2.new(0, 19, 1, 0),
- AutoButtonColor = false,
- Text = "",
- })
- Create("ImageLabel", {
- Parent = CloseButton,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 5, 0, 5),
- Size = UDim2.new(0, 9, 0, 9),
- Image = "rbxassetid://5597086202",
- })
- local MaximizeButton = Create("TextButton", {
- Parent = TopBar,
- BackgroundColor3 = Color3.fromRGB(37, 36, 38),
- BorderSizePixel = 0,
- Position = UDim2.new(1, -38, 0, 0),
- Size = UDim2.new(0, 19, 1, 0),
- AutoButtonColor = false,
- Text = "",
- })
- Create("ImageLabel", {
- Parent = MaximizeButton,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 5, 0, 5),
- Size = UDim2.new(0, 9, 0, 9),
- Image = "rbxassetid://5597108117",
- })
- local MinimizeButton = Create("TextButton", {
- Parent = TopBar,
- BackgroundColor3 = Color3.fromRGB(37, 36, 38),
- BorderSizePixel = 0,
- Position = UDim2.new(1, -57, 0, 0),
- Size = UDim2.new(0, 19, 1, 0),
- AutoButtonColor = false,
- Text = "",
- })
- Create("ImageLabel", {
- Parent = MinimizeButton,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 5, 0, 5),
- Size = UDim2.new(0, 9, 0, 9),
- Image = "rbxassetid://5597105827",
- })
- local LeftPanel = Create("Frame", {
- Parent = Background,
- BackgroundColor3 = Color3.fromRGB(53, 52, 55),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 0, 0, 19),
- Size = UDim2.new(0, 160, 0, 261),
- })
- local TableHeader = Create("Frame", {
- Parent = LeftPanel,
- BackgroundColor3 = Color3.fromRGB(30, 29, 32),
- BorderSizePixel = 0,
- Size = UDim2.new(1, 0, 0, 17),
- })
- local function mkHeader(text, xOff, w, xAlign)
- return Create("TextLabel", {
- Parent = TableHeader,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, xOff, 0, 0),
- Size = UDim2.new(0, w, 1, 0),
- Font = Enum.Font.SourceSansBold,
- Text = text,
- TextColor3 = Color3.fromRGB(160, 160, 170),
- TextSize = 11,
- TextXAlignment = xAlign or Enum.TextXAlignment.Left,
- TextTruncate = Enum.TextTruncate.AtEnd,
- })
- end
- mkHeader(" ID", 0, 30)
- mkHeader("Name", 32, 90)
- mkHeader("Size", 124, 34, Enum.TextXAlignment.Right)
- local DirLegend = Create("Frame", {
- Parent = LeftPanel,
- BackgroundColor3 = Color3.fromRGB(30, 29, 32),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 0, 0, 17),
- Size = UDim2.new(1, 0, 0, 10),
- })
- Create("Frame", {Parent=DirLegend, BackgroundColor3=Color3.fromRGB(99,86,245),
- BorderSizePixel=0, Position=UDim2.new(0,4,0,3), Size=UDim2.new(0,3,0,4)})
- Create("TextLabel", {Parent=DirLegend, BackgroundTransparency=1,
- Position=UDim2.new(0,9,0,0), Size=UDim2.new(0,28,1,0),
- Font=Enum.Font.SourceSans, Text="SEND", TextColor3=Color3.fromRGB(130,130,200),
- TextSize=9, TextXAlignment=Enum.TextXAlignment.Left})
- Create("Frame", {Parent=DirLegend, BackgroundColor3=Color3.fromRGB(50,200,100),
- BorderSizePixel=0, Position=UDim2.new(0,42,0,3), Size=UDim2.new(0,3,0,4)})
- Create("TextLabel", {Parent=DirLegend, BackgroundTransparency=1,
- Position=UDim2.new(0,48,0,0), Size=UDim2.new(0,28,1,0),
- Font=Enum.Font.SourceSans, Text="RECV", TextColor3=Color3.fromRGB(130,200,130),
- TextSize=9, TextXAlignment=Enum.TextXAlignment.Left})
- Create("Frame", {Parent=DirLegend, BackgroundColor3=Color3.fromRGB(255,60,60),
- BorderSizePixel=0, Position=UDim2.new(0,82,0,3), Size=UDim2.new(0,3,0,4)})
- Create("TextLabel", {Parent=DirLegend, BackgroundTransparency=1,
- Position=UDim2.new(0,88,0,0), Size=UDim2.new(0,50,1,0),
- Font=Enum.Font.SourceSans, Text="BLOCKED", TextColor3=Color3.fromRGB(255,100,100),
- TextSize=9, TextXAlignment=Enum.TextXAlignment.Left})
- local LogList = Create("ScrollingFrame", {
- Parent = LeftPanel,
- Active = true,
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Position = UDim2.new(0, 0, 0, 27),
- Size = UDim2.new(1, 0, 1, -36),
- CanvasSize = UDim2.new(0, 0, 0, 0),
- ScrollBarThickness = 3,
- ScrollBarImageColor3 = Color3.fromRGB(99, 86, 245),
- })
- Create("UIListLayout", {
- Parent = LogList,
- SortOrder = Enum.SortOrder.LayoutOrder,
- HorizontalAlignment = Enum.HorizontalAlignment.Center,
- })
- local StatusBar = Create("Frame", {
- Parent = LeftPanel,
- BackgroundColor3 = Color3.fromRGB(30, 29, 32),
- BorderSizePixel = 0,
- AnchorPoint = Vector2.new(0, 1),
- Position = UDim2.new(0, 0, 1, 0),
- Size = UDim2.new(1, 0, 0, 9),
- })
- local StatusLabel = Create("TextLabel", {
- Parent = StatusBar,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 3, 0, 0),
- Size = UDim2.new(1, -3, 1, 0),
- Font = Enum.Font.SourceSans,
- Text = "Ready",
- TextColor3 = Color3.fromRGB(150, 150, 160),
- TextSize = 9,
- TextXAlignment = Enum.TextXAlignment.Left,
- TextTruncate = Enum.TextTruncate.AtEnd,
- })
- local RightPanel = Create("Frame", {
- Parent = Background,
- BackgroundColor3 = Color3.fromRGB(37, 36, 38),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 160, 0, 19),
- Size = UDim2.new(0, 300, 0, 261),
- })
- local CodeBox = Create("Frame", {
- Parent = RightPanel,
- BackgroundColor3 = Color3.fromRGB(21, 19, 20),
- BorderSizePixel = 0,
- Size = UDim2.new(1, 0, 0, 155),
- })
- local CodeScroll = Create("ScrollingFrame", {
- Parent = CodeBox,
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Size = UDim2.new(1, 0, 1, 0),
- CanvasSize = UDim2.new(0, 0, 0, 0),
- ScrollBarThickness = 3,
- ScrollBarImageColor3 = Color3.fromRGB(99, 86, 245),
- })
- local CodeLabel = Create("TextLabel", {
- Parent = CodeScroll,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 4, 0, 2),
- Size = UDim2.new(1, -8, 0, 0),
- Font = Enum.Font.RobotoMono,
- Text = "",
- TextColor3 = Color3.fromRGB(210, 210, 210),
- TextSize = 11,
- TextXAlignment = Enum.TextXAlignment.Left,
- TextYAlignment = Enum.TextYAlignment.Top,
- TextWrapped = false,
- RichText = false,
- })
- local ButtonsScroll = Create("ScrollingFrame", {
- Parent = RightPanel,
- Active = true,
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Position = UDim2.new(0, 0, 0, 155),
- Size = UDim2.new(1, 0, 1, -155),
- CanvasSize = UDim2.new(0, 0, 0, 0),
- ScrollBarThickness = 3,
- })
- local UIGridLayout = Create("UIGridLayout", {
- Parent = ButtonsScroll,
- HorizontalAlignment = Enum.HorizontalAlignment.Center,
- SortOrder = Enum.SortOrder.LayoutOrder,
- CellPadding = UDim2.new(0, 2, 0, 2),
- CellSize = UDim2.new(0, 94, 0, 27),
- })
- local ResizeHandle = Create("Frame", {
- Parent = Background,
- BackgroundColor3 = Color3.fromRGB(80, 70, 200),
- BackgroundTransparency = 0.4,
- BorderSizePixel = 0,
- AnchorPoint = Vector2.new(1, 1),
- Position = UDim2.new(1, 0, 1, 0),
- Size = UDim2.new(0, 8, 0, 8),
- ZIndex = 6,
- })
- local ToolTip = Create("Frame", {
- Parent = ScreenGui,
- BackgroundColor3 = Color3.fromRGB(26, 26, 26),
- BackgroundTransparency = 0.1,
- BorderColor3 = Color3.new(1, 1, 1),
- Size = UDim2.new(0, 200, 0, 30),
- ZIndex = 10,
- Visible = false,
- })
- local ToolTipLabel = Create("TextLabel", {
- Parent = ToolTip,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 3, 0, 2),
- Size = UDim2.new(1, -6, 1, -4),
- ZIndex = 10,
- Font = Enum.Font.SourceSans,
- Text = "",
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 13,
- TextWrapped = true,
- TextXAlignment = Enum.TextXAlignment.Left,
- TextYAlignment = Enum.TextYAlignment.Top,
- })
- local function setStatus(txt)
- StatusLabel.Text = txt
- end
- local function setCode(txt)
- CodeLabel.Text = txt
- local ts = TextService:GetTextSize(txt, CodeLabel.TextSize, CodeLabel.Font,
- Vector2.new(math.max(CodeScroll.AbsoluteSize.X - 8, 100), math.huge))
- CodeLabel.Size = UDim2.new(1, -8, 0, ts.Y + 4)
- CodeScroll.CanvasSize = UDim2.new(0, ts.X + 8, 0, ts.Y + 4)
- end
- local function updateRemoteCanvas()
- local ll = LogList:FindFirstChildOfClass("UIListLayout")
- if ll then
- LogList.CanvasSize = UDim2.fromOffset(ll.AbsoluteContentSize.X, ll.AbsoluteContentSize.Y)
- end
- end
- local function updateButtonCanvas()
- ButtonsScroll.CanvasSize = UDim2.fromOffset(
- UIGridLayout.AbsoluteContentSize.X,
- UIGridLayout.AbsoluteContentSize.Y
- )
- end
- local function makeToolTip(enable, text)
- if enable and text then
- ToolTipLabel.Text = text
- local ts = TextService:GetTextSize(text, 13, Enum.Font.SourceSans, Vector2.new(220, math.huge))
- ToolTip.Size = UDim2.new(0, ts.X + 6, 0, ts.Y + 4)
- if not connections["tooltip_move"] then
- connections["tooltip_move"] = RunService.RenderStepped:Connect(function()
- local mp = UserInputService:GetMouseLocation()
- local vp = workspace.CurrentCamera.ViewportSize
- local tl = mp + Vector2.new(14, -8)
- local br = tl + ToolTip.AbsoluteSize
- if br.X > vp.X then tl = Vector2.new(vp.X - ToolTip.AbsoluteSize.X, tl.Y) end
- if br.Y > vp.Y then tl = Vector2.new(tl.X, mp.Y - ToolTip.AbsoluteSize.Y - 4) end
- ToolTip.Position = UDim2.fromOffset(tl.X, tl.Y)
- end)
- end
- ToolTip.Visible = true
- else
- ToolTip.Visible = false
- if connections["tooltip_move"] then
- connections["tooltip_move"]:Disconnect()
- connections["tooltip_move"] = nil
- end
- end
- end
- local COL_SEND = Color3.fromRGB(99, 86, 245)
- local COL_RECV = Color3.fromRGB(50, 200, 100)
- local COL_BLOCKED = Color3.fromRGB(255, 60, 60)
- local function newPacketRow(data)
- if layoutOrder < 1 then layoutOrder = 999999999 end
- local idHex = string.format("%02X", data.packetId)
- local name = getPktName(data.packetId)
- local sizeS = tostring(data.size)
- local isBlocked = data.blocked
- local dirClr = isBlocked and COL_BLOCKED
- or (data.direction == "RECV" and COL_RECV or COL_SEND)
- local textClr = isBlocked and Color3.fromRGB(255, 150, 150) or Color3.fromRGB(210, 210, 210)
- local idClr = isBlocked and Color3.fromRGB(255, 100, 100) or Color3.fromRGB(170, 130, 255)
- local Row = Create("Frame", {
- LayoutOrder = layoutOrder,
- Parent = LogList,
- BackgroundColor3 = Color3.fromRGB(47, 46, 49),
- BorderSizePixel = 0,
- Size = UDim2.new(1, 0, 0, 17),
- })
- Create("Frame", {
- Parent = Row,
- BackgroundColor3 = dirClr,
- BorderSizePixel = 0,
- Position = UDim2.new(0, 0, 0, 1),
- Size = UDim2.new(0, 3, 1, -2),
- })
- Create("TextLabel", {
- Parent = Row,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 6, 0, 0),
- Size = UDim2.new(0, 24, 1, 0),
- Font = Enum.Font.RobotoMono,
- Text = idHex,
- TextColor3 = idClr,
- TextSize = 11,
- TextXAlignment = Enum.TextXAlignment.Left,
- })
- Create("TextLabel", {
- Parent = Row,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 32, 0, 0),
- Size = UDim2.new(0, 90, 1, 0),
- Font = Enum.Font.SourceSans,
- Text = name,
- TextColor3 = textClr,
- TextSize = 11,
- TextXAlignment = Enum.TextXAlignment.Left,
- TextTruncate = Enum.TextTruncate.AtEnd,
- })
- Create("TextLabel", {
- Parent = Row,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 124, 0, 0),
- Size = UDim2.new(0, 34, 1, 0),
- Font = Enum.Font.RobotoMono,
- Text = sizeS,
- TextColor3 = Color3.fromRGB(130, 200, 130),
- TextSize = 11,
- TextXAlignment = Enum.TextXAlignment.Right,
- })
- local Btn = Create("TextButton", {
- Parent = Row,
- BackgroundTransparency = 1,
- BorderSizePixel = 0,
- Size = UDim2.new(1, 0, 1, 0),
- AutoButtonColor = false,
- Text = "",
- })
- local log = {
- packetId = data.packetId,
- name = name,
- size = data.size,
- priority = data.priority,
- reliability = data.reliability,
- channel = data.channel,
- hexStr = data.hexStr,
- hexDump = data.hexDump,
- subInfo = data.subInfo,
- buf = data.buf,
- time = data.time,
- direction = data.direction,
- blocked = isBlocked,
- Row = Row,
- }
- Btn.MouseButton1Click:Connect(function()
- if selected then
- pcall(function() selected.Row.BackgroundColor3 = Color3.fromRGB(47, 46, 49) end)
- end
- selected = log
- Row.BackgroundColor3 = Color3.fromRGB(65, 63, 100)
- local blockedLine = isBlocked and " *** BLOCKED (return false) ***\n" or ""
- local subLine = data.subInfo and ("\n" .. data.subInfo) or ""
- local detail = string.format(
- "[%s] ID: 0x%02X %s\n%sSize: %d Priority: %s Reliability: %s Channel: %s\nTime: %.4f%s\n\n-- Hex Dump --\n%s",
- data.direction, data.packetId, name,
- blockedLine,
- data.size, tostring(data.priority), tostring(data.reliability), tostring(data.channel),
- data.time, subLine,
- data.hexDump or ""
- )
- setCode(detail)
- if sideClosed then task.spawn(toggleSideTray) end
- end)
- Btn.MouseEnter:Connect(function()
- if selected ~= log then
- Row.BackgroundColor3 = Color3.fromRGB(58, 57, 62)
- end
- makeToolTip(true, string.format("[%s%s] 0x%02X %s | %d bytes",
- data.direction, isBlocked and " BLOCKED" or "",
- data.packetId, name, data.size))
- end)
- Btn.MouseLeave:Connect(function()
- if selected ~= log then
- Row.BackgroundColor3 = Color3.fromRGB(47, 46, 49)
- end
- makeToolTip(false)
- end)
- layoutOrder -= 1
- table.insert(remoteLogs, 1, Row)
- if #remoteLogs > MAX_LOG then
- local old = table.remove(remoteLogs, #remoteLogs)
- if old and old.Parent then old:Destroy() end
- end
- updateRemoteCanvas()
- end
- local function processPacket(p, direction, blocked)
- if not capturing then return end
- local packetId, buf = readPacket(p)
- if packetId == nil or buf == nil then return end
- if blacklist[packetId] then return end
- local sizeVal = buffer.len(buf)
- local bytes = bufToBytes(buf)
- local hexStr = bytesToHexStr(bytes)
- local hexDump = fmtHexDump(buf)
- local priority, reliability, channel = 0, 0, 0
- pcall(function()
- priority = p.Priority or 0
- reliability = p.Reliability or 0
- channel = p.OrderingChannel or p.Channel or 0
- end)
- local subInfo = nil
- if packetId == 0x83 then
- subInfo = tryDecodeDataSubs(buf)
- end
- newPacketRow({
- packetId = packetId,
- size = sizeVal,
- priority = priority,
- reliability = reliability,
- channel = channel,
- hexStr = hexStr,
- hexDump = hexDump,
- subInfo = subInfo,
- buf = buf,
- time = tick(),
- direction = direction,
- blocked = blocked or false,
- })
- end
- if RN_REAL then
- pcall(function()
- RN.add_send_hook(function(p)
- local packetId = readPacket(p)
- if packetId ~= nil and blocklist[packetId] then
- processPacket(p, "SEND", true)
- return false
- end
- processPacket(p, "SEND", false)
- end)
- end)
- pcall(function()
- RN.add_recv_hook(function(p)
- processPacket(p, "RECV", false)
- end)
- end)
- end
- local function newButton(name, tipFn, onClick)
- local FT = Create("Frame", {
- Parent = ButtonsScroll,
- BackgroundTransparency = 1,
- Size = UDim2.new(0, 94, 0, 23),
- })
- Create("Frame", {
- Parent = FT,
- BackgroundColor3 = Color3.new(1, 1, 1),
- BorderSizePixel = 0,
- Position = UDim2.new(0, 6, 0, 8),
- Size = UDim2.new(0, 5, 0, 16),
- ZIndex = 2,
- })
- Create("TextLabel", {
- Parent = FT,
- BackgroundTransparency = 1,
- Position = UDim2.new(0, 16, 0, 8),
- Size = UDim2.new(0, 68, 0, 16),
- Font = Enum.Font.SourceSans,
- Text = name,
- TextColor3 = Color3.new(1, 1, 1),
- TextSize = 13,
- TextXAlignment = Enum.TextXAlignment.Left,
- ZIndex = 2,
- TextTruncate = Enum.TextTruncate.AtEnd,
- })
- local Btn = Create("TextButton", {
- Parent = FT,
- BackgroundColor3 = Color3.new(0, 0, 0),
- BackgroundTransparency = 0.7,
- BorderColor3 = Color3.new(1, 1, 1),
- Position = UDim2.new(0, 6, 0, 8),
- Size = UDim2.new(0, 82, 0, 16),
- AutoButtonColor = false,
- Text = "",
- })
- Btn.MouseEnter:Connect(function() makeToolTip(true, tipFn()) end)
- Btn.MouseLeave:Connect(function() makeToolTip(false) end)
- Btn.MouseButton1Click:Connect(onClick)
- updateButtonCanvas()
- end
- local function maximizeSize(speed)
- speed = speed or 0.05
- local bH = Background.AbsoluteSize.Y - TopBar.AbsoluteSize.Y
- local lW = LeftPanel.AbsoluteSize.X
- local bW = Background.AbsoluteSize.X
- TweenService:Create(LeftPanel, TweenInfo.new(speed), {Size = UDim2.fromOffset(lW, bH)}):Play()
- TweenService:Create(RightPanel, TweenInfo.new(speed), {Size = UDim2.fromOffset(bW - lW, bH)}):Play()
- TweenService:Create(TopBar, TweenInfo.new(speed), {Size = UDim2.fromOffset(bW, 19)}):Play()
- TweenService:Create(CodeBox, TweenInfo.new(speed), {Size = UDim2.fromOffset(bW - lW, bH - 106)}):Play()
- TweenService:Create(ButtonsScroll, TweenInfo.new(speed), {
- Position = UDim2.fromOffset(0, bH - 106),
- Size = UDim2.fromOffset(bW - lW, 106),
- }):Play()
- TweenService:Create(LogList, TweenInfo.new(speed), {Size = UDim2.fromOffset(lW, bH - 36)}):Play()
- end
- local function minimizeSize(speed)
- speed = speed or 0.05
- local bH = Background.AbsoluteSize.Y - TopBar.AbsoluteSize.Y
- local lW = LeftPanel.AbsoluteSize.X
- TweenService:Create(LeftPanel, TweenInfo.new(speed), {Size = UDim2.fromOffset(lW, bH)}):Play()
- TweenService:Create(RightPanel, TweenInfo.new(speed), {Size = UDim2.fromOffset(0, bH)}):Play()
- TweenService:Create(TopBar, TweenInfo.new(speed), {Size = UDim2.fromOffset(lW, 19)}):Play()
- TweenService:Create(LogList, TweenInfo.new(speed), {Size = UDim2.fromOffset(lW, bH - 36)}):Play()
- end
- local function bringBackOnResize()
- local vp = workspace.CurrentCamera.ViewportSize
- local cx = Background.AbsolutePosition.X
- local cy = Background.AbsolutePosition.Y
- local minW = sideClosed and LeftPanel.AbsoluteSize.X or Background.AbsoluteSize.X
- cx = math.clamp(cx, 0, vp.X - minW)
- cy = math.clamp(cy, 0, vp.Y - Background.AbsoluteSize.Y - GuiInset.Y)
- TweenService:Create(Background, TweenInfo.new(0.1), {Position = UDim2.new(0, cx, 0, cy)}):Play()
- end
- local function validateSize()
- local x = math.max(Background.AbsoluteSize.X, MIN_W)
- local y = math.max(Background.AbsoluteSize.Y, MIN_H)
- local vp = workspace.CurrentCamera.ViewportSize
- x = math.min(x, vp.X - Background.AbsolutePosition.X)
- y = math.min(y, vp.Y - Background.AbsolutePosition.Y - GuiInset.Y)
- x = math.max(x, MIN_W)
- y = math.max(y, MIN_H)
- Background.Size = UDim2.fromOffset(x, y)
- end
- local function isInResizeRange(mousePos)
- local rel = mousePos - Background.AbsolutePosition
- local bW = Background.AbsoluteSize.X
- local bH = Background.AbsoluteSize.Y
- local range = 6
- local nearX = rel.X >= bW - range and rel.X <= bW + 2
- local nearY = rel.Y >= bH - range and rel.Y <= bH + 2
- if nearX and nearY then return true, "B" end
- if nearX then return true, "X" end
- if nearY then return true, "Y" end
- return false, nil
- end
- local function isInDragRange(mousePos)
- local rel = mousePos - Background.AbsolutePosition
- local maxX = TopBar.AbsoluteSize.X - CloseButton.AbsoluteSize.X * 3
- return rel.X >= 0 and rel.X <= maxX and rel.Y >= 0 and rel.Y <= TopBar.AbsoluteSize.Y
- end
- local function fadeOut(elements)
- local visible = {}
- for _, v in next, elements do
- if typeof(v) == "Instance" and v:IsA("GuiObject") and v.Visible then
- visible[v] = true
- TweenService:Create(v, TweenInfo.new(0.35), {BackgroundTransparency = 1}):Play()
- if v:IsA("TextLabel") or v:IsA("TextButton") then
- TweenService:Create(v, TweenInfo.new(0.35), {TextTransparency = 1}):Play()
- elseif v:IsA("ImageLabel") or v:IsA("ImageButton") then
- TweenService:Create(v, TweenInfo.new(0.35), {ImageTransparency = 1}):Play()
- end
- task.delay(0.35, function() v.Visible = false end)
- end
- end
- return function()
- for obj in next, visible do
- task.spawn(function()
- obj.Visible = true
- obj.BackgroundTransparency = 1
- TweenService:Create(obj, TweenInfo.new(0.35), {BackgroundTransparency = 0}):Play()
- if obj:IsA("TextLabel") or obj:IsA("TextButton") then
- obj.TextTransparency = 1
- TweenService:Create(obj, TweenInfo.new(0.35), {TextTransparency = 0}):Play()
- elseif obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
- obj.ImageTransparency = 1
- TweenService:Create(obj, TweenInfo.new(0.35), {ImageTransparency = 0}):Play()
- end
- end)
- end
- end
- end
- local remotesFadeIn, rightFadeIn
- function toggleMinimize(override)
- if mainClosing and not override then return end
- mainClosing = true
- closed = not closed
- if closed then
- if not sideClosed then toggleSideTray(true) end
- remotesFadeIn = fadeOut(LeftPanel:GetDescendants())
- TweenService:Create(LeftPanel, TweenInfo.new(0.35), {Size = UDim2.new(0, 160, 0, 0)}):Play()
- task.wait(0.35)
- else
- TweenService:Create(LeftPanel, TweenInfo.new(0.35), {Size = UDim2.new(0, 160, 0, 261)}):Play()
- task.wait(0.35)
- if remotesFadeIn then remotesFadeIn(); remotesFadeIn = nil end
- bringBackOnResize()
- end
- mainClosing = false
- end
- function toggleSideTray(override)
- if sideClosing and not override then return end
- sideClosing = true
- sideClosed = not sideClosed
- if sideClosed then
- rightFadeIn = fadeOut(RightPanel:GetDescendants())
- task.wait(0.35)
- minimizeSize(0.35)
- task.wait(0.35)
- RightPanel.Visible = false
- else
- if closed then toggleMinimize(true) end
- RightPanel.Visible = true
- maximizeSize(0.35)
- task.wait(0.35)
- if rightFadeIn then rightFadeIn(); rightFadeIn = nil end
- bringBackOnResize()
- end
- sideClosing = false
- end
- local function backgroundUserInput(input)
- if input.UserInputType ~= Enum.UserInputType.MouseButton1
- and input.UserInputType ~= Enum.UserInputType.Touch then return end
- local mousePos = UserInputService:GetMouseLocation() - GuiInset
- local inResize, resizeType = isInResizeRange(mousePos)
- if inResize and not closed then
- local lastPos = UserInputService:GetMouseLocation()
- local szOffset = Background.AbsoluteSize - lastPos
- if not connections["resize"] then
- connections["resize"] = RunService.RenderStepped:Connect(function()
- local np = UserInputService:GetMouseLocation()
- if np == lastPos then return end
- local newW = (np + szOffset).X
- local newH = (np + szOffset).Y
- local curW = Background.AbsoluteSize.X
- local curH = Background.AbsoluteSize.Y
- if (resizeType == "X" or resizeType == "B") and not sideClosed then
- curW = math.max(newW, MIN_W)
- end
- if resizeType == "Y" or resizeType == "B" then
- curH = math.max(newH, MIN_H)
- end
- Background.Size = UDim2.fromOffset(curW, curH)
- validateSize()
- if sideClosed then minimizeSize() else maximizeSize() end
- lastPos = np
- end)
- end
- table.insert(connections, UserInputService.InputEnded:Connect(function(ie)
- if ie == input and connections["resize"] then
- connections["resize"]:Disconnect()
- connections["resize"] = nil
- end
- end))
- elseif isInDragRange(mousePos) then
- local lastPos = UserInputService:GetMouseLocation()
- local offset = Background.AbsolutePosition - lastPos
- if not connections["drag"] then
- connections["drag"] = RunService.RenderStepped:Connect(function()
- local np = UserInputService:GetMouseLocation()
- if np == lastPos then return end
- local vp = workspace.CurrentCamera.ViewportSize
- local minW = sideClosed and LeftPanel.AbsoluteSize.X or TopBar.AbsoluteSize.X
- local cx = math.clamp((offset + np).X, 0, vp.X - minW)
- local cy = math.clamp((offset + np).Y, 0, vp.Y - Background.AbsoluteSize.Y - GuiInset.Y)
- lastPos = np
- Background.Position = UDim2.new(0, cx, 0, cy)
- end)
- end
- table.insert(connections, UserInputService.InputEnded:Connect(function(ie)
- if ie == input and connections["drag"] then
- connections["drag"]:Disconnect()
- connections["drag"] = nil
- end
- end))
- end
- end
- CloseButton.MouseEnter:Connect(function()
- TweenService:Create(CloseButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(255,60,60)}):Play()
- end)
- CloseButton.MouseLeave:Connect(function()
- TweenService:Create(CloseButton, TweenInfo.new(0.2), {BackgroundColor3 = Color3.fromRGB(37,36,38)}):Play()
- end)
- MinimizeButton.MouseButton1Click:Connect(function() task.spawn(toggleMinimize) end)
- MaximizeButton.MouseButton1Click:Connect(function() task.spawn(toggleSideTray) end)
- TitleBtn.MouseEnter:Connect(function()
- local c = capturing and Color3.fromRGB(252,51,51) or Color3.fromRGB(68,206,91)
- TweenService:Create(TitleBtn, TweenInfo.new(0.3), {TextColor3 = c}):Play()
- end)
- TitleBtn.MouseLeave:Connect(function()
- TweenService:Create(TitleBtn, TweenInfo.new(0.3), {TextColor3 = Color3.new(1,1,1)}):Play()
- end)
- TitleBtn.MouseButton1Click:Connect(function()
- capturing = not capturing
- setStatus(capturing and "Capturing..." or "Paused")
- TweenService:Create(TitleBtn, TweenInfo.new(0.3), {
- TextColor3 = capturing and Color3.new(1,1,1) or Color3.fromRGB(252,51,51)
- }):Play()
- end)
- newButton("Copy Hex",
- function() return "Copy raw hex to clipboard" end,
- function()
- if selected then setclipboard(selected.hexStr); setStatus("Hex copied!") end
- end)
- newButton("Copy Script",
- function() return "Copy raknet.send() script" end,
- function()
- if selected then
- local arr = {}
- for _, b in ipairs(hexStrToBytes(selected.hexStr)) do
- arr[#arr + 1] = string.format("0x%02X", b)
- end
- setclipboard(string.format("raknet.send({%s}, %s, %s, %s)",
- table.concat(arr, ", "),
- tostring(selected.priority),
- tostring(selected.reliability),
- tostring(selected.channel)))
- setStatus("Script copied!")
- end
- end)
- newButton("Replay",
- function() return "Re-inject selected packet" end,
- function()
- if selected and selected.buf then
- local ok = tryInject(selected.buf, selected.priority, selected.reliability, selected.channel)
- setStatus(ok and "Replayed!" or "Replay failed!")
- else
- setStatus("Nothing selected!")
- end
- end)
- newButton("Hex Dump",
- function() return "Show hex dump in code panel" end,
- function()
- if selected then setCode(selected.hexDump or selected.hexStr or "") end
- end)
- newButton("Excl. ID",
- function() return "Exclude this packet ID from logs" end,
- function()
- if selected then
- blacklist[selected.packetId] = true
- setStatus(string.format("Excl. 0x%02X %s", selected.packetId, selected.name))
- end
- end)
- newButton("Clr Excl.",
- function() return "Clear all exclusions" end,
- function()
- blacklist = {}
- setStatus("Exclusions cleared!")
- end)
- newButton("Block ID",
- function() return "Block this SEND packet ID.\nHook returns false — packet is dropped." end,
- function()
- if selected then
- if selected.direction == "SEND" then
- blocklist[selected.packetId] = true
- setStatus(string.format("Blocked 0x%02X %s", selected.packetId, selected.name))
- else
- setStatus("Only SEND packets can be blocked!")
- end
- else
- setStatus("Nothing selected!")
- end
- end)
- newButton("Clr Block",
- function() return "Unblock all blocked packet IDs" end,
- function()
- blocklist = {}
- setStatus("Blocklist cleared!")
- end)
- newButton("Copy Dump",
- function() return "Copy full hex dump to clipboard" end,
- function()
- if selected and selected.hexDump then
- setclipboard(selected.hexDump)
- setStatus("Dump copied!")
- end
- end)
- newButton("Clear",
- function() return "Clear all captured packets" end,
- function()
- selected = nil
- for _, v in ipairs(LogList:GetChildren()) do
- if not v:IsA("UIListLayout") then v:Destroy() end
- end
- table.clear(remoteLogs)
- setCode("")
- setStatus("Logs cleared!")
- end)
- table.insert(connections, UserInputService.InputBegan:Connect(function(input, gpe)
- if gpe then return end
- if input.KeyCode == Enum.KeyCode.K then
- Background.Visible = not Background.Visible
- end
- end))
- table.insert(connections, UserInputService.InputBegan:Connect(backgroundUserInput))
- local function connectResize()
- if not workspace.CurrentCamera then
- workspace:GetPropertyChangedSignal("CurrentCamera"):Wait()
- end
- local camCon = workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(bringBackOnResize)
- workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
- camCon:Disconnect()
- camCon = workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(bringBackOnResize)
- end)
- end
- local function shutdown()
- for _, con in next, connections do
- if typeof(con) == "RBXScriptConnection" then con:Disconnect() end
- end
- table.clear(connections)
- pcall(function() RN.remove_send_hook() end)
- pcall(function() RN.remove_recv_hook() end)
- ScreenGui:Destroy()
- getgenv().RakNetSpyExecuted = false
- end
- CloseButton.MouseButton1Click:Connect(shutdown)
- if not getgenv().RakNetSpyExecuted then
- getgenv().RakNetSpyShutdown = shutdown
- ScreenGui.Enabled = true
- ScreenGui.Parent = gethui()
- connectResize()
- bringBackOnResize()
- if RN_REAL then
- setStatus("API found | K=toggle | title=pause")
- setCode("RakNet Spy ready.\nRakNet API detected.\n\nClick title bar to pause/resume.\nPress K to toggle window.\nDrag bottom-right corner to resize.\nBlock ID button drops SEND packets via return false.")
- else
- setStatus("WARNING: No RakNet API detected!")
- setCode("WARNING: RakNet API not found.\nNo packets will be captured.\n\nTried: raknet / getgenv().raknet /\nRakNet / getgenv().RakNet / syn.raknet")
- end
- getgenv().RakNetSpyExecuted = true
- else
- ScreenGui:Destroy()
- end
- if autoexecscript ~= false then
- Players.LocalPlayer.OnTeleport:Connect(clonefunction(newcclosure(function()
- clonefunction(queueteleport)("clonefunction(loadstring)(cloneref(game):HttpGet('https://pastebin.com/raw/b1DTcv4n'))()")
- end)))
- end
Advertisement