Universal Script 📌
5.6k Views
712 Executions

AUTO INTERACT PROXIMITY PROMPT

Universal Script 📌
Fnfcharters
FnfchartersPublished 5
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

You're able to fire nearby prompt.

View Raw
local Players = game:GetService("Players")
local player = Players.LocalPlayer

while true do
    local character = player.Character or player.CharacterAdded:Wait()
    local rootPart = character:WaitForChild("HumanoidRootPart")
    
    local active = true
    local characterRemovingConn = player.CharacterRemoving:Connect(function()
        active = false
        characterRemovingConn:Disconnect()
    end)

    while active do
        for _, instance in ipairs(workspace:GetDescendants()) do
            if instance:IsA("ProximityPrompt") then
                local prompt = instance
                local targetPart = prompt.Parent
                
                if targetPart and targetPart:IsA("BasePart") and rootPart and rootPart.Parent then
                    local distance = (targetPart.Position - rootPart.Position).Magnitude
                    if distance <= prompt.MaxActivationDistance then
                        prompt:InputHoldBegin()
                        task.wait(prompt.HoldDuration)
                        prompt:InputHoldEnd()
                    end
                end
            end
        end
        task.wait(0.2)
    end
end


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Script hub
202.3k
2.3M
Bumped 1 hour ago
Key System

Script hub

#20 this week

Verified script badgeAirflow HUB

Universal Script 📌
57.4k
270.2k
Bumped 3 hours ago
Key System
Script hub
2.2M
2.5M
Bumped 6 hours ago
Key System
Universal Script 📌
33.3k
479.6k
Bumped 6 hours ago
Script hub
4.0M
2.7M
Bumped 6 hours ago

Script hub

Hall of Fame #5

KeylessVerified script badge[KEYLESS] Moondiety Script | 30+ supported Games

Script hub
580
2.6k
Bumped 8 hours ago