Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[=[
- d888b db db d888888b .d888b. db db db .d8b.
- 88' Y8b 88 88 `88' VP `8D 88 88 88 d8' `8b
- 88 88 88 88 odD' 88 88 88 88ooo88
- 88 ooo 88 88 88 .88' 88 88 88 88~~~88
- 88. ~8~ 88b d88 .88. j88. 88booo. 88b d88 88 88 @uniquadev
- Y888P ~Y8888P' Y888888P 888888D Y88888P ~Y8888P' YP YP CONVERTER
- designed using localmaze gui creator
- ]=]
- local LMG2L = {};
- LMG2L["ScreenGui_1"] = Instance.new("ScreenGui", game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"));
- LMG2L["ScreenGui_1"]["ZIndexBehavior"] = Enum.ZIndexBehavior.Sibling;
- LMG2L["LocalScript_2"] = Instance.new("LocalScript", LMG2L["ScreenGui_1"]);
- LMG2L["espbutton_3"] = Instance.new("TextButton", LMG2L["ScreenGui_1"]);
- LMG2L["espbutton_3"]["BorderSizePixel"] = 0;
- LMG2L["espbutton_3"]["TextSize"] = 14;
- LMG2L["espbutton_3"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- LMG2L["espbutton_3"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Regular, Enum.FontStyle.Normal);
- LMG2L["espbutton_3"]["BackgroundTransparency"] = 0.4;
- LMG2L["espbutton_3"]["Size"] = UDim2.new(0, 178, 0, 30);
- LMG2L["espbutton_3"]["Text"] = [[ESP]];
- LMG2L["espbutton_3"]["Name"] = [[espbutton]];
- LMG2L["espbutton_3"]["Position"] = UDim2.new(0, 356, 0, -22);
- LMG2L["UICorner_4"] = Instance.new("UICorner", LMG2L["espbutton_3"]);
- LMG2L["LocalScript_5"] = Instance.new("LocalScript", LMG2L["espbutton_3"]);
- LMG2L["espbutton_6"] = Instance.new("TextButton", LMG2L["ScreenGui_1"]);
- LMG2L["espbutton_6"]["BorderSizePixel"] = 0;
- LMG2L["espbutton_6"]["TextSize"] = 14;
- LMG2L["espbutton_6"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255);
- LMG2L["espbutton_6"]["FontFace"] = Font.new([[rbxasset://fonts/families/GothamSSm.json]], Enum.FontWeight.Regular, Enum.FontStyle.Normal);
- LMG2L["espbutton_6"]["BackgroundTransparency"] = 0.4;
- LMG2L["espbutton_6"]["Size"] = UDim2.new(0, 122, 0, 30);
- LMG2L["espbutton_6"]["Text"] = [[Aim]];
- LMG2L["espbutton_6"]["Name"] = [[espbutton]];
- LMG2L["espbutton_6"]["Position"] = UDim2.new(0, 434, 0, 12);
- LMG2L["UICorner_7"] = Instance.new("UICorner", LMG2L["espbutton_6"]);
- LMG2L["LocalScript_8"] = Instance.new("LocalScript", LMG2L["espbutton_6"]);
- local function C_2()
- local script = LMG2L["LocalScript_2"];
- script.Parent.ResetOnSpawn = false
- end;
- task.spawn(C_2);
- local function C_5()
- local script = LMG2L["LocalScript_5"];
- -- ===== SERVICIOS =====
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Button = script.Parent
- -- ===== COLORES =====
- local COLOR_DEFAULT = Color3.fromRGB(0, 255, 0) -- Verde
- local COLOR_GUN = Color3.fromRGB(0, 150, 255) -- Azul
- local COLOR_KNIFE = Color3.fromRGB(255, 0, 0) -- Rojo
- local TEXT_SIZE = 13
- local ESP_ENABLED = false
- local Connections = {}
- -- ===== DETECTAR COLOR =====
- local function getESPColor(player)
- -- Backpack
- local backpack = player:FindFirstChild("Backpack")
- if backpack then
- for _, tool in ipairs(backpack:GetChildren()) do
- if tool:IsA("Tool") then
- if tool.Name == "Knife" then return COLOR_KNIFE end
- if tool.Name == "Gun" then return COLOR_GUN end
- end
- end
- end
- -- Equipado
- local char = player.Character
- if char then
- for _, tool in ipairs(char:GetChildren()) do
- if tool:IsA("Tool") then
- if tool.Name == "Knife" then return COLOR_KNIFE end
- if tool.Name == "Gun" then return COLOR_GUN end
- end
- end
- end
- return COLOR_DEFAULT
- end
- -- ===== CREAR ESP =====
- local function addESP(player)
- if player == LocalPlayer then return end
- local function onCharacter(char)
- if not ESP_ENABLED then return end
- -- BORRAR SI EXISTE
- if char:FindFirstChild("ESP_Highlight") then
- char.ESP_Highlight:Destroy()
- end
- -- OUTLINE ONLY
- local hl = Instance.new("Highlight")
- hl.Name = "ESP_Highlight"
- hl.Adornee = char
- hl.FillTransparency = 1 -- SIN RELLENO
- hl.OutlineTransparency = 0
- hl.OutlineColor = getESPColor(player)
- hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
- hl.Parent = char
- -- NOMBRE
- local head = char:WaitForChild("Head", 3)
- if not head then return end
- if head:FindFirstChild("ESP_Name") then
- head.ESP_Name:Destroy()
- end
- local bb = Instance.new("BillboardGui")
- bb.Name = "ESP_Name"
- bb.Adornee = head
- bb.Size = UDim2.new(0, 120, 0, 22)
- bb.StudsOffset = Vector3.new(0, 2.6, 0)
- bb.AlwaysOnTop = true
- bb.Parent = head
- local txt = Instance.new("TextLabel")
- txt.Size = UDim2.new(1,0,1,0)
- txt.BackgroundTransparency = 1
- txt.Text = player.DisplayName
- txt.Font = Enum.Font.GothamMedium
- txt.TextSize = TEXT_SIZE
- txt.TextColor3 = getESPColor(player)
- txt.TextStrokeTransparency = 1
- txt.Parent = bb
- end
- if player.Character then
- onCharacter(player.Character)
- end
- Connections[player] = player.CharacterAdded:Connect(onCharacter)
- end
- -- ===== QUITAR ESP =====
- local function removeESP(player)
- if Connections[player] then
- Connections[player]:Disconnect()
- Connections[player] = nil
- end
- if player.Character then
- local char = player.Character
- if char:FindFirstChild("ESP_Highlight") then
- char.ESP_Highlight:Destroy()
- end
- local head = char:FindFirstChild("Head")
- if head and head:FindFirstChild("ESP_Name") then
- head.ESP_Name:Destroy()
- end
- end
- end
- -- ===== ACTUALIZAR COLORES =====
- RunService.RenderStepped:Connect(function()
- if not ESP_ENABLED then return end
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- local hl = player.Character:FindFirstChild("ESP_Highlight")
- if hl then
- hl.OutlineColor = getESPColor(player)
- end
- local head = player.Character:FindFirstChild("Head")
- if head and head:FindFirstChild("ESP_Name") then
- head.ESP_Name.TextLabel.TextColor3 = getESPColor(player)
- end
- end
- end
- end)
- -- ===== BOTÓN ON / OFF =====
- Button.MouseButton1Click:Connect(function()
- ESP_ENABLED = not ESP_ENABLED
- Button.Text = ESP_ENABLED and "ESP ON" or "ESP OFF"
- for _, player in ipairs(Players:GetPlayers()) do
- if ESP_ENABLED then
- addESP(player)
- else
- removeESP(player)
- end
- end
- end)
- -- ===== NUEVOS JUGADORES =====
- Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function()
- if ESP_ENABLED then
- addESP(player)
- end
- end)
- end)
- Players.PlayerRemoving:Connect(function(player)
- removeESP(player)
- end)
- end;
- task.spawn(C_5);
- local function C_8()
- local script = LMG2L["LocalScript_8"];
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local camera = workspace.CurrentCamera
- local Button = script.Parent
- local ScreenGui = Button:FindFirstAncestorOfClass("ScreenGui")
- if ScreenGui then
- ScreenGui.ResetOnSpawn = false
- end
- local AIM_DISTANCE = 250
- local SMOOTHNESS = 0.4
- local PREDICTION_MULTIPLIER = 0.22
- local GEAR_NAME = "Knife"
- local AIM_ACTIVE = false
- local function hasKnife(target)
- if target:FindFirstChild("Backpack") and target.Backpack:FindFirstChild(GEAR_NAME) then
- return true
- end
- if target.Character and target.Character:FindFirstChild(GEAR_NAME) then
- return true
- end
- return false
- end
- local function getTarget()
- local closest = nil
- local shortestDistance = AIM_DISTANCE
- local myChar = player.Character
- if not myChar or not myChar:FindFirstChild("HumanoidRootPart") then
- return nil
- end
- for _, target in pairs(Players:GetPlayers()) do
- if target ~= player and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
- if hasKnife(target) then
- local distance = (target.Character.HumanoidRootPart.Position - myChar.HumanoidRootPart.Position).Magnitude
- if distance < shortestDistance then
- shortestDistance = distance
- closest = target
- end
- end
- end
- end
- return closest
- end
- -- TOGGLE
- Button.MouseButton1Click:Connect(function()
- AIM_ACTIVE = not AIM_ACTIVE
- if AIM_ACTIVE then
- Button.Text = "Aim: ON"
- else
- Button.Text = "Aim: OFF"
- end
- end)
- -- AIM LOOP
- RunService.RenderStepped:Connect(function()
- if not AIM_ACTIVE then return end
- local myChar = player.Character
- if not myChar or not myChar:FindFirstChild("HumanoidRootPart") then return end
- local target = getTarget()
- if not target or not target.Character then return end
- local hrp = target.Character:FindFirstChild("HumanoidRootPart")
- if not hrp then return end
- local velocity = hrp.AssemblyLinearVelocity
- local predictedPosition = hrp.Position + (velocity * PREDICTION_MULTIPLIER)
- local newCFrame = CFrame.new(camera.CFrame.Position, predictedPosition)
- camera.CFrame = camera.CFrame:Lerp(newCFrame, SMOOTHNESS)
- end)
- end;
- task.spawn(C_8);
- return LMG2L["ScreenGui_1"], require;
Advertisement