SebTDZ

Untitled

Apr 2nd, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --This Removed Part with a Gui to Control This
  2.  
  3. -- Objects
  4.  
  5. local PlrName = "SebTDZ500"
  6.  
  7. local plr = game.Players:FindFirstChild(PlrName)
  8. local RemoveRandomThingsGui = Instance.new("ScreenGui")
  9. local Frame = Instance.new("Frame")
  10. local RemoveButton = Instance.new("TextButton")
  11. local UnRemoveButton = Instance.new("TextButton")
  12. local StoredParts = Instance.new("Folder")
  13.  
  14. -- Properties
  15.  
  16. RemoveRandomThingsGui.Name = "RemoveRandomThingsGui"
  17. RemoveRandomThingsGui.Parent = plr.PlayerGui
  18. RemoveRandomThingsGui.ResetOnSpawn = false
  19.  
  20. Frame.Parent = RemoveRandomThingsGui
  21. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  22. Frame.Position = UDim2.new(0, 300, 0, 200)
  23. Frame.Size = UDim2.new(0, 300, 0, 150)
  24. Frame.Active = true
  25. Frame.Draggable = true
  26.  
  27. StoredParts.Parent = game.Lighting
  28. StoredParts.Name = "StoredParts"
  29.  
  30. RemoveButton.Parent = Frame
  31. RemoveButton.BackgroundColor3 = Color3.new(1, 1, 1)
  32. RemoveButton.Position = UDim2.new(0, 40, 0, 20)
  33. RemoveButton.Size = UDim2.new(0, 225, 0, 50)
  34. RemoveButton.Font = Enum.Font.SourceSans
  35. RemoveButton.FontSize = Enum.FontSize.Size32
  36. RemoveButton.Text = "Remove Random Things"
  37. RemoveButton.TextSize = 25
  38.  
  39. UnRemoveButton.Parent = Frame
  40. UnRemoveButton.BackgroundColor3 = Color3.new(1, 1, 1)
  41. UnRemoveButton.Position = UDim2.new(0, 40, 0, 80)
  42. UnRemoveButton.Size = UDim2.new(0, 225, 0, 50)
  43. UnRemoveButton.Font = Enum.Font.SourceSans
  44. UnRemoveButton.FontSize = Enum.FontSize.Size32
  45. UnRemoveButton.Text = "UnRemove Random Things"
  46. UnRemoveButton.TextSize = 22.5
  47.  
  48. RemoveButton.MouseButton1Down:connect(function()
  49.   if Workspace:FindFirstChildOfClass("Model") then
  50.     local Model = Workspace:FindFirstChildOfClass("Model")
  51.     Model.Parent = StoredParts
  52.   elseif Workspace:FindFirstChildOfClass("Folder") then
  53.     local Folder = Workspace:FindFirstChildOfClass("Folder")
  54.     Folder.Parent = StoredParts
  55.   elseif Workspace:FindFirstChildOfClass("Part") then
  56.     local Part = Workspace:FindFirstChildOfClass("Part")
  57.     Part.Parent = StoredParts
  58.   elseif Workspace:FindFirstChildOfClass("UnionOperation") then
  59.     local Union = Workspace:FindFirstChildOfClass("UnionOperation")
  60.     Union.Parent = StoredParts
  61.   elseif Workspace:FindFirstChildOfClass("SpawnLocation") then
  62.     local SpawnLocation = Workspace:FindFirstChildOfClass("SpawnLocation")
  63.     SpawnLocation.Parent = StoredParts
  64.   end
  65. end)
  66.  
  67. UnRemoveButton.MouseButton1Down:connect(function()
  68.   if StoredParts:FindFirstChildOfClass("Model") then
  69.     local Model = StoredParts:FindFirstChildOfClass("Model")
  70.     Model.Parent = Workspace
  71.   elseif StoredParts:FindFirstChildOfClass("Folder") then
  72.     local Folder = StoredParts:FindFirstChildOfClass("Folder")
  73.     Folder.Parent = Workspace
  74.   elseif StoredParts:FindFirstChildOfClass("Part") then
  75.     local Part = StoredParts:FindFirstChildOfClass("Part")
  76.     Part.Parent = Workspace
  77.   elseif StoredParts:FindFirstChildOfClass("UnionOperation") then
  78.     local Union = StoredParts:FindFirstChildOfClass("UnionOperation")
  79.     Union.Parent = Workspace
  80.   elseif StoredParts:FindFirstChildOfClass("SpawnLocation") then
  81.     local SpawnLocation = StoredParts:FindFirstChildOfClass("SpawnLocation")
  82.     SpawnLocation.Parent = Workspace
  83.   end
  84. end)
Advertisement
Add Comment
Please, Sign In to add comment