
13.5k Views
25 Executions
LocalPlayer Trap
Universal Script 📌
007n7zPublished 10
3 years 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
<Trap>
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local hitCircles = {}
local function createHitCircle(player)
local character = player.Character
if not character then return end
local hitCircle = Instance.new("Part")
hitCircle.Shape = Enum.PartType.Ball
hitCircle.BrickColor = BrickColor.new(Color3.fromRGB(0, 102, 0))
hitCircle.Transparency = 0.5
hitCircle.Size = Vector3.new(10, 10, 10)
hitCircle.Anchored = false
hitCircle.CanCollide = true
hitCircle.Parent = workspace
table.insert(hitCircles, {player = player, circle = hitCircle})
end
local function destroyHitCircle(player)
for i, hitData in ipairs(hitCircles) do
if hitData.player == player then
hitData.circle:Destroy()
table.remove(hitCircles, i)
break
end
end
end
local function showHitCircles()
for _, hitData in ipairs(hitCircles) do
local otherPlayer = hitData.player
local otherCharacter = otherPlayer.Character
if otherCharacter then
local otherRootPart = otherCharacter:FindFirstChild("HumanoidRootPart")
if otherRootPart then
local distance = (otherRootPart.Position - character.HumanoidRootPart.Position).Magnitude
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







