Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guiL = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- for _,b in pairs(guiL:GetDescendants()) do
- if b.Name == "Gui" and b.ClassName == "ScreenGui" then b:Destroy() end
- end
- function guimaker()
- -- creates onscreen gui
- local Gui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Top = Instance.new("TextLabel")
- local ScrollingFrame = Instance.new("ScrollingFrame")
- local Frame_2 = Instance.new("Frame")
- local SUser = Instance.new("Folder")
- local TextButton = Instance.new("TextButton")
- local TextBox = Instance.new("TextBox")
- local SItem = Instance.new("Folder")
- local TextButton_2 = Instance.new("TextButton")
- local TextBox_2 = Instance.new("TextBox")
- Gui.Name = "Gui"
- Gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Gui.DisplayOrder = 999999999
- Frame.Parent = Gui
- Frame.Active = true
- Frame.BackgroundColor3 = Color3.fromRGB(122, 122, 122)
- Frame.BorderColor3 = Color3.fromRGB(100, 100, 100)
- Frame.BorderSizePixel = 2
- Frame.Position = UDim2.new(1, -200, 1, -100)
- Frame.Size = UDim2.new(0, 200, 0, 100)
- Top.Name = "Top"
- Top.Parent = Frame
- Top.BackgroundColor3 = Color3.fromRGB(167, 167, 167)
- Top.BackgroundTransparency = 0.200
- Top.BorderColor3 = Color3.fromRGB(100, 100, 100)
- Top.BorderSizePixel = 2
- Top.Size = UDim2.new(1, 1, 0, 22)
- Top.SizeConstraint = Enum.SizeConstraint.RelativeXX
- Top.ZIndex = 999999999
- Top.Font = Enum.Font.SciFi
- Top.Text = "PlayerViewer - LocatePlayer"
- Top.TextColor3 = Color3.fromRGB(0, 0, 0)
- Top.TextSize = 14.000
- ScrollingFrame.Parent = Frame
- ScrollingFrame.Active = true
- ScrollingFrame.BackgroundColor3 = Color3.fromRGB(122, 122, 122)
- ScrollingFrame.BorderColor3 = Color3.fromRGB(100, 100, 100)
- ScrollingFrame.BorderSizePixel = 2
- ScrollingFrame.Position = UDim2.new(0, 0, 0, 22)
- ScrollingFrame.Size = UDim2.new(1, 1, 0.779999971, 1)
- Frame_2.Parent = ScrollingFrame
- Frame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame_2.BackgroundTransparency = 1.000
- Frame_2.BorderSizePixel = 0
- Frame_2.Size = UDim2.new(0.930000007, 1, 1, 1)
- SUser.Name = "SUser"
- SUser.Parent = Frame_2
- TextButton.Parent = SUser
- TextButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.Position = UDim2.new(0, 0, 0, 35)
- TextButton.Size = UDim2.new(0.474999994, 1, 0, 22)
- TextButton.Font = Enum.Font.Ubuntu
- TextButton.Text = "Locate"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14.000
- TextButton.TextWrapped = true
- TextBox.Parent = SUser
- TextBox.BackgroundColor3 = Color3.fromRGB(67, 67, 67)
- TextBox.BackgroundTransparency = 0.200
- TextBox.BorderColor3 = Color3.fromRGB(100, 100, 100)
- TextBox.BorderSizePixel = 2
- TextBox.Position = UDim2.new(0, 0, 0, 5)
- TextBox.Size = UDim2.new(0.474999994, 1, 0, 22)
- TextBox.Font = Enum.Font.Ubuntu
- TextBox.PlaceholderText = "Insert Player Username Here..."
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextBox.TextScaled = true
- TextBox.TextSize = 14.000
- TextBox.TextWrapped = true
- SItem.Name = "SItem"
- SItem.Parent = Frame_2
- TextButton_2.Parent = SItem
- TextButton_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TextButton_2.Position = UDim2.new(1, 0, 0, 35)
- TextButton_2.Size = UDim2.new(-0.474999994, 1, 0, 22)
- TextButton_2.Font = Enum.Font.Ubuntu
- TextButton_2.Text = "Locate"
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextScaled = true
- TextButton_2.TextSize = 14.000
- TextButton_2.TextWrapped = true
- TextBox_2.Parent = SItem
- TextBox_2.BackgroundColor3 = Color3.fromRGB(67, 67, 67)
- TextBox_2.BackgroundTransparency = 0.200
- TextBox_2.BorderColor3 = Color3.fromRGB(100, 100, 100)
- TextBox_2.BorderSizePixel = 2
- TextBox_2.Position = UDim2.new(1, 0, 0, 5)
- TextBox_2.Size = UDim2.new(-0.474999994, 1, 0, 22)
- TextBox_2.Font = Enum.Font.Ubuntu
- TextBox_2.PlaceholderText = "Insert Player Item Here...(MAY LAG)"
- TextBox_2.Text = ""
- TextBox_2.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextBox_2.TextScaled = true
- TextBox_2.TextSize = 14.000
- TextBox_2.TextWrapped = true
- end
- guimaker()
- sgui = guiL:WaitForChild("Gui").Frame.ScrollingFrame.Frame
- suser = sgui.SUser
- sitm = sgui.SItem
- function FindPlayer(String)
- bool = false
- user = nil
- for _,p in pairs(game:GetService("Players"):GetChildren()) do
- if (string.sub(string.lower(p.Name),1,string.len(String))) == string.lower(String) and String ~= "" then
- bool = true
- user = p
- return user, bool
- end
- end
- return user, bool
- end
- function FindItem(String)
- bool = false
- item = nil
- for _,p in pairs(game:GetService("Players"):GetChildren()) do
- for _,i in pairs(p.Backpack:GetChildren()) do
- if (string.sub(string.lower(i.Name),1,string.len(String))) == string.lower(String) and String ~= "" then
- bool = true
- item = p
- return item, bool
- end
- end
- end
- if item == nil then
- for _,p in pairs(game.Players:GetChildren()) do
- if p.Character:FindFirstChildOfClass("Tool", true) then
- i = p.Character:FindFirstChildOfClass("Tool", true)
- if (string.sub(string.lower(i.Name),1,string.len(String))) == string.lower(String) and String ~= "" then
- bool = true
- item = p
- print(item)
- return item, bool
- end
- end
- end
- end
- return item, bool
- end
- function sPlayerc()
- FindPlayer(tostring(suser.TextBox.Text))
- if bool then
- PlayerToLocate = user
- suser.TextButton.Text = "Found!"
- task.wait(1)
- suser.TextButton.Text = "Locate Player"
- else
- PlayerToLocate = ""
- suser.TextButton.Text = "Not Found."
- task.wait(1)
- suser.TextButton.Text = "Locate Player"
- end
- return PlayerToLocate
- end
- function sItemc()
- FindItem(tostring(sitm.TextBox.Text))
- if bool then
- PlayerToLocate = item
- sitm.TextButton.Text = "Found!"
- task.wait(1)
- sitm.TextButton.Text = "Locate Item"
- else
- PlayerToLocate = ""
- sitm.TextButton.Text = "Not Found."
- task.wait(1)
- sitm.TextButton.Text = "Locate Item"
- end
- return PlayerToLocate
- end
- function createDis(attatchment, name, display, health, l, h, color) -- creates UI for username
- local bill = Instance.new("BillboardGui")
- local button1 = Instance.new("TextButton")
- bill.Parent = guiL
- bill.Adornee = attatchment
- bill.AlwaysOnTop = true
- bill.Size = UDim2.new(l, 0, h, 0)
- bill.StudsOffset = Vector3.new( -((l / 2) - 0.75), 3, 0)
- bill.Name = "HarkzGUI"
- bill.Active = true
- button1.Parent = bill
- button1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- button1.BackgroundTransparency = 0.2
- button1.BorderColor3 = color
- button1.BorderSizePixel = 3
- button1.BorderMode = Enum.BorderMode.Inset
- button1.Size = UDim2.new(l/2, 0, h/2, 0)
- button1.TextColor3 = color
- button1.TextScaled = true
- button1.TextSize = 14
- button1.TextWrapped = true
- button1.Font = Enum.Font.Ubuntu
- button1.Text = "@"..name..", "..display.." Health: "..health
- end
- function createArrow(attatchment, color)
- local bill = Instance.new("BillboardGui")
- local img = Instance.new("ImageLabel")
- bill.Parent = guiL
- bill.Parent = guiL
- bill.Adornee = attatchment
- bill.AlwaysOnTop = true
- bill.Size = UDim2.new(2, 0, 1, 0)
- bill.StudsOffset = Vector3.new(0, 2.12, 0)
- bill.Name = "harkarrow"
- bill.Active = true
- img.Parent = bill
- img.BackgroundTransparency = 1
- img.Image = "rbxassetid://12930275268"
- img.ImageColor3 = color
- img.Size = UDim2.new(1,0, 1,0)
- img.Active = true
- img.ImageTransparency = 0.2
- end
- function createItem(attatchment, item, color, x, y) -- creates UI for Tools
- local bill = Instance.new("BillboardGui")
- local button2 = Instance.new("TextButton")
- bill.Parent = guiL
- bill.Adornee = attatchment
- bill.AlwaysOnTop = true
- bill.Size = UDim2.new(2, 0, 2, 0)
- bill.StudsOffset = Vector3.new(x, y, 0)
- bill.Name = "HarkzGUI"
- bill.Active = true
- button2.Parent = bill
- button2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- button2.BackgroundTransparency = 0.200
- button2.BorderColor3 = color
- button2.BorderSizePixel = 3
- button2.BorderMode = Enum.BorderMode.Inset
- button2.Size = UDim2.new(1, 0, 1, 0)
- button2.TextColor3 = color
- button2.TextScaled = true
- button2.TextSize = 14
- button2.TextWrapped = true
- button2.Font = Enum.Font.Ubuntu
- button2.Text = tostring(item)
- end
- while wait() do -- loop
- if not guiL:FindFirstChild("Gui") then
- guimaker()
- sgui = guiL:WaitForChild("Gui").Frame
- end
- if guiL:FindFirstChild("Gui") then
- suser.TextButton.MouseButton1Click:Connect(sPlayerc)
- sitm.TextButton.MouseButton1Click:Connect(sItemc)
- end
- for _,b in pairs(guiL:GetDescendants()) do
- if b.Name == "HarkzGUI" or b.Name == "harkarrow" or b.Name == "Gui" and b.ClassName == "BillboardGui" then b:Destroy() end
- end
- for _,p in pairs(game.Players:GetChildren()) do
- if p.ClassName == "Player" then
- if workspace:WaitForChild(p.Name) then
- character = workspace:WaitForChild(p.Name)
- end
- if character:FindFirstChild("Humanoid") then
- if character:FindFirstChild("Head") then
- health = character.Humanoid.Health
- mhealth = character.Humanoid.MaxHealth
- percent = math.floor((health / mhealth) * 100)
- if percent >= 75 then -- this part was written by the ai and i loved it so much that i kept it
- color = Color3.fromRGB(0,255,0)
- elseif percent < 75 and percent > 25 then
- color = Color3.fromRGB(255,255,0)
- else
- color = Color3.fromRGB(255,0,0)
- end
- head = character.Head
- createDis(head, p.Name, p.DisplayName, character.Humanoid.Health, 3, 1.5, (color))
- if p.Name == tostring(PlayerToLocate) then
- if character:FindFirstChild("Head") then
- createArrow(head, color)
- end
- end
- end
- q = false
- offset = 1.25
- for n in pairs(p.Backpack:GetChildren()) do offset -= 1.25 q = true end
- for _,i in pairs(p.Backpack:GetChildren()) do
- if character:FindFirstChild("Head") then
- if i.ClassName == "Tool" then
- createItem(head, i.Name, Color3.fromRGB(100,100,100), offset, 5)
- else
- createItem(head, i.Name.." [, isA '"..i.ClassName.."']", Color3.new(0.8, 0.25,0.25), offset, 5)
- end
- end
- offset += 2.5
- end
- offset = 1.25
- for _,n in pairs(character:GetDescendants()) do if n.ClassName == "Tool" then offset -= 1.25 end end
- for _,i in pairs(character:GetDescendants()) do
- if character:FindFirstChild("Head", true) then
- if i.ClassName == "Tool" then
- if q then
- createItem(head, i.Name, Color3.fromRGB(10,255,5), offset, 7.5)
- offset += 2.5
- else
- createItem(head, i.Name, Color3.fromRGB(10,255,5), offset, 5)
- offset += 2.5
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement