Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Auto Spawn/Find Kraken (for Fishing Event - Pet Simulator 99!)
- Created By Baltazar.exe
- ]]
- request, writefile, readfile = request, writefile, readfile
- if not game:IsLoaded() then repeat task.wait() until game:IsLoaded() task.wait(math.random(3, 5) + math.random()) end
- local Players = game:GetService("Players")
- local HttpService = game:GetService("HttpService")
- local TeleportService = game:GetService("TeleportService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local player = Players.LocalPlayer
- local HRP = player.Character and player.Character:WaitForChild("HumanoidRootPart")
- local placeId = game.PlaceId
- local jobId = game.JobId
- if Players.LocalPlayer.PlayerGui:FindFirstChild("__INTRO") then
- repeat
- task.wait()
- until not Players.LocalPlayer.PlayerGui:FindFirstChild("__INTRO")
- end
- local webhookUrl = "http://discord.com/api/webhooks/780409893974310932/F99GPQ47lb-RCQ2MgLS3hL2YpBc7oki3qmVkpqVXO-onSDt5Oc6Q95nD6lQ5pUMCqlHO"
- local discordUserId = "370086748891643905"
- local function createStatusGui(text, color)
- local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- gui.Name = "KrakenStatusGui"
- gui.ResetOnSpawn = false
- local label = Instance.new("TextLabel", gui)
- label.Size = UDim2.new(0, 300, 0, 50)
- label.Position = UDim2.new(0.5, -150, 0.1, 0)
- label.BackgroundTransparency = 0.3
- label.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- label.TextScaled = true
- label.Font = Enum.Font.SourceSansBold
- label.TextStrokeTransparency = 0
- label.TextColor3 = color
- label.Text = text
- return gui
- end
- local function tryDetectKraken()
- local folder = workspace:FindFirstChild("__THINGS") and workspace.__THINGS:FindFirstChild("EventFishingPOIs")
- local model = folder and folder:FindFirstChildWhichIsA("Model", true)
- return model and model:FindFirstChild("kraken_mesh")
- end
- local function sendWebhook()
- local payload = HttpService:JSONEncode({
- content = "<@" .. discordUserId .. "> 🐙 Kraken Found!"
- })
- local headers = {["Content-Type"] = "application/json"}
- pcall(function()
- request({
- Url = webhookUrl,
- Method = "POST",
- Headers = headers,
- Body = payload
- })
- end)
- end
- local function attemptTeleportToKraken(target)
- for i = 1, 30 do
- pcall(function()
- HRP.CFrame = target.CFrame + Vector3.new(0, 10, 0)
- end)
- task.wait(5)
- if (HRP.Position - (target.Position + Vector3.new(0,10,0))).Magnitude < 15 then
- return true
- end
- end
- return false
- end
- local function startServerHopLoop()
- local cursor = ""
- local allIDs = {}
- local currentHour = os.date("!*t").hour
- local function readCache()
- local ok, result = pcall(function()
- return HttpService:JSONDecode(readfile("NotSameServers.json"))
- end)
- if ok and result and tonumber(result[1]) == currentHour then
- return result
- else
- return {currentHour}
- end
- end
- local function writeCache()
- pcall(function()
- writefile("NotSameServers.json", HttpService:JSONEncode(allIDs))
- end)
- end
- allIDs = readCache()
- if not table.find(allIDs, jobId) then
- table.insert(allIDs, jobId)
- end
- writeCache()
- local function hop()
- local url = "http://games.roblox.com/v1/games/" .. placeId .. "/servers/Public?sortOrder=Asc&limit=100"
- if cursor ~= "" then url = url .. "&cursor=" .. cursor end
- local ok, data = pcall(function()
- return HttpService:JSONDecode(game:HttpGet(url))
- end)
- if not ok or typeof(data) ~= "table" or not data.data then
- warn("⚠️ Failed to fetch server list. Retrying...")
- return false
- end
- cursor = data.nextPageCursor or ""
- for _, server in ipairs(data.data) do
- local id = tostring(server.id)
- if server.playing < server.maxPlayers and not table.find(allIDs, id) then
- table.insert(allIDs, id)
- writeCache()
- local tpOk = pcall(function()
- TeleportService:TeleportToPlaceInstance(placeId, id, player)
- end)
- return tpOk
- end
- end
- return false
- end
- task.spawn(function()
- while true do
- local attempts = 0
- while attempts < 30 do
- attempts += 1
- print(string.format("[%s] Attempt #%d", os.date("%H:%M:%S"), attempts))
- if hop() then return end
- task.wait(5)
- end
- warn("❌ Hop failed after 30 tries. Retrying in 3s.")
- task.wait(3)
- end
- end)
- end
- local function startKrakenChecker()
- task.spawn(function()
- while true do
- task.wait(60)
- if not tryDetectKraken() then
- warn("⚠️ Kraken no longer detected. Hopping...")
- startServerHopLoop()
- break
- else
- print("✅ Kraken still present.")
- end
- end
- end)
- end
- HRP.CFrame = CFrame.new(Vector3.new(12183.01, 10.62, -36.98))
- task.wait(5)
- pcall(function()
- ReplicatedStorage:WaitForChild("Network"):WaitForChild("Boats_RequestSpawn"):InvokeServer("Boat 1")
- end)
- local kraken = tryDetectKraken()
- local gui
- if kraken then
- gui = createStatusGui("Kraken found!", Color3.fromRGB(0, 255, 0))
- if attemptTeleportToKraken(kraken) then
- sendWebhook()
- startKrakenChecker()
- else
- warn("❌ Failed to teleport to Kraken.")
- gui:Destroy()
- gui = createStatusGui("Teleport failed. Hopping...", Color3.fromRGB(255, 0, 0))
- startServerHopLoop()
- end
- task.delay(5, function() gui:Destroy() end)
- else
- gui = createStatusGui("Checking Kraken spawn points...", Color3.fromRGB(255, 165, 0))
- local krakenPositions = {
- Vector3.new(13827.95, 4.62, 404.89),
- Vector3.new(13879.96, 4.15, 439.78),
- Vector3.new(13803.33, 4.15, 506.65),
- Vector3.new(13742.28, 4.15, 453.34)
- }
- local pos = krakenPositions[math.random(1, #krakenPositions)]
- HRP.CFrame = CFrame.new(pos)
- task.wait(5)
- kraken = tryDetectKraken()
- if kraken then
- gui:Destroy()
- gui = createStatusGui("Kraken spawned!", Color3.fromRGB(0, 255, 0))
- pcall(function()
- ReplicatedStorage:WaitForChild("Network"):WaitForChild("Boats_RequestSpawn"):InvokeServer("Boat 1")
- end)
- if attemptTeleportToKraken(kraken) then
- sendWebhook()
- startKrakenChecker()
- else
- warn("❌ Failed to teleport after spawn.")
- gui:Destroy()
- gui = createStatusGui("Teleport failed. Hopping...", Color3.fromRGB(255, 0, 0))
- startServerHopLoop()
- end
- task.delay(5, function() gui:Destroy() end)
- else
- gui:Destroy()
- gui = createStatusGui("Kraken not found. Hopping...", Color3.fromRGB(255, 0, 0))
- startServerHopLoop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement