-- dckrzw's manager: Minimal client-side pairing + command listener GUI -- Single-file LocalScript for Roblox local Players = game:GetService("Players") local StarterGui = game:GetService("StarterGui") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TextChatService = game:FindService("TextChatService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local localPlayer = Players.LocalPlayer -- Configuration local UI_TITLE = "dckrzw's manager" local PANEL_WIDTH = 300 local PANEL_HEIGHT = 160 -- State local active = true -- disabled when GUI closed local pairedUserId: number? = nil local pairedUsername: string? = nil local pairedDisplayName: string? = nil local connections: { RBXScriptConnection } = {} -- Bang/follow state local bangAnim: Animation? = nil local bangTrack: AnimationTrack? = nil local bangDiedConn: RBXScriptConnection? = nil local bangLoopConn: RBXScriptConnection? = nil -- Generate a random 4-digit code on script start math.randomseed(tick() % 1 * 1e7) local code = string.format("%04d", math.random(0, 9999)) -- UI Elements local screenGui = Instance.new("ScreenGui") screenGui.Name = "dckrzw_manager_gui" screenGui.ResetOnSpawn = false screenGui.IgnoreGuiInset = true screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = localPlayer:WaitForChild("PlayerGui") local panel = Instance.new("Frame") panel.Name = "Panel" panel.Size = UDim2.fromOffset(PANEL_WIDTH, PANEL_HEIGHT) panel.Position = UDim2.fromScale(0.1, 0.2) panel.BackgroundColor3 = Color3.fromRGB(28, 28, 32) panel.BorderSizePixel = 0 panel.Parent = screenGui local uicorner = Instance.new("UICorner") uicorner.CornerRadius = UDim.new(0, 10) uicorner.Parent = panel local header = Instance.new("Frame") header.Name = "Header" header.Size = UDim2.new(1, 0, 0, 32) header.BackgroundColor3 = Color3.fromRGB(20, 20, 24) header.BorderSizePixel = 0 header.Parent = panel local headerCorner = Instance.new("UICorner") headerCorner.CornerRadius = UDim.new(0, 10) headerCorner.Parent = header local headerMask = Instance.new("Frame") headerMask.BackgroundTransparency = 1 headerMask.Size = UDim2.new(1, 0, 1, 0) headerMask.Parent = header local title = Instance.new("TextLabel") title.Name = "Title" title.BackgroundTransparency = 1 title.Font = Enum.Font.GothamBold title.Text = UI_TITLE title.TextColor3 = Color3.fromRGB(235, 235, 245) title.TextSize = 14 title.TextXAlignment = Enum.TextXAlignment.Left title.Position = UDim2.fromOffset(10, 0) title.Size = UDim2.new(1, -100, 1, 0) title.Parent = header local btnClose = Instance.new("TextButton") btnClose.Name = "Close" btnClose.Text = "✕" btnClose.Font = Enum.Font.GothamBold btnClose.TextSize = 14 btnClose.TextColor3 = Color3.fromRGB(235, 235, 245) btnClose.BackgroundTransparency = 1 btnClose.Size = UDim2.fromOffset(32, 32) btnClose.Position = UDim2.new(1, -34, 0, 0) btnClose.Parent = header local btnMin = Instance.new("TextButton") btnMin.Name = "Minimize" btnMin.Text = "–" btnMin.Font = Enum.Font.GothamBold btnMin.TextSize = 18 btnMin.TextColor3 = Color3.fromRGB(235, 235, 245) btnMin.BackgroundTransparency = 1 btnMin.Size = UDim2.fromOffset(32, 32) btnMin.Position = UDim2.new(1, -68, 0, 0) btnMin.Parent = header local contents = Instance.new("Frame") contents.Name = "Contents" contents.BackgroundTransparency = 1 contents.Position = UDim2.fromOffset(0, 32) contents.Size = UDim2.new(1, 0, 1, -32) contents.Parent = panel local layout = Instance.new("UIListLayout") layout.Padding = UDim.new(0, 8) layout.FillDirection = Enum.FillDirection.Vertical layout.HorizontalAlignment = Enum.HorizontalAlignment.Center layout.VerticalAlignment = Enum.VerticalAlignment.Top layout.SortOrder = Enum.SortOrder.LayoutOrder layout.Parent = contents local codeBox = Instance.new("TextLabel") codeBox.Name = "Code" codeBox.BackgroundColor3 = Color3.fromRGB(38, 38, 44) codeBox.BorderSizePixel = 0 codeBox.Font = Enum.Font.GothamSemibold codeBox.Text = "Pair Code: " .. code codeBox.TextColor3 = Color3.fromRGB(255, 255, 255) codeBox.TextSize = 18 codeBox.Size = UDim2.fromOffset(PANEL_WIDTH - 24, 36) codeBox.Parent = contents local codeCorner = Instance.new("UICorner") codeCorner.CornerRadius = UDim.new(0, 8) codeCorner.Parent = codeBox local statusLabel = Instance.new("TextLabel") statusLabel.Name = "Status" statusLabel.BackgroundTransparency = 1 statusLabel.Font = Enum.Font.Gotham statusLabel.Text = "Status: Waiting for pair" statusLabel.TextColor3 = Color3.fromRGB(200, 200, 210) statusLabel.TextSize = 14 statusLabel.Size = UDim2.fromOffset(PANEL_WIDTH - 24, 24) statusLabel.Parent = contents local hintLabel = Instance.new("TextLabel") hintLabel.Name = "Hint" hintLabel.BackgroundTransparency = 1 hintLabel.Font = Enum.Font.Gotham hintLabel.Text = "Have your main type the code in chat." hintLabel.TextColor3 = Color3.fromRGB(160, 160, 170) hintLabel.TextSize = 12 hintLabel.Size = UDim2.fromOffset(PANEL_WIDTH - 24, 20) hintLabel.Parent = contents -- Paired user info UI (hidden until paired) local pairInfo = Instance.new("Frame") pairInfo.Name = "PairInfo" pairInfo.BackgroundTransparency = 1 pairInfo.Size = UDim2.fromOffset(PANEL_WIDTH - 24, 56) pairInfo.Visible = false pairInfo.Parent = contents local avatar = Instance.new("ImageLabel") avatar.Name = "Avatar" avatar.BackgroundTransparency = 1 avatar.Size = UDim2.fromOffset(40, 40) avatar.Position = UDim2.fromOffset(0, 8) avatar.Image = "rbxassetid://0" avatar.Parent = pairInfo local nameLabel = Instance.new("TextLabel") nameLabel.Name = "Name" nameLabel.BackgroundTransparency = 1 nameLabel.Font = Enum.Font.GothamSemibold nameLabel.Text = "Username" nameLabel.TextColor3 = Color3.fromRGB(235, 235, 245) nameLabel.TextSize = 14 nameLabel.TextXAlignment = Enum.TextXAlignment.Left nameLabel.Position = UDim2.fromOffset(48, 8) nameLabel.Size = UDim2.fromOffset(PANEL_WIDTH - 24 - 48, 20) nameLabel.Parent = pairInfo local displayLabel = Instance.new("TextLabel") displayLabel.Name = "DisplayName" displayLabel.BackgroundTransparency = 1 displayLabel.Font = Enum.Font.Gotham displayLabel.Text = "Display Name" displayLabel.TextColor3 = Color3.fromRGB(180, 180, 190) displayLabel.TextSize = 12 displayLabel.TextXAlignment = Enum.TextXAlignment.Left displayLabel.Position = UDim2.fromOffset(48, 30) displayLabel.Size = UDim2.fromOffset(PANEL_WIDTH - 24 - 48, 18) displayLabel.Parent = pairInfo -- Dragging local dragging = false local dragStart: Vector2? = nil local startPos: UDim2? = nil local function beginDrag(input) dragging = true dragStart = input.Position startPos = panel.Position end local function endDrag() dragging = false end header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then beginDrag(input) end end) header.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then endDrag() end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and dragStart and startPos then local delta = input.Position - dragStart panel.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) -- Helpers local function disconnectAll() for _, c in ipairs(connections) do pcall(function() c:Disconnect() end) end table.clear(connections) end local function setStatus(text) statusLabel.Text = text end local function updatePairInfo() if not pairedUserId then pairInfo.Visible = false hintLabel.Visible = true return end local player = Players:GetPlayerByUserId(pairedUserId) local effectiveUsername = pairedUsername or (player and player.Name) or tostring(pairedUserId) local effectiveDisplayName = pairedDisplayName or (player and player.DisplayName) or effectiveUsername nameLabel.Text = effectiveUsername displayLabel.Text = effectiveDisplayName local ok, content, _ = pcall(function() return Players:GetUserThumbnailAsync(pairedUserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48) end) if ok and content then avatar.Image = content end hintLabel.Visible = false pairInfo.Visible = true end local function setActive(nextActive: boolean) active = nextActive if not active then disconnectAll() setStatus("Status: Inactive (closed)") else setStatus(pairedUserId and ("Paired: " .. (pairedUsername or tostring(pairedUserId))) or "Status: Waiting for pair") updatePairInfo() end end local function unpair() pairedUserId = nil pairedUsername = nil pairedDisplayName = nil setStatus("Status: Waiting for pair") updatePairInfo() end -- Command implementations local function cmd_reset() local character = localPlayer.Character or localPlayer.CharacterAdded:Wait() local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Health = 0 end end -- Safe, visible equivalent of an action for `.bang`. -- Plays a quick looping action animation to indicate receipt (non-explicit). local bangAnimationId = "rbxassetid://507777826" -- R6 "Dance" as a safe placeholder local function isR15(character: Instance): boolean local humanoid = character and character:FindFirstChildOfClass("Humanoid") return humanoid and humanoid.RigType == Enum.HumanoidRigType.R15 or false end local function getRoot(character: Instance): BasePart? if not character then return nil end return character:FindFirstChild("HumanoidRootPart") :: BasePart end local function getTorso(character: Instance): BasePart? if not character then return nil end return (character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")) :: BasePart end local function findPlayersByName(query: string): { Player } local results = {} if not query or query == "" then return results end local lower = string.lower(query) for _, p in ipairs(Players:GetPlayers()) do if string.find(string.lower(p.Name), lower, 1, true) then table.insert(results, p) end end return results end local function cleanupBang() if bangDiedConn then pcall(function() bangDiedConn:Disconnect() end) end if bangLoopConn then pcall(function() bangLoopConn:Disconnect() end) end bangDiedConn = nil bangLoopConn = nil if bangTrack then pcall(function() bangTrack:Stop() end) end if bangAnim then pcall(function() bangAnim:Destroy() end) end bangTrack = nil bangAnim = nil end local function cmd_unbang() cleanupBang() end local function cmd_goto(args: { string }?) local targetName = args and args[1] if not targetName or targetName == "" then return end local targets = findPlayersByName(targetName) if #targets == 0 then return end local targetPlayer = targets[1] local myCharacter = localPlayer.Character or localPlayer.CharacterAdded:Wait() local myHumanoid = myCharacter:FindFirstChildOfClass("Humanoid") if myHumanoid and myHumanoid.SeatPart then myHumanoid.Sit = false task.wait(0.1) end local myRoot = getRoot(myCharacter) local otherRoot = getRoot(targetPlayer.Character) if myRoot and otherRoot then myRoot.CFrame = otherRoot.CFrame + Vector3.new(3, 1, 0) -- attempt to break velocity similar to Infinite Yield's breakvelocity pcall(function() myRoot.AssemblyLinearVelocity = Vector3.zero myRoot.AssemblyAngularVelocity = Vector3.zero end) end end local function cmd_bang(args: { string }?) -- stop any existing loop/animation cleanupBang() task.wait() local character = localPlayer.Character or localPlayer.CharacterAdded:Wait() local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid) bangAnim = Instance.new("Animation") -- Choose anim by rig type, safe placeholder animations bangAnim.AnimationId = (isR15(character) and "rbxassetid://5918726674") or "rbxassetid://148840371" pcall(function() bangTrack = animator:LoadAnimation(bangAnim) end) if bangTrack then bangTrack:Play(0.1, 1, 1) local speedArg = tonumber(args and args[2]) pcall(function() bangTrack:AdjustSpeed(speedArg or 3) end) end -- stop on death bangDiedConn = humanoid.Died:Connect(function() cleanupBang() end) -- follow/attach behind a target if provided local targetName = args and args[1] if targetName and targetName ~= "" then local targets = findPlayersByName(targetName) if #targets > 0 then local targetPlayer = targets[1] local offset = CFrame.new(0, 0, 1.1) bangLoopConn = RunService.Stepped:Connect(function() pcall(function() local otherRoot = getTorso(targetPlayer.Character) local myRoot = getRoot(character) if otherRoot and myRoot then myRoot.CFrame = otherRoot.CFrame * offset end end) end) end end end local function handleCommand(messageText: string) -- simple parser: .command arg1 arg2 if type(messageText) ~= "string" or messageText == "" then return end if string.sub(messageText, 1, 1) ~= "." then return end local parts = {} for token in string.gmatch(messageText, "%S+") do table.insert(parts, token) end if #parts == 0 then return end local cmd = string.lower(string.sub(parts[1], 2)) local args: { string } = {} for i = 2, #parts do args[#args + 1] = parts[i] end if cmd == "reset" then cmd_reset() elseif cmd == "bang" or cmd == "follow" then cmd_bang(args) elseif cmd == "unbang" or cmd == "unfollow" then cmd_unbang() elseif cmd == "goto" or cmd == "to" then cmd_goto(args) end end -- Chat handling (TextChatService first, legacy fallback second) local function handleIncoming(senderUserId: number, senderName: string, messageText: string) if not active then return end if pairedUserId == nil then -- Only pair on exact match to code if messageText == code then pairedUserId = senderUserId pairedUsername = senderName local p = Players:GetPlayerByUserId(senderUserId) pairedDisplayName = p and p.DisplayName or senderName setStatus("Paired: " .. senderName) updatePairInfo() end return end -- Only accept commands from paired user if senderUserId == pairedUserId then handleCommand(messageText) end end local function connectTextChatService() if not TextChatService then return end local conn = TextChatService.MessageReceived:Connect(function(message) -- message: TextChatMessage local text = message and message.Text or "" local source = message and message.TextSource local userId = source and source.UserId or 0 local name = source and source.Name or "" if text ~= "" and userId ~= 0 then handleIncoming(userId, name, text) end end) table.insert(connections, conn) end local function connectLegacyChat() local defaultEvents = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") if not defaultEvents then return end local onMessage = defaultEvents:FindFirstChild("OnMessageDoneFiltering") if not onMessage or not onMessage:IsA("RemoteEvent") then return end local conn = onMessage.OnClientEvent:Connect(function(data) -- data: {FromSpeaker, Message, SpeakerUserId} local text = data and data.Message or "" local name = data and data.FromSpeaker or "" local userId = data and data.SpeakerUserId or 0 if text ~= "" and userId ~= 0 then handleIncoming(userId, name, text) end end) table.insert(connections, conn) end local function startListening() disconnectAll() -- Prefer TextChatService; legacy fallback local ok = false if TextChatService and TextChatService:FindFirstChild("ChatVersion") == nil then -- New TextChatService API (MessageReceived is available regardless); use directly connectTextChatService() ok = #connections > 0 else connectTextChatService() ok = #connections > 0 end if not ok then connectLegacyChat() end end -- Button behaviors btnMin.MouseButton1Click:Connect(function() contents.Visible = not contents.Visible if contents.Visible then btnMin.Text = "–" panel.Size = UDim2.fromOffset(PANEL_WIDTH, PANEL_HEIGHT) else btnMin.Text = "+" panel.Size = UDim2.fromOffset(PANEL_WIDTH, 32) end end) btnClose.MouseButton1Click:Connect(function() panel.Visible = false setActive(false) end) -- Allow reopening via CoreGui prompt for convenience local reopenBindable = Instance.new("BindableFunction") reopenBindable.OnInvoke = function() panel.Visible = true setActive(true) startListening() end local function promptReopen() pcall(function() StarterGui:SetCore("SendNotification", { Title = UI_TITLE, Text = "dckrzw's manager interface closed. Click to reopen.", Duration = 5, Callback = reopenBindable, Button1 = "Open", }) end) end panel:GetPropertyChangedSignal("Visible"):Connect(function() if not panel.Visible then promptReopen() end end) -- Initial wiring startListening() setStatus("Status: Waiting for pair") -- Persist pairing across respawn; do not unpair on CharacterAdded -- Safety: If TextChatService is disabled and legacy not found, show a hint if #connections == 0 then hintLabel.Text = "Chat API not found; enable TextChat or default chat." end