Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = owner
- local Character = Player.Character
- local Tool = Instance.new("Tool")
- local Tween = game:GetService("TweenService")
- local Ambient = nil
- local Fog = nil
- local Rocks = {}
- Tool.CanBeDropped = false
- Tool.RequiresHandle = false
- Tool.Name = "World Rift"
- Tool.Parent = Player.Backpack
- local Create_Fog = function()
- Fog = Instance.new("Part")
- local Mesh = Instance.new("SpecialMesh")
- Fog.Name = "Fog_Block"
- Fog.CanCollide = false
- Fog.Anchored = true
- Fog.CanTouch = false
- Fog.CastShadow = false
- Fog.Size = Vector3.new(1,1,1)
- Fog.Color = Color3.new(1,0,0)
- Fog.Material = Enum.Material.Neon
- Fog.Parent = workspace.Terrain
- Mesh.MeshId = "http://www.roblox.com/asset/?id=1527559"
- Mesh.TextureId = ""
- Mesh.Scale = Vector3.new(-4000,-4000,-4000)
- Mesh.Parent = Fog
- end
- local Create_Rock = function()
- spawn(function()
- local Rock = Instance.new("Part")
- local Origin = CFrame.new(0,0,0)
- local Radius = 500
- local RPS = math.pi * 0.3
- local Current_Angle = math.rad(math.random(-180,180))
- local Rand_Offset = math.random(-80,80)
- local Y_Offset = math.sin(math.rad(Rand_Offset))
- local Y_Scale = math.cos(math.rad(Rand_Offset))
- local Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- local Rot_Speed = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- local Frame_Event = nil
- Rock.Name = "Rock"
- Rock.CanCollide = false
- Rock.Anchored = true
- Rock.CanTouch = false
- Rock.CastShadow = false
- Rock.Size = Vector3.new(math.random(20,200),math.random(20,200),math.random(20,200))
- Rock.Material = Enum.Material.Slate
- Rock.Color = Color3.new(0,0,0)
- Rock.Parent = workspace.Terrain
- table.insert(Rocks,1,Rock)
- Frame_Event = game:GetService("RunService").Heartbeat:Connect(function(Delta_Time)
- local New_Radius = Radius * Y_Scale
- Current_Angle = (Current_Angle + (RPS * Delta_Time)) % (2 * math.pi)
- Orientation += Rot_Speed * Delta_Time
- Rock.CFrame = Origin * CFrame.new(math.cos(Current_Angle) * New_Radius, Radius * Y_Offset, math.sin(Current_Angle) * New_Radius)
- Rock.Orientation = Orientation
- end)
- Rock.AncestryChanged:Wait()
- Frame_Event:Disconnect()
- end)
- end
- local Damage_Enemies = function(Point,Radius,Damage)
- for i,Humanoid in pairs(workspace:GetDescendants()) do
- if Humanoid:IsA("Humanoid") and Humanoid.Parent ~= Character and Humanoid.RootPart and (Humanoid.RootPart.Position - Point).Magnitude < Radius then
- Humanoid:TakeDamage(Damage)
- end
- end
- end
- local Create_Dust = function(Rock)
- spawn(function()
- local Emitter = Instance.new("ParticleEmitter")
- Emitter.Texture = "http://www.roblox.com/asset/?id=1946917526"
- Emitter.Lifetime = NumberRange.new(1,2)
- Emitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,20),NumberSequenceKeypoint.new(1,40)})
- Emitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)})
- Emitter.Drag = 10
- Emitter.Rate = 600
- Emitter.Speed = NumberRange.new(100,100)
- Emitter.SpreadAngle = Vector2.new(-180,180)
- Emitter.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(0.1,0.1,0.1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,0))})
- Emitter.Parent = Rock
- wait(0.05)
- Emitter.Enabled = false
- end)
- end
- local Play_Ambient = function()
- Ambient = Instance.new("Sound")
- Ambient.SoundId = "rbxassetid://1838820057"
- Ambient.Volume = 0.5
- Ambient.PlaybackSpeed = 1.5
- Ambient.Looped = true
- Ambient.Name = "Rift_Ambient"
- Ambient.Parent = workspace
- Ambient:Play()
- end
- local Play_Beam = function()
- local Sound = Instance.new("Sound")
- Sound.SoundId = "rbxassetid://2780197456"
- Sound.Volume = 2
- Sound.PlaybackSpeed = 1+(math.random(-5,5)/100)
- Sound.Parent = workspace
- Sound:Play()
- game.Debris:AddItem(Sound,3)
- end
- local Play_Crash = function()
- local Sound = Instance.new("Sound")
- Sound.SoundId = "rbxassetid://6324841214"
- Sound.Volume = 1
- Sound.PlaybackSpeed = 0.5+(math.random(-5,5)/100)
- Sound.Parent = workspace
- Sound:Play()
- game.Debris:AddItem(Sound,4)
- end
- local Attack_1 = function()
- local Floor,Point = workspace:FindPartOnRay(Ray.new(Character.PrimaryPart.Position + (Character.PrimaryPart.CFrame.LookVector * 10), Vector3.new(0,-10,0)))
- if Floor then
- local Index = math.random(1,#Rocks)
- local Rock = Rocks[Index]
- table.remove(Rocks,Index)
- if Rock.Position.Y < 0 then
- Rock.Position *= -1
- end
- Rock.Size *= 0.2
- Tween:Create(Rock,TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Position = Point}):Play()
- Rock.Parent = workspace
- Create_Rock()
- wait(1)
- Damage_Enemies(Point,30,10)
- Play_Crash()
- Create_Dust(Rock)
- wait(0.3)
- Rock.Transparency = 1
- wait(2)
- Rock:Destroy()
- end
- end
- local Attack_2 = function()
- local Floor,Point = workspace:FindPartOnRay(Ray.new(Character.PrimaryPart.Position + (Character.PrimaryPart.CFrame.LookVector * 10), Vector3.new(0,-10,0)))
- if Floor then
- local Index = math.random(1,#Rocks)
- local Beam = Rocks[Index]
- table.remove(Rocks,Index)
- if Beam.Position.Y < 0 then
- Beam.Position *= -1
- end
- Beam.Size = Vector3.new(5,5,(Point - Beam.Position).Magnitude)
- Beam.CFrame = CFrame.new((Point + Beam.Position) / 2,Point)
- Beam.Material = Enum.Material.Neon
- Beam.Color = Color3.new(1,0,0)
- Beam.Parent = workspace
- Play_Beam()
- Damage_Enemies(Point,20,30)
- for i = 1,3 do
- local Wave = Beam:Clone()
- Wave.Size = Vector3.new(3,3,3)
- Wave.Position = Point
- Wave.Shape = Enum.PartType.Ball
- Wave.Parent = workspace
- Tween:Create(Wave,TweenInfo.new(0.15,Enum.EasingStyle.Quad),{Size = Vector3.new(50,50,50),Transparency = 1}):Play()
- game.Debris:AddItem(Wave,0.15)
- wait(0.1)
- end
- Beam:Destroy()
- Create_Rock()
- end
- end
- Create_Fog()
- for i = 1,50 do
- Create_Rock()
- end
- Play_Ambient()
- Character.Humanoid.WalkSpeed = 50
- Tool.Equipped:Connect(function()
- end)
- Tool.Unequipped:Connect(function()
- end)
- Tool.Activated:Connect(function()
- if Character.Humanoid.MoveDirection.Magnitude > 0.5 then
- Attack_1()
- else
- Attack_2()
- end
- end)
- Tool.Deactivated:Connect(function()
- end)
- Character.Humanoid.Died:Connect(function()
- for i,Rock in pairs(Rocks) do
- Rock:Destroy()
- end
- Fog:Destroy()
- Ambient:Stop()
- Ambient:Destroy()
- Rocks = {}
- Fog = nil
- Ambient = nil
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement