Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- part = function()
- local a = Instance.new("Part", owner.Character)
- a.CanCollide = false
- a.Size = Vector3.new(6.5, 6.5, 6.5)
- a.Color = Color3.fromRGB(184, 65, 65)
- a.Transparency = 0.7
- a.Material = "Neon"
- local b = Instance.new("BodyVelocity", a)
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = Vector3.new()
- a:SetNetworkOwner(owner)
- return a
- end
- part2 = function()
- local a = Instance.new("Part", owner.Character)
- a.CanCollide = false
- a.Size = Vector3.new(6.7, 6.7, 6.7)
- a.Color = Color3.fromRGB(120, 6, 6)
- a.Transparency = 0.85
- a.Material = Enum.Material.ForceField
- local b = Instance.new("BodyVelocity", a)
- b.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- b.Velocity = Vector3.new()
- a:SetNetworkOwner(owner)
- return a
- end
- 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 = part2()
- d = part2()
- replicating = false
- wait()
- weld1 = Instance.new("Weld", a)
- weld1.Part0 = a
- weld1.Part1 = c
- weld2 = Instance.new("Weld", b)
- weld2.Part0 = b
- weld2.Part1 = d
- end
- script.ChildRemoved:connect(function(a)
- if a.ClassName == "Part" and replicating == false then
- replicate()
- end
- end
- )
- replicate()
- CreateRegion3FromLocAndSize = function(Position, Size)
- local SizeOffset = Size / 2
- local Point1 = Position - SizeOffset
- local Point2 = Position + SizeOffset
- return Region3.new(Point1, Point2)
- end
- local vel
- game:GetService("RunService").Heartbeat:connect(function()
- pcall(function()
- root.CFrame = owner.Character.HumanoidRootPart.CFrame
- a.CFrame = owner.Character.HumanoidRootPart.CFrame
- b.CFrame = owner.Character.HumanoidRootPart.CFrame
- c.CFrame = owner.Character.HumanoidRootPart.CFrame
- d.CFrame = owner.Character.HumanoidRootPart.CFrame
- local void = owner.Character:GetDescendants()
- local reg = CreateRegion3FromLocAndSize(owner.Character.HumanoidRootPart.CFrame.p, Vector3.new(6.5, 6.5, 6.5))
- for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, math.huge * -math.huge)) do
- if v.Name ~= "Base" then
- v:Destroy()
- end
- end
- end)
- end)
Add Comment
Please, Sign In to add comment