CaliberMag

NewESP

Aug 6th, 2020 (edited)
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. local RunService = game:GetService("RunService")
  2.  
  3. local player = game:GetService("Players").LocalPlayer
  4. local stepTime = 5
  5.  
  6. local Blacklist = { --//Blacklist because I don't know the ServerStorage names of some Trees/Ores
  7. --//Ores
  8. "Stone_Rock"; "Coal_Rock"; "Copper_Rock"; "Iron_Rock"; "Silver_Rock"; "Gold_Rock"; "Tourmaline_Rock"; "Ruby_Rock"; "Sapphire_Rock"; "Topaz_Rock"; "Emerald_Rock"; "Diamond_Rock"; "Amethyst_Rock"; "Cinnabar_Rock";
  9.  
  10. --//Trees
  11. "Light_Tree"; "Normal_Tree"; "Strong_Tree"; "Maple_Tree"; "Dead_Tree"; "Blood_Tree"; "Acid_Tree"; "Magma_Tree"; "Magic_Tree"; "Corrupted_Tree";
  12.  
  13. --//Misc
  14. "Fish"; "Crates"; "Monsters";
  15. }
  16.  
  17. local function CreateGui(MainPart)
  18. if MainPart.Parent.Properties.Alive.Value == true then
  19. local BillboardGui = Instance.new("BillboardGui")
  20. local TextLabel = Instance.new("TextLabel")
  21.  
  22. BillboardGui.Parent = MainPart
  23. BillboardGui.AlwaysOnTop = true
  24. BillboardGui.LightInfluence = 1
  25. BillboardGui.Size = UDim2.new(0, 100, 0, 100)
  26. BillboardGui.StudsOffset = Vector3.new(0, 2, 0)
  27.  
  28. BillboardGui.Adornee = MainPart
  29.  
  30. TextLabel.Parent = BillboardGui
  31. TextLabel.BackgroundTransparency = 1
  32. TextLabel.Size = UDim2.new(1.5, 0, 3, 0)
  33. TextLabel.TextColor3 = Color3.new(255, 44, 44)
  34. coroutine.resume(coroutine.create(function()
  35. local Stepped
  36. Stepped = RunService.RenderStepped:Connect(function()
  37. TextLabel.Text = tostring(MainPart.Parent.Name.. " [" ..tonumber((player.Character.HumanoidRootPart.Position - MainPart.Position).Magnitude).. "]")
  38. if MainPart.Parent.Properties.Alive.Value == false then
  39. Stepped:Disconnect()
  40. end
  41. end)
  42. end))
  43. TextLabel.TextScaled = true
  44.  
  45. coroutine.resume(coroutine.create(function()
  46. repeat wait(1) until MainPart.Parent.Properties.Alive.Value == false
  47. BillboardGui:Destroy()
  48. end))
  49. end
  50. end
  51.  
  52. local lastTime = 0
  53. RunService.Heartbeat:Connect(function()
  54. if tick() - lastTime >= stepTime then
  55. lastTime = tick()
  56. for _, v in pairs(game.workspace.Resources:GetDescendants()) do
  57. if v:IsA("Model") and v.PrimaryPart ~= nil and not v.PrimaryPart:FindFirstChild("BillboardGui") then
  58. if not table.find(Blacklist, v.Name) and not table.find(Blacklist, v.Parent.Name) then
  59. CreateGui(v.PrimaryPart)
  60. end
  61. end
  62. end
  63. end
  64. end)
Add Comment
Please, Sign In to add comment