follow script
Key RequiredUniversal

follow script

Universal Scriptascoolastheoceanascoolastheocean 353 views 350 executesUpdated Jan 31, 2026
Unrated
00
Lua Script•250 lines (8277 chars)
print("Script executing...")

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")

local LocalPlayer = Players.LocalPlayer


local LEFT_OFFSET   = 4
local BEHIND_OFFSET = 3

local followConnection = nil
local currentTarget    = nil


local RUN_ANIM_ID = "rbxassetid://180426354"
local runTrack = nil


local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "WallflickFollowGUI"
ScreenGui.ResetOnSpawn = false
ScreenGui.DisplayOrder = 10  -- on top
ScreenGui.Enabled = true


local success, err = pcall(function()
    ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui", 15)
end)

if not success then
    warn("[Wallflick Follow] Failed to parent ScreenGui: " .. tostring(err))
    StarterGui:SetCore("SendNotification", {Title = "Wallflick Error", Text = "PlayerGui not ready - try again after spawning", Duration = 8})
    return  -- exit early
end

print("check out more scripts! (ascoolastheocean)")

local function addCorner(parent, radius)
    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, radius or 8)
    corner.Parent = parent
end

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 260, 0, 340)
MainFrame.Position = UDim2.new(0.5, -130, 0.5, -170)
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
MainFrame.BorderSizePixel = 0
MainFrame.Parent = ScreenGui
addCorner(MainFrame, 12)

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, -40, 0, 45)
Title.Position = UDim2.new(0, 10, 0, 0)
Title.BackgroundTransparency = 1
Title.Text = "CHANGED THE NAME STUPID"
Title.TextColor3 = Color3.fromRGB(255, 180, 0)
Title.Font = Enum.Font.SourceSansBold
Title.TextSize = 20
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = MainFrame

local CloseBtn = Instance.new("TextButton")
CloseBtn.Size = UDim2.new(0, 35, 0, 35)
CloseBtn.Position = UDim2.new(1, -42, 0, 5)
CloseBtn.BackgroundColor3 = Color3.fromRGB(220, 50, 50)
CloseBtn.Text = "✕"
CloseBtn.TextColor3 = Color3.new(1,1,1)
CloseBtn.Font = Enum.Font.SourceSansBold
CloseBtn.TextSize = 24
CloseBtn.Parent = MainFrame
addCorner(CloseBtn, 6)

local ScrollingFrame = Instance.new("ScrollingFrame")
ScrollingFrame.Size = UDim2.new(1, -16, 1, -110)
ScrollingFrame.Position = UDim2.new(0, 8, 0, 55)
ScrollingFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
ScrollingFrame.BorderSizePixel = 0
ScrollingFrame.ScrollBarThickness = 6
ScrollingFrame.ScrollBarImageColor3 = Color3.fromRGB(100, 100, 100)
ScrollingFrame.Parent = MainFrame
addCorner(ScrollingFrame, 8)

local UIListLayout = Instance.new("UIListLayout")
UIListLayout.Padding = UDim.new(0, 6)
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Parent = ScrollingFrame

local StopButton = Instance.new("TextButton")
StopButton.Size = UDim2.new(1, -16, 0, 45)
StopButton.Position = UDim2.new(0, 8, 1, -55)
StopButton.BackgroundColor3 = Color3.fromRGB(180, 40, 40)
StopButton.Text = "STOP FOLLOWING"
StopButton.TextColor3 = Color3.new(1,1,1)
StopButton.Font = Enum.Font.SourceSansBold
StopButton.TextSize = 18
StopButton.Parent = MainFrame
addCorner(StopButton, 8)

print("yo")

-- Draggable (same as yours)
local dragging = false
local dragStart, startPos
Title.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        startPos = MainFrame.Position
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then dragging = false end
        end)
    end
end)
UserInputService.InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = input.Position - dragStart
        MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
    end
end)

-- Character refs + load anim safely
local LocalHumanoid, LocalAnimator, LocalRoot

local function refreshRefs()
    local char = LocalPlayer.Character
    if not char then return false end
    LocalHumanoid = char:FindFirstChild("Humanoid")
    LocalRoot = char:FindFirstChild("HumanoidRootPart")
    LocalAnimator = LocalHumanoid and LocalHumanoid:FindFirstChild("Animator")
    return LocalRoot and LocalHumanoid and LocalAnimator
end

local function loadRunAnimation()
    if runTrack or not LocalAnimator then return end
    local anim = Instance.new("Animation")
    anim.AnimationId = RUN_ANIM_ID
    runTrack = LocalAnimator:LoadAnimation(anim)
    runTrack.Looped = true
    runTrack.Priority = Enum.AnimationPriority.Movement
end

-- Follow logic
local function updateFollow()
    if not currentTarget or not refreshRefs() then return end
    local tChar = currentTarget.Character
    local tHRP = tChar and tChar:FindFirstChild("HumanoidRootPart")
    if not tHRP then return end

    local posCFrame = tHRP.CFrame * CFrame.new(-LEFT_OFFSET, 0, BEHIND_OFFSET)
    TweenService:Create(LocalRoot, TweenInfo.new(0.15, Enum.EasingStyle.Linear), {CFrame = posCFrame}):Play()

    local tHum = tChar:FindFirstChild("Humanoid")
    local moving = tHum and tHum.MoveDirection.Magnitude > 0.05
    if moving then
        loadRunAnimation()
        if runTrack and not runTrack.IsPlaying then runTrack:Play(0.1) end
    else
        if runTrack and runTrack.IsPlaying then runTrack:Stop(0.2) end
    end
end

local function startFollowing()
    if followConnection then followConnection:Disconnect() end
    followConnection = RunService.Heartbeat:Connect(updateFollow)
end

local function stopFollowing()
    if followConnection then followConnection:Disconnect(); followConnection = nil end
    currentTarget = nil
    if runTrack then runTrack:Stop(0.2) end
    StarterGui:SetCore("SendNotification", {Title = "Follow", Text = "Stopped!", Duration = 3})
end

-- Player list (same as yours)
local function refreshPlayerList()
    for _, child in ScrollingFrame:GetChildren() do
        if child:IsA("TextButton") then child:Destroy() end
    end

    for _, plr in Players:GetPlayers() do
        if plr ~= LocalPlayer then
            local btn = Instance.new("TextButton")
            btn.Size = UDim2.new(1, 0, 0, 42)
            btn.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
            btn.Text = "👤 " .. plr.Name
            btn.TextColor3 = Color3.new(1,1,1)
            btn.Font = Enum.Font.SourceSans
            btn.TextSize = 18
            btn.Parent = ScrollingFrame
            addCorner(btn, 6)

            btn.MouseButton1Click:Connect(function()
                currentTarget = plr
                StarterGui:SetCore("SendNotification", {Title = "Follow", Text = "Following " .. plr.Name .. " (left + behind)", Duration = 4})
                startFollowing()
            end)

            btn.MouseEnter:Connect(function() btn.BackgroundColor3 = Color3.fromRGB(65,65,65) end)
            btn.MouseLeave:Connect(function() btn.BackgroundColor3 = Color3.fromRGB(45,45,45) end)
        end
    end

    ScrollingFrame.CanvasSize = UDim2.new(0,0,0, UIListLayout.AbsoluteContentSize.Y + 12)
end

-- Connections
task.spawn(function()
    task.wait(1)  -- small delay for stability
    refreshPlayerList()
end)

Players.PlayerAdded:Connect(refreshPlayerList)
Players.PlayerRemoving:Connect(refreshPlayerList)

CloseBtn.MouseButton1Click:Connect(function()
    stopFollowing()
    ScreenGui:Destroy()
end)

StopButton.MouseButton1Click:Connect(stopFollowing)

-- Respawn
LocalPlayer.CharacterAdded:Connect(function()
    refreshRefs()
    loadRunAnimation()
    if currentTarget then startFollowing() end
end)

-- Toggle + force stop
UserInputService.InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.KeyCode == Enum.KeyCode.Insert then
        ScreenGui.Enabled = not ScreenGui.Enabled
    elseif input.KeyCode == Enum.KeyCode.End then
        stopFollowing()
    end
end)

StarterGui:SetCore("SendNotification", {
    Title = "CHANGE NAME!",
    Text = "Loaded! (credits are ascoolastheocean)",
    Duration = 10
})

print("a good subsitute executor would be xeno")

Features & Information

this is an work in progress script, expected to be done in feb 6 or less. open sourced btw

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts