Advertisement
TuandaZ

ps99-hop-krakenfind

May 6th, 2025
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.31 KB | Gaming | 0 0
  1. --[[
  2.  
  3.     Auto Spawn/Find Kraken (for Fishing Event - Pet Simulator 99!)
  4.  
  5.                     Created By Baltazar.exe
  6.    
  7.    
  8. ]]
  9.  
  10. request, writefile, readfile = request, writefile, readfile
  11.  
  12. if not game:IsLoaded() then repeat task.wait() until game:IsLoaded() task.wait(math.random(3, 5) + math.random()) end
  13.  
  14. local Players = game:GetService("Players")
  15. local HttpService = game:GetService("HttpService")
  16. local TeleportService = game:GetService("TeleportService")
  17. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  18. local player = Players.LocalPlayer
  19. local HRP = player.Character and player.Character:WaitForChild("HumanoidRootPart")
  20. local placeId = game.PlaceId
  21. local jobId = game.JobId
  22.  
  23. if Players.LocalPlayer.PlayerGui:FindFirstChild("__INTRO") then
  24.     repeat
  25.         task.wait()
  26.     until not Players.LocalPlayer.PlayerGui:FindFirstChild("__INTRO")
  27. end
  28.  
  29. local webhookUrl = "http://discord.com/api/webhooks/780409893974310932/F99GPQ47lb-RCQ2MgLS3hL2YpBc7oki3qmVkpqVXO-onSDt5Oc6Q95nD6lQ5pUMCqlHO"
  30. local discordUserId = "370086748891643905"
  31.  
  32. local function createStatusGui(text, color)
  33.     local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  34.     gui.Name = "KrakenStatusGui"
  35.     gui.ResetOnSpawn = false
  36.  
  37.     local label = Instance.new("TextLabel", gui)
  38.     label.Size = UDim2.new(0, 300, 0, 50)
  39.     label.Position = UDim2.new(0.5, -150, 0.1, 0)
  40.     label.BackgroundTransparency = 0.3
  41.     label.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  42.     label.TextScaled = true
  43.     label.Font = Enum.Font.SourceSansBold
  44.     label.TextStrokeTransparency = 0
  45.     label.TextColor3 = color
  46.     label.Text = text
  47.  
  48.     return gui
  49. end
  50.  
  51. local function tryDetectKraken()
  52.     local folder = workspace:FindFirstChild("__THINGS") and workspace.__THINGS:FindFirstChild("EventFishingPOIs")
  53.     local model = folder and folder:FindFirstChildWhichIsA("Model", true)
  54.     return model and model:FindFirstChild("kraken_mesh")
  55. end
  56.  
  57. local function sendWebhook()
  58.     local payload = HttpService:JSONEncode({
  59.         content = "<@" .. discordUserId .. "> 🐙 Kraken Found!"
  60.     })
  61.     local headers = {["Content-Type"] = "application/json"}
  62.     pcall(function()
  63.         request({
  64.             Url = webhookUrl,
  65.             Method = "POST",
  66.             Headers = headers,
  67.             Body = payload
  68.         })
  69.     end)
  70. end
  71.  
  72. local function attemptTeleportToKraken(target)
  73.     for i = 1, 30 do
  74.         pcall(function()
  75.             HRP.CFrame = target.CFrame + Vector3.new(0, 10, 0)
  76.         end)
  77.         task.wait(5)
  78.         if (HRP.Position - (target.Position + Vector3.new(0,10,0))).Magnitude < 15 then
  79.             return true
  80.         end
  81.     end
  82.     return false
  83. end
  84.  
  85. local function startServerHopLoop()
  86.     local cursor = ""
  87.     local allIDs = {}
  88.     local currentHour = os.date("!*t").hour
  89.  
  90.     local function readCache()
  91.         local ok, result = pcall(function()
  92.             return HttpService:JSONDecode(readfile("NotSameServers.json"))
  93.         end)
  94.         if ok and result and tonumber(result[1]) == currentHour then
  95.             return result
  96.         else
  97.             return {currentHour}
  98.         end
  99.     end
  100.  
  101.     local function writeCache()
  102.         pcall(function()
  103.             writefile("NotSameServers.json", HttpService:JSONEncode(allIDs))
  104.         end)
  105.     end
  106.  
  107.     allIDs = readCache()
  108.     if not table.find(allIDs, jobId) then
  109.         table.insert(allIDs, jobId)
  110.     end
  111.     writeCache()
  112.  
  113.     local function hop()
  114.         local url = "http://games.roblox.com/v1/games/" .. placeId .. "/servers/Public?sortOrder=Asc&limit=100"
  115.         if cursor ~= "" then url = url .. "&cursor=" .. cursor end
  116.  
  117.         local ok, data = pcall(function()
  118.             return HttpService:JSONDecode(game:HttpGet(url))
  119.         end)
  120.  
  121.         if not ok or typeof(data) ~= "table" or not data.data then
  122.             warn("⚠️ Failed to fetch server list. Retrying...")
  123.             return false
  124.         end
  125.  
  126.         cursor = data.nextPageCursor or ""
  127.  
  128.         for _, server in ipairs(data.data) do
  129.             local id = tostring(server.id)
  130.             if server.playing < server.maxPlayers and not table.find(allIDs, id) then
  131.                 table.insert(allIDs, id)
  132.                 writeCache()
  133.                 local tpOk = pcall(function()
  134.                     TeleportService:TeleportToPlaceInstance(placeId, id, player)
  135.                 end)
  136.                 return tpOk
  137.             end
  138.         end
  139.  
  140.         return false
  141.     end
  142.  
  143.     task.spawn(function()
  144.         while true do
  145.             local attempts = 0
  146.             while attempts < 30 do
  147.                 attempts += 1
  148.                 print(string.format("[%s] Attempt #%d", os.date("%H:%M:%S"), attempts))
  149.                 if hop() then return end
  150.                 task.wait(5)
  151.             end
  152.             warn("❌ Hop failed after 30 tries. Retrying in 3s.")
  153.             task.wait(3)
  154.         end
  155.     end)
  156. end
  157.  
  158. local function startKrakenChecker()
  159.     task.spawn(function()
  160.         while true do
  161.             task.wait(60)
  162.             if not tryDetectKraken() then
  163.                 warn("⚠️ Kraken no longer detected. Hopping...")
  164.                 startServerHopLoop()
  165.                 break
  166.             else
  167.                 print("✅ Kraken still present.")
  168.             end
  169.         end
  170.     end)
  171. end
  172.  
  173. HRP.CFrame = CFrame.new(Vector3.new(12183.01, 10.62, -36.98))
  174. task.wait(5)
  175.  
  176. pcall(function()
  177.     ReplicatedStorage:WaitForChild("Network"):WaitForChild("Boats_RequestSpawn"):InvokeServer("Boat 1")
  178. end)
  179.  
  180. local kraken = tryDetectKraken()
  181. local gui
  182.  
  183. if kraken then
  184.     gui = createStatusGui("Kraken found!", Color3.fromRGB(0, 255, 0))
  185.     if attemptTeleportToKraken(kraken) then
  186.         sendWebhook()
  187.         startKrakenChecker()
  188.     else
  189.         warn("❌ Failed to teleport to Kraken.")
  190.         gui:Destroy()
  191.         gui = createStatusGui("Teleport failed. Hopping...", Color3.fromRGB(255, 0, 0))
  192.         startServerHopLoop()
  193.     end
  194.     task.delay(5, function() gui:Destroy() end)
  195. else
  196.     gui = createStatusGui("Checking Kraken spawn points...", Color3.fromRGB(255, 165, 0))
  197.     local krakenPositions = {
  198.         Vector3.new(13827.95, 4.62, 404.89),
  199.         Vector3.new(13879.96, 4.15, 439.78),
  200.         Vector3.new(13803.33, 4.15, 506.65),
  201.         Vector3.new(13742.28, 4.15, 453.34)
  202.     }
  203.     local pos = krakenPositions[math.random(1, #krakenPositions)]
  204.     HRP.CFrame = CFrame.new(pos)
  205.     task.wait(5)
  206.  
  207.     kraken = tryDetectKraken()
  208.     if kraken then
  209.         gui:Destroy()
  210.         gui = createStatusGui("Kraken spawned!", Color3.fromRGB(0, 255, 0))
  211.         pcall(function()
  212.             ReplicatedStorage:WaitForChild("Network"):WaitForChild("Boats_RequestSpawn"):InvokeServer("Boat 1")
  213.         end)
  214.         if attemptTeleportToKraken(kraken) then
  215.             sendWebhook()
  216.             startKrakenChecker()
  217.         else
  218.             warn("❌ Failed to teleport after spawn.")
  219.             gui:Destroy()
  220.             gui = createStatusGui("Teleport failed. Hopping...", Color3.fromRGB(255, 0, 0))
  221.             startServerHopLoop()
  222.         end
  223.         task.delay(5, function() gui:Destroy() end)
  224.     else
  225.         gui:Destroy()
  226.         gui = createStatusGui("Kraken not found. Hopping...", Color3.fromRGB(255, 0, 0))
  227.         startServerHopLoop()
  228.     end
  229. end
Tags: Ps99
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement