Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- https://www.roblox.com/games/5286116071/Hunting-Season-BETA
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInput = game:GetService("UserInputService")
- local LocalPlayer = Players.LocalPlayer
- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
- local workspaceRef= workspace
- local ESPData = {}
- local animalESPEnabled = false
- local targetSpeed = 16
- local function findRootPart(model)
- if model.PrimaryPart then
- return model.PrimaryPart
- end
- for _, child in ipairs(model:GetDescendants()) do
- if child:IsA("BasePart") then
- return child
- end
- end
- return nil
- end
- local function createESPForModel(model)
- if not model or not model:IsA("Model") then return end
- if ESPData[model] then return end
- local rootPart = findRootPart(model)
- if not rootPart then
- return
- end
- local billGui = Instance.new("BillboardGui")
- billGui.Name = "AnimalESPBillboard"
- billGui.Adornee = rootPart
- billGui.Size = UDim2.new(0, 100, 0, 30)
- billGui.StudsOffset = Vector3.new(0, 2.5, 0)
- billGui.AlwaysOnTop = true
- billGui.ResetOnSpawn = false
- billGui.Parent = model
- local label = Instance.new("TextLabel")
- label.Name = "ESPLabel"
- label.Size = UDim2.new(1, 0, 1, 0)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.fromRGB(255, 200, 50)
- label.TextStrokeColor3 = Color3.new(0, 0, 0)
- label.TextStrokeTransparency = 0.3
- label.Font = Enum.Font.GothamBold
- label.TextScaled = false
- label.TextSize = 14
- label.Text = ""
- label.Parent = billGui
- ESPData[model] = {
- billGui = billGui,
- label = label,
- part = rootPart,
- }
- end
- local function destroyESPForModel(model)
- local data = ESPData[model]
- if data then
- if data.billGui and data.billGui.Parent then
- data.billGui:Destroy()
- end
- ESPData[model] = nil
- end
- end
- local function updateESPForModel(model, data)
- if not data.part or not data.label or not data.billGui then return end
- if not model:IsDescendantOf(workspaceRef) then
- destroyESPForModel(model)
- return
- end
- local worldPos = data.part.Position + Vector3.new(0, 2.5, 0)
- local camera = workspace.CurrentCamera
- local onScreen = camera:WorldToViewportPoint(worldPos)
- if not onScreen then
- data.billGui.Enabled = false
- return
- end
- local playerRoot = LocalPlayer.Character and (LocalPlayer.Character:FindFirstChild("HumanoidRootPart") or LocalPlayer.Character:FindFirstChild("Head"))
- if not playerRoot then
- data.billGui.Enabled = false
- return
- end
- local dist = math.floor((playerRoot.Position - data.part.Position).Magnitude)
- data.label.Text = model.Name .. " [" .. tostring(dist) .. "m]"
- data.billGui.Enabled = animalESPEnabled
- end
- RunService.RenderStepped:Connect(function()
- if not animalESPEnabled then
- return
- end
- local animalsFolder = workspaceRef:FindFirstChild("Animals")
- local currentAnimals = {}
- if animalsFolder then
- for _, child in ipairs(animalsFolder:GetChildren()) do
- if child:IsA("Model") then
- currentAnimals[child] = true
- if not ESPData[child] then
- createESPForModel(child)
- end
- end
- end
- end
- for model, _ in pairs(ESPData) do
- if not currentAnimals[model] then
- destroyESPForModel(model)
- end
- end
- for model, data in pairs(ESPData) do
- updateESPForModel(model, data)
- end
- end)
- local function applySpeed()
- if not LocalPlayer.Character then return end
- local humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if humanoid then
- humanoid.WalkSpeed = targetSpeed
- end
- end
- LocalPlayer.CharacterAdded:Connect(function(char)
- char:WaitForChild("Humanoid").WalkSpeed = targetSpeed
- end)
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "AnimalESPControlGui"
- screenGui.ResetOnSpawn = false
- screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- screenGui.Parent = PlayerGui
- local mainFrame = Instance.new("Frame")
- mainFrame.Name = "MainFrame"
- mainFrame.Size = UDim2.new(0, 240, 0, 140)
- mainFrame.Position = UDim2.new(0.5, -120, 0.5, -70)
- mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- mainFrame.BackgroundColor3= Color3.fromRGB(30, 30, 30)
- mainFrame.BorderSizePixel = 0
- mainFrame.Active = true
- mainFrame.Draggable = true
- mainFrame.Parent = screenGui
- local frameCorner = Instance.new("UICorner")
- frameCorner.CornerRadius = UDim.new(0, 6)
- frameCorner.Parent = mainFrame
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Name = "Title"
- titleLabel.Size = UDim2.new(1, 0, 0, 24)
- titleLabel.Position = UDim2.new(0, 0, 0, 0)
- titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- titleLabel.BorderSizePixel = 0
- titleLabel.Font = Enum.Font.GothamBold
- titleLabel.TextSize = 18
- titleLabel.TextColor3 = Color3.new(1, 1, 1)
- titleLabel.Text = "MultiFunction GUI"
- titleLabel.Parent = mainFrame
- local titleCorner = Instance.new("UICorner")
- titleCorner.CornerRadius = UDim.new(0, 6)
- titleCorner.Parent = titleLabel
- local speedBox = Instance.new("TextBox")
- speedBox.Name = "SpeedBox"
- speedBox.Size = UDim2.new(1, -20, 0, 28)
- speedBox.Position = UDim2.new(0, 10, 0, 34)
- speedBox.PlaceholderText = "Введите скорость (число)"
- speedBox.ClearTextOnFocus = false
- speedBox.Text = ""
- speedBox.Font = Enum.Font.SourceSans
- speedBox.TextSize = 16
- speedBox.TextColor3 = Color3.new(1, 1, 1)
- speedBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- speedBox.BorderSizePixel = 0
- speedBox.Parent = mainFrame
- local speedCorner = Instance.new("UICorner")
- speedCorner.CornerRadius = UDim.new(0, 4)
- speedCorner.Parent = speedBox
- local activateBtn = Instance.new("TextButton")
- activateBtn.Name = "ActivateBtn"
- activateBtn.Size = UDim2.new(1, -20, 0, 30)
- activateBtn.Position = UDim2.new(0, 10, 0, 72)
- activateBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 215)
- activateBtn.BorderSizePixel = 0
- activateBtn.Font = Enum.Font.GothamBold
- activateBtn.TextSize = 16
- activateBtn.TextColor3 = Color3.new(1, 1, 1)
- activateBtn.Text = "Activate Speed"
- activateBtn.Parent = mainFrame
- local actCorner = Instance.new("UICorner")
- actCorner.CornerRadius = UDim.new(0, 4)
- actCorner.Parent = activateBtn
- local espBtn = Instance.new("TextButton")
- espBtn.Name = "ESPBtn"
- espBtn.Size = UDim2.new(1, -20, 0, 30)
- espBtn.Position = UDim2.new(0, 10, 0, 110)
- espBtn.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
- espBtn.BorderSizePixel = 0
- espBtn.Font = Enum.Font.GothamBold
- espBtn.TextSize = 16
- espBtn.TextColor3 = Color3.new(1, 1, 1)
- espBtn.Text = "ESP: OFF"
- espBtn.Parent = mainFrame
- local espCorner = Instance.new("UICorner")
- espCorner.CornerRadius = UDim.new(0, 4)
- espCorner.Parent = espBtn
- activateBtn.MouseButton1Click:Connect(function()
- local txt = speedBox.Text
- local num = tonumber(txt)
- if num and num > 0 then
- targetSpeed = num
- applySpeed()
- local oldText = activateBtn.Text
- activateBtn.Text = "Speed → " .. tostring(num)
- wait(1)
- activateBtn.Text = oldText
- else
- local oldText = activateBtn.Text
- activateBtn.Text = "Ошибка: введите число"
- wait(1.2)
- activateBtn.Text = oldText
- end
- end)
- espBtn.MouseButton1Click:Connect(function()
- animalESPEnabled = not animalESPEnabled
- if animalESPEnabled then
- espBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 0)
- espBtn.Text = "ESP: ON"
- else
- espBtn.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
- espBtn.Text = "ESP: OFF"
- for model, _ in pairs(ESPData) do
- destroyESPForModel(model)
- end
- end
- end)
- UserInput.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- if input.KeyCode == Enum.KeyCode.RightControl then
- screenGui.Enabled = not screenGui.Enabled
- end
- end)
- local function onAnimalAdded(child)
- if child:IsA("Model") and animalESPEnabled then
- createESPForModel(child)
- end
- end
- local function bindAnimalFolder(folder)
- folder.ChildAdded:Connect(onAnimalAdded)
- end
- local animalsFolder = workspaceRef:FindFirstChild("Animals")
- if animalsFolder then
- bindAnimalFolder(animalsFolder)
- end
- workspaceRef.ChildAdded:Connect(function(ch)
- if ch.Name == "Animals" and ch:IsA("Folder") then
- bindAnimalFolder(ch)
- end
- end)
- applySpeed()
- if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChildOfClass("Humanoid") then
- LocalPlayer.CharacterAdded:Wait()
- applySpeed()
- end
- if animalsFolder then
- for _, mdl in ipairs(animalsFolder:GetChildren()) do
- if mdl:IsA("Model") then
- createESPForModel(mdl)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement