Dalebig

World_Rift v2

Apr 10th, 2021
732
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Player = owner
  2. local Character = Player.Character
  3. local Tool = Instance.new("Tool")
  4. local Tween = game:GetService("TweenService")
  5. local Ambient = nil
  6. local Fog = nil
  7. local Rocks = {}
  8.  
  9. Tool.CanBeDropped = false
  10. Tool.RequiresHandle = false
  11. Tool.Name = "World Rift"
  12. Tool.Parent = Player.Backpack
  13.  
  14. local Create_Fog = function()
  15.     Fog = Instance.new("Part")
  16.     local Mesh = Instance.new("SpecialMesh")
  17.  
  18.     Fog.Name = "Fog_Block"
  19.     Fog.CanCollide = false
  20.     Fog.Anchored = true
  21.     Fog.CanTouch = false
  22.     Fog.CastShadow = false
  23.     Fog.Size = Vector3.new(1,1,1)
  24.     Fog.Color = Color3.new(1,0,0)
  25.     Fog.Material = Enum.Material.Neon
  26.     Fog.Parent = workspace.Terrain
  27.  
  28.     Mesh.MeshId = "http://www.roblox.com/asset/?id=1527559"
  29.     Mesh.TextureId = ""
  30.     Mesh.Scale = Vector3.new(-4000,-4000,-4000)
  31.     Mesh.Parent = Fog
  32. end
  33.  
  34. local Create_Rock = function()
  35.     spawn(function()
  36.         local Rock = Instance.new("Part")
  37.         local Origin = CFrame.new(0,0,0)
  38.         local Radius = 500
  39.         local RPS = math.pi * 0.3
  40.         local Current_Angle = math.rad(math.random(-180,180))
  41.         local Rand_Offset = math.random(-80,80)
  42.         local Y_Offset = math.sin(math.rad(Rand_Offset))
  43.         local Y_Scale = math.cos(math.rad(Rand_Offset))
  44.         local Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
  45.         local Rot_Speed = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  46.         local Frame_Event = nil
  47.  
  48.         Rock.Name = "Rock"
  49.         Rock.CanCollide = false
  50.         Rock.Anchored = true
  51.         Rock.CanTouch = false
  52.         Rock.CastShadow = false
  53.         Rock.Size = Vector3.new(math.random(20,200),math.random(20,200),math.random(20,200))
  54.         Rock.Material = Enum.Material.Slate
  55.         Rock.Color = Color3.new(0,0,0)
  56.         Rock.Parent = workspace.Terrain
  57.         table.insert(Rocks,1,Rock)
  58.  
  59.         Frame_Event = game:GetService("RunService").Heartbeat:Connect(function(Delta_Time)
  60.             local New_Radius = Radius * Y_Scale
  61.             Current_Angle = (Current_Angle + (RPS * Delta_Time)) % (2 * math.pi)
  62.             Orientation += Rot_Speed * Delta_Time
  63.             Rock.CFrame = Origin * CFrame.new(math.cos(Current_Angle) * New_Radius, Radius * Y_Offset, math.sin(Current_Angle) * New_Radius)
  64.             Rock.Orientation = Orientation
  65.         end)
  66.  
  67.         Rock.AncestryChanged:Wait()
  68.         Frame_Event:Disconnect()
  69.     end)
  70. end
  71.  
  72. local Damage_Enemies = function(Point,Radius,Damage)
  73.     for i,Humanoid in pairs(workspace:GetDescendants()) do
  74.         if Humanoid:IsA("Humanoid") and Humanoid.Parent ~= Character and Humanoid.RootPart and (Humanoid.RootPart.Position - Point).Magnitude < Radius then
  75.             Humanoid:TakeDamage(Damage)
  76.         end
  77.     end
  78. end
  79.  
  80. local Create_Dust = function(Rock)
  81.     spawn(function()
  82.         local Emitter = Instance.new("ParticleEmitter")
  83.  
  84.         Emitter.Texture = "http://www.roblox.com/asset/?id=1946917526"
  85.         Emitter.Lifetime = NumberRange.new(1,2)
  86.         Emitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,20),NumberSequenceKeypoint.new(1,40)})
  87.         Emitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)})
  88.         Emitter.Drag = 10
  89.         Emitter.Rate = 600
  90.         Emitter.Speed = NumberRange.new(100,100)
  91.         Emitter.SpreadAngle = Vector2.new(-180,180)
  92.         Emitter.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(0.1,0.1,0.1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,0))})
  93.         Emitter.Parent = Rock
  94.         wait(0.05)
  95.         Emitter.Enabled = false
  96.     end)
  97. end
  98.  
  99. local Play_Ambient = function()
  100.     Ambient = Instance.new("Sound")
  101.     Ambient.SoundId = "rbxassetid://1838820057"
  102.     Ambient.Volume = 0.5
  103.     Ambient.PlaybackSpeed = 1.5
  104.     Ambient.Looped = true
  105.     Ambient.Name = "Rift_Ambient"
  106.     Ambient.Parent = workspace
  107.     Ambient:Play()
  108. end
  109.  
  110. local Play_Beam = function()
  111.     local Sound = Instance.new("Sound")
  112.     Sound.SoundId = "rbxassetid://2780197456"
  113.     Sound.Volume = 2
  114.     Sound.PlaybackSpeed = 1+(math.random(-5,5)/100)
  115.     Sound.Parent = workspace
  116.     Sound:Play()
  117.     game.Debris:AddItem(Sound,3)
  118. end
  119.  
  120. local Play_Crash = function()
  121.     local Sound = Instance.new("Sound")
  122.     Sound.SoundId = "rbxassetid://6324841214"
  123.     Sound.Volume = 1
  124.     Sound.PlaybackSpeed = 0.5+(math.random(-5,5)/100)
  125.     Sound.Parent = workspace
  126.     Sound:Play()
  127.     game.Debris:AddItem(Sound,4)
  128. end
  129.  
  130. local Attack_1 = function()
  131.     local Floor,Point = workspace:FindPartOnRay(Ray.new(Character.PrimaryPart.Position + (Character.PrimaryPart.CFrame.LookVector * 10), Vector3.new(0,-10,0)))
  132.  
  133.     if Floor then
  134.         local Index = math.random(1,#Rocks)
  135.         local Rock = Rocks[Index]
  136.  
  137.         table.remove(Rocks,Index)
  138.         if Rock.Position.Y < 0 then
  139.             Rock.Position *= -1
  140.         end
  141.         Rock.Size *= 0.2
  142.         Tween:Create(Rock,TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Position = Point}):Play()
  143.         Rock.Parent = workspace
  144.         Create_Rock()
  145.  
  146.         wait(1)
  147.  
  148.         Damage_Enemies(Point,30,10)
  149.         Play_Crash()
  150.         Create_Dust(Rock)
  151.  
  152.         wait(0.3)
  153.  
  154.         Rock.Transparency = 1
  155.  
  156.         wait(2)
  157.  
  158.         Rock:Destroy()
  159.     end
  160. end
  161.  
  162. local Attack_2 = function()
  163.     local Floor,Point = workspace:FindPartOnRay(Ray.new(Character.PrimaryPart.Position + (Character.PrimaryPart.CFrame.LookVector * 10), Vector3.new(0,-10,0)))
  164.  
  165.     if Floor then
  166.         local Index = math.random(1,#Rocks)
  167.         local Beam = Rocks[Index]
  168.  
  169.         table.remove(Rocks,Index)
  170.         if Beam.Position.Y < 0 then
  171.             Beam.Position *= -1
  172.         end
  173.         Beam.Size = Vector3.new(5,5,(Point - Beam.Position).Magnitude)
  174.         Beam.CFrame = CFrame.new((Point + Beam.Position) / 2,Point)
  175.         Beam.Material = Enum.Material.Neon
  176.         Beam.Color = Color3.new(1,0,0)
  177.         Beam.Parent = workspace
  178.  
  179.         Play_Beam()
  180.         Damage_Enemies(Point,20,30)
  181.  
  182.         for i = 1,3 do
  183.             local Wave = Beam:Clone()
  184.             Wave.Size = Vector3.new(3,3,3)
  185.             Wave.Position = Point
  186.             Wave.Shape = Enum.PartType.Ball
  187.             Wave.Parent = workspace
  188.             Tween:Create(Wave,TweenInfo.new(0.15,Enum.EasingStyle.Quad),{Size = Vector3.new(50,50,50),Transparency = 1}):Play()
  189.             game.Debris:AddItem(Wave,0.15)
  190.             wait(0.1)
  191.         end
  192.  
  193.         Beam:Destroy()
  194.         Create_Rock()
  195.     end
  196. end
  197.  
  198. Create_Fog()
  199. for i = 1,50 do
  200.     Create_Rock()
  201. end
  202. Play_Ambient()
  203. Character.Humanoid.WalkSpeed = 50
  204.  
  205. Tool.Equipped:Connect(function()
  206.  
  207. end)
  208.  
  209. Tool.Unequipped:Connect(function()
  210.  
  211. end)
  212.  
  213. Tool.Activated:Connect(function()
  214.     if Character.Humanoid.MoveDirection.Magnitude > 0.5 then
  215.         Attack_1()
  216.     else
  217.         Attack_2()
  218.     end
  219. end)
  220.  
  221. Tool.Deactivated:Connect(function()
  222.  
  223. end)
  224.  
  225. Character.Humanoid.Died:Connect(function()
  226.     for i,Rock in pairs(Rocks) do
  227.         Rock:Destroy()
  228.     end
  229.     Fog:Destroy()
  230.     Ambient:Stop()
  231.     Ambient:Destroy()
  232.     Rocks = {}
  233.     Fog = nil
  234.     Ambient = nil
  235. end)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×