OPEN SOURCE MM2 CHAMS

MM2 CHAMS MURDERER CHAMS SHERIFF CHAMS INNOCENT CHAMS INCLUDE SELF

loadstring(game:HttpGet("https://pasteblox.com/raw/3nd6tx6x96"))()
pbx pull 3nd6tx6x96raw link never changes · v1 live
open-source-mm2-chams.lua
--[[
    x4axq mm2 chams  (v12)
    click rows to toggle | X = unload

    workspace.<username>.Backpack.Toys.Knife  -> murderer (red)
    workspace.<username>.Backpack.Toys.Gun    -> sheriff  (blue)
    alive + neither tool (round active)       -> innocent (green)
]]

local Players = game:GetService("Players")
local UIS     = game:GetService("UserInputService")

local LP = Players.LocalPlayer

local CFG = {
    murderer = Color3.fromRGB(255, 48, 48),
    sheriff  = Color3.fromRGB(52, 132, 255),
    innocent = Color3.fromRGB(61, 220, 116),
    fill     = 0.55,
    edge     = 0.30,
    scan     = 0.18,
}

local UI = {
    cardBg    = Color3.fromRGB(17, 19, 23),
    border    = Color3.fromRGB(38, 43, 51),
    divider   = Color3.fromRGB(32, 36, 43),
    textHi    = Color3.fromRGB(233, 236, 239),
    textLo    = Color3.fromRGB(174, 180, 188),
    boxFill   = Color3.fromRGB(200, 204, 210),
    boxOff    = Color3.fromRGB(20, 23, 28),
    boxBorder = Color3.fromRGB(58, 64, 73),
    close     = Color3.fromRGB(120, 126, 134),
    watermark = Color3.fromRGB(96, 102, 112),
}

local ROLE_COLOR = {
    m = CFG.murderer,
    s = CFG.sheriff,
    i = CFG.innocent,
}

local S = {
    on          = false,
    running     = false,
    includeSelf = false,
    roles       = { migrationBuilder = true },
    hl          = {},
    tag         = {},
    conns       = {},
    gui         = nil,
}

-- ── detection ─────────────────────────────────────────────
local function checkContainer(container)
    if not container then return nil end
    for _, c in ipairs(container:GetChildren()) do
        if c:IsA("Tool") then
            if c.Name == "Knife" then return "m" end
            if c.Name == "Gun"   then return "s" end
        end
    end
    return nil
end

local function findTool(char)
    local r = checkContainer(char)
    if r then return r end
    local back = char:FindFirstChild("Backpack")
    if not back then return nil end
    local toys = back:FindFirstChild("Toys")
    if toys then
        r = checkContainer(toys)
        if r then return r end
    end
    return checkContainer(back)
end

local function isAlive(char)
    if not char then return false end
    local hum = char:FindFirstChildOfClass("Humanoid")
    return hum ~= nil and hum.Health > 0
end

local function roleOf(plr)
    local char = plr.Character or workspace:FindFirstChild(plr.Name)
    if not char or not isAlive(char) then return nil, char end
    local r = findTool(char)
    if r then return r, char end
    local back = plr:FindFirstChild("Backpack")
    if back then
        r = checkContainer(back)
        if r then return r, char end
    end
    return nil, char
end

-- ── highlight ─────────────────────────────────────────────
local function drop(plr)
    local h = S.hl[plr]
    if h then h:Destroy() end
    S.hl[plr]  = nil
    S.tag[plr] = nil
end

local function apply(plr, role, char)
    local color = ROLE_COLOR[role]
    if not color then return drop(plr) end
    local h = S.hl[plr]
    if not h or h.Adornee ~= char then
        if h then h:Destroy() end
        h = Instance.new("Highlight")
        h.Name                = "x4axq"
        h.Adornee             = char
        h.DepthMode           = Enum.HighlightDepthMode.AlwaysOnTop
        h.FillTransparency    = CFG.fill
        h.OutlineTransparency = CFG.edge
        h.Parent              = char
        S.hl[plr] = h
    end
    h.FillColor    = color
    h.OutlineColor = color
    S.tag[plr]     = role
end

-- ── one pass ──────────────────────────────────────────────
local function pass()
    local roles, chars = {}, {}
    local active = false

    for _, plr in ipairs(Players:GetPlayers()) do
        local role, char = roleOf(plr)
        chars[plr] = char
        if role then
            roles[plr] = role
            active = true
        end
    end

    if active then
        for _, plr in ipairs(Players:GetPlayers()) do
            if not roles[plr] and isAlive(chars[plr]) then
                roles[plr] = "i"
            end
        end
    end

    local seen = {}
    for _, plr in ipairs(Players:GetPlayers()) do
        local role = roles[plr]
        local char = chars[plr]
        if role and char then
            local allowed = (plr ~= LP) or S.includeSelf
            if allowed then
                if role == "m" then allowed = S.roles.murderer
                elseif role == "s" then allowed = S.roles.sheriff
                else allowed = S.roles.innocent end
            end
            if allowed then
                seen[plr] = true
                apply(plr, role, char)
            end
        end
    end

    local stale = {}
    for plr in pairs(S.hl) do
        if not seen[plr] then table.insert(stale, plr) end
    end
    for _, plr in ipairs(stale) do drop(plr) end
end

-- ── loop ──────────────────────────────────────────────────
local function clearAll()
    for plr in pairs(S.hl) do
        if S.hl[plr] then S.hl[plr]:Destroy() end
    end
    S.hl  = {}
    S.tag = {}
end

local function startLoop()
    if S.running then return end
    S.running = true
    task.spawn(function()
        while S.running do
            pass()
            task.wait(CFG.scan)
        end
    end)
end

local function stopLoop()
    S.running = false
end

local function unload()
    S.on      = false
    S.running = false
    clearAll()
    for _, c in ipairs(S.conns) do
        pcall(function() c:Disconnect() end)
    end
    S.conns = {}
    if S.gui then S.gui:Destroy(); S.gui = nil end
    pcall(function() getgenv().x4axq_chams = nil end)
end

-- ── gui ───────────────────────────────────────────────────
local function makeGui()
    local gui = Instance.new("ScreenGui")
    gui.Name           = "x4axq"
    gui.ResetOnSpawn   = false
    gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    gui.DisplayOrder   = 999
    gui.IgnoreGuiInset = false
    local ok = pcall(function()
        gui.Parent = (gethui and gethui()) or game:GetService("CoreGui")
    end)
    if not ok then gui.Parent = LP:WaitForChild("PlayerGui") end
    S.gui = gui

    local card = Instance.new("Frame")
    card.Size             = UDim2.fromOffset(210, 186)
    card.Position         = UDim2.new(0, 16, 0, 72)
    card.BackgroundColor3 = UI.cardBg
    card.BorderSizePixel  = 0
    card.Active           = true
    card.Parent           = gui

    local stroke = Instance.new("UIStroke")
    stroke.Color           = UI.border
    stroke.Thickness       = 1
    stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
    stroke.Parent          = card

    local title = Instance.new("TextLabel")
    title.Size              = UDim2.new(1, -40, 0, 30)
    title.Position          = UDim2.fromOffset(12, 0)
    title.BackgroundTransparency = 1
    title.Font              = Enum.Font.GothamMedium
    title.Text              = "x4axq mm2 chams"
    title.TextSize          = 12
    title.TextColor3        = UI.textHi
    title.TextXAlignment    = Enum.TextXAlignment.Left
    title.Parent            = card

    local close = Instance.new("TextButton")
    close.Size              = UDim2.fromOffset(22, 22)
    close.Position          = UDim2.new(1, -28, 0, 4)
    close.BackgroundTransparency = 1
    close.Text              = "×"
    close.Font              = Enum.Font.Gotham
    close.TextSize          = 15
    close.TextColor3        = UI.close
    close.AutoButtonColor   = false
    close.Parent            = card

    local sep = Instance.new("Frame")
    sep.Size             = UDim2.new(1, -24, 0, 1)
    sep.Position         = UDim2.fromOffset(12, 30)
    sep.BackgroundColor3 = UI.divider
    sep.BorderSizePixel  = 0
    sep.Parent           = card

    local function addRow(y, text, bright)
        local box = Instance.new("Frame")
        box.Size             = UDim2.fromOffset(10, 10)
        box.Position         = UDim2.fromOffset(14, y + 6)
        box.BackgroundColor3 = UI.boxOff
        box.BorderSizePixel  = 1
        box.BorderColor3     = UI.boxBorder
        box.Parent           = card

        local label = Instance.new("TextLabel")
        label.Size              = UDim2.new(1, -44, 0, 22)
        label.Position          = UDim2.fromOffset(32, y)
        label.BackgroundTransparency = 1
        label.Font              = bright and Enum.Font.GothamMedium or Enum.Font.Gotham
        label.Text              = text
        label.TextSize          = 12
        label.TextColor3        = bright and UI.textHi or UI.textLo
        label.TextXAlignment    = Enum.TextXAlignment.Left
        label.Parent            = card

        local hit = Instance.new("TextButton")
        hit.Size              = UDim2.new(1, -20, 0, 22)
        hit.Position          = UDim2.fromOffset(10, y)
        hit.BackgroundTransparency = 1
        hit.Text              = ""
        hit.AutoButtonColor   = false
        hit.ZIndex            = 5
        hit.Parent            = card

        return { box = box, hit = hit }
    end

    local function paint(row, on)
        row.box.BackgroundColor3 = on and UI.boxFill or UI.boxOff
        row.box.BorderColor3     = on and UI.boxFill or UI.boxBorder
lines 1–300 of 396open raw find-in-page only searches the lines loaded so far. "show all" loads the rest.

changelog

1 version
  1. first version

    live

    @x4axq·