local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
local Window = Rayfield:CreateWindow({
Name = "Sharkbite 2",
LoadingTitle = "Sharkbite 2",
LoadingSubtitle = "sb2",
Theme = "Default",
ToggleUIKeybind = "K",
ConfigurationSaving = {
Enabled = true,
FolderName = nil,
FileName = "SharkConfig"
},
Discord = {
Enabled = false,
Invite = "",
RememberJoins = true
},
KeySystem = false
})
local Tab = Window:CreateTab("Main", 4483362458)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VirtualInputManager = game:GetService("VirtualInputManager")
local Camera = workspace.CurrentCamera
local player = Players.LocalPlayer
local backpack = player:WaitForChild("Backpack")
local character = player.Character or player.CharacterAdded:Wait()
local hrp
local remote = nil
local sharkName = nil
local validWeapons = ReplicatedStorage:WaitForChild("ClientViewportObjects"):WaitForChild("Weapons")
local remotesFolder = ReplicatedStorage
:WaitForChild("Projectiles")
:WaitForChild("Events")
:WaitForChild("Weapons")
:WaitForChild("remotes")
local function hookRemote(remoteObject)
local mt = getrawmetatable(game)
setreadonly(mt, false)
local oldNamecall = mt.__namecall
mt.__namecall = newcclosure(function(self, ...)
local method = getnamecallmethod()
if self == remoteObject and (method == "FireServer" or method == "InvokeServer") then
remote = self.Name
mt.__namecall = oldNamecall
setreadonly(mt, true)
end
return oldNamecall(self, ...)
end)
end
for _, child in ipairs(remotesFolder:GetChildren()) do
if child:IsA("RemoteEvent") or child:IsA("RemoteFunction") then
pcall(hookRemote, child)
end
end
local afk = player.PlayerScripts:FindFirstChild("AFK")
if afk then afk:Destroy() end
local hud = player.PlayerScripts:FindFirstChild("HUD")
if hud then
local oxygen = hud:FindFirstChild("Oxygen")
if oxygen then oxygen:Destroy() end
end
local function updateHRP()
character = player.Character or player.CharacterAdded:Wait()
backpack = player:WaitForChild("Backpack")
local humanoid = character:WaitForChild("Humanoid")
hrp = humanoid and humanoid.RootPart
end
player.CharacterAdded:Connect(updateHRP)
if player.Character then updateHRP() end
local function unseat()
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
if humanoid and humanoid.SeatPart then
humanoid.Sit = false
end
end
local sharksFolder = workspace:WaitForChild("Sharks")
local function getShark()
for _, shark in ipairs(sharksFolder:GetChildren()) do
if shark:IsA("Model") then
sharkName = shark.Name
return
end
end
sharkName = nil
end
getShark()
sharksFolder.ChildAdded:Connect(getShark)
sharksFolder.ChildRemoved:Connect(getShark)
local currentSide = 1
local sharkCenterResults = {{}, {}, {}, {}}
local sharkRaycastParams = RaycastParams.new()
sharkRaycastParams.FilterType = Enum.RaycastFilterType.Exclude
local function getSharkCenter(shark)
local boundingCFrame, boundingSize = shark:GetBoundingBox()
local sharkCenter = boundingCFrame.Position - Vector3.new(0, boundingSize.Y * 0.125, 0)
sharkRaycastParams.FilterDescendantsInstances = {character, shark}
for i, angle in ipairs({0, 90, 180, 270}) do
local rad = math.rad(angle)
local dirToTest = Vector3.new(math.cos(rad), 0, math.sin(rad))
local rayResult = workspace:Raycast(sharkCenter, dirToTest * 300, sharkRaycastParams)
sharkCenterResults[i].dist = rayResult and rayResult.Distance or 300
sharkCenterResults[i].dir = dirToTest
end
if sharkCenterResults[currentSide].dist < 150 then
local bestSide, bestDist = currentSide, sharkCenterResults[currentSide].dist
for i = 1, 4 do
if sharkCenterResults[i].dist > bestDist then
bestDist = sharkCenterResults[i].dist
bestSide = i
end
end
currentSide = bestSide
end
local current = sharkCenterResults[currentSide]
return sharkCenter + current.dir * current.dist
end
local function KillShark()
if sharkName and remote then
local shark = sharksFolder:FindFirstChild(sharkName)
if shark then
remotesFolder:WaitForChild(remote):FireServer(shark, true)
end
end
end
Tab:CreateSection("Autofarm")
local runningConnection
local lastClickTime = 0
local clickCooldown = 1
Tab:CreateToggle({
Name = "Auto kill shark [won't work with projectiles]",
CurrentValue = false,
Flag = "AutoKillShark",
Callback = function(on)
if on and (not getrawmetatable or not setreadonly or not newcclosure) then
task.delay(0.2, function()
Rayfield.Flags["AutoKillShark"]:Set(false)
end)
Rayfield:Notify({
Title = "Executor too weak",
Content = "Your executor does not support getrawmetatable, setreadonly, or newcclosure.",
Duration = 3
})
return
end
if on then
runningConnection = RunService.Heartbeat:Connect(function()
if not (player.Team and player.Team.Name == "Survivor" and hrp) then return end
if not sharkName then
Camera.CameraType = Enum.CameraType.Custom
local chinook = workspace:FindFirstChild("Chinook")
local interior = chinook and chinook:FindFirstChild("interior")
if interior then
unseat()
hrp.CFrame = interior.CFrame
end
else
local shark = sharksFolder:FindFirstChild(sharkName)
if shark then
local sharkPart = shark.PrimaryPart or shark:FindFirstChildWhichIsA("BasePart", true)
if sharkPart then
if next(backpack:GetChildren()) then
for _, tool in ipairs(backpack:GetChildren()) do
if tool:IsA("Tool") and validWeapons:FindFirstChild(tool.Name) then
tool.Parent = character
end
end
end
if not remote then
local boundingCFrame, boundingSize = shark:GetBoundingBox()
local directCenter = boundingCFrame.Position - Vector3.new(0, boundingSize.Y * 0.125, 0)
unseat()
hrp.CFrame = CFrame.new(directCenter)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = CFrame.new(directCenter, sharkPart.Position)
local equippedTool = character:FindFirstChildOfClass("Tool")
if equippedTool then
local now = os.clock()
if now - lastClickTime >= clickCooldown then
local vp = Camera.ViewportSize
local cx, cy = vp.X / 2, vp.Y / 2
VirtualInputManager:SendMouseMoveEvent(cx, cy, game)
VirtualInputManager:SendMouseButtonEvent(cx, cy, 0, true, game, 1)
VirtualInputManager:SendMouseButtonEvent(cx, cy, 0, false, game, 1)
lastClickTime = now
end
end
else
local sharkCenter = getSharkCenter(shark)
Camera.CameraType = Enum.CameraType.Custom
unseat()
hrp.CFrame = CFrame.new(sharkCenter)
KillShark()
end
end
end
end
end)
else
Camera.CameraType = Enum.CameraType.Custom
if runningConnection then
runningConnection:Disconnect()
runningConnection = nil
end
end
end
})
local DestructionParts = {}
local AutoWinConnection
local SharksDescendantConnection
local function getSharkModel(part)
local current = part.Parent
while current and current ~= sharksFolder do
if current.Parent == sharksFolder then
return current
end
current = current.Parent
end
return nil
end
local function getFrontPart(shark, parts)
if #parts == 0 then return nil end
if #parts == 1 then return parts[1] end
local root = shark.PrimaryPart or shark:FindFirstChildWhichIsA("BasePart", true)
if not root then return parts[1] end
local lookVector = root.CFrame.LookVector
local bestPart, bestDot = nil, -math.huge
for _, part in ipairs(parts) do
if part and part.Parent then
local dir = part.Position - root.Position
if dir.Magnitude > 0 then
local dot = lookVector:Dot(dir.Unit)
if dot > bestDot then
bestDot = dot
bestPart = part
end
end
end
end
return bestPart
end
local function addDestructionPart(part)
local shark = getSharkModel(part)
if not shark then return end
if not DestructionParts[shark] then
DestructionParts[shark] = {}
shark.AncestryChanged:Connect(function(_, parent)
if not parent then
DestructionParts[shark] = nil
end
end)
end
table.insert(DestructionParts[shark], part)
part.AncestryChanged:Connect(function(_, parent)
if parent then return end
local list = DestructionParts[shark]
if not list then return end
for i = #list, 1, -1 do
if list[i] == part then
table.remove(list, i)
break
end
end
end)
end
local function getNearestSurvivorToPart(part)
local nearestPlayer, nearestDist = nil, math.huge
for _, plr in Players:GetPlayers() do
if plr ~= player and plr.Team and plr.Team.Name == "Survivor" then
local char = plr.Character
local humanoid = char and char:FindFirstChildOfClass("Humanoid")
local hrpTarget = humanoid and humanoid.RootPart
if hrpTarget and not hrpTarget:FindFirstChild("Attachment") then
local dist = (hrpTarget.Position - part.Position).Magnitude
if dist < nearestDist then
nearestDist = dist
nearestPlayer = plr
end
end
end
end
return nearestPlayer
end
Tab:CreateToggle({
Name = "Auto win as shark",
CurrentValue = false,
Flag = "AutoWinShark",
Callback = function(state)
if state then
for _, d in ipairs(sharksFolder:GetDescendants()) do
if d:IsA("BasePart") and d.Name == "DestructionPart" then
addDestructionPart(d)
end
end
SharksDescendantConnection = sharksFolder.DescendantAdded:Connect(function(desc)
if desc:IsA("BasePart") and desc.Name == "DestructionPart" then
addDestructionPart(desc)
end
end)
AutoWinConnection = RunService.Heartbeat:Connect(function()
if not (player.Team and player.Team.Name == "Shark") then return end
for shark, parts in DestructionParts do
local ownerValue = shark:FindFirstChild("PlayerOwner")
if not (ownerValue and ownerValue:IsA("ObjectValue") and ownerValue.Value == player) then continue end
local frontPart = getFrontPart(shark, parts)
if not frontPart or not frontPart.Parent then continue end
local targetPlayer = getNearestSurvivorToPart(frontPart)
if targetPlayer and targetPlayer.Character then
local humanoid = targetPlayer.Character:FindFirstChildOfClass("Humanoid")
local targetHRP = humanoid and humanoid.RootPart
if targetHRP then
local rotation = CFrame.Angles(math.rad(-90), math.rad(90), 0)
frontPart.CFrame = CFrame.new(targetHRP.Position) * rotation * CFrame.new(-frontPart.Size.X / 2, 0, 0)
end
end
end
end)
else
if AutoWinConnection then
AutoWinConnection:Disconnect()
AutoWinConnection = nil
end
if SharksDescendantConnection then
SharksDescendantConnection:Disconnect()
SharksDescendantConnection = nil
end
table.clear(DestructionParts)
end
end
})
Tab:CreateSection("Shark ESP")
local sharkESPConnections = {}
local espWatching = false
local function setSharkESP(enabled)
for _, conn in ipairs(sharkESPConnections) do
conn:Disconnect()
end
table.clear(sharkESPConnections)
espWatching = false
for _, desc in ipairs(sharksFolder:GetDescendants()) do
if desc:IsA("Highlight") then
desc.Enabled = enabled
desc.OutlineTransparency = enabled and 0 or 1
if enabled then
table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("Enabled"):Connect(function()
if not desc.Enabled then desc.Enabled = true end
end))
table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("OutlineTransparency"):Connect(function()
if desc.OutlineTransparency ~= 0 then desc.OutlineTransparency = 0 end
end))
end
end
end
if enabled and not espWatching then
espWatching = true
table.insert(sharkESPConnections, sharksFolder.DescendantAdded:Connect(function(desc)
if desc:IsA("Highlight") then
desc.Enabled = true
desc.OutlineTransparency = 0
table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("Enabled"):Connect(function()
if not desc.Enabled then desc.Enabled = true end
end))
table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("OutlineTransparency"):Connect(function()
if desc.OutlineTransparency ~= 0 then desc.OutlineTransparency = 0 end
end))
end
end))
end
end
Tab:CreateToggle({
Name = "Highlight sharks [ESP]",
CurrentValue = false,
Flag = "SharkESP",
Callback = function(state)
setSharkESP(state)
end
})
Tab:CreateSection("Auto Vase")
local VaseTouchParts = {}
local VaseConnections = {}
local VaseHeartbeat
local function AddVaseTouch(part)
table.insert(VaseTouchParts, part)
part.AncestryChanged:Connect(function(_, parent)
if parent then return end
for i = #VaseTouchParts, 1, -1 do
if VaseTouchParts[i] == part then
table.remove(VaseTouchParts, i)
break
end
end
end)
end
Tab:CreateToggle({
Name = "Auto touch vases [WARNING: HIGH RISK]",
CurrentValue = false,
Flag = "AutoTouchVases",
Callback = function(state)
if state then
local folder = workspace:FindFirstChild("Vases")
if folder then
for _, d in ipairs(folder:GetDescendants()) do
if d:IsA("TouchTransmitter") then
AddVaseTouch(d)
end
end
table.insert(VaseConnections, folder.DescendantAdded:Connect(function(desc)
if desc:IsA("TouchTransmitter") then
AddVaseTouch(desc)
end
end))
end
VaseHeartbeat = RunService.Heartbeat:Connect(function()
local char = player.Character
local humanoid = char and char:FindFirstChildOfClass("Humanoid")
local charHRP = humanoid and humanoid.RootPart
if not charHRP then return end
for _, t in ipairs(VaseTouchParts) do
if t and t.Parent and t.Parent:IsA("BasePart") then
local part = t.Parent
unseat()
charHRP.CFrame = part.CFrame
firetouchinterest(charHRP, part, 0)
firetouchinterest(charHRP, part, 1)
end
end
end)
else
for _, c in ipairs(VaseConnections) do c:Disconnect() end
table.clear(VaseConnections)
table.clear(VaseTouchParts)
if VaseHeartbeat then
VaseHeartbeat:Disconnect()
VaseHeartbeat = nil
end
end
end
})Boost your gameplay with this powerful auto farm script featuring auto kill survivors, auto kill sharks, and automatic vase claiming for faster farming and smoother progression. Optimized for efficiency, stability, and easy grinding.
No comments yet. Be the first to comment!
1local Rayfield = loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
2
3local Window = Rayfield:CreateWindow({
4 Name = "Sharkbite 2",
5 LoadingTitle = "Sharkbite 2",
6 LoadingSubtitle = "sb2",
7 Theme = "Default",
8 ToggleUIKeybind = "K",
9 ConfigurationSaving = {
10 Enabled = true,
11 FolderName = nil,
12 FileName = "SharkConfig"
13 },
14 Discord = {
15 Enabled = false,
16 Invite = "",
17 RememberJoins = true
18 },
19 KeySystem = false
20})
21
22local Tab = Window:CreateTab("Main", 4483362458)
23
24local Players = game:GetService("Players")
25local RunService = game:GetService("RunService")
26local ReplicatedStorage = game:GetService("ReplicatedStorage")
27local VirtualInputManager = game:GetService("VirtualInputManager")
28local Camera = workspace.CurrentCamera
29
30local player = Players.LocalPlayer
31local backpack = player:WaitForChild("Backpack")
32local character = player.Character or player.CharacterAdded:Wait()
33local hrp
34
35local remote = nil
36local sharkName = nil
37
38local validWeapons = ReplicatedStorage:WaitForChild("ClientViewportObjects"):WaitForChild("Weapons")
39
40local remotesFolder = ReplicatedStorage
41 :WaitForChild("Projectiles")
42 :WaitForChild("Events")
43 :WaitForChild("Weapons")
44 :WaitForChild("remotes")
45
46local function hookRemote(remoteObject)
47 local mt = getrawmetatable(game)
48 setreadonly(mt, false)
49 local oldNamecall = mt.__namecall
50 mt.__namecall = newcclosure(function(self, ...)
51 local method = getnamecallmethod()
52 if self == remoteObject and (method == "FireServer" or method == "InvokeServer") then
53 remote = self.Name
54 mt.__namecall = oldNamecall
55 setreadonly(mt, true)
56 end
57 return oldNamecall(self, ...)
58 end)
59end
60
61for _, child in ipairs(remotesFolder:GetChildren()) do
62 if child:IsA("RemoteEvent") or child:IsA("RemoteFunction") then
63 pcall(hookRemote, child)
64 end
65end
66
67local afk = player.PlayerScripts:FindFirstChild("AFK")
68if afk then afk:Destroy() end
69
70local hud = player.PlayerScripts:FindFirstChild("HUD")
71if hud then
72 local oxygen = hud:FindFirstChild("Oxygen")
73 if oxygen then oxygen:Destroy() end
74end
75
76local function updateHRP()
77 character = player.Character or player.CharacterAdded:Wait()
78 backpack = player:WaitForChild("Backpack")
79 local humanoid = character:WaitForChild("Humanoid")
80 hrp = humanoid and humanoid.RootPart
81end
82
83player.CharacterAdded:Connect(updateHRP)
84if player.Character then updateHRP() end
85
86local function unseat()
87 local humanoid = character and character:FindFirstChildOfClass("Humanoid")
88 if humanoid and humanoid.SeatPart then
89 humanoid.Sit = false
90 end
91end
92
93local sharksFolder = workspace:WaitForChild("Sharks")
94
95local function getShark()
96 for _, shark in ipairs(sharksFolder:GetChildren()) do
97 if shark:IsA("Model") then
98 sharkName = shark.Name
99 return
100 end
101 end
102 sharkName = nil
103end
104
105getShark()
106sharksFolder.ChildAdded:Connect(getShark)
107sharksFolder.ChildRemoved:Connect(getShark)
108
109local currentSide = 1
110local sharkCenterResults = {{}, {}, {}, {}}
111local sharkRaycastParams = RaycastParams.new()
112sharkRaycastParams.FilterType = Enum.RaycastFilterType.Exclude
113
114local function getSharkCenter(shark)
115 local boundingCFrame, boundingSize = shark:GetBoundingBox()
116 local sharkCenter = boundingCFrame.Position - Vector3.new(0, boundingSize.Y * 0.125, 0)
117
118 sharkRaycastParams.FilterDescendantsInstances = {character, shark}
119
120 for i, angle in ipairs({0, 90, 180, 270}) do
121 local rad = math.rad(angle)
122 local dirToTest = Vector3.new(math.cos(rad), 0, math.sin(rad))
123 local rayResult = workspace:Raycast(sharkCenter, dirToTest * 300, sharkRaycastParams)
124 sharkCenterResults[i].dist = rayResult and rayResult.Distance or 300
125 sharkCenterResults[i].dir = dirToTest
126 end
127
128 if sharkCenterResults[currentSide].dist < 150 then
129 local bestSide, bestDist = currentSide, sharkCenterResults[currentSide].dist
130 for i = 1, 4 do
131 if sharkCenterResults[i].dist > bestDist then
132 bestDist = sharkCenterResults[i].dist
133 bestSide = i
134 end
135 end
136 currentSide = bestSide
137 end
138
139 local current = sharkCenterResults[currentSide]
140 return sharkCenter + current.dir * current.dist
141end
142
143local function KillShark()
144 if sharkName and remote then
145 local shark = sharksFolder:FindFirstChild(sharkName)
146 if shark then
147 remotesFolder:WaitForChild(remote):FireServer(shark, true)
148 end
149 end
150end
151
152Tab:CreateSection("Autofarm")
153
154local runningConnection
155local lastClickTime = 0
156local clickCooldown = 1
157
158Tab:CreateToggle({
159 Name = "Auto kill shark [won't work with projectiles]",
160 CurrentValue = false,
161 Flag = "AutoKillShark",
162 Callback = function(on)
163 if on and (not getrawmetatable or not setreadonly or not newcclosure) then
164 task.delay(0.2, function()
165 Rayfield.Flags["AutoKillShark"]:Set(false)
166 end)
167 Rayfield:Notify({
168 Title = "Executor too weak",
169 Content = "Your executor does not support getrawmetatable, setreadonly, or newcclosure.",
170 Duration = 3
171 })
172 return
173 end
174
175 if on then
176 runningConnection = RunService.Heartbeat:Connect(function()
177 if not (player.Team and player.Team.Name == "Survivor" and hrp) then return end
178
179 if not sharkName then
180 Camera.CameraType = Enum.CameraType.Custom
181 local chinook = workspace:FindFirstChild("Chinook")
182 local interior = chinook and chinook:FindFirstChild("interior")
183 if interior then
184 unseat()
185 hrp.CFrame = interior.CFrame
186 end
187 else
188 local shark = sharksFolder:FindFirstChild(sharkName)
189 if shark then
190 local sharkPart = shark.PrimaryPart or shark:FindFirstChildWhichIsA("BasePart", true)
191 if sharkPart then
192 if next(backpack:GetChildren()) then
193 for _, tool in ipairs(backpack:GetChildren()) do
194 if tool:IsA("Tool") and validWeapons:FindFirstChild(tool.Name) then
195 tool.Parent = character
196 end
197 end
198 end
199
200 if not remote then
201 local boundingCFrame, boundingSize = shark:GetBoundingBox()
202 local directCenter = boundingCFrame.Position - Vector3.new(0, boundingSize.Y * 0.125, 0)
203
204 unseat()
205 hrp.CFrame = CFrame.new(directCenter)
206
207 Camera.CameraType = Enum.CameraType.Scriptable
208 Camera.CFrame = CFrame.new(directCenter, sharkPart.Position)
209
210 local equippedTool = character:FindFirstChildOfClass("Tool")
211 if equippedTool then
212 local now = os.clock()
213 if now - lastClickTime >= clickCooldown then
214 local vp = Camera.ViewportSize
215 local cx, cy = vp.X / 2, vp.Y / 2
216 VirtualInputManager:SendMouseMoveEvent(cx, cy, game)
217 VirtualInputManager:SendMouseButtonEvent(cx, cy, 0, true, game, 1)
218 VirtualInputManager:SendMouseButtonEvent(cx, cy, 0, false, game, 1)
219 lastClickTime = now
220 end
221 end
222 else
223 local sharkCenter = getSharkCenter(shark)
224 Camera.CameraType = Enum.CameraType.Custom
225 unseat()
226 hrp.CFrame = CFrame.new(sharkCenter)
227 KillShark()
228 end
229 end
230 end
231 end
232 end)
233 else
234 Camera.CameraType = Enum.CameraType.Custom
235 if runningConnection then
236 runningConnection:Disconnect()
237 runningConnection = nil
238 end
239 end
240 end
241})
242
243local DestructionParts = {}
244
245local AutoWinConnection
246local SharksDescendantConnection
247
248local function getSharkModel(part)
249 local current = part.Parent
250 while current and current ~= sharksFolder do
251 if current.Parent == sharksFolder then
252 return current
253 end
254 current = current.Parent
255 end
256 return nil
257end
258
259local function getFrontPart(shark, parts)
260 if #parts == 0 then return nil end
261 if #parts == 1 then return parts[1] end
262
263 local root = shark.PrimaryPart or shark:FindFirstChildWhichIsA("BasePart", true)
264 if not root then return parts[1] end
265
266 local lookVector = root.CFrame.LookVector
267 local bestPart, bestDot = nil, -math.huge
268
269 for _, part in ipairs(parts) do
270 if part and part.Parent then
271 local dir = part.Position - root.Position
272 if dir.Magnitude > 0 then
273 local dot = lookVector:Dot(dir.Unit)
274 if dot > bestDot then
275 bestDot = dot
276 bestPart = part
277 end
278 end
279 end
280 end
281
282 return bestPart
283end
284
285local function addDestructionPart(part)
286 local shark = getSharkModel(part)
287 if not shark then return end
288
289 if not DestructionParts[shark] then
290 DestructionParts[shark] = {}
291 shark.AncestryChanged:Connect(function(_, parent)
292 if not parent then
293 DestructionParts[shark] = nil
294 end
295 end)
296 end
297
298 table.insert(DestructionParts[shark], part)
299
300 part.AncestryChanged:Connect(function(_, parent)
301 if parent then return end
302 local list = DestructionParts[shark]
303 if not list then return end
304 for i = #list, 1, -1 do
305 if list[i] == part then
306 table.remove(list, i)
307 break
308 end
309 end
310 end)
311end
312
313local function getNearestSurvivorToPart(part)
314 local nearestPlayer, nearestDist = nil, math.huge
315 for _, plr in Players:GetPlayers() do
316 if plr ~= player and plr.Team and plr.Team.Name == "Survivor" then
317 local char = plr.Character
318 local humanoid = char and char:FindFirstChildOfClass("Humanoid")
319 local hrpTarget = humanoid and humanoid.RootPart
320 if hrpTarget and not hrpTarget:FindFirstChild("Attachment") then
321 local dist = (hrpTarget.Position - part.Position).Magnitude
322 if dist < nearestDist then
323 nearestDist = dist
324 nearestPlayer = plr
325 end
326 end
327 end
328 end
329 return nearestPlayer
330end
331
332Tab:CreateToggle({
333 Name = "Auto win as shark",
334 CurrentValue = false,
335 Flag = "AutoWinShark",
336 Callback = function(state)
337 if state then
338 for _, d in ipairs(sharksFolder:GetDescendants()) do
339 if d:IsA("BasePart") and d.Name == "DestructionPart" then
340 addDestructionPart(d)
341 end
342 end
343
344 SharksDescendantConnection = sharksFolder.DescendantAdded:Connect(function(desc)
345 if desc:IsA("BasePart") and desc.Name == "DestructionPart" then
346 addDestructionPart(desc)
347 end
348 end)
349
350 AutoWinConnection = RunService.Heartbeat:Connect(function()
351 if not (player.Team and player.Team.Name == "Shark") then return end
352
353 for shark, parts in DestructionParts do
354 local ownerValue = shark:FindFirstChild("PlayerOwner")
355 if not (ownerValue and ownerValue:IsA("ObjectValue") and ownerValue.Value == player) then continue end
356
357 local frontPart = getFrontPart(shark, parts)
358 if not frontPart or not frontPart.Parent then continue end
359
360 local targetPlayer = getNearestSurvivorToPart(frontPart)
361 if targetPlayer and targetPlayer.Character then
362 local humanoid = targetPlayer.Character:FindFirstChildOfClass("Humanoid")
363 local targetHRP = humanoid and humanoid.RootPart
364 if targetHRP then
365 local rotation = CFrame.Angles(math.rad(-90), math.rad(90), 0)
366 frontPart.CFrame = CFrame.new(targetHRP.Position) * rotation * CFrame.new(-frontPart.Size.X / 2, 0, 0)
367 end
368 end
369 end
370 end)
371 else
372 if AutoWinConnection then
373 AutoWinConnection:Disconnect()
374 AutoWinConnection = nil
375 end
376 if SharksDescendantConnection then
377 SharksDescendantConnection:Disconnect()
378 SharksDescendantConnection = nil
379 end
380 table.clear(DestructionParts)
381 end
382 end
383})
384
385Tab:CreateSection("Shark ESP")
386
387local sharkESPConnections = {}
388local espWatching = false
389
390local function setSharkESP(enabled)
391 for _, conn in ipairs(sharkESPConnections) do
392 conn:Disconnect()
393 end
394 table.clear(sharkESPConnections)
395 espWatching = false
396
397 for _, desc in ipairs(sharksFolder:GetDescendants()) do
398 if desc:IsA("Highlight") then
399 desc.Enabled = enabled
400 desc.OutlineTransparency = enabled and 0 or 1
401 if enabled then
402 table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("Enabled"):Connect(function()
403 if not desc.Enabled then desc.Enabled = true end
404 end))
405 table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("OutlineTransparency"):Connect(function()
406 if desc.OutlineTransparency ~= 0 then desc.OutlineTransparency = 0 end
407 end))
408 end
409 end
410 end
411
412 if enabled and not espWatching then
413 espWatching = true
414 table.insert(sharkESPConnections, sharksFolder.DescendantAdded:Connect(function(desc)
415 if desc:IsA("Highlight") then
416 desc.Enabled = true
417 desc.OutlineTransparency = 0
418 table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("Enabled"):Connect(function()
419 if not desc.Enabled then desc.Enabled = true end
420 end))
421 table.insert(sharkESPConnections, desc:GetPropertyChangedSignal("OutlineTransparency"):Connect(function()
422 if desc.OutlineTransparency ~= 0 then desc.OutlineTransparency = 0 end
423 end))
424 end
425 end))
426 end
427end
428
429Tab:CreateToggle({
430 Name = "Highlight sharks [ESP]",
431 CurrentValue = false,
432 Flag = "SharkESP",
433 Callback = function(state)
434 setSharkESP(state)
435 end
436})
437
438Tab:CreateSection("Auto Vase")
439
440local VaseTouchParts = {}
441local VaseConnections = {}
442local VaseHeartbeat
443
444local function AddVaseTouch(part)
445 table.insert(VaseTouchParts, part)
446 part.AncestryChanged:Connect(function(_, parent)
447 if parent then return end
448 for i = #VaseTouchParts, 1, -1 do
449 if VaseTouchParts[i] == part then
450 table.remove(VaseTouchParts, i)
451 break
452 end
453 end
454 end)
455end
456
457Tab:CreateToggle({
458 Name = "Auto touch vases [WARNING: HIGH RISK]",
459 CurrentValue = false,
460 Flag = "AutoTouchVases",
461 Callback = function(state)
462 if state then
463 local folder = workspace:FindFirstChild("Vases")
464 if folder then
465 for _, d in ipairs(folder:GetDescendants()) do
466 if d:IsA("TouchTransmitter") then
467 AddVaseTouch(d)
468 end
469 end
470 table.insert(VaseConnections, folder.DescendantAdded:Connect(function(desc)
471 if desc:IsA("TouchTransmitter") then
472 AddVaseTouch(desc)
473 end
474 end))
475 end
476
477 VaseHeartbeat = RunService.Heartbeat:Connect(function()
478 local char = player.Character
479 local humanoid = char and char:FindFirstChildOfClass("Humanoid")
480 local charHRP = humanoid and humanoid.RootPart
481 if not charHRP then return end
482 for _, t in ipairs(VaseTouchParts) do
483 if t and t.Parent and t.Parent:IsA("BasePart") then
484 local part = t.Parent
485 unseat()
486 charHRP.CFrame = part.CFrame
487 firetouchinterest(charHRP, part, 0)
488 firetouchinterest(charHRP, part, 1)
489 end
490 end
491 end)
492 else
493 for _, c in ipairs(VaseConnections) do c:Disconnect() end
494 table.clear(VaseConnections)
495 table.clear(VaseTouchParts)
496 if VaseHeartbeat then
497 VaseHeartbeat:Disconnect()
498 VaseHeartbeat = nil
499 end
500 end
501 end
502})