Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local loaded = false
- -- Check if the script has already been loaded
- if not loaded then
- loadstring(game:HttpGet("https://raw.githubusercontent.com/cloudman4416/scripts/main/Loader"))() --auto farm
- loaded = true -- Set the flag to true after loading
- end
- wait(10) -- Make sure not to crash the game
- -- Function to handle cleaning up the previous GUI instance
- local function cleanUpExistingGUI()
- -- Check if the ScreenGui already exists
- local existingScreenGui = game.Players.LocalPlayer.PlayerGui:FindFirstChild("TeleportGui")
- if existingScreenGui then
- existingScreenGui:Destroy() -- Destroy the existing ScreenGui
- end
- end
- -- Function to create the new Teleport GUI
- local function createTeleportGUI()
- -- Clean up any existing GUI before creating the new one
- cleanUpExistingGUI()
- -- Create the new ScreenGui
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "TeleportGui" -- Name the GUI to easily find it later
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Frame setup (ScrollingFrame for large lists)
- local Frame = Instance.new("ScrollingFrame")
- Frame.Parent = ScreenGui
- Frame.Size = UDim2.new(0, 200, 0, 400)
- Frame.Position = UDim2.new(0, 10, 1, -410)
- Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- Frame.BorderSizePixel = 0
- Frame.Active = true
- Frame.Draggable = true
- Frame.CanvasSize = UDim2.new(0, 0, 0, 0) -- Dynamically updated later
- Frame.ScrollBarThickness = 8
- -- Add a corner to make the frame look nicer
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 10)
- UICorner.Parent = Frame
- -- Layout for buttons
- local UIListLayout = Instance.new("UIListLayout")
- UIListLayout.Parent = Frame
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 5)
- -- Search box setup
- local SearchBox = Instance.new("TextBox")
- SearchBox.Parent = Frame
- SearchBox.Size = UDim2.new(1, 0, 0, 30)
- SearchBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- SearchBox.PlaceholderText = "Search..."
- SearchBox.Font = Enum.Font.SourceSans
- SearchBox.TextSize = 14
- SearchBox.Text = ""
- local locations = {
- {name = "Altar", path = workspace.world.spawns.TpSpots.altar},
- {name = "Ancient", path = workspace.world.spawns.TpSpots.ancient},
- {name = "Ancient Archives", path = workspace.world.spawns.TpSpots.ancientarchives},
- {name = "Ancient Archives Entrance", path = workspace.world.spawns.TpSpots.ancientarchivesentrance},
- {name = "Arch", path = workspace.world.spawns.TpSpots.arch},
- {name = "Brine", path = workspace.world.spawns.TpSpots.brine},
- {name = "Christmas", path = workspace.world.spawns.TpSpots.christmas},
- {name = "Crafting", path = workspace.world.spawns.TpSpots.crafting},
- {name = "Deep", path = workspace.world.spawns.TpSpots.deep},
- {name = "Deep Shop", path = workspace.world.spawns.TpSpots.deepshop},
- {name = "Desolate", path = workspace.world.spawns.TpSpots.desolate},
- {name = "DesolateDeep Spawn 2", path = workspace.world.spawns.DesolateDeep:GetChildren()[2]},
- {name = "Depths Maze End", path = workspace.world.spawns.TpSpots.depthsmazeend},
- {name = "Dr Fin", path = workspace.world.spawns.TpSpots.drfin},
- {name = "Elf", path = workspace.world.spawns.TpSpots.elf},
- {name = "Executive", path = workspace.world.spawns.TpSpots.executive},
- {name = "Fishing Zone Child 122", path = workspace.zones.fishing:GetChildren()[122]},
- {name = "Forsaken Shores Spawn 4", path = workspace.world.spawns["Forsaken Shores"]:GetChildren()[4]},
- {name = "Gamma Grotto Spawn 2", path = workspace.world.spawns["Gamma Grotto"]:GetChildren()[2]},
- {name = "Hints", path = workspace.world.Hints},
- {name = "Keepers Altar", path = workspace.world.spawns["Keepers Altar"].spawn},
- {name = "Lost Island Cave", path = workspace.world.spawns.TpSpots.lostislandcave},
- {name = "Merlin", path = workspace.world.spawns.TpSpots.merlin},
- {name = "MeteorItems", path = workspace.MeteorItems},
- {name = "Mirror Room", path = workspace.world.spawns.TpSpots.mirrorroom},
- {name = "Moosewood Spawn 2", path = workspace.world.spawns.Moosewood:GetChildren()[2]},
- {name = "Mushgrove", path = workspace.world.spawns.TpSpots.mushgrove},
- {name = "Mushgrove Elevator Spawn 2", path = workspace.world.spawns["Mushgrove Elevator"]:GetChildren()[2]},
- {name = "Roslit", path = workspace.world.spawns.TpSpots.roslit},
- {name = "Roslit Spawn 2", path = workspace.world.spawns.Roslit:GetChildren()[2]},
- {name = "Santa", path = workspace.world.spawns.TpSpots.santa},
- {name = "Santa Claus", path = workspace.world.npcs["Santa Claus"]},
- {name = "Snow", path = workspace.world.spawns.TpSpots.snow},
- {name = "Snowcap Spawn", path = workspace.world.spawns.Snowcap.spawn},
- {name = "Spike", path = workspace.world.spawns.TpSpots.spike},
- {name = "Starter Spawn 6", path = workspace.world.spawns.Starter:GetChildren()[6]},
- {name = "Statue", path = workspace.world.spawns.TpSpots.statue},
- {name = "Statue Elevator Spawn 2", path = workspace.world.spawns["Statue Elevator"]:GetChildren()[2]},
- {name = "Sunstone", path = workspace.world.spawns.TpSpots.sunstone},
- {name = "Sunstone Spawn 4", path = workspace.world.spawns.Sunstone:GetChildren()[4]},
- {name = "Terrapin", path = workspace.world.spawns.TpSpots.terrapin},
- {name = "The Depths Entrance", path = workspace.world.spawns.TpSpots.thedepthsentrance},
- {name = "Depth Farm1", path = CFrame.new(938.5912475585938, -737.6888427734375, 1421.85888671875)},
- {name = "The Depths Spawn 6", path = workspace.world.spawns["The Depths"]:GetChildren()[6]},
- {name = "Trident", path = workspace.world.spawns.TpSpots.trident},
- {name = "Uncharted", path = workspace.world.spawns.TpSpots.Uncharted},
- {name = "Vertigo", path = workspace.world.spawns.TpSpots.vertigo},
- {name = "Volcano", path = workspace.world.spawns.TpSpots.volcano},
- {name = "Waterfall", path = CFrame.new(5801.23583984375, 135.301513671875, 405.92071533203125)},
- {name = "Wilson", path = workspace.world.spawns.TpSpots.wilson},
- {name = "Wilson's Rod", path = CFrame.new(2884.64571953125, 137.97425842285156, 2714.76367187)},
- {name = "Workshop", path = workspace.world.spawns.TpSpots.workshop},
- {name = "Zone Child 25", path = workspace:GetChildren()[25]},
- {name = "Rabbit Fish", path = CFrame.new(1012.4281005859375, 131.32025146484375, -1235.1728515625)},
- {name = "Salmon", path = CFrame.new(1218.240234375, 130.97080993652344, -1149.02490234375)},
- {name = "Dweller Catfish", path = CFrame.new(-1787.2255859375, -142.69393920898438, -3325.0849609375)},
- {name = "Banditfish", path = CFrame.new(-1502.45947265625, -234.71923828125, -2861.443359375)},
- {name = "Cockatoo Squid", path = CFrame.new(-1610.629150390625, -228.2467041015625, -2752.755615234375)},
- {name = "Rod of the Depths", path = CFrame.new(1705.6826171875, -902.527099609375, 1444.4217529296875)},
- }
- -- Function to create teleport buttons
- local function createButtons()
- -- Clear old buttons
- for _, button in pairs(Frame:GetChildren()) do
- if button:IsA("TextButton") then
- button:Destroy()
- end
- end
- -- Create buttons for locations
- for _, location in ipairs(locations) do
- if SearchBox.Text == "" or string.find(location.name:lower(), SearchBox.Text:lower()) then
- local Button = Instance.new("TextButton")
- Button.Parent = Frame
- Button.Size = UDim2.new(1, 0, 0, 30)
- Button.BackgroundColor3 = Color3.fromRGB(math.random(100, 255), math.random(100, 255), math.random(100, 255))
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.Font = Enum.Font.SourceSansBold
- Button.TextSize = 14
- Button.Text = location.name
- -- Teleport to location functionality
- Button.MouseButton1Click:Connect(function()
- local character = game.Players.LocalPlayer.Character
- if character and location.path then
- if typeof(location.path) == "CFrame" then
- character:SetPrimaryPartCFrame(location.path) -- Move to the CFrame location
- else
- character:MoveTo(location.path.Position) -- If it's a part, move to its position
- end
- else
- warn("Teleport failed for: " .. location.name)
- end
- end)
- end
- end
- -- Create buttons for players
- for _, player in ipairs(game.Players:GetPlayers()) do
- if player ~= game.Players.LocalPlayer then -- Don't show self in the list
- local Button = Instance.new("TextButton")
- Button.Parent = Frame
- Button.Size = UDim2.new(1, 0, 0, 30)
- Button.BackgroundColor3 = Color3.fromRGB(100, 255, 100) -- A different color for players
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.Font = Enum.Font.SourceSansBold
- Button.TextSize = 14
- Button.Text = "Teleport to " .. player.Name
- -- Teleport to player functionality
- Button.MouseButton1Click:Connect(function()
- local character = game.Players.LocalPlayer.Character
- if character and player.Character then
- character:MoveTo(player.Character.PrimaryPart.Position)
- else
- warn("Teleport failed to player: " .. player.Name)
- end
- end)
- end
- end
- -- Update CanvasSize for scrolling
- Frame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10)
- end
- -- Connect search box input to filter buttons
- SearchBox:GetPropertyChangedSignal("Text"):Connect(createButtons)
- -- Adjust CanvasSize dynamically when layout changes
- UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
- Frame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10)
- end)
- -- Initial button creation
- createButtons()
- end
- -- Call the function to create the teleport GUI
- createTeleportGUI()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement