Advertisement
wallop560

ESP

Sep 13th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1.  
  2.  
  3. local UIS = game:GetService("UserInputService")
  4.  
  5. local gui
  6. function map(x,in_min,in_max,out_min,out_max)
  7. return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
  8. end
  9. local toggle = false
  10. UIS.InputBegan:Connect(function(key)
  11. if key.KeyCode == Enum.KeyCode.P then
  12. toggle = not toggle
  13. if toggle == true then
  14. for i,v in pairs(game.Players:GetPlayers())do
  15. if _G.TeamMode == true then
  16. local gui = Instance.new("BillboardGui",v.Character.HumanoidRootPart)
  17. gui.Size = UDim2.new(0,100,0,20)
  18. gui.AlwaysOnTop = true
  19. gui.Name = "theGui"
  20. local TextBox = Instance.new("TextLabel",gui)
  21. TextBox.Size = UDim2.new(1,0,0,20)
  22. TextBox.BorderSizePixel = 5
  23. TextBox.BorderColor3 = Color3.fromRGB(25,25,25)
  24. TextBox.Text = tostring(v.Team)
  25. TextBox.BackgroundColor3 = Color3.fromRGB(25,25,25)
  26. TextBox.TextColor3 = Color3.fromRGB(150,150,150)
  27. TextBox.BackgroundTransparency = 0.3
  28. TextBox.TextSize = 18
  29. TextBox.BackgroundColor3 = v.TeamColor.Color
  30. local color = v.TeamColor.Color
  31. local colorR = map(color.R, 1, 0, 0, 1)
  32. local colorG = map(color.G, 1, 0, 0, 1)
  33. local colorB = map(color.B, 1, 0, 0, 1)
  34. TextBox.TextColor3 = Color3.new(colorR,colorG,colorB)
  35. gui.Size = UDim2.new(0,TextBox.TextBounds.X + 10,0,TextBox.TextBounds.Y + 5)
  36.  
  37. elseif _G.PersonMode == true then
  38. local gui = Instance.new("BillboardGui",v.Character.HumanoidRootPart)
  39. gui.Size = UDim2.new(0,100,0,20)
  40. gui.AlwaysOnTop = true
  41. gui.Name = "theGui"
  42. local TextBox = Instance.new("TextLabel",gui)
  43. TextBox.Size = UDim2.new(1,0,0,20)
  44. TextBox.BorderSizePixel = 5
  45. TextBox.BorderColor3 = Color3.fromRGB(25,25,25)
  46. TextBox.Text = tostring(v.Name)
  47. TextBox.BackgroundColor3 = Color3.fromRGB(25,25,25)
  48. TextBox.TextColor3 = Color3.fromRGB(150,150,150)
  49. TextBox.BackgroundTransparency = 0.3
  50. TextBox.TextSize = 18
  51.  
  52.  
  53. gui.Size = UDim2.new(0,TextBox.TextBounds.X + 10,0,TextBox.TextBounds.Y + 5)
  54. TextBox.BackgroundColor3 = v.Character:FindFirstChild("Head").Color
  55. local color = v.Character:FindFirstChild("Head").Color
  56. local colorR = map(color.R, 1, 0, 0, 1)
  57. local colorG = map(color.G, 1, 0, 0, 1)
  58. local colorB = map(color.B, 1, 0, 0, 1)
  59. TextBox.TextColor3 = Color3.new(colorR,colorG,colorB)
  60.  
  61.  
  62. end
  63. end
  64. end
  65.  
  66. if toggle == false then
  67. for i,v in pairs(game.Players:GetPlayers())do
  68.  
  69. if v.Character.HumanoidRootPart:FindFirstChild("theGui") then v.Character.HumanoidRootPart.theGui:Destroy() end
  70.  
  71. end
  72. end
  73.  
  74. end
  75. end)
  76.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement