
396 Views
70 Executions
stay in front of target user persistently
Universal Script π
maclikeskadeFirst script
9 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
features are as the title describes. keybind to activate/deactivate, is X. this code was quickly written with AI
--[[ Configuration ]]--
local targetUsername = "cryingprada" -- Change to the target's username
local followDistance = 3
local toggleKey = Enum.KeyCode.T
--[[ Script Start ]]--
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local localPlayer = Players.LocalPlayer
local char = localPlayer.Character or localPlayer.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local toggled = false
local targetPlayer = nil
-- Toggle listener
UIS.InputBegan:Connect(function(input, gpe)
if not gpe and input.KeyCode == toggleKey then
toggled = not toggled
print("Stay-in-front toggled:", toggled)
end
end)
-- Helper: get player by username
local function getPlayerByUsername(name)
for _, plr in pairs(Players:GetPlayers()) do
if plr.Name:lower() == name:lower() or plr.DisplayName:lower() == name:lower() then
return plr
end
end
return nil
end
-- Constant tracking loop
RunService.RenderStepped:Connect(function()
if not toggled then return end
targetPlayer = getPlayerByUsername(targetUsername)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







