Forum > Scripts >

What's wrong with this script?

Posts: 2

Threads: 1

Joined: Jul, 2018

Reputation: 0

Posted

local plr = game.Players.LocalPlayer

local connections = {}

local maingui = Instance.new("ScreenGui")
local btn = Instance.new("TextButton", maingui)

maingui.Size = UDim2.new(0, 200, 0, 200)
btn.Size = maingui.Size
btn.Text = "ESP: Off"
maingui.Position = UDim2.new(0.95, 0, 0.95, 0)
btn.Position = maingui.Position
maingui.Parent = plr.PlayerGui

function tag(plr)
local char = plr:FindFirstChild("Character")
local hrp = char:FindFirstChild("HumanoidRootPart")
if hrp then
local gui = Instance.new("BillboardGui", hrp)
gui.Name = "esp"
gui.Adornee = hrp
gui.LightInfluence = 0
gui.MaxDistance = math.huge
gui.Size = UDim2.new(2, 0, 2, 0)
local label = Instance.new("TextLabel", gui)
label.Text = plr.Name
label.Size = UDim2.new(1, 0, 1, 0)
connections[plr.Name] = char.Humanoid.Died:connect(function()
plr.CharacterAdded:connect(function() tag(plr) end)
end)
end
end

function untag(plr)
local char = plr:FindFirstChild("Character")
local hrp = char:FindFirstChild("HumanoidRootPart")
if hrp then
local gui = hrp:FindFirstChild("esp")
if gui then
gui:Destroy()
connections[plr.Name]:Disconnect()
end
end
end

btn.MouseButton1Click:connect(function()
if btn.Text == "ESP: Off" then
btn.Text = "ESP: On"
for i, p in pairs(game.Players:GetChildren()) do
local char = p:FindFirstChild("Character")
if char then
if char:FindFirstChild("HumanoidRootPart") the
tag(p)
end
end
end
elseif btn.Text == "ESP: On" then
btn.Text = "ESP: Off"
for i, p in pairs(game.Players:GetChildren()) do
local char = p:FindFirstChild("Character")
if char then
if char:FindFirstChild("HumanoidRootPart") the
untag(p)
end
end
end
end
end

The button won't show up, why?
  • 0

Posts: 3824

Threads: 191

Joined: Mar, 2018

Reputation: 67

Replied

What game
And most script executors here can't run that
So what did u use to run it

#MEWANTGLOBALCHAT
  • 0

Reputation Goal: 69
#NoMoreMods

 

#MEWANTGLOBALCHAT 

MarkBackwards

i am human

Posts: 41

Threads: 6

Joined: Jun, 2018

Reputation: 0

Replied

He probably used JJSploit lol. (I'm just kidding)
  • 0

Posts: 2

Threads: 1

Joined: Jul, 2018

Reputation: 0

Replied

It's for Attrition and I used sk8r. Attrition Hub, which has WAY more GUI elements, on the other hand, works.
  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )