of     1   

AbsoluteZeroDEV
#228411289Monday, December 04, 2017 1:53 AM GMT

Hello, so I'm new to scripting; and I'm wanting to make a script that creates a brick when someone walks onto it (Only the names listed in the local developer variable) It works; but I'm wondering if there's any way I could simplify the code? local developer = { ["AbsoluteZeroDEV"] = true; ["AnyoneYouWant"] = true; } game.Players.PlayerAdded:connect(function(player) game.Workspace.CreateBricks.Touched:connect(function(hit) local yor = player.PlayerGui.TestGui.TestFrame.Authentication if not developer[player.Name] then yor.Text = (player.Name .. ", we're storry, but you're not a developer") return end for i = 1, 1 do PartCreated = Instance.new("Part", workspace.Bricks) PartCreated.Name = "Bruh" PartCreated.Transparency = math.random() PartCreated.BrickColor = BrickColor.random() Pa#############ition = Vector3.new(8.495, 0.57, -24.88) print(player.Name .. "Stepped on this brick") end end) end) game.Players.PlayerAdded:connect(function(player) game.Workspace.CreateBricks.TouchEnded:connect(function(nonhit) local CleanUpParts = game.Workspace.Bricks:GetChildren() for i = 1, #CleanUpParts do CleanUpParts[i]:isA("Part") CleanUpParts[i]:destroy() print("Destroyed") end end) end)

    of     1