Advertisement
bobopopcornboy

player killer local

Sep 2nd, 2024 (edited)
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.39 KB | None | 0 0
  1. folder = workspace.MrBigHatsProperty
  2. event = folder.KILL
  3. players = game.Players:GetChildren()
  4. selected = 1
  5.  
  6. gui = Instance.new("ScreenGui")
  7. gui.Parent = game.Players.LocalPlayer.PlayerGui
  8. --window
  9. window = Instance.new("Frame")
  10. window.Parent = gui
  11. window.Size = UDim2.new(0, 121, 0, 321)
  12. window.Position = UDim2.new(0.798, 0, 0, 0)
  13. --cool stuff
  14.  
  15. des = Instance.new("TextButton")
  16. des.Parent = window
  17. des.BackgroundTransparency = 0
  18. des.Text = "KILL"
  19. des.TextColor = BrickColor.Red()
  20. des.Position = UDim2.new(-.24,0,0.1,1)
  21. des.Size = UDim2.new(0,20,0,20)
  22. des.Name = "KILL"
  23.  
  24. skin = Instance.new("TextButton")
  25. skin.Parent = window
  26. skin.BackgroundTransparency = 0
  27. skin.Text = "skin"
  28. skin.TextColor = BrickColor.Red()
  29. skin.Position = UDim2.new(-.24,0,0.1,21)
  30. skin.Size = UDim2.new(0,20,0,20)
  31. skin.Name = "KILL"
  32.  
  33. --different
  34. sf = Instance.new("ScrollingFrame")
  35. sf.Parent = window
  36. sf.Size = UDim2.new(1,0,1,0)
  37. pl = Instance.new("Folder")
  38. pl.Parent = sf
  39. uilist = Instance.new("UIListLayout")
  40. uilist.Parent = pl
  41. tbs = {}
  42.  
  43. function fill()
  44.     if not highlight then
  45.       highlight = Instance.new("Highlight")
  46.       highlight.Name = "selected"
  47.       highlight.Parent = frame
  48.       highlight.FillTransparency = 1
  49.       highlight.OutlineColor = Color3.new(0.0980392, 0.788235, 1)
  50.     end
  51.     players = game.Players:GetChildren()
  52.     pl:ClearAllChildren()
  53.     uilist = Instance.new("UIListLayout")
  54.     uilist.Parent = pl
  55.     for i=1, #players do
  56.         local tb = Instance.new("TextButton")
  57.         tb.Parent = pl
  58.         tb.Text = players[i].Name
  59.         tb.Size = UDim2.new(0,99,0,19)
  60.         if i == selected then tb.BackgroundColor3 = Color3.new(0.0980392, 0.788235, 1) end
  61.         local ii = i * 0.02
  62.         tb.Position = UDim2.new(-0.008,0,ii)
  63.         tbs[i] = tb
  64.         ov = Instance.new("ObjectValue")
  65.         ov.Parent = tb
  66.         ov.Value = players[i]
  67.         ov.Name = "ov"
  68.     end
  69. end
  70. fill()
  71.  
  72. des.MouseButton1Down:Connect(function()
  73. local tmp = tbs[selected].ov.Value
  74. event:FireServer("kill",tmp.Name)
  75. end)
  76.  
  77. skin.MouseButton1Down:Connect(function()
  78. local tmp = tbs[selected].ov.Value
  79. event:FireServer("skin",tmp.Name)
  80. end)
  81.  
  82. while wait(0.5) do
  83.     fill()
  84.     for i=1,#tbs do
  85.         tbs[i].Activated:Connect(function()
  86.           selected = i
  87.           local tmp = tbs[selected].ov.Value
  88.           highlight.Parent = tmp.Character
  89.         end)
  90.     end
  91. end
Tags: Roblox local
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement