Advertisement
timmie140

fish

Dec 20th, 2024 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.82 KB | None | 0 0
  1. local loaded = false
  2.  
  3. -- Check if the script has already been loaded
  4. if not loaded then
  5.     loadstring(game:HttpGet("https://raw.githubusercontent.com/cloudman4416/scripts/main/Loader"))() --auto farm
  6.     loaded = true  -- Set the flag to true after loading
  7. end
  8.  
  9. wait(10) -- Make sure not to crash the game
  10.  
  11. -- Function to handle cleaning up the previous GUI instance
  12. local function cleanUpExistingGUI()
  13.     -- Check if the ScreenGui already exists
  14.     local existingScreenGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("TeleportGui")
  15.     if existingScreenGui then
  16.         existingScreenGui:Destroy() -- Destroy the existing ScreenGui
  17.     end
  18. end
  19.  
  20. -- Function to create the new Teleport GUI
  21. local function createTeleportGUI()
  22.     -- Clean up any existing GUI before creating the new one
  23.     cleanUpExistingGUI()
  24.  
  25.     -- Create the new ScreenGui
  26.     local ScreenGui = Instance.new("ScreenGui")
  27.     ScreenGui.Name = "TeleportGui"  -- Name the GUI to easily find it later
  28.     ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  29.  
  30.     -- Frame setup (ScrollingFrame for large lists)
  31.     local Frame = Instance.new("ScrollingFrame")
  32.     Frame.Parent = ScreenGui
  33.     Frame.Size = UDim2.new(0, 200, 0, 400)
  34.     Frame.Position = UDim2.new(0, 10, 1, -410)
  35.     Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  36.     Frame.BorderSizePixel = 0
  37.     Frame.Active = true
  38.     Frame.Draggable = true
  39.     Frame.CanvasSize = UDim2.new(0, 0, 0, 0) -- Dynamically updated later
  40.     Frame.ScrollBarThickness = 8
  41.  
  42.     -- Add a corner to make the frame look nicer
  43.     local UICorner = Instance.new("UICorner")
  44.     UICorner.CornerRadius = UDim.new(0, 10)
  45.     UICorner.Parent = Frame
  46.  
  47.     -- Layout for buttons
  48.     local UIListLayout = Instance.new("UIListLayout")
  49.     UIListLayout.Parent = Frame
  50.     UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  51.     UIListLayout.Padding = UDim.new(0, 5)
  52.  
  53.     -- Search box setup
  54.     local SearchBox = Instance.new("TextBox")
  55.     SearchBox.Parent = Frame
  56.     SearchBox.Size = UDim2.new(1, 0, 0, 30)
  57.     SearchBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  58.     SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  59.     SearchBox.PlaceholderText = "Search..."
  60.     SearchBox.Font = Enum.Font.SourceSans
  61.     SearchBox.TextSize = 14
  62.     SearchBox.Text = ""
  63.  
  64.     local locations = {
  65.         {name = "Altar", path = workspace.world.spawns.TpSpots.altar},
  66.         {name = "Ancient", path = workspace.world.spawns.TpSpots.ancient},
  67.         {name = "Ancient Archives", path = workspace.world.spawns.TpSpots.ancientarchives},
  68.         {name = "Ancient Archives Entrance", path = workspace.world.spawns.TpSpots.ancientarchivesentrance},
  69.         {name = "Arch", path = workspace.world.spawns.TpSpots.arch},
  70.         {name = "Brine", path = workspace.world.spawns.TpSpots.brine},
  71.         {name = "Christmas", path = workspace.world.spawns.TpSpots.christmas},
  72.         {name = "Crafting", path = workspace.world.spawns.TpSpots.crafting},
  73.         {name = "Deep", path = workspace.world.spawns.TpSpots.deep},
  74.         {name = "Deep Shop", path = workspace.world.spawns.TpSpots.deepshop},
  75.         {name = "Desolate", path = workspace.world.spawns.TpSpots.desolate},
  76.         {name = "DesolateDeep Spawn 2", path = workspace.world.spawns.DesolateDeep:GetChildren()[2]},
  77.         {name = "Depths Maze End", path = workspace.world.spawns.TpSpots.depthsmazeend},
  78.         {name = "Dr Fin", path = workspace.world.spawns.TpSpots.drfin},
  79.         {name = "Elf", path = workspace.world.spawns.TpSpots.elf},
  80.         {name = "Executive", path = workspace.world.spawns.TpSpots.executive},
  81.         {name = "Fishing Zone Child 122", path = workspace.zones.fishing:GetChildren()[122]},
  82.         {name = "Forsaken Shores Spawn 4", path = workspace.world.spawns["Forsaken Shores"]:GetChildren()[4]},
  83.         {name = "Gamma Grotto Spawn 2", path = workspace.world.spawns["Gamma Grotto"]:GetChildren()[2]},
  84.         {name = "Hints", path = workspace.world.Hints},
  85.         {name = "Keepers Altar", path = workspace.world.spawns["Keepers Altar"].spawn},
  86.         {name = "Lost Island Cave", path = workspace.world.spawns.TpSpots.lostislandcave},
  87.         {name = "Merlin", path = workspace.world.spawns.TpSpots.merlin},
  88.         {name = "MeteorItems", path = workspace.MeteorItems},
  89.         {name = "Mirror Room", path = workspace.world.spawns.TpSpots.mirrorroom},
  90.         {name = "Moosewood Spawn 2", path = workspace.world.spawns.Moosewood:GetChildren()[2]},
  91.         {name = "Mushgrove", path = workspace.world.spawns.TpSpots.mushgrove},
  92.         {name = "Mushgrove Elevator Spawn 2", path = workspace.world.spawns["Mushgrove Elevator"]:GetChildren()[2]},
  93.         {name = "Roslit", path = workspace.world.spawns.TpSpots.roslit},
  94.         {name = "Roslit Spawn 2", path = workspace.world.spawns.Roslit:GetChildren()[2]},
  95.         {name = "Santa", path = workspace.world.spawns.TpSpots.santa},
  96.         {name = "Santa Claus", path = workspace.world.npcs["Santa Claus"]},
  97.         {name = "Snow", path = workspace.world.spawns.TpSpots.snow},
  98.         {name = "Snowcap Spawn", path = workspace.world.spawns.Snowcap.spawn},
  99.         {name = "Spike", path = workspace.world.spawns.TpSpots.spike},
  100.         {name = "Starter Spawn 6", path = workspace.world.spawns.Starter:GetChildren()[6]},
  101.         {name = "Statue", path = workspace.world.spawns.TpSpots.statue},
  102.         {name = "Statue Elevator Spawn 2", path = workspace.world.spawns["Statue Elevator"]:GetChildren()[2]},
  103.         {name = "Sunstone", path = workspace.world.spawns.TpSpots.sunstone},
  104.         {name = "Sunstone Spawn 4", path = workspace.world.spawns.Sunstone:GetChildren()[4]},
  105.         {name = "Terrapin", path = workspace.world.spawns.TpSpots.terrapin},
  106.         {name = "The Depths Entrance", path = workspace.world.spawns.TpSpots.thedepthsentrance},
  107.         {name = "Depth Farm1", path = CFrame.new(938.5912475585938, -737.6888427734375, 1421.85888671875)},
  108.         {name = "The Depths Spawn 6", path = workspace.world.spawns["The Depths"]:GetChildren()[6]},
  109.         {name = "Trident", path = workspace.world.spawns.TpSpots.trident},
  110.         {name = "Uncharted", path = workspace.world.spawns.TpSpots.Uncharted},
  111.         {name = "Vertigo", path = workspace.world.spawns.TpSpots.vertigo},
  112.         {name = "Volcano", path = workspace.world.spawns.TpSpots.volcano},
  113.         {name = "Waterfall", path = CFrame.new(5801.23583984375, 135.301513671875, 405.92071533203125)},
  114.         {name = "Wilson", path = workspace.world.spawns.TpSpots.wilson},
  115.         {name = "Wilson's Rod", path = CFrame.new(2884.64571953125, 137.97425842285156, 2714.76367187)},
  116.         {name = "Workshop", path = workspace.world.spawns.TpSpots.workshop},
  117.         {name = "Zone Child 25", path = workspace:GetChildren()[25]},
  118.         {name = "Rabbit Fish", path = CFrame.new(1012.4281005859375, 131.32025146484375, -1235.1728515625)},
  119.         {name = "Salmon", path = CFrame.new(1218.240234375, 130.97080993652344, -1149.02490234375)},
  120.         {name = "Dweller Catfish", path = CFrame.new(-1787.2255859375, -142.69393920898438, -3325.0849609375)},
  121.         {name = "Banditfish", path = CFrame.new(-1502.45947265625, -234.71923828125, -2861.443359375)},
  122.         {name = "Cockatoo Squid", path = CFrame.new(-1610.629150390625, -228.2467041015625, -2752.755615234375)},
  123.         {name = "Rod of the Depths", path = CFrame.new(1705.6826171875, -902.527099609375, 1444.4217529296875)},
  124.  
  125.     }
  126.  
  127.     -- Function to create teleport buttons
  128.     local function createButtons()
  129.         -- Clear old buttons
  130.         for _, button in pairs(Frame:GetChildren()) do
  131.             if button:IsA("TextButton") then
  132.                 button:Destroy()
  133.             end
  134.         end
  135.  
  136.         -- Create buttons for locations
  137.         for _, location in ipairs(locations) do
  138.             if SearchBox.Text == "" or string.find(location.name:lower(), SearchBox.Text:lower()) then
  139.                 local Button = Instance.new("TextButton")
  140.                 Button.Parent = Frame
  141.                 Button.Size = UDim2.new(1, 0, 0, 30)
  142.                 Button.BackgroundColor3 = Color3.fromRGB(math.random(100, 255), math.random(100, 255), math.random(100, 255))
  143.                 Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  144.                 Button.Font = Enum.Font.SourceSansBold
  145.                 Button.TextSize = 14
  146.                 Button.Text = location.name
  147.  
  148.                 -- Teleport to location functionality
  149.                 Button.MouseButton1Click:Connect(function()
  150.                     local character = game.Players.LocalPlayer.Character
  151.                     if character and location.path then
  152.                         if typeof(location.path) == "CFrame" then
  153.                             character:SetPrimaryPartCFrame(location.path)  -- Move to the CFrame location
  154.                         else
  155.                             character:MoveTo(location.path.Position)  -- If it's a part, move to its position
  156.                         end
  157.                     else
  158.                         warn("Teleport failed for: " .. location.name)
  159.                     end
  160.                 end)
  161.             end
  162.         end
  163.  
  164.         -- Create buttons for players
  165.         for _, player in ipairs(game.Players:GetPlayers()) do
  166.             if player ~= game.Players.LocalPlayer then -- Don't show self in the list
  167.                 local Button = Instance.new("TextButton")
  168.                 Button.Parent = Frame
  169.                 Button.Size = UDim2.new(1, 0, 0, 30)
  170.                 Button.BackgroundColor3 = Color3.fromRGB(100, 255, 100) -- A different color for players
  171.                 Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  172.                 Button.Font = Enum.Font.SourceSansBold
  173.                 Button.TextSize = 14
  174.                 Button.Text = "Teleport to " .. player.Name
  175.  
  176.                 -- Teleport to player functionality
  177.                 Button.MouseButton1Click:Connect(function()
  178.                     local character = game.Players.LocalPlayer.Character
  179.                     if character and player.Character then
  180.                         character:MoveTo(player.Character.PrimaryPart.Position)
  181.                     else
  182.                         warn("Teleport failed to player: " .. player.Name)
  183.                     end
  184.                 end)
  185.             end
  186.         end
  187.  
  188.         -- Update CanvasSize for scrolling
  189.         Frame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10)
  190.     end
  191.  
  192.     -- Connect search box input to filter buttons
  193.     SearchBox:GetPropertyChangedSignal("Text"):Connect(createButtons)
  194.  
  195.     -- Adjust CanvasSize dynamically when layout changes
  196.     UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  197.         Frame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10)
  198.     end)
  199.  
  200.     -- Initial button creation
  201.     createButtons()
  202. end
  203.  
  204. -- Call the function to create the teleport GUI
  205. createTeleportGUI()
  206.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement