-- Toggles elevated mode on G key press: teleports up/down 20 studs and creates/deletes a temporary platform local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local isActive = false local currentPrompt = nil local originalDist = nil local platform = nil -- To store the temporary platform local function findNearestPrompt(position) local nearest = nil local shortestDist = math.huge for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("ProximityPrompt") then local part = obj.Parent if part:IsA("BasePart") then local dist = (part.Position - position).Magnitude if dist < shortestDist then shortestDist = dist nearest = obj end end end end return nearest end local function toggleMode() local char = player.Character if not char then return end local root = char:FindFirstChild("HumanoidRootPart") if not root then return end local hum = char:FindFirstChildOfClass("Humanoid") if not hum then return end if not isActive then -- Activate: Teleport up 20 studs, create platform below, extend nearest prompt range root.CFrame = root.CFrame + Vector3.new(0, 20, 0) -- Create temporary platform right below the new position platform = Instance.new("Part") platform.Size = Vector3.new(10, 1, 10) -- Decent size platform, adjust as needed platform.Position = root.Position - Vector3.new(0, 3, 0) -- Slightly below feet platform.Anchored = true platform.CanCollide = true platform.Transparency = 0.3 -- Slightly transparent to indicate it's temporary (optional) platform.Color = Color3.new(0, 0, 1) -- Blue color (optional) platform.Parent = workspace -- Extend nearest prompt range local pos = root.Position currentPrompt = findNearestPrompt(pos) if currentPrompt then originalDist = currentPrompt.MaxActivationDistance currentPrompt.MaxActivationDistance = 40 end isActive = true else -- Deactivate: Delete platform, reset prompt range, teleport down 20 studs if platform then platform:Destroy() platform = nil end if currentPrompt then currentPrompt.MaxActivationDistance = originalDist or 10 currentPrompt = nil originalDist = nil end root.CFrame = root.CFrame + Vector3.new(0, -20, 0) isActive = false end end -- Handle input (changed to G key as requested) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.G then toggleMode() end end) -- Reset on respawn player.CharacterAdded:Connect(function(char) char:WaitForChild("HumanoidRootPart") char:WaitForChildOfClass("Humanoid") isActive = false currentPrompt = nil originalDist = nil if platform then platform:Destroy() platform = nil end end)