Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local LogService = game:GetService("LogService")
- local ScriptContext = game:GetService("ScriptContext")
- local Player = game:GetService("Players").LocalPlayer
- local Heartbeat = game:GetService("RunService").Heartbeat
- local State_Type = true
- if not Config.Path then
- Config.Path = workspace
- end
- local function WTS(Position)
- local Screen = workspace.CurrentCamera:WorldToViewportPoint(Position)
- return Vector2.new(Screen.X, Screen.Y)
- end
- local function New_Drawing(Type, Color)
- local ESP = Drawing.new(Type)
- ESP.Color = Color
- ESP.Size = 20.0
- ESP.Outline = true
- ESP.Center = true
- ESP.Visible = true
- return ESP
- end
- local function Render_ESP(Target, ESP)
- local Delta_Time = 0
- local Loop; Loop = Heartbeat:Connect(function()
- if math.floor(Player:DistanceFromCharacter(Target.CFrame.p)) <= Config.Range then
- if os.clock() - Delta_Time < Config.Refresh_Rate / 1000 then
- return
- end
- else
- ESP.Visible = false
- return
- end
- if Target ~= nil and Target.Parent == Config.Path then
- ESP.Position = (WTS(Target.CFrame.p) or Vector2.new(0, 0))
- if Player.Character ~= nil then
- ESP.Text = tostring("[".. Target.Parent.Name .."] ".. Target.Name ..[[
- ]]
- .. "[" ..math.floor(Player:DistanceFromCharacter(Target.CFrame.p)).. "]")
- end
- local _, Screen = workspace.CurrentCamera:WorldToViewportPoint(Target.CFrame.p)
- if Screen then
- ESP.Visible = State_Type
- else
- ESP.Visible = false
- end
- else
- Loop:Disconnect()
- if ESP ~= nil then
- ESP:Remove()
- end
- end
- end)
- end
- local function Verify_Object(Object)
- for _, Entry in pairs(Config.Blacklist) do
- if string.find(Entry, Object.Name) then
- return false
- end
- end
- return true
- end
- for _, Connection in pairs(getconnections(LogService.MessageOut)) do
- Connection:Disable()
- end
- for _, Connection in pairs(getconnections(ScriptContext.Error)) do
- Connection:Disable()
- end
- local function Object_Found(Object)
- if Object:FindFirstChild("ItemDetector") or Object:FindFirstChild("ID") then
- if not Verify_Object(Object) then
- return
- end
- Render_ESP(Object, New_Drawing("Text", Object.Color))
- end
- end
- for _, Child in pairs(Config.Path:GetChildren()) do
- Object_Found(Child)
- if Config.Path == ReplicatedStorage then
- task.wait()
- end
- end
- Config.Path.ChildAdded:Connect(function(Child)
- repeat task.wait() until Child.Name
- Object_Found(Child)
- end)
- UserInputService.InputBegan:Connect(function(Input_Obj, State)
- if Input_Obj.KeyCode == Enum.KeyCode.F2 then
- State_Type = not State_Type
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement