DumbShit

Phantom Forces ESP

Oct 13th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. local espRainbow = false
  2. local espToggle = true
  3.  
  4.  
  5. local library = loadstring(game:HttpGet("https://pastebin.com/raw/CkyR8ePz",true))()
  6. local espwindow = library:CreateWindow("ESP")
  7.  
  8. espwindow:Section('Edited By Spoorloos')
  9.  
  10. espwindow:Bind("Toggled", {
  11. flag = "espToggle";
  12. kbonly = true;
  13. default = Enum.KeyCode.N;
  14. }, function()
  15. if espToggle == true then espToggle = false elseif espToggle == false then espToggle = true end
  16. end)
  17.  
  18. espwindow:Section('Settings:')
  19.  
  20. espwindow:Bind("Rainbow", {
  21. flag = "espRainbow";
  22. kbonly = true;
  23. default = Enum.KeyCode.M;
  24. }, function()
  25. if espRainbow == true then espRainbow = false elseif espRainbow == false then espRainbow = true end
  26. end)
  27.  
  28. local player = game.Players.LocalPlayer
  29. local players = {}
  30. local core = game:GetService("CoreGui")
  31.  
  32. function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end
  33.  
  34. local counter = 0
  35.  
  36. function CreateBillboard(adornee)
  37. local billboard = Instance.new("BillboardGui")
  38. billboard.Name = "E"
  39. local frame = Instance.new("Frame")
  40. billboard.AlwaysOnTop = true
  41. billboard.Size = UDim2.new(4, 0, 5.5, 0)
  42. billboard.StudsOffset = Vector3.new(0, 0, 0)
  43. billboard.Adornee = adornee
  44. if espRainbow then
  45. frame.BackgroundColor3 = Color3.fromHSV(zigzag(counter),1,1)
  46. else
  47. frame.BackgroundColor = BrickColor.new("Maroon")
  48. end
  49. frame.BackgroundTransparency = .35
  50. frame.BorderSizePixel = 0
  51. frame.Size = UDim2.new(1, 0, 1, 0)
  52. billboard.Parent = core
  53. frame.Parent = billboard
  54. counter = counter + 0.0005
  55. billboard.Parent = core
  56. end
  57.  
  58. function GetEnemyPlayers()
  59. players = {}
  60. if #game:GetService("Teams"):GetTeams() > 0 then
  61. local friendly = player.Team.Name
  62. for i,v in pairs(game:GetService("Teams"):GetTeams()) do
  63. if v.Name ~= friendly and v.Name ~= (game.Teams:FindFirstChild("Spectators") and game.Teams.Spectators.Name) then
  64. local enemyPlayers = v:GetPlayers()
  65. for i,v in pairs(enemyPlayers) do
  66. table.insert(players, v)
  67. end
  68. end
  69. end
  70. return players
  71. end
  72. end
  73.  
  74. function InsertBillboardToPlayers()
  75. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do if v.Name == "E" then v:Destroy() end end
  76. local otherTeamR
  77. if game.Players.LocalPlayer.Team ~= nil then
  78. if game.Players.LocalPlayer.Team.Name == "Ghosts" then
  79. otherTeamR = "Phantoms"
  80. elseif game.Players.LocalPlayer.Team.Name == "Phantoms" then
  81. otherTeamR = "Ghosts"
  82. end
  83. end
  84.  
  85. local players = game.Workspace:FindFirstChild("Players")
  86. local otherteam = players:FindFirstChild(otherTeamR)
  87. for i,v in pairs(otherteam:GetChildren()) do
  88. CreateBillboard(v.Torso)
  89. end
  90. end
  91.  
  92. if espToggle then
  93. InsertBillboardToPlayers()
  94. end
  95.  
  96. game.Players.PlayerAdded:Connect(function(plr)
  97. plr.CharacterAdded:Wait()
  98. players = GetEnemyPlayers()
  99. if espToggle then
  100. InsertBillboardToPlayers()
  101. else
  102. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do if v.Name == "E" then v:Destroy() end end
  103. end
  104. end)
  105.  
  106. game.Players.PlayerRemoving:Connect(function(plr)
  107. plr.CharacterRemoving:Wait()
  108. players = GetEnemyPlayers()
  109. if espToggle then
  110. InsertBillboardToPlayers()
  111. else
  112. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do if v.Name == "E" then v:Destroy() end end
  113. end
  114. end)
  115.  
  116. game:GetService('RunService').Stepped:Connect(function()
  117. if espToggle then
  118. InsertBillboardToPlayers()
  119. else
  120. for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do if v.Name == "E" then v:Destroy() end end
  121. end
  122. end)
Add Comment
Please, Sign In to add comment