-- Load the Rayfield Library local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local LocalPlayer = Players.LocalPlayer -- Create the main Window with the Amethyst theme local Window = Rayfield:CreateWindow({ Name = "⚡ Position Hub & Teleport ⚡", LoadingTitle = "Loading Position System...", LoadingSubtitle = "Secure ESP System v17.0", Theme = "Amethyst", ConfigurationSaving = { Enabled = false }, KeySystem = false, }) -- Create Tab and Section local ESPTab = Window:CreateTab("ESP & Teleport", 4483362458) local ESPSection = ESPTab:CreateSection("Position & One-Way Teleport") -- State variables local espEnabled = false local selectedTargetName = "Appearance" local savedPosition = nil -- Stores your saved spot local activeHighlights = {} local activeBeam = nil local trackedConnections = {} -- Function to clear highlights, beams, and listeners local function clearESP() for _, highlight in ipairs(activeHighlights) do if highlight then highlight:Destroy() end end activeHighlights = {} if activeBeam then activeBeam:Destroy() activeBeam = nil end for _, conn in ipairs(trackedConnections) do if conn then conn:Disconnect() end end trackedConnections = {} end -- STRICT FILTER: Checks if the item is ACTUALLY available to be picked up local function isTargetValid(item) if not (item:IsA("BasePart") or item:IsA("Model")) then return false end local prompt = item:FindFirstChildWhichIsA("ProximityPrompt", true) if prompt and prompt.Enabled == false then return false end if item:IsA("BasePart") and item.Transparency >= 1 then return false end if item:IsA("Model") and item.PrimaryPart and item.PrimaryPart.Transparency >= 1 then return false end local currentParent = item.Parent while currentParent and currentParent ~= game do if currentParent:FindFirstChild("Humanoid") then return false end currentParent = currentParent.Parent end return true end -- Function to update ESP and tracer line local function updateESP() clearESP() if not espEnabled or not selectedTargetName then return end if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return end local hrp = LocalPlayer.Character.HumanoidRootPart local foundPart = nil local shortestDistance = math.huge local targetNormalized = string.lower(selectedTargetName):gsub("%s+", "") for _, descendant in ipairs(Workspace:GetDescendants()) do local nameNormalized = string.lower(descendant.Name):gsub("%s+", "") if nameNormalized == targetNormalized and isTargetValid(descendant) then local partPos = descendant:IsA("Model") and descendant:GetPivot().Position or descendant.Position local highlight = Instance.new("Highlight") highlight.Name = "TargetESPHighlight" highlight.Adornee = descendant highlight.FillColor = Color3.fromRGB(170, 0, 255) highlight.OutlineColor = Color3.fromRGB(255, 255, 255) highlight.FillTransparency = 0.35 highlight.Parent = descendant table.insert(activeHighlights, highlight) local distance = (hrp.Position - partPos).Magnitude if distance < shortestDistance then shortestDistance = distance foundPart = descendant end end end if foundPart and hrp then local targetPart = foundPart:IsA("Model") and foundPart.PrimaryPart or foundPart if targetPart and targetPart:IsA("BasePart") then local attachment0 = Instance.new("Attachment", hrp) local attachment1 = Instance.new("Attachment", targetPart) local beam = Instance.new("Beam") beam.Attachment0 = attachment0 beam.Attachment1 = attachment1 beam.Color = ColorSequence.new(Color3.fromRGB(0, 255, 255)) beam.Width0 = 0.1 beam.Width1 = 0.1 beam.FaceCamera = true beam.Parent = hrp activeBeam = beam end end end -- Button 1: Save Current Position ESPTab:CreateButton({ Name = "📌 Save Current Position", Callback = function() local character = LocalPlayer.Character if character and character:FindFirstChild("HumanoidRootPart") then savedPosition = character.HumanoidRootPart.CFrame Rayfield:Notify({ Title = "Position Saved!", Content = "Your current spot has been locked in.", Duration = 2, }) else Rayfield:Notify({ Title = "Error", Content = "Character not found!", Duration = 2 }) end end, }) -- Button 2: Teleport to Appearance (One-Way) & Grab ESPTab:CreateButton({ Name = "⚡ Teleport to Appearance (No Auto-Return)", Callback = function() local character = LocalPlayer.Character if not character or not character:FindFirstChild("HumanoidRootPart") then Rayfield:Notify({ Title = "Error", Content = "Character not found!", Duration = 2 }) return end local hrp = character.HumanoidRootPart local targetPart = nil local targetPrompt = nil local shortestDistance = 1000 -- 1000 studs max limit local targetNormalized = string.lower(selectedTargetName):gsub("%s+", "") for _, descendant in ipairs(Workspace:GetDescendants()) do local nameNormalized = string.lower(descendant.Name):gsub("%s+", "") if nameNormalized == targetNormalized and isTargetValid(descendant) then local partPos = descendant:IsA("Model") and descendant:GetPivot().Position or descendant.Position local distance = (hrp.Position - partPos).Magnitude if distance <= shortestDistance then shortestDistance = distance targetPart = descendant targetPrompt = descendant:FindFirstChildWhichIsA("ProximityPrompt", true) end end end if not targetPart then Rayfield:Notify({ Title = "Not Found / Already Taken", Content = "No available " .. selectedTargetName .. " found within 1000 studs!", Duration = 3, }) return end local targetPos = targetPart:IsA("Model") and targetPart:GetPivot() or targetPart.CFrame -- Teleport there and grab it (does NOT return you automatically) hrp.CFrame = targetPos + Vector3.new(0, 2, 0) if targetPrompt then pcall(function() fireproximityprompt(targetPrompt) end) end Rayfield:Notify({ Title = "Teleported & Grabbed!", Content = "Reached " .. selectedTargetName .. " (" .. math.floor(shortestDistance) .. " studs). Staying here.", Duration = 1.5, }) if espEnabled then task.wait(0.1) updateESP() end end, }) -- Button 3: Teleport Back to Saved Position ESPTab:CreateButton({ Name = "🔙 Teleport Back to Saved Position", Callback = function() local character = LocalPlayer.Character if not character or not character:FindFirstChild("HumanoidRootPart") then Rayfield:Notify({ Title = "Error", Content = "Character not found!", Duration = 2 }) return end if not savedPosition then Rayfield:Notify({ Title = "No Position Saved", Content = "Click 'Save Current Position' first!", Duration = 3, }) return end character.HumanoidRootPart.CFrame = savedPosition Rayfield:Notify({ Title = "Teleported Back!", Content = "Returned to your saved position.", Duration = 1.5, }) end, }) -- Dropdown Menu ESPTab:CreateDropdown({ Name = "Select Target", Options = {"Appearance", "Closet"}, CurrentOption = {"Appearance"}, Flag = "TargetDropdown", Callback = function(Option) if type(Option) == "table" then selectedTargetName = Option[1] else selectedTargetName = Option end if espEnabled then updateESP() end Rayfield:Notify({ Title = "Target Switched", Content = "Now tracking: " .. tostring(selectedTargetName), Duration = 2, }) end, }) -- Toggle to turn ESP on/off ESPTab:CreateToggle({ Name = "Enable Target ESP", CurrentValue = false, Flag = "TargetESPState", Callback = function(Value) espEnabled = Value updateESP() Rayfield:Notify({ Title = "ESP Status", Content = Value and "ESP Active & Auto-Clearing." or "ESP Turned Off.", Duration = 2, }) if Value then task.spawn(function() while espEnabled do task.wait(2) if espEnabled then updateESP() end end end) end end, }) Rayfield:LoadConfiguration()