local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:WaitForChild("HumanoidRootPart") -- Variables for process control local isTeleporting = false local currentConnection = nil local guiEnabled = true local guiMinimized = false local teleportationCycle = 0 -- Creating GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "FishTeleporterGUI" screenGui.Parent = player.PlayerGui local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 240, 0, 150) frame.Position = UDim2.new(0, 10, 0, 10) frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) frame.BorderSizePixel = 0 frame.Parent = screenGui -- Adding drag functionality local dragging = false local dragInput, dragStart, startPos local function updateInput(input) local delta = input.Position - dragStart frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) frame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then updateInput(input) end end) local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = frame -- Title bar with close and minimize buttons local titleBar = Instance.new("Frame") titleBar.Size = UDim2.new(1, 0, 0, 30) titleBar.Position = UDim2.new(0, 0, 0, 0) titleBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30) titleBar.BorderSizePixel = 0 titleBar.Parent = frame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 8) titleCorner.Parent = titleBar local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -60, 1, 0) title.Position = UDim2.new(0, 5, 0, 0) title.BackgroundTransparency = 1 title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Text = "Fish Teleporter" title.Font = Enum.Font.GothamBold title.TextSize = 14 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = titleBar -- Minimize button local minimizeButton = Instance.new("TextButton") minimizeButton.Size = UDim2.new(0, 25, 0, 25) minimizeButton.Position = UDim2.new(1, -60, 0, 2) minimizeButton.BackgroundColor3 = Color3.fromRGB(255, 193, 7) minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) minimizeButton.Text = "_" minimizeButton.Font = Enum.Font.GothamBold minimizeButton.TextSize = 14 minimizeButton.Parent = titleBar local minimizeCorner = Instance.new("UICorner") minimizeCorner.CornerRadius = UDim.new(0, 4) minimizeCorner.Parent = minimizeButton -- Close button local closeButton = Instance.new("TextButton") closeButton.Size = UDim2.new(0, 25, 0, 25) closeButton.Position = UDim2.new(1, -30, 0, 2) closeButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60) closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) closeButton.Text = "X" closeButton.Font = Enum.Font.GothamBold closeButton.TextSize = 14 closeButton.Parent = titleBar local closeCorner = Instance.new("UICorner") closeCorner.CornerRadius = UDim.new(0, 4) closeCorner.Parent = closeButton -- Content frame (will be hidden when minimized) local contentFrame = Instance.new("Frame") contentFrame.Size = UDim2.new(1, 0, 1, -30) contentFrame.Position = UDim2.new(0, 0, 0, 30) contentFrame.BackgroundTransparency = 1 contentFrame.Parent = frame local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0.8, 0, 0, 40) toggleButton.Position = UDim2.new(0.1, 0, 0.15, 0) toggleButton.BackgroundColor3 = Color3.fromRGB(76, 175, 80) toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) toggleButton.Text = "Enable" toggleButton.Font = Enum.Font.Gotham toggleButton.TextSize = 14 toggleButton.Parent = contentFrame local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(0, 6) buttonCorner.Parent = toggleButton local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, 0, 0, 20) statusLabel.Position = UDim2.new(0, 0, 0.45, 0) statusLabel.BackgroundTransparency = 1 statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) statusLabel.Text = "Status: Disabled" statusLabel.Font = Enum.Font.Gotham statusLabel.TextSize = 12 statusLabel.Parent = contentFrame local cycleLabel = Instance.new("TextLabel") cycleLabel.Size = UDim2.new(1, 0, 0, 20) cycleLabel.Position = UDim2.new(0, 0, 0.6, 0) cycleLabel.BackgroundTransparency = 1 cycleLabel.TextColor3 = Color3.fromRGB(200, 200, 200) cycleLabel.Text = "Cycle: 0" cycleLabel.Font = Enum.Font.Gotham cycleLabel.TextSize = 12 cycleLabel.Parent = contentFrame local fishCountLabel = Instance.new("TextLabel") fishCountLabel.Size = UDim2.new(1, 0, 0, 20) fishCountLabel.Position = UDim2.new(0, 0, 0.75, 0) fishCountLabel.BackgroundTransparency = 1 fishCountLabel.TextColor3 = Color3.fromRGB(200, 200, 200) fishCountLabel.Text = "Fish: 0" fishCountLabel.Font = Enum.Font.Gotham fishCountLabel.TextSize = 12 fishCountLabel.Parent = contentFrame -- Function to minimize GUI local function minimizeGUI() guiMinimized = true contentFrame.Visible = false frame.Size = UDim2.new(0, 240, 0, 30) minimizeButton.Text = "□" title.Text = "Fish Teleporter [Minimized]" end -- Function to maximize GUI local function maximizeGUI() guiMinimized = false contentFrame.Visible = true frame.Size = UDim2.new(0, 240, 0, 150) minimizeButton.Text = "_" title.Text = "Fish Teleporter" end -- Function to find FishAssets and SpawnedFish folders local function findFishAssets() local workspace = game:GetService("Workspace") -- Search for FishAssets folder local fishAssets = workspace:FindFirstChild("FishAssets") if not fishAssets then return nil end -- Search for SpawnedFish folder inside FishAssets local spawnedFish = fishAssets:FindFirstChild("SpawnedFish") if not spawnedFish then return nil end return spawnedFish end -- Function to get all objects in SpawnedFish folder local function getFishObjects(spawnedFishFolder) local fishObjects = {} for _, child in ipairs(spawnedFishFolder:GetChildren()) do if child:IsA("Model") then -- Look for the main part of the fish local primaryPart = child.PrimaryPart if primaryPart then table.insert(fishObjects, { model = child, part = primaryPart }) else -- If no PrimaryPart, look for any base part for _, part in ipairs(child:GetDescendants()) do if part:IsA("BasePart") then table.insert(fishObjects, { model = child, part = part }) break end end end elseif child:IsA("BasePart") then table.insert(fishObjects, { model = child, part = child }) end end return fishObjects end -- Function for precise teleportation to object local function teleportToObject(fishData) local targetPart = fishData.part local targetModel = fishData.model if not targetPart or not targetPart.Parent then return false end -- Calculate position right inside the fish local targetPosition = targetPart.Position -- For models use PrimaryPart position if targetModel:IsA("Model") and targetModel.PrimaryPart then targetPosition = targetModel:GetPivot().Position end -- Disable collisions during teleportation local originalCollision = humanoidRootPart.CanCollide humanoidRootPart.CanCollide = false -- Instant teleportation right to the fish humanoidRootPart.CFrame = CFrame.new(targetPosition) -- Restore collisions after a short delay wait(0.1) humanoidRootPart.CanCollide = originalCollision return true end -- Main infinite teleportation function local function startInfiniteTeleportation() if isTeleporting then return end isTeleporting = true teleportationCycle = 0 toggleButton.Text = "Disable" toggleButton.BackgroundColor3 = Color3.fromRGB(244, 67, 54) -- Start infinite loop in separate coroutine spawn(function() while isTeleporting do teleportationCycle += 1 cycleLabel.Text = "Cycle: " .. teleportationCycle local spawnedFishFolder = findFishAssets() if not spawnedFishFolder then statusLabel.Text = "Status: Waiting for folder..." fishCountLabel.Text = "Fish: 0" wait(2) -- Wait before next attempt continue end local fishObjects = getFishObjects(spawnedFishFolder) local fishCount = #fishObjects fishCountLabel.Text = "Fish: " .. fishCount if fishCount == 0 then statusLabel.Text = "Status: No fish, waiting..." wait(3) -- Increase wait time if no fish continue end statusLabel.Text = "Status: Cycle " .. teleportationCycle .. ", fish: " .. fishCount -- Teleport to all fish in current cycle for i, fishData in ipairs(fishObjects) do if not isTeleporting then break end if not fishData.part or not fishData.part.Parent then continue end statusLabel.Text = "Status: Cycle " .. teleportationCycle .. " | Fish " .. i .. "/" .. fishCount local success = teleportToObject(fishData) if success then -- Short delay between teleportations for waitTime = 1, 3 do if not isTeleporting then break end wait(0.1) end else statusLabel.Text = "Status: Teleport error " .. i end end -- Delay between cycles (shorter if more fish, longer if fewer) local cycleDelay = math.max(1, 5 - #fishObjects * 0.5) -- From 1 to 5 seconds statusLabel.Text = "Status: Waiting " .. cycleDelay .. "s..." for i = 1, cycleDelay * 10 do if not isTeleporting then break end wait(0.1) end end -- After stopping the cycle if isTeleporting then isTeleporting = false end statusLabel.Text = "Status: Stopped" toggleButton.Text = "Enable" toggleButton.BackgroundColor3 = Color3.fromRGB(76, 175, 80) end) end -- Function to stop teleportation local function stopTeleportation() isTeleporting = false statusLabel.Text = "Status: Stopping..." end -- Function to close GUI local function closeGUI() guiEnabled = false screenGui.Enabled = false stopTeleportation() end -- Function to show GUI local function showGUI() guiEnabled = true screenGui.Enabled = true end -- Toggle button click handler toggleButton.MouseButton1Click:Connect(function() if not guiEnabled then return end if isTeleporting then stopTeleportation() else startInfiniteTeleportation() end end) -- Minimize button click handler minimizeButton.MouseButton1Click:Connect(function() if guiMinimized then maximizeGUI() else minimizeGUI() end end) -- Close button click handler closeButton.MouseButton1Click:Connect(function() closeGUI() end) -- Character changed handler player.CharacterAdded:Connect(function(newCharacter) character = newCharacter humanoidRootPart = character:WaitForChild("HumanoidRootPart") -- Stop teleportation when character changes if isTeleporting then stopTeleportation() end end) -- Hotkey for showing/hiding GUI (F5) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F5 then if guiEnabled then closeGUI() else showGUI() end end end) -- Hotkey for minimizing/maximizing GUI (F6) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F6 then if guiMinimized then maximizeGUI() else minimizeGUI() end end end) -- Automatic fish counter update every 5 seconds spawn(function() while true do if guiEnabled and not isTeleporting then local spawnedFishFolder = findFishAssets() if spawnedFishFolder then local fishObjects = getFishObjects(spawnedFishFolder) fishCountLabel.Text = "Fish: " .. #fishObjects else fishCountLabel.Text = "Fish: 0" end end wait(5) end end) -- Console message about controls print("Fish Teleporter loaded!") print("Controls:") print("- Click button to start/stop infinite teleportation") print("- Click _ to minimize GUI") print("- Click X to close GUI") print("- Press F5 to show/hide GUI") print("- Press F6 to minimize/maximize GUI") print("- Drag the title bar to move GUI") print("- Script will run infinitely until stopped")