Advertisement
hjkook

model delete

Aug 18th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local TextBox = Instance.new("TextBox")
  4. local TextButton = Instance.new("TextButton")
  5. local w = workspace:GetChildren()
  6. local name = TextBox.Text
  7.  
  8. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  9. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  10.  
  11. Frame.Parent = ScreenGui
  12. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  13. Frame.Position = UDim2.new(0.0273809507, 0, 0.820987701, 0)
  14. Frame.Size = UDim2.new(0, 214, 0, 100)
  15.  
  16. TextBox.Parent = Frame
  17. TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  18. TextBox.Position = UDim2.new(0.0327102803, 0, 0.129999995, 0)
  19. TextBox.Size = UDim2.new(0, 200, 0, 27)
  20. TextBox.Font = Enum.Font.SourceSans
  21. TextBox.Text = ""
  22. TextBox.TextColor3 = Color3.new(0, 0, 0)
  23. TextBox.TextSize = 14
  24.  
  25. TextButton.Parent = Frame
  26. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  27. TextButton.Position = UDim2.new(0.0327102803, 0, 0.5, 0)
  28. TextButton.Size = UDim2.new(0, 200, 0, 50)
  29. TextButton.Font = Enum.Font.SourceSans
  30. TextButton.TextColor3 = Color3.new(0, 0, 0)
  31. TextButton.TextSize = 14
  32. TextButton.MouseButton1Click:connect(function()
  33. for i = 1, #w do
  34. if w[i].Name == name or w[i].Name == name or w[i].Name == name then
  35. w[i]:Destroy()
  36. end
  37. end
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement