local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local Camera = Workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer local RoleESPEnabled = false local CamlockEnabled = false local GunESPEnabled = false local FOV = 200 local Smoothness = 1 local CamlockTarget = nil local Highlights = {} local GunHighlights = {} local Colors = { Murderer = Color3.fromRGB(255, 0, 0), Sheriff = Color3.fromRGB(0, 100, 255), Innocent = Color3.fromRGB(0, 255, 0), Gun = Color3.fromRGB(180, 0, 255) } local function GetRole(player) local role = nil pcall(function() if player.Character then local char = player.Character if char:FindFirstChild("Role") then role = char.Role.Value elseif char:FindFirstChild("Humanoid") and char.Humanoid:FindFirstChild("Role") then role = char.Humanoid.Role.Value end end if not role and player:FindFirstChild("Role") then role = player.Role.Value end if not role then role = player:GetAttribute("Role") end if not role and player.Character then local pack = player:FindFirstChild("Backpack") if pack then if pack:FindFirstChild("Knife") or pack:FindFirstChild("Murderer") then role = "Murderer" elseif pack:FindFirstChild("Gun") or pack:FindFirstChild("Revolver") or pack:FindFirstChild("Sheriff") then role = "Sheriff" end end local char = player.Character if char:FindFirstChild("Knife") then role = "Murderer" elseif char:FindFirstChild("Gun") or char:FindFirstChild("Revolver") then role = "Sheriff" end end end) return role and string.lower(tostring(role)) or nil end local function IsGunDrop(obj) if not obj then return false end local name = string.lower(obj.Name) if name:find("gun") or name:find("revolver") or name:find("weapon") or name:find("pistol") then local parent = obj.Parent if parent then if parent:IsA("Model") and parent:FindFirstChildOfClass("Humanoid") then return false end if parent.Parent and parent.Parent:IsA("Model") and parent.Parent:FindFirstChildOfClass("Humanoid") then return false end end return true end return false end local function ClearHighlights() for _, h in pairs(Highlights) do if h and h.Parent then pcall(function() h:Destroy() end) end end Highlights = {} end local function ClearGunHighlights() for _, h in pairs(GunHighlights) do if h and h.Parent then pcall(function() h:Destroy() end) end end GunHighlights = {} end local function ApplyRoleESP() ClearHighlights() if not RoleESPEnabled then return end for _, player in ipairs(Players:GetPlayers()) do if player \~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local role = GetRole(player) local color = Colors.Innocent if role then if role:find("murder") then color = Colors.Murderer elseif role:find("sher") or role:find("police") or role:find("gun") then color = Colors.Sheriff else color = Colors.Innocent end end local char = player.Character local highlight = Instance.new("Highlight") highlight.Name = "RoleESP_" .. player.Name highlight.Adornee = char highlight.FillColor = color highlight.OutlineColor = color highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = char Highlights[player] = highlight end end end local function ApplyGunESP() ClearGunHighlights() if not GunESPEnabled then return end for _, obj in ipairs(Workspace:GetDescendants()) do if IsGunDrop(obj) then local target = obj if not GunHighlights[target] then local highlight = Instance.new("Highlight") highlight.Name = "GunESP" highlight.Adornee = target highlight.FillColor = Colors.Gun highlight.OutlineColor = Colors.Gun highlight.FillTransparency = 0.4 highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = target GunHighlights[target] = highlight end end end end local function GetClosestInFOV() local closest = nil local closestDist = FOV local mousePos = UserInputService:GetMouseLocation() for _, player in ipairs(Players:GetPlayers()) do if player \~= LocalPlayer and player.Character then local root = player.Character:FindFirstChild("HumanoidRootPart") local humanoid = player.Character:FindFirstChildOfClass("Humanoid") if root and humanoid and humanoid.Health > 0 then local screenPos, onScreen = Camera:WorldToViewportPoint(root.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude if dist < closestDist then closestDist = dist closest = root end end end end end return closest end local function CamlockLoop() if not CamlockEnabled then CamlockTarget = nil return end CamlockTarget = GetClosestInFOV() if CamlockTarget and CamlockTarget.Parent then local targetPos = CamlockTarget.Position local currentCF = Camera.CFrame local goalCF = CFrame.new(currentCF.Position, targetPos) Camera.CFrame = currentCF:Lerp(goalCF, 1 / math.max(Smoothness, 0.1)) end end local Window = Rayfield:CreateWindow({ Name = "MM2 Test | Role ESP + Camlock", LoadingTitle = "MM2 Private Test", LoadingSubtitle = "Role ESP / Camlock / Gun ESP", ConfigurationSaving = { Enabled = false }, Discord = { Enabled = false }, KeySystem = false }) local MainTab = Window:CreateTab("Main", 4483362458) local ESPTab = Window:CreateTab("ESP", 4483362458) local AimTab = Window:CreateTab("Camlock", 4483362458) MainTab:CreateToggle({ Name = "Role ESP", CurrentValue = false, Flag = "RoleESP", Callback = function(Value) RoleESPEnabled = Value if Value then ApplyRoleESP() else ClearHighlights() end end }) MainTab:CreateToggle({ Name = "Gun Drop ESP", CurrentValue = false, Flag = "GunESP", Callback = function(Value) GunESPEnabled = Value if Value then ApplyGunESP() else ClearGunHighlights() end end }) MainTab:CreateToggle({ Name = "Camlock", CurrentValue = false, Flag = "Camlock", Callback = function(Value) CamlockEnabled = Value if not Value then CamlockTarget = nil end end }) ESPTab:CreateLabel("Murderer = Red Highlight") ESPTab:CreateLabel("Sheriff = Blue Highlight") ESPTab:CreateLabel("Innocent = Green Highlight") ESPTab:CreateLabel("Gun Drop = Purple Highlight") ESPTab:CreateButton({ Name = "Refresh Role ESP", Callback = function() if RoleESPEnabled then ApplyRoleESP() end end }) ESPTab:CreateButton({ Name = "Refresh Gun ESP", Callback = function() if GunESPEnabled then ApplyGunESP() end end }) AimTab:CreateSlider({ Name = "FOV", Range = {50, 200}, Increment = 5, Suffix = "px", CurrentValue = 200, Flag = "FOV", Callback = function(Value) FOV = Value end }) AimTab:CreateSlider({ Name = "Smoothness", Range = {1, 20}, Increment = 1, Suffix = "", CurrentValue = 1, Flag = "Smooth", Callback = function(Value) Smoothness = Value end }) AimTab:CreateLabel("Smoothness 1 = Instant | Higher = Smoother") RunService.RenderStepped:Connect(function() CamlockLoop() end) task.spawn(function() while true do task.wait(1.5) if RoleESPEnabled then pcall(ApplyRoleESP) end if GunESPEnabled then pcall(ApplyGunESP) end end end) Players.PlayerRemoving:Connect(function(player) if Highlights[player] then pcall(function() Highlights[player]:Destroy() end) Highlights[player] = nil end end) Rayfield:Notify({ Title = "MM2 Test Loaded", Content = "Role ESP + Camlock + Gun ESP ready", Duration = 4, Image = 4483362458 })