Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetDist(p1, p2)
- local mgn = (p1-p2).magnitude
- if mgn < 0 then mgn = -mgn end
- return math.ceil(mgn/7)
- end
- local prevobj = Instance.new("Part", game.Workspace)
- local function CreateEsp(obj, name)
- local Gui = Instance.new("BillboardGui", game.CoreGui)
- Gui.Name = "Item"
- Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Gui.Adornee = obj
- Gui.AlwaysOnTop = true
- Gui.LightInfluence = 1
- Gui.Size = UDim2.new(0, 170, 0, 100)
- Gui.StudsOffset = Vector3.new(0, 0.699999988, 0)
- Gui.MaxDistance = 1000
- local Body = Instance.new("Frame", Gui)
- Body.Name = "Body"
- Body.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
- Body.BackgroundTransparency = 0.5
- Body.BorderColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
- Body.BorderSizePixel = 2
- Body.Position = UDim2.new(0, 10, 0, 20)
- Body.Size = UDim2.new(0, 150, 0, 20)
- local ItemName = Instance.new("TextLabel", Body)
- ItemName.Name = "ItemName"
- ItemName.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
- ItemName.BorderSizePixel = 0
- ItemName.Size = UDim2.new(0, 150, 0, 20)
- ItemName.Font = Enum.Font.Code
- ItemName.Text = name
- ItemName.TextColor3 = Color3.new(1, 1, 1)
- ItemName.TextSize = 15
- local Distance = Instance.new("TextLabel", Body)
- Distance.Name = "Distance"
- Distance.BackgroundColor3 = Color3.new(1, 1, 1)
- Distance.BackgroundTransparency = 1
- Distance.Position = UDim2.new(0, 0, 0, -18)
- Distance.Size = UDim2.new(0, 150, 0, 15)
- Distance.Font = Enum.Font.SourceSans
- Distance.Text = "Distance: "..GetDist(game.Players.LocalPlayer.Character.HumanoidRootPart.Position or prevobj.Position, obj.Position)..' meters'
- Distance.TextColor3 = Color3.new(1, 1, 1)
- Distance.TextSize = 15
- Distance.TextStrokeTransparency = 0
- local Target = Instance.new("Frame", Body)
- Target.Name = "Target"
- Target.BackgroundColor3 = Color3.new(0.254902, 0.254902, 0.254902)
- Target.BackgroundTransparency = 0.4
- Target.BorderColor3 = Color3.new(0.105882, 0.105882, 0.105882)
- Target.BorderSizePixel = 2
- Target.Position = UDim2.new(0, 67, 0, 28)
- Target.Size = UDim2.new(0, 16, 0, 16)
- local TargetBody = Instance.new("Frame", Body)
- TargetBody.Name = "TargetBody"
- TargetBody.BackgroundColor3 = Color3.new(0, 1, 0)
- TargetBody.BackgroundTransparency = 0.4
- TargetBody.BorderSizePixel = 2
- TargetBody.Position = UDim2.new(0, 71, 0, 32)
- TargetBody.Size = UDim2.new(0, 8, 0, 8)
- end
- local function Reset()
- for i,v in next, game.CoreGui:GetChildren()do
- if v:IsA("BillboardGui") and v.Name == "Item"then
- v:Destroy()
- end
- end
- end
- _G.search = _G.search or nil
- _G.Limit = _G.Limit or 70
- local Items = {}
- local function Scan()
- Items = {}
- for i,v in next, game.Workspace:GetChildren()do
- if (v.Name == "Object" and v:FindFirstChild("Pickup"))or v.Name == "Worldmodel" or v.Name == "Ammo" then
- table.insert(Items, v)
- end
- end
- end
- spawn(function()Scan()
- while wait(5)do
- Scan()
- end
- end)
- while wait()do pcall(function()
- Reset()
- for i,v in next, Items do
- if GetDist(game.Players.LocalPlayer.Character.HumanoidRootPart.Position or prevobj.Position, v.Position) < _G.Limit then
- if _G.search ~= nil then
- if typeof(_G.search) == 'table' then
- for i2,v2 in next, _G.search do
- if string.find(v.BillboardGui.TextLabel.Text:lower(), v2:lower())then
- CreateEsp(v, v.BillboardGui.TextLabel.Text)
- end
- end
- else
- if string.find(v.BillboardGui.TextLabel.Text:lower(), _G.search:lower())then
- CreateEsp(v, v.BillboardGui.TextLabel.Text)
- end
- end
- else
- CreateEsp(v, v.BillboardGui.TextLabel.Text)
- end
- end
- end
- end)end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement