Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --==[[ quick execute: loadstring(game:HttpGet("https://pastebin.com/raw/PSNsEKug"))() ]]==--
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local localPlayer = Players.LocalPlayer
- local espColors = {
- Red = Color3.fromRGB(255, 0, 0),
- Blue = Color3.fromRGB(0, 0, 255),
- Green = Color3.fromRGB(0, 255, 0),
- Yellow = Color3.fromRGB(255, 255, 0),
- Pink = Color3.fromRGB(255, 105, 180),
- Purple = Color3.fromRGB(128, 0, 128),
- Black = Color3.fromRGB(0, 0, 0),
- White = Color3.fromRGB(255, 255, 255),
- Rainbow = "Rainbow",
- ["Team Color"] = "TeamColor",
- }
- local espStyles = {
- "Small Square",
- "Medium Square",
- "Big Square",
- "Lines",
- }
- local selectedColor = "Red"
- local selectedStyle = "Small Square"
- local espEnabled = true
- local function getKeys(tbl)
- local keys = {}
- for k in pairs(tbl) do
- table.insert(keys, k)
- end
- return keys
- end
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "FunnyStuffGoingOn"
- screenGui.Parent = localPlayer:WaitForChild("PlayerGui")
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 280, 0, 450)
- mainFrame.Position = UDim2.new(0, 50, 0, 50)
- mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- mainFrame.BorderSizePixel = 0
- mainFrame.Parent = screenGui
- mainFrame.Active = true
- mainFrame.Draggable = true
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 30, 0, 30)
- closeButton.Position = UDim2.new(1, -35, 0, 5)
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.new(1, 0, 0)
- closeButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- closeButton.Parent = mainFrame
- closeButton.Font = Enum.Font.SourceSansBold
- closeButton.TextSize = 20
- local reopenButton = Instance.new("TextButton")
- reopenButton.Size = UDim2.new(0, 60, 0, 30)
- reopenButton.Position = UDim2.new(0, 50, 0, 50)
- reopenButton.Text = "OPEN"
- reopenButton.TextColor3 = Color3.new(1, 1, 1)
- reopenButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- reopenButton.Font = Enum.Font.SourceSansBold
- reopenButton.TextSize = 22
- reopenButton.Visible = false
- reopenButton.Parent = screenGui
- reopenButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = true
- reopenButton.Visible = false
- end)
- local minimizeButton = Instance.new("TextButton")
- minimizeButton.Size = UDim2.new(0, 30, 0, 30)
- minimizeButton.Position = UDim2.new(1, -70, 0, 5)
- minimizeButton.Text = "-"
- minimizeButton.TextColor3 = Color3.new(1, 1, 1)
- minimizeButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- minimizeButton.Font = Enum.Font.SourceSansBold
- minimizeButton.TextSize = 28
- minimizeButton.Parent = mainFrame
- minimizeButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = false
- reopenButton.Visible = true
- end)
- local title = Instance.new("TextLabel")
- title.Position = UDim2.new(0, 10, 0, -30)
- title.Size = UDim2.new(1, -20, 0, 20)
- title.BackgroundTransparency = 1
- title.TextColor3 = Color3.new(1, 1, 1)
- title.TextScaled = true
- title.Text = "SKIRA'S UNIVERSAL ESP"
- title.Parent = mainFrame
- local function createLabel(text, parent, posY)
- local label = Instance.new("TextLabel")
- label.Text = text
- label.Size = UDim2.new(1, -20, 0, 24)
- label.Position = UDim2.new(0, 10, 0, posY)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.new(1,1,1)
- label.Font = Enum.Font.SourceSansBold
- label.TextSize = 18
- label.TextXAlignment = Enum.TextXAlignment.Left
- label.Parent = parent
- return label
- end
- local function createButtonList(title, options, parent, posY, callback)
- createLabel(title, parent, posY)
- local buttonHeight = 40
- local padding = 6
- local totalHeight = (#options) * (buttonHeight + padding) - padding
- local visibleHeight = math.min(totalHeight, 4 * (buttonHeight + padding))
- local scroll = Instance.new("ScrollingFrame")
- scroll.Size = UDim2.new(1, -20, 0, visibleHeight)
- scroll.Position = UDim2.new(0, 10, 0, posY + 28)
- scroll.BackgroundColor3 = Color3.fromRGB(50,50,50)
- scroll.BorderSizePixel = 0
- scroll.ScrollBarThickness = 8
- scroll.CanvasSize = UDim2.new(0, 0, 0, totalHeight)
- scroll.Parent = parent
- local layout = Instance.new("UIListLayout")
- layout.SortOrder = Enum.SortOrder.LayoutOrder
- layout.Padding = UDim.new(0, padding)
- layout.Parent = scroll
- for i, option in ipairs(options) do
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(1, 0, 0, buttonHeight)
- btn.Text = option
- btn.Font = Enum.Font.SourceSans
- btn.TextSize = 20
- btn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Parent = scroll
- btn.MouseEnter:Connect(function()
- btn.BackgroundColor3 = Color3.fromRGB(120, 120, 120)
- end)
- btn.MouseLeave:Connect(function()
- btn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- end)
- btn.MouseButton1Click:Connect(function()
- callback(option)
- end)
- end
- return scroll, buttonHeight + padding, totalHeight
- end
- local markers = {}
- local function clearMarkers()
- for player, markerList in pairs(markers) do
- for _, m in ipairs(markerList) do
- if m.gui then
- m.gui:Destroy()
- end
- if m.line then
- if m.line.att0 then m.line.att0:Destroy() end
- if m.line.att1 then m.line.att1:Destroy() end
- m.line.beam:Destroy()
- end
- end
- markers[player] = nil
- end
- end
- local function createBillboard(part, size, color)
- if not part then return end
- local billboard = Instance.new("BillboardGui")
- billboard.Size = UDim2.new(0, size, 0, size)
- billboard.AlwaysOnTop = true
- billboard.Adornee = part
- billboard.Parent = part
- billboard.Name = "ESP_Billboard"
- local frame = Instance.new("Frame")
- frame.BackgroundColor3 = color
- frame.Size = UDim2.new(1, 0, 1, 0)
- frame.BorderSizePixel = 0
- frame.Parent = billboard
- return billboard
- end
- local function createLine(part0, part1, color)
- if not (part0 and part1) then return end
- local attachment0 = part0:FindFirstChild("ESP_Attachment0")
- if not attachment0 then
- attachment0 = Instance.new("Attachment")
- attachment0.Name = "ESP_Attachment0"
- attachment0.Parent = part0
- end
- local attachment1 = part1:FindFirstChild("ESP_Attachment1")
- if not attachment1 then
- attachment1 = Instance.new("Attachment")
- attachment1.Name = "ESP_Attachment1"
- attachment1.Parent = part1
- end
- local beam = part0:FindFirstChild("ESP_Beam")
- if not beam then
- beam = Instance.new("Beam")
- beam.Name = "ESP_Beam"
- beam.FaceCamera = true
- beam.Width0 = 0.15
- beam.Width1 = 0.15
- beam.Transparency = NumberSequence.new(0)
- beam.Attachment0 = attachment0
- beam.Attachment1 = attachment1
- beam.Parent = part0
- end
- beam.Color = ColorSequence.new(color)
- return {
- beam = beam,
- att0 = attachment0,
- att1 = attachment1,
- }
- end
- local partConnections = {
- Torso = {"Head", "LeftUpperArm", "RightUpperArm", "LeftUpperLeg", "RightUpperLeg"},
- Head = {},
- LeftUpperArm = {"LeftLowerArm"},
- RightUpperArm = {"RightLowerArm"},
- LeftUpperLeg = {"LeftLowerLeg"},
- RightUpperLeg = {"RightLowerLeg"},
- LeftLowerArm = {"LeftHand"},
- RightLowerArm = {"RightHand"},
- LeftLowerLeg = {"LeftFoot"},
- RightLowerLeg = {"RightFoot"},
- }
- local function getColor(colorName, time, player)
- if colorName == "Rainbow" then
- local hue = (time % 5) / 5
- return Color3.fromHSV(hue, 1, 1)
- elseif colorName == "Team Color" and player and player.TeamColor then
- return player.TeamColor.Color
- end
- return espColors[colorName] or Color3.new(1, 0, 0)
- end
- local function updateMarkersForPlayer(player)
- if not espEnabled then return end
- local character = player.Character
- if not character then return end
- markers[player] = markers[player] or {}
- for _, m in ipairs(markers[player]) do
- if m.gui then m.gui:Destroy() end
- if m.line then
- if m.line.att0 then m.line.att0:Destroy() end
- if m.line.att1 then m.line.att1:Destroy() end
- m.line.beam:Destroy()
- end
- end
- markers[player] = {}
- if selectedStyle == "Lines" then
- for partName, connectedParts in pairs(partConnections) do
- local part0 = character:FindFirstChild(partName)
- if part0 then
- for _, conPartName in ipairs(connectedParts) do
- local part1 = character:FindFirstChild(conPartName)
- if part1 then
- local color = getColor(selectedColor, tick(), player)
- local lineData = nil
- for _, marker in ipairs(markers[player]) do
- if marker.line and marker.line.att0.Parent == part0 and marker.line.att1.Parent == part1 then
- lineData = marker.line
- break
- end
- end
- if not lineData then
- lineData = createLine(part0, part1, color)
- table.insert(markers[player], {line = lineData})
- else
- lineData.beam.Color = ColorSequence.new(color)
- end
- end
- end
- end
- end
- else
- local sizeMap = {
- ["Small Square"] = 8,
- ["Medium Square"] = 16,
- ["Big Square"] = 28,
- }
- local size = sizeMap[selectedStyle] or 8
- for _, part in ipairs(character:GetChildren()) do
- if part:IsA("BasePart") then
- local color = getColor(selectedColor, tick(), player)
- local gui = createBillboard(part, size, color)
- if gui then
- table.insert(markers[player], {gui = gui})
- end
- end
- end
- end
- end
- local function refreshAllESP()
- clearMarkers()
- for _, player in pairs(Players:GetPlayers()) do
- if player.Character then
- updateMarkersForPlayer(player)
- end
- end
- end
- Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function()
- refreshAllESP()
- end)
- end)
- for _, player in pairs(Players:GetPlayers()) do
- player.CharacterAdded:Connect(function()
- refreshAllESP()
- end)
- end
- RunService.Heartbeat:Connect(function()
- if not espEnabled then return end
- if selectedColor == "Rainbow" or selectedColor == "Team Color" or selectedStyle == "Lines" then
- for player, list in pairs(markers) do
- for _, m in ipairs(list) do
- if m.gui then
- m.gui.Frame.BackgroundColor3 = getColor(selectedColor, tick(), player)
- elseif m.line and m.line.beam then
- m.line.beam.Color = ColorSequence.new(getColor(selectedColor, tick(), player))
- end
- end
- end
- end
- end)
- closeButton.MouseButton1Click:Connect(function()
- espEnabled = false
- clearMarkers()
- screenGui:Destroy()
- end)
- local colorScroll, colorBtnHeight, colorTotalHeight = createButtonList("ESP Colors", getKeys(espColors), mainFrame, 10, function(selection)
- selectedColor = selection
- refreshAllESP()
- end)
- local styleScroll, styleBtnHeight, styleTotalHeight = createButtonList("ESP Styles", espStyles, mainFrame, 230, function(selection)
- selectedStyle = selection
- refreshAllESP()
- end)
- refreshAllESP()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement