Advertisement
Glitch_kingGUEST666

Mm2 esp and admin script

Mar 27th, 2023
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. loadstring(game:HttpGet('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'))()
  2.  
  3. --[[
  4. Credits to Kiriot22 for the Role getter <3
  5. - poorly coded by FeIix <3
  6. ]]
  7.  
  8. -- > Declarations < --
  9.  
  10. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  11. local Players = game:GetService("Players")
  12. local RunService = game:GetService("RunService")
  13. local LP = Players.LocalPlayer
  14. local roles
  15.  
  16. -- > Functions <--
  17.  
  18. function CreateHighlight() -- make any new highlights for new players
  19. for i, v in pairs(Players:GetChildren()) do
  20. if v ~= LP and v.Character and not v.Character:FindFirstChild("Highlight") then
  21. Instance.new("Highlight", v.Character)
  22. end
  23. end
  24. end
  25.  
  26. function UpdateHighlights() -- Get Current Role Colors (messy)
  27. for _, v in pairs(Players:GetChildren()) do
  28. if v ~= LP and v.Character and v.Character:FindFirstChild("Highlight") then
  29. Highlight = v.Character:FindFirstChild("Highlight")
  30. if v.Name == Sheriff and IsAlive(v) then
  31. Highlight.FillColor = Color3.fromRGB(0, 0, 225)
  32. elseif v.Name == Murder and IsAlive(v) then
  33. Highlight.FillColor = Color3.fromRGB(225, 0, 0)
  34. elseif v.Name == Hero and IsAlive(v) and not IsAlive(game.Players[Sheriff]) then
  35. Highlight.FillColor = Color3.fromRGB(255, 250, 0)
  36. else
  37. Highlight.FillColor = Color3.fromRGB(0, 225, 0)
  38. end
  39. end
  40. end
  41. end
  42.  
  43. function IsAlive(Player) -- Simple sexy function
  44. for i, v in pairs(roles) do
  45. if Player.Name == i then
  46. if not v.Killed and not v.Dead then
  47. return true
  48. else
  49. return false
  50. end
  51. end
  52. end
  53. end
  54.  
  55.  
  56. -- > Loops < --
  57.  
  58. RunService.RenderStepped:connect(function()
  59. roles = ReplicatedStorage:FindFirstChild("GetPlayerData", true):InvokeServer()
  60. for i, v in pairs(roles) do
  61. if v.Role == "Murderer" then
  62. Murder = i
  63. elseif v.Role == 'Sheriff'then
  64. Sheriff = i
  65. elseif v.Role == 'Hero'then
  66. Hero = i
  67. end
  68. end
  69. CreateHighlight()
  70. UpdateHighlights()
  71. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement