Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- part = function()
- local a = Instance.new("Part", script)
- a.CanCollide = true
- a.Size = Vector3.new(10, 10, 1)
- a.Color = Color3.fromRGB(184, 65, 65)
- a.Transparency = 0.7
- a.Material = "Neon"
- a.Anchored = true
- a.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,-3.5)
- return a
- end
- local active = false
- local replicating = false
- local root, a, b, c, d = nil, nil, nil, nil, nil
- replicate = function()
- replicating = true
- script:ClearAllChildren()
- root = part()
- root.Transparency = 1
- root.Size = Vector3.new(0.2, 0.2, 0.2)
- root.CanCollide = false
- a = part()
- b = part()
- c = part()
- d = part()
- replicating = false
- end
- count = 0
- function wall()
- count = count + 1
- if count == 1 then
- active = true
- replicate()
- elseif count == 2 then
- active = false
- wait()
- a:Destroy()
- b:Destroy()
- c:Destroy()
- d:Destroy()
- root:Destroy()
- count = 0
- end
- end
- script.ChildRemoved:connect(function(a)
- if a:IsA("BasePart") and replicating == false and active == true then
- replicate()
- end
- end
- )
- local E = Instance.new("RemoteEvent",NLS([[local E = script:FindFirstChildWhichIsA("RemoteEvent")
- local Mouse = owner:GetMouse()
- function ButtonDown(key)
- key = key:lower()
- if key == "q" then
- E:FireServer("Down")
- end
- end
- Mouse.KeyDown:Connect(ButtonDown)
- ]],owner.PlayerGui))
- E.OnServerEvent:Connect(wall)
- pcall(function()
- while true do
- task.wait()
- while active do
- task.wait()
- a.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-7)
- b.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-7)
- c.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-7)
- d.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-7)
- root.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,2.5,-7)
- end
- end
- end)
Add Comment
Please, Sign In to add comment