Insta get needle
Key Required

Insta get needle

🔍 Find the Needle!YimitriYiYimitriYi 4.4K views 17.7K executesUpdated Sep 6, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•216 lines (6541 chars)
local Players=game:GetService("Players")
local RunService=game:GetService("RunService")
local UserInputService=game:GetService("UserInputService")
local VirtualInputManager=game:GetService("VirtualInputManager")
local player=Players.LocalPlayer
local workspace=game:GetService("Workspace")

local DISTANCIA_DETRAS=3
local VECES_INTERACCION=3

local character,humanoid,rootPart
local needle,needlePrompt

local flyConnection
local cameraConnection
local flying=false
local flySpeed=FLY_SPEED
local cameraFocused=false


local function startFly()
    if not character or not rootPart then return end
    if flyConnection then flyConnection:Disconnect() end
    flying=true
    local hum=character:FindFirstChild("Humanoid")
    if hum then
        hum:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
        hum.PlatformStand=true
    end
    local bv=Instance.new("BodyVelocity")
    bv.MaxForce=Vector3.new(1e9,1e9,1e9)
    bv.Parent=rootPart
    local bg=Instance.new("BodyGyro")
    bg.MaxTorque=Vector3.new(1e9,1e9,1e9)
    bg.Parent=rootPart
    flyConnection=RunService.RenderStepped:Connect(function()
        if not flying or not rootPart or not rootPart.Parent then return end
        local cam=workspace.CurrentCamera
        if not cam then return end
        local cf=cam.CFrame
        local dir=Vector3.new()
        if UserInputService:IsKeyDown(Enum.KeyCode.W) then dir=dir+cf.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.S) then dir=dir-cf.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.A) then dir=dir-cf.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.D) then dir=dir+cf.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.Space) then dir=dir+cf.UpVector end
        if dir.Magnitude>0 then dir=dir.Unit end
        bv.Velocity=dir*flySpeed
        if dir.Magnitude>0 then
            bg.CFrame=rootPart.CFrame:Lerp(CFrame.lookAt(rootPart.Position,rootPart.Position+dir),0.3)
        end
    end)
end

local function getNeedle()
    local main=workspace:FindFirstChild("Main")
    if main then
        needle=main:FindFirstChild("Needle")
        if needle then
            needlePrompt=needle:FindFirstChild("NeedlePrompt")
        end
    end
    return needle
end

local function getPart()
    if not needle then return nil end
    if needle:IsA("BasePart") then return needle end
    if needle.PrimaryPart then return needle.PrimaryPart end
    return needle:FindFirstChildWhichIsA("BasePart")
end

local function cleanGUI()
    local gui=player:FindFirstChildOfClass("PlayerGui")
    if gui then
        local keep={InteractHover=true,HayHover=true}
        for _,obj in ipairs(gui:GetChildren()) do
            if not keep[obj.Name] then obj:Destroy() end
        end
    end
    local h=workspace:FindFirstChild("Haystack")
    if h then h:Destroy() end
end

local function forceCamera()
    local cam=workspace.CurrentCamera
    if cam and humanoid and humanoid.Parent then
        if cam.CameraType~=Enum.CameraType.Custom then
            cam.CameraType=Enum.CameraType.Custom
        end
        if cam.CameraSubject~=humanoid then
            cam.CameraSubject=humanoid
        end
    end
end

-- CAMARA MIRANDO AL NEEDLE
local function focusCameraOnNeedle()
    if cameraConnection then cameraConnection:Disconnect() end
    
    local cam=workspace.CurrentCamera
    if not cam then return end
    
    cameraFocused=true
    cam.CameraType=Enum.CameraType.Scriptable
    
    cameraConnection=RunService.RenderStepped:Connect(function()
        if not cameraFocused then return end
        local part=getPart()
        local cam=workspace.CurrentCamera
        if not cam or not part or not rootPart then return end
        
        -- Posicion de la camara detras del jugador mirando al needle
        local camPos = rootPart.Position + Vector3.new(0, 2, 5)
        cam.CFrame = CFrame.lookAt(camPos, part.Position)
    end)
end

local function unfocusCamera()
    cameraFocused=false
    if cameraConnection then
        cameraConnection:Disconnect()
        cameraConnection=nil
    end
    forceCamera()
end

local function teleport()
    local part=getPart()
    if not part or not rootPart then return false end
    local backward = -part.CFrame.LookVector
    local posDetras = part.Position + (backward * DISTANCIA_DETRAS)
    posDetras = Vector3.new(posDetras.X, part.Position.Y, posDetras.Z)
    rootPart.CFrame = CFrame.lookAt(posDetras, part.Position)
    return true
end

local function pressE()
    VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, nil)
    task.wait(0.05)
    VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, nil)
end

local function interactMultiple()
    local exito = false
    for i = 1, VECES_INTERACCION do
        pressE()
        exito = true
        task.wait(0.1)
    end
    return exito
end

local function run()
    cleanGUI()
    character=player.Character
    if not character then return end
    humanoid=character:FindFirstChild("Humanoid")
    rootPart=character:FindFirstChild("HumanoidRootPart")
    if not humanoid or not rootPart then return end
    if not getNeedle() then return end
    teleport()
    
    -- Activar camara mirando al needle
    focusCameraOnNeedle()
    
    interactMultiple()
    
    -- Desactivar camara y volver al jugador
   
    
    startFly()
    
end

while not player.Character do end
task.spawn(run)

player.CharacterAdded:Connect(function(newChar)
    character=newChar
    humanoid=newChar:FindFirstChild("Humanoid")
    rootPart=newChar:FindFirstChild("HumanoidRootPart")
    task.spawn(run)
end)

RunService.RenderStepped:Connect(function()
    if humanoid and humanoid.Parent then
        local cam=workspace.CurrentCamera
        if cam then
            if cam.CameraType~=Enum.CameraType.Custom then
                cam.CameraType=Enum.CameraType.Custom
            end
            if cam.CameraSubject~=humanoid then
                cam.CameraSubject=humanoid
            end
        end
    end
end)

_G.Needle={
    run=run,
    fly=function()
        flying=not flying
        if flying then startFly() else if flyConnection then flyConnection:Disconnect() end end
    end,
    speed=function(s) if s then flySpeed=s end return flySpeed end,
    veces=function(n) if n then VECES_INTERACCION=n end return VECES_INTERACCION end,
    pressE=pressE,
    focus=function()
        if cameraFocused then
            unfocusCamera()
        else
            focusCameraOnNeedle()
        end
    end
}

Features & Information

insta get needle

Community Comments (0)

No comments yet for this script.

More Scripts for 🔍 Find the Needle!