Advertisement
anphu04

Murder Myster 2 - ROLES RADAR

Aug 29th, 2023
1,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.99 KB | None | 0 0
  1. -- 28/2/2023 : last exploit(s) before going home tomorrow
  2. myplr = game.Players.LocalPlayer
  3. uis = game:GetService('UserInputService')
  4.  
  5. local event
  6. local stop = false
  7. event = uis.InputBegan:Connect(function(input,gpe)
  8.     if gpe then return end
  9.     if input.KeyCode == Enum.KeyCode.R then
  10.         stop = true
  11.     end
  12. end)
  13.  
  14. --//////////////////////////////////
  15.  
  16. function surf(part,face,color3)
  17.     local gui = Instance.new("SurfaceGui")
  18.     gui.Name = "NightVision_Surface"
  19.     gui.LightInfluence = 1
  20.     gui.AlwaysOnTop = true
  21.     gui.Face = face
  22.    
  23.     local fr = Instance.new("Frame")
  24.     fr.Size = UDim2.new(1,0,1,0)
  25.     fr.BorderSizePixel = 0
  26.     fr.BackgroundColor3 = color3
  27.     fr.BackgroundTransparency = 0.5
  28.     fr.Parent = gui
  29.    
  30.     gui.Parent = part
  31. end
  32.  
  33. function highlight(char, color3)
  34.     local root = char:FindFirstChild('HumanoidRootPart')
  35.     surf(root, "Top", color3)
  36.     surf(root, "Bottom", color3)
  37.     surf(root, "Right", color3)
  38.     surf(root, "Left", color3)
  39.     surf(root, "Front", color3)
  40.     surf(root, "Back", color3)
  41.  
  42.     --[[for j,part in pairs(char:GetChildren()) do
  43.         if part:IsA("BasePart") or part:IsA("MeshPart") then
  44.             surf("Top")
  45.             surf("Bottom")
  46.             surf("Right")
  47.             surf("Left")
  48.             surf("Front")
  49.             surf("Back")
  50.         end
  51.     end]]
  52.    
  53. end
  54.  
  55. function alreadyhas(char, tagname)
  56.     local oldtag
  57.     for i,v in pairs(char:GetChildren()) do
  58.         if v.Name == 'innocent_tag' or v.Name == 'gun_tag' or v.Name == 'knife_tag' then
  59.             oldtag = v
  60.             break
  61.         end
  62.     end
  63.  
  64.     local already
  65.     if oldtag and oldtag.Name == tagname then
  66.         already = true
  67.     else
  68.         already = false
  69.  
  70.         if oldtag and oldtag.Name ~= tagname then
  71.             oldtag:Destroy()
  72.         end
  73.  
  74.         local newtag = Instance.new('BoolValue')
  75.         newtag.Name = tagname
  76.         newtag.Parent = char
  77.  
  78.         for j,part in pairs(char:GetChildren()) do
  79.             if part:IsA("BasePart") or part:IsA("MeshPart") then
  80.                 for i,v in pairs(part:GetChildren()) do
  81.                     if v.Name == 'NightVision_Surface' then
  82.                         v:Destroy() -- also remove the old ones in the process
  83.                         ok = true
  84.                     end
  85.                 end
  86.             end
  87.         end
  88.     end
  89.  
  90.     return already
  91. end
  92.  
  93. while not stop do
  94.     for i,plr in pairs(game.Players:GetChildren()) do
  95.         if plr ~= game.Players.LocalPlayer then
  96.             local char = plr.Character
  97.             if char == nil then continue end
  98.  
  99.             if char:FindFirstChild('Knife') then
  100.                 if not alreadyhas(char,'knife_tag') then
  101.                     highlight(char,Color3.new(1,0,0))
  102.                 end
  103.  
  104.                 -- if youre a sheriff, aimbot at the murderer's head
  105.                 if myplr.Character and myplr.Character:FindFirstChild('Gun') then
  106.                     workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, char:FindFirstChild('Head').Position)
  107.                 end
  108.  
  109.             elseif char:FindFirstChild('Gun') then
  110.                 if not alreadyhas(char,'gun_tag') then
  111.                     highlight(char,Color3.new(0,0,1))
  112.                 end
  113.             else
  114.                 if not alreadyhas(char,'innocent_tag') then
  115.                     highlight(char,Color3.new(0,1,0))
  116.                 end
  117.             end
  118.  
  119.         end
  120.     end
  121.  
  122.     local gundrop = workspace:FindFirstChild('GunDrop')
  123.     if gundrop then
  124.         if not alreadyhas(gundrop, 'gundrop_tag') then
  125.             surf(gundrop, "Top", Color3.new(0,0,1))
  126.             surf(gundrop, "Bottom", Color3.new(0,0,1))
  127.             surf(gundrop, "Right", Color3.new(0,0,1))
  128.             surf(gundrop, "Left", Color3.new(0,0,1))
  129.             surf(gundrop, "Front", Color3.new(0,0,1))
  130.             surf(gundrop, "Back", Color3.new(0,0,1))
  131.         end
  132.     end
  133.  
  134.     wait()
  135. end
  136. event:Disconnect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement