Advertisement
R-77

Hunting Season [BETA] script

Jun 2nd, 2025 (edited)
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.54 KB | Gaming | 0 0
  1. -- https://www.roblox.com/games/5286116071/Hunting-Season-BETA
  2. local Players    = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local UserInput  = game:GetService("UserInputService")
  5.  
  6. local LocalPlayer = Players.LocalPlayer
  7. local PlayerGui   = LocalPlayer:WaitForChild("PlayerGui")
  8. local workspaceRef= workspace
  9.  
  10. local ESPData = {}
  11. local animalESPEnabled = false
  12. local targetSpeed = 16
  13.  
  14. local function findRootPart(model)
  15.     if model.PrimaryPart then
  16.         return model.PrimaryPart
  17.     end
  18.     for _, child in ipairs(model:GetDescendants()) do
  19.         if child:IsA("BasePart") then
  20.             return child
  21.         end
  22.     end
  23.     return nil
  24. end
  25.  
  26. local function createESPForModel(model)
  27.     if not model or not model:IsA("Model") then return end
  28.     if ESPData[model] then return end
  29.  
  30.     local rootPart = findRootPart(model)
  31.     if not rootPart then
  32.         return
  33.     end
  34.  
  35.     local billGui = Instance.new("BillboardGui")
  36.     billGui.Name           = "AnimalESPBillboard"
  37.     billGui.Adornee        = rootPart
  38.     billGui.Size           = UDim2.new(0, 100, 0, 30)
  39.     billGui.StudsOffset    = Vector3.new(0, 2.5, 0)
  40.     billGui.AlwaysOnTop    = true
  41.     billGui.ResetOnSpawn   = false
  42.     billGui.Parent         = model
  43.  
  44.     local label = Instance.new("TextLabel")
  45.     label.Name                  = "ESPLabel"
  46.     label.Size                  = UDim2.new(1, 0, 1, 0)
  47.     label.BackgroundTransparency = 1
  48.     label.TextColor3            = Color3.fromRGB(255, 200, 50)
  49.     label.TextStrokeColor3      = Color3.new(0, 0, 0)
  50.     label.TextStrokeTransparency = 0.3
  51.     label.Font                  = Enum.Font.GothamBold
  52.     label.TextScaled            = false
  53.     label.TextSize              = 14
  54.     label.Text                  = ""
  55.     label.Parent                = billGui
  56.  
  57.     ESPData[model] = {
  58.         billGui = billGui,
  59.         label   = label,
  60.         part    = rootPart,
  61.     }
  62. end
  63.  
  64. local function destroyESPForModel(model)
  65.     local data = ESPData[model]
  66.     if data then
  67.         if data.billGui and data.billGui.Parent then
  68.             data.billGui:Destroy()
  69.         end
  70.         ESPData[model] = nil
  71.     end
  72. end
  73.  
  74. local function updateESPForModel(model, data)
  75.     if not data.part or not data.label or not data.billGui then return end
  76.     if not model:IsDescendantOf(workspaceRef) then
  77.         destroyESPForModel(model)
  78.         return
  79.     end
  80.  
  81.     local worldPos = data.part.Position + Vector3.new(0, 2.5, 0)
  82.     local camera = workspace.CurrentCamera
  83.     local onScreen = camera:WorldToViewportPoint(worldPos)
  84.     if not onScreen then
  85.         data.billGui.Enabled = false
  86.         return
  87.     end
  88.  
  89.     local playerRoot = LocalPlayer.Character and (LocalPlayer.Character:FindFirstChild("HumanoidRootPart") or LocalPlayer.Character:FindFirstChild("Head"))
  90.     if not playerRoot then
  91.         data.billGui.Enabled = false
  92.         return
  93.     end
  94.     local dist = math.floor((playerRoot.Position - data.part.Position).Magnitude)
  95.     data.label.Text = model.Name .. " [" .. tostring(dist) .. "m]"
  96.     data.billGui.Enabled = animalESPEnabled
  97. end
  98.  
  99. RunService.RenderStepped:Connect(function()
  100.     if not animalESPEnabled then
  101.         return
  102.     end
  103.  
  104.     local animalsFolder = workspaceRef:FindFirstChild("Animals")
  105.     local currentAnimals = {}
  106.     if animalsFolder then
  107.         for _, child in ipairs(animalsFolder:GetChildren()) do
  108.             if child:IsA("Model") then
  109.                 currentAnimals[child] = true
  110.                 if not ESPData[child] then
  111.                     createESPForModel(child)
  112.                 end
  113.             end
  114.         end
  115.     end
  116.  
  117.     for model, _ in pairs(ESPData) do
  118.         if not currentAnimals[model] then
  119.             destroyESPForModel(model)
  120.         end
  121.     end
  122.  
  123.     for model, data in pairs(ESPData) do
  124.         updateESPForModel(model, data)
  125.     end
  126. end)
  127.  
  128. local function applySpeed()
  129.     if not LocalPlayer.Character then return end
  130.     local humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
  131.     if humanoid then
  132.         humanoid.WalkSpeed = targetSpeed
  133.     end
  134. end
  135.  
  136. LocalPlayer.CharacterAdded:Connect(function(char)
  137.     char:WaitForChild("Humanoid").WalkSpeed = targetSpeed
  138. end)
  139.  
  140. local screenGui = Instance.new("ScreenGui")
  141. screenGui.Name           = "AnimalESPControlGui"
  142. screenGui.ResetOnSpawn   = false
  143. screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  144. screenGui.Parent         = PlayerGui
  145.  
  146. local mainFrame = Instance.new("Frame")
  147. mainFrame.Name            = "MainFrame"
  148. mainFrame.Size            = UDim2.new(0, 240, 0, 140)
  149. mainFrame.Position        = UDim2.new(0.5, -120, 0.5, -70)
  150. mainFrame.AnchorPoint     = Vector2.new(0.5, 0.5)
  151. mainFrame.BackgroundColor3= Color3.fromRGB(30, 30, 30)
  152. mainFrame.BorderSizePixel = 0
  153. mainFrame.Active          = true
  154. mainFrame.Draggable       = true
  155. mainFrame.Parent          = screenGui
  156.  
  157. local frameCorner = Instance.new("UICorner")
  158. frameCorner.CornerRadius = UDim.new(0, 6)
  159. frameCorner.Parent       = mainFrame
  160.  
  161. local titleLabel = Instance.new("TextLabel")
  162. titleLabel.Name             = "Title"
  163. titleLabel.Size             = UDim2.new(1, 0, 0, 24)
  164. titleLabel.Position         = UDim2.new(0, 0, 0, 0)
  165. titleLabel.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  166. titleLabel.BorderSizePixel  = 0
  167. titleLabel.Font             = Enum.Font.GothamBold
  168. titleLabel.TextSize         = 18
  169. titleLabel.TextColor3       = Color3.new(1, 1, 1)
  170. titleLabel.Text             = "MultiFunction GUI"
  171. titleLabel.Parent           = mainFrame
  172.  
  173. local titleCorner = Instance.new("UICorner")
  174. titleCorner.CornerRadius = UDim.new(0, 6)
  175. titleCorner.Parent       = titleLabel
  176.  
  177. local speedBox = Instance.new("TextBox")
  178. speedBox.Name             = "SpeedBox"
  179. speedBox.Size             = UDim2.new(1, -20, 0, 28)
  180. speedBox.Position         = UDim2.new(0, 10, 0, 34)
  181. speedBox.PlaceholderText  = "Введите скорость (число)"
  182. speedBox.ClearTextOnFocus = false
  183. speedBox.Text             = ""
  184. speedBox.Font             = Enum.Font.SourceSans
  185. speedBox.TextSize         = 16
  186. speedBox.TextColor3       = Color3.new(1, 1, 1)
  187. speedBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  188. speedBox.BorderSizePixel  = 0
  189. speedBox.Parent           = mainFrame
  190.  
  191. local speedCorner = Instance.new("UICorner")
  192. speedCorner.CornerRadius = UDim.new(0, 4)
  193. speedCorner.Parent       = speedBox
  194.  
  195. local activateBtn = Instance.new("TextButton")
  196. activateBtn.Name             = "ActivateBtn"
  197. activateBtn.Size             = UDim2.new(1, -20, 0, 30)
  198. activateBtn.Position         = UDim2.new(0, 10, 0, 72)
  199. activateBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 215)
  200. activateBtn.BorderSizePixel  = 0
  201. activateBtn.Font             = Enum.Font.GothamBold
  202. activateBtn.TextSize         = 16
  203. activateBtn.TextColor3       = Color3.new(1, 1, 1)
  204. activateBtn.Text             = "Activate Speed"
  205. activateBtn.Parent           = mainFrame
  206.  
  207. local actCorner = Instance.new("UICorner")
  208. actCorner.CornerRadius = UDim.new(0, 4)
  209. actCorner.Parent       = activateBtn
  210.  
  211. local espBtn = Instance.new("TextButton")
  212. espBtn.Name             = "ESPBtn"
  213. espBtn.Size             = UDim2.new(1, -20, 0, 30)
  214. espBtn.Position         = UDim2.new(0, 10, 0, 110)
  215. espBtn.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
  216. espBtn.BorderSizePixel  = 0
  217. espBtn.Font             = Enum.Font.GothamBold
  218. espBtn.TextSize         = 16
  219. espBtn.TextColor3       = Color3.new(1, 1, 1)
  220. espBtn.Text             = "ESP: OFF"
  221. espBtn.Parent           = mainFrame
  222.  
  223. local espCorner = Instance.new("UICorner")
  224. espCorner.CornerRadius = UDim.new(0, 4)
  225. espCorner.Parent       = espBtn
  226.  
  227. activateBtn.MouseButton1Click:Connect(function()
  228.     local txt = speedBox.Text
  229.     local num = tonumber(txt)
  230.     if num and num > 0 then
  231.         targetSpeed = num
  232.         applySpeed()
  233.         local oldText = activateBtn.Text
  234.         activateBtn.Text = "Speed → " .. tostring(num)
  235.         wait(1)
  236.         activateBtn.Text = oldText
  237.     else
  238.         local oldText = activateBtn.Text
  239.         activateBtn.Text = "Ошибка: введите число"
  240.         wait(1.2)
  241.         activateBtn.Text = oldText
  242.     end
  243. end)
  244.  
  245. espBtn.MouseButton1Click:Connect(function()
  246.     animalESPEnabled = not animalESPEnabled
  247.     if animalESPEnabled then
  248.         espBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 0)
  249.         espBtn.Text = "ESP: ON"
  250.     else
  251.         espBtn.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
  252.         espBtn.Text = "ESP: OFF"
  253.         for model, _ in pairs(ESPData) do
  254.             destroyESPForModel(model)
  255.         end
  256.     end
  257. end)
  258.  
  259. UserInput.InputBegan:Connect(function(input, gameProcessed)
  260.     if gameProcessed then return end
  261.     if input.KeyCode == Enum.KeyCode.RightControl then
  262.         screenGui.Enabled = not screenGui.Enabled
  263.     end
  264. end)
  265.  
  266. local function onAnimalAdded(child)
  267.     if child:IsA("Model") and animalESPEnabled then
  268.         createESPForModel(child)
  269.     end
  270. end
  271.  
  272. local function bindAnimalFolder(folder)
  273.     folder.ChildAdded:Connect(onAnimalAdded)
  274. end
  275.  
  276. local animalsFolder = workspaceRef:FindFirstChild("Animals")
  277. if animalsFolder then
  278.     bindAnimalFolder(animalsFolder)
  279. end
  280.  
  281. workspaceRef.ChildAdded:Connect(function(ch)
  282.     if ch.Name == "Animals" and ch:IsA("Folder") then
  283.         bindAnimalFolder(ch)
  284.     end
  285. end)
  286.  
  287. applySpeed()
  288.  
  289. if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChildOfClass("Humanoid") then
  290.     LocalPlayer.CharacterAdded:Wait()
  291.     applySpeed()
  292. end
  293.  
  294. if animalsFolder then
  295.     for _, mdl in ipairs(animalsFolder:GetChildren()) do
  296.         if mdl:IsA("Model") then
  297.             createESPForModel(mdl)
  298.         end
  299.     end
  300. end
  301.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement