--[[ SnowflakeTeleport — ONE LocalScript, ONE file. StarterPlayer > StarterPlayerScripts, paste entire file. Snowflake auto-follow, server hop (same PlaceID) with slider 30s–10m + auto timer + hop now, draggable UI. ]] local Players = game:GetService("Players") local CollectionService = game:GetService("CollectionService") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TeleportService = game:GetService("TeleportService") local CONFIG = { SnowflakeTags = { "Snowflake", "SnowFlake" }, DetectByTags = true, DetectByName = true, NameSubstring = "snowflake", SnowflakeAttribute = nil, TeleportYOffset = 6, TeleportCooldownSeconds = 4, RayOriginAboveTarget = 80, RaycastLengthDown = 600, AutoTeleportToNearest = true, Keys = { Nearest = Enum.KeyCode.T, NextInList = Enum.KeyCode.Y }, CountRefreshSeconds = 0.75, PanelPosition = UDim2.new(1, -268, 0, 12), PanelWidth = 252, IgnoreAncestorHints = { "template", "replicatedstorage", "serverstorage", "starterpack", "__backup", "_storage" }, IgnoreNearWorldOriginXZ = 5, ServerHopMinSeconds = 30, ServerHopMaxSeconds = 600, ServerHopDefaultSeconds = 300, -- Changed to 5 minutes (300 seconds) Colors = { Panel = Color3.fromRGB(28, 30, 36), Stroke = Color3.fromRGB(55, 58, 68), Text = Color3.fromRGB(235, 237, 243), Subtext = Color3.fromRGB(160, 165, 180), On = Color3.fromRGB(52, 142, 92), Off = Color3.fromRGB(72, 76, 88), Button = Color3.fromRGB(66, 120, 212), ButtonDisabled = Color3.fromRGB(50, 52, 60), DragBar = Color3.fromRGB(40, 43, 52), SliderTrack = Color3.fromRGB(48, 50, 58), SliderKnob = Color3.fromRGB(210, 214, 225), }, } local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local C = CONFIG.Colors local cycleIndex, featureEnabled, lastTeleportClock = 0, true, -1e9 -- Changed featureEnabled to true (enabled by default) local SH_MIN = CONFIG.ServerHopMinSeconds local SH_MAX = CONFIG.ServerHopMaxSeconds local serverHopIntervalSec = math.clamp(math.floor(CONFIG.ServerHopDefaultSeconds + 0.5), SH_MIN, SH_MAX) local autoServerHopEnabled = true -- Changed to true (enabled by default) local serverHopElapsed = 0 local sliderDragging = false local function getRoot() local c = player.Character return c and c:FindFirstChild("HumanoidRootPart") or nil end local function waitForRoot() local c = player.Character or player.CharacterAdded:Wait() return c:WaitForChild("HumanoidRootPart", 15) end local function isUnderWorkspace(inst) return inst:IsDescendantOf(workspace) end local function getTargetCFrame(inst) if inst:IsA("Model") then if inst.PrimaryPart then return inst.PrimaryPart.CFrame end for _, ch in ipairs(inst:GetDescendants()) do if ch:IsA("BasePart") then return ch.CFrame end end return inst:GetPivot() elseif inst:IsA("BasePart") then return inst.CFrame elseif inst:IsA("Tool") then local h = inst:FindFirstChild("Handle") if h and h:IsA("BasePart") then return h.CFrame end end return nil end local function compactLower(s) s = string.lower(s) return (string.gsub(s, "%s+", "")) end local function nameHintsSnowflake(inst) local needle = compactLower(CONFIG.NameSubstring) if needle == "" then return false end if string.find(compactLower(inst.Name), needle, 1, true) then return true end local p = inst.Parent while p and p ~= game do if string.find(compactLower(p.Name), needle, 1, true) then return true end p = p.Parent end return false end local function attributeHintsSnowflake(inst) local attr = CONFIG.SnowflakeAttribute if not attr or attr == "" then return false end local v = inst:GetAttribute(attr) return v == true or v == "true" or v == 1 end local function isForbiddenOriginColumn(pos) local lim = CONFIG.IgnoreNearWorldOriginXZ if type(lim) ~= "number" or lim <= 0 then return false end return math.abs(pos.X) < lim and math.abs(pos.Z) < lim end local function isExcludedFromSnowflakes(inst) if not inst or not inst.Parent then return true end local char = player.Character if char and inst:IsDescendantOf(char) then return true end local p = inst while p and p ~= workspace do local ln = string.lower(p.Name) for _, hint in ipairs(CONFIG.IgnoreAncestorHints) do if hint ~= "" and string.find(ln, string.lower(hint), 1, true) then return true end end p = p.Parent end return false end local function isViableSnowflake(inst) if isExcludedFromSnowflakes(inst) or not isUnderWorkspace(inst) then return false end local cf = getTargetCFrame(inst) if not cf then return false end if inst:IsA("BasePart") and inst.Size.Magnitude < 0.05 then return false end if isForbiddenOriginColumn(cf.Position) then return false end return true end local function collectSnowflakes() local out, seen = {}, {} local function push(inst) if seen[inst] or not isViableSnowflake(inst) then return end seen[inst] = true table.insert(out, inst) end if CONFIG.DetectByTags then for _, tag in ipairs(CONFIG.SnowflakeTags) do for _, inst in ipairs(CollectionService:GetTagged(tag)) do push(inst) end end end if CONFIG.DetectByName then for _, d in ipairs(workspace:GetDescendants()) do if (d:IsA("BasePart") or d:IsA("Model") or d:IsA("Tool")) and nameHintsSnowflake(d) then push(d) end end end if CONFIG.SnowflakeAttribute and CONFIG.SnowflakeAttribute ~= "" then for _, d in ipairs(workspace:GetDescendants()) do if (d:IsA("BasePart") or d:IsA("Model") or d:IsA("Tool")) and attributeHintsSnowflake(d) then push(d) end end end return out end local function getTeleportCooldownLeft() if CONFIG.TeleportCooldownSeconds <= 0 then return 0 end return math.max(0, CONFIG.TeleportCooldownSeconds - (os.clock() - lastTeleportClock)) end local function raycastStandPosition(cf, pick) local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Exclude local exclude = {} local char = player.Character if char then table.insert(exclude, char) end if pick and typeof(pick) == "Instance" then table.insert(exclude, pick) end params.FilterDescendantsInstances = exclude local dir = Vector3.new(0, -CONFIG.RaycastLengthDown, 0) for _, lift in ipairs({ CONFIG.RayOriginAboveTarget, CONFIG.RayOriginAboveTarget + 220, 400 }) do local hit = workspace:Raycast(cf.Position + Vector3.new(0, lift, 0), dir, params) if hit then return hit end end return nil end local function standHeightAboveHit(root, humanoid) local hip = humanoid and humanoid.HipHeight or 2 return hip + root.Size.Y * 0.5 + 0.35 end local function teleportToSnowflake(pick, cf) if getTeleportCooldownLeft() > 0 or not isViableSnowflake(pick) then return false end local freshCf = getTargetCFrame(pick) if not freshCf then return false end cf = freshCf local root = getRoot() or waitForRoot() if not root then return false end local humanoid = root.Parent and root.Parent:FindFirstChildOfClass("Humanoid") local hit = raycastStandPosition(cf, pick) local targetPos if hit then targetPos = hit.Position + hit.Normal * standHeightAboveHit(root, humanoid) else warn("[SnowflakeTeleport] Raycast missed ground; using high fallback above the snowflake.") targetPos = cf.Position + Vector3.new(0, math.max(CONFIG.TeleportYOffset, 24), 0) end if isForbiddenOriginColumn(targetPos) then warn("[SnowflakeTeleport] Skipped teleport near world origin X,Z. Fix pivot or set CONFIG.IgnoreNearWorldOriginXZ = 0.") return false end local _, yaw, _ = cf:ToOrientation() local dest = CFrame.new(targetPos) * CFrame.Angles(0, yaw, 0) root.AssemblyLinearVelocity = Vector3.zero root.AssemblyAngularVelocity = Vector3.zero root.CFrame = dest lastTeleportClock = os.clock() return true end local function nearestSnowflake(refs) local root = getRoot() or waitForRoot() if not root or #refs == 0 then return nil end local best, bestDist, p = nil, math.huge, root.Position for _, inst in ipairs(refs) do if isViableSnowflake(inst) then local icf = getTargetCFrame(inst) if icf then local d = (icf.Position - p).Magnitude if d < bestDist then bestDist, best = d, inst end end end end return best end local function teleportNearest(silent, refsCached) local pick = nearestSnowflake(refsCached or collectSnowflakes()) if not pick then if not silent then warn("[SnowflakeTeleport] No valid snowflakes in Workspace.") end return end local pcf = getTargetCFrame(pick) if pcf then teleportToSnowflake(pick, pcf) end end local function teleportNextInList() local refs = collectSnowflakes() if #refs == 0 then warn("[SnowflakeTeleport] No snowflakes found.") return end cycleIndex = (cycleIndex % #refs) + 1 local pick = refs[cycleIndex] if isViableSnowflake(pick) then local pcf = getTargetCFrame(pick) if pcf then teleportToSnowflake(pick, pcf) end end end local function serverHopNow() local ok, err = pcall(function() TeleportService:Teleport(game.PlaceId, player) end) if not ok then warn("[SnowflakeTeleport] Server hop failed: ", err) end end local function formatDuration(sec) sec = math.max(0, math.floor(sec + 0.5)) local m = sec // 60 local s = sec % 60 if m > 0 then return string.format("%dm %02ds", m, s) end return string.format("%ds", s) end local function secondsFromSliderAlpha(alpha) alpha = math.clamp(alpha, 0, 1) local span = math.max(0, SH_MAX - SH_MIN) return math.clamp(math.floor(SH_MIN + alpha * span + 0.5), SH_MIN, SH_MAX) end local function sliderAlphaFromSeconds(sec) local span = math.max(1, SH_MAX - SH_MIN) return math.clamp((sec - SH_MIN) / span, 0, 1) end local function makeDraggable(frame, handle) local dragging, dragStart, startPos = false, Vector2.zero, UDim2.new() local function updatePosition(input) local d = input.Position - dragStart frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end local function moveType(t) return t == Enum.UserInputType.MouseMovement or t == Enum.UserInputType.Touch end handle.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position local endConn endConn = input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false if endConn then endConn:Disconnect() end end end) end end) handle.InputChanged:Connect(function(input) if dragging and moveType(input.UserInputType) then updatePosition(input) end end) UserInputService.InputChanged:Connect(function(input) if dragging and moveType(input.UserInputType) then updatePosition(input) end end) end local screenGui = Instance.new("ScreenGui") screenGui.Name = "SnowflakeTeleportUI" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.IgnoreGuiInset = false screenGui.Parent = playerGui local panel = Instance.new("Frame") panel.AnchorPoint = Vector2.new(0, 0) panel.Position = CONFIG.PanelPosition panel.Size = UDim2.new(0, CONFIG.PanelWidth, 0, 0) panel.AutomaticSize = Enum.AutomaticSize.Y panel.BackgroundColor3 = C.Panel panel.BorderSizePixel = 0 panel.Parent = screenGui local pc = Instance.new("UICorner") pc.CornerRadius = UDim.new(0, 10) pc.Parent = panel local stroke = Instance.new("UIStroke") stroke.Color = C.Stroke stroke.Thickness = 1 stroke.Parent = panel local pad = Instance.new("UIPadding") pad.PaddingTop = UDim.new(0, 8) pad.PaddingBottom = UDim.new(0, 12) pad.PaddingLeft = UDim.new(0, 14) pad.PaddingRight = UDim.new(0, 14) pad.Parent = panel local list = Instance.new("UIListLayout") list.FillDirection = Enum.FillDirection.Vertical list.HorizontalAlignment = Enum.HorizontalAlignment.Center list.SortOrder = Enum.SortOrder.LayoutOrder list.Padding = UDim.new(0, 10) list.Parent = panel local dragBar = Instance.new("Frame") dragBar.LayoutOrder = 1 dragBar.Size = UDim2.new(1, 0, 0, 32) dragBar.BackgroundColor3 = C.DragBar dragBar.BorderSizePixel = 0 dragBar.Active = true dragBar.Parent = panel local dbc = Instance.new("UICorner") dbc.CornerRadius = UDim.new(0, 8) dbc.Parent = dragBar local grip = Instance.new("TextLabel") grip.BackgroundTransparency = 1 grip.Position = UDim2.new(0, 6, 0, 0) grip.Size = UDim2.new(0, 22, 1, 0) grip.Font = Enum.Font.GothamBold grip.TextSize = 16 grip.TextColor3 = C.Subtext grip.Text = "⋮⋮" grip.TextXAlignment = Enum.TextXAlignment.Left grip.Active = false grip.Selectable = false grip.Parent = dragBar local titleInBar = Instance.new("TextLabel") titleInBar.BackgroundTransparency = 1 titleInBar.Position = UDim2.new(0, 28, 0, 0) titleInBar.Size = UDim2.new(1, -36, 1, 0) titleInBar.Font = Enum.Font.GothamBold titleInBar.TextSize = 15 titleInBar.TextColor3 = C.Text titleInBar.TextXAlignment = Enum.TextXAlignment.Left titleInBar.Text = "Snowflake + server hop — drag here" titleInBar.Active = false titleInBar.Selectable = false titleInBar.Parent = dragBar makeDraggable(panel, dragBar) local function makeLabel(text, order, sub) local l = Instance.new("TextLabel") l.LayoutOrder = order l.BackgroundTransparency = 1 l.Size = UDim2.new(1, 0, 0, sub and 18 or 22) l.Font = Enum.Font.GothamBold l.TextSize = sub and 13 or 16 l.TextColor3 = sub and C.Subtext or C.Text l.TextXAlignment = Enum.TextXAlignment.Left l.Text = text l.Parent = panel return l end local countLabel = makeLabel("Detected on map: …", 2, true) local toggleBtn = Instance.new("TextButton") toggleBtn.LayoutOrder = 3 toggleBtn.Size = UDim2.new(1, 0, 0, 38) toggleBtn.BackgroundColor3 = C.On -- Changed to On (enabled by default) toggleBtn.TextColor3 = C.Text toggleBtn.Font = Enum.Font.GothamMedium toggleBtn.TextSize = 15 toggleBtn.AutoButtonColor = true toggleBtn.Text = "Enabled — tap to disable" -- Changed text to enabled toggleBtn.Parent = panel local tc = Instance.new("UICorner") tc.CornerRadius = UDim.new(0, 8) tc.Parent = toggleBtn local goBtn = Instance.new("TextButton") goBtn.LayoutOrder = 4 goBtn.Size = UDim2.new(1, 0, 0, 36) goBtn.BackgroundColor3 = C.Button goBtn.TextColor3 = Color3.new(1, 1, 1) goBtn.Font = Enum.Font.GothamMedium goBtn.TextSize = 14 goBtn.AutoButtonColor = false goBtn.Text = "Auto-follow nearest" goBtn.Active = false goBtn.Parent = panel local gc = Instance.new("UICorner") gc.CornerRadius = UDim.new(0, 8) gc.Parent = goBtn makeLabel("Hotkeys: T = now · Y = next (snowflake)", 5, true) makeLabel("Server hop (same game, new server)", 6, false) local serverHopSliderLabel = makeLabel("Every: 5m 00s · drag bar (30s – 10m)", 7, true) -- Changed default display local sliderRow = Instance.new("Frame") sliderRow.LayoutOrder = 8 sliderRow.Size = UDim2.new(1, 0, 0, 36) sliderRow.BackgroundTransparency = 1 sliderRow.Parent = panel local sliderTrack = Instance.new("Frame") sliderTrack.Name = "Track" sliderTrack.AnchorPoint = Vector2.new(0.5, 0.5) sliderTrack.Position = UDim2.new(0.5, 0, 0.5, 0) sliderTrack.Size = UDim2.new(1, 0, 0, 10) sliderTrack.BackgroundColor3 = C.SliderTrack sliderTrack.BorderSizePixel = 0 sliderTrack.Active = true sliderTrack.Parent = sliderRow Instance.new("UICorner", sliderTrack).CornerRadius = UDim.new(1, 0) local sliderKnob = Instance.new("Frame") sliderKnob.Name = "Knob" sliderKnob.AnchorPoint = Vector2.new(0.5, 0.5) sliderKnob.Size = UDim2.new(0, 18, 0, 18) sliderKnob.BackgroundColor3 = C.SliderKnob sliderKnob.BorderSizePixel = 0 sliderKnob.Active = true sliderKnob.ZIndex = 2 sliderKnob.Parent = sliderRow Instance.new("UICorner", sliderKnob).CornerRadius = UDim.new(1, 0) local function placeKnobFromSeconds(sec) sec = math.clamp(math.floor(sec + 0.5), SH_MIN, SH_MAX) serverHopIntervalSec = sec local a = sliderAlphaFromSeconds(sec) sliderKnob.Position = UDim2.new(a, 0, 0.5, 0) end local function updateSliderReadout(countdownRemain) local intervalStr = formatDuration(serverHopIntervalSec) if autoServerHopEnabled then local remain = math.max(0, math.ceil(countdownRemain or (serverHopIntervalSec - serverHopElapsed))) serverHopSliderLabel.Text = string.format("Every %s · next in %s", intervalStr, formatDuration(remain)) else serverHopSliderLabel.Text = string.format("Every %s (30s – 10m) · auto off", intervalStr) end end local function pointerAlphaForSlider() local x = UserInputService:GetMouseLocation().X local t = sliderTrack.AbsolutePosition.X local w = sliderTrack.AbsoluteSize.X if w <= 1 then return sliderAlphaFromSeconds(serverHopIntervalSec) end return math.clamp((x - t) / w, 0, 1) end local function applyPointerOrAlpha(alpha, resetElapsed) local sec = secondsFromSliderAlpha(alpha) placeKnobFromSeconds(sec) if resetElapsed then serverHopElapsed = 0 end updateSliderReadout() end placeKnobFromSeconds(serverHopIntervalSec) updateSliderReadout() local function beginSliderDrag() sliderDragging = true applyPointerOrAlpha(pointerAlphaForSlider(), true) end sliderTrack.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then beginSliderDrag() end end) sliderKnob.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then beginSliderDrag() end end) UserInputService.InputChanged:Connect(function(input) if not sliderDragging then return end if input.UserInputType ~= Enum.UserInputType.MouseMovement and input.UserInputType ~= Enum.UserInputType.Touch then return end applyPointerOrAlpha(pointerAlphaForSlider(), true) end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if sliderDragging then sliderDragging = false updateSliderReadout() end end end) local autoServerHopBtn = Instance.new("TextButton") autoServerHopBtn.LayoutOrder = 9 autoServerHopBtn.Size = UDim2.new(1, 0, 0, 34) autoServerHopBtn.BackgroundColor3 = C.On -- Changed to On (enabled by default) autoServerHopBtn.TextColor3 = C.Text autoServerHopBtn.Font = Enum.Font.GothamMedium autoServerHopBtn.TextSize = 14 autoServerHopBtn.Text = "Auto server hop: ON" -- Changed text to ON autoServerHopBtn.Parent = panel Instance.new("UICorner", autoServerHopBtn).CornerRadius = UDim.new(0, 8) local serverHopNowBtn = Instance.new("TextButton") serverHopNowBtn.LayoutOrder = 10 serverHopNowBtn.Size = UDim2.new(1, 0, 0, 36) serverHopNowBtn.BackgroundColor3 = C.Button serverHopNowBtn.TextColor3 = Color3.new(1, 1, 1) serverHopNowBtn.Font = Enum.Font.GothamBold serverHopNowBtn.TextSize = 14 serverHopNowBtn.Text = "Server hop now" serverHopNowBtn.Parent = panel Instance.new("UICorner", serverHopNowBtn).CornerRadius = UDim.new(0, 8) autoServerHopBtn.MouseButton1Click:Connect(function() autoServerHopEnabled = not autoServerHopEnabled serverHopElapsed = 0 if autoServerHopEnabled then autoServerHopBtn.BackgroundColor3 = C.On autoServerHopBtn.Text = "Auto server hop: ON" else autoServerHopBtn.BackgroundColor3 = C.Off autoServerHopBtn.Text = "Auto server hop: OFF" end updateSliderReadout() end) serverHopNowBtn.MouseButton1Click:Connect(function() serverHopNow() end) local function syncGoButton() if not featureEnabled then return end local left = getTeleportCooldownLeft() if CONFIG.AutoTeleportToNearest then goBtn.Text = left > 0 and string.format("Auto on · cooldown %.1fs", left) or "Auto on · hops to nearest" goBtn.Active = false goBtn.AutoButtonColor = false goBtn.BackgroundColor3 = C.Button goBtn.TextColor3 = Color3.new(1, 1, 1) else if left > 0 then goBtn.Text = string.format("Wait %.1fs", left) goBtn.Active = false goBtn.AutoButtonColor = false else goBtn.Text = "Teleport to nearest" goBtn.Active = true goBtn.AutoButtonColor = true end end end local function applyEnabledState() if featureEnabled then toggleBtn.BackgroundColor3 = C.On toggleBtn.Text = "Enabled — tap to disable" goBtn.BackgroundColor3 = C.Button goBtn.TextColor3 = Color3.new(1, 1, 1) syncGoButton() else toggleBtn.BackgroundColor3 = C.Off toggleBtn.Text = "Disabled — tap to enable" goBtn.BackgroundColor3 = C.ButtonDisabled goBtn.TextColor3 = C.Subtext goBtn.Active = false goBtn.AutoButtonColor = false goBtn.Text = CONFIG.AutoTeleportToNearest and "Auto-follow (enable above)" or "Teleport to nearest" end end local function refreshCount() countLabel.Text = "Detected on map: " .. tostring(#collectSnowflakes()) end toggleBtn.MouseButton1Click:Connect(function() featureEnabled = not featureEnabled applyEnabledState() refreshCount() end) goBtn.MouseButton1Click:Connect(function() if featureEnabled and not CONFIG.AutoTeleportToNearest then teleportNearest(false) end end) applyEnabledState() refreshCount() local acc = 0 RunService.Heartbeat:Connect(function(dt) acc += dt if acc >= CONFIG.CountRefreshSeconds then acc = 0 refreshCount() end if featureEnabled and CONFIG.AutoTeleportToNearest and player.Character and getRoot() and getTeleportCooldownLeft() <= 0 then local refs = collectSnowflakes() if #refs > 0 then teleportNearest(true, refs) end end if autoServerHopEnabled then serverHopElapsed += dt if serverHopElapsed >= serverHopIntervalSec then serverHopElapsed = 0 serverHopNow() end local remain = math.max(0, serverHopIntervalSec - serverHopElapsed) updateSliderReadout(remain) else updateSliderReadout() end syncGoButton() end) UserInputService.InputBegan:Connect(function(input, gameProcessed) if not featureEnabled or gameProcessed or UserInputService:GetFocusedTextBox() then return end if input.KeyCode == CONFIG.Keys.Nearest then teleportNearest(false) elseif input.KeyCode == CONFIG.Keys.NextInList then teleportNextInList() end end)