Advertisement
iiJosephCats205

Volcano

Dec 1st, 2019
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.56 KB | None | 0 0
  1. --By iiJoeCats
  2.  
  3.  
  4. --Converted with ttyyuu12345's model to script plugin v4
  5. function sandbox(var,func)
  6.     local env = getfenv(func)
  7.     local newenv = setmetatable({},{
  8.         __index = function(self,k)
  9.             if k=="script" then
  10.                 return var
  11.             else
  12.                 return env[k]
  13.             end
  14.         end,
  15.     })
  16.     setfenv(func,newenv)
  17.     return func
  18. end
  19. cors = {}
  20. mas = Instance.new("Model",game:GetService("Lighting"))
  21. Model0 = Instance.new("Model")
  22. Part1 = Instance.new("Part")
  23. SpecialMesh2 = Instance.new("SpecialMesh")
  24. Fire3 = Instance.new("Fire")
  25. Smoke4 = Instance.new("Smoke")
  26. Script5 = Instance.new("Script")
  27. Model0.Name = "Volcano"
  28. Model0.Parent = mas
  29. Part1.Parent = Model0
  30. Part1.CFrame = CFrame.new(54, 10, -107, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  31. Part1.Orientation = Vector3.new(0, -90, 0)
  32. Part1.Position = Vector3.new(54, 10, -107)
  33. Part1.Rotation = Vector3.new(0, -90, 0)
  34. Part1.Size = Vector3.new(12, 20, 12)
  35. Part1.Anchored = true
  36. Part1.BottomSurface = Enum.SurfaceType.Smooth
  37. Part1.TopSurface = Enum.SurfaceType.Smooth
  38. Part1.FormFactor = Enum.FormFactor.Symmetric
  39. Part1.formFactor = Enum.FormFactor.Symmetric
  40. SpecialMesh2.Parent = Part1
  41. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=17438728"
  42. SpecialMesh2.Scale = Vector3.new(9, 10, 9)
  43. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=17521809"
  44. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  45. Fire3.Parent = Part1
  46. Fire3.Enabled = false
  47. Fire3.Size = 30
  48. Fire3.Heat = 25
  49. Fire3.size = 30
  50. Smoke4.Parent = Part1
  51. Smoke4.Color = Color3.new(0, 0, 0)
  52. Smoke4.Enabled = false
  53. Smoke4.Size = 5
  54. Smoke4.Opacity = 1
  55. Smoke4.RiseVelocity = 10
  56. Script5.Parent = Model0
  57. table.insert(cors,sandbox(Script5,function()
  58. -----------------------------------------
  59. -------//VOLCANO AI BY iiJoeCats\\-------
  60. -----------------------------------------
  61.  
  62. repeat wait(5) until script.Parent.Part
  63. print("Running")
  64.  
  65. --//Variables
  66. local handle = script.Parent.Part
  67. local fire = handle.Fire
  68. local smoke = handle.Smoke
  69. local eruptPos = handle.Position + Vector3.new(0,10,0)
  70. local howMuchAsh = 50
  71. local colors = {"Bright red","Br. yellowish orange","New Yeller"}
  72.  
  73. --//Functions
  74. local function sendAsh()
  75.     smoke.Enabled = true
  76.     wait(5)
  77.     smoke.Enabled = false
  78. end
  79.  
  80. local function erupt()
  81.     fire.Enabled = true
  82.     wait(math.random(1,5))
  83.     for i = 1,howMuchAsh do
  84.         local effect = Instance.new("Part",script.Parent)
  85.         game:GetService("Debris"):AddItem(effect,4)
  86.         effect.Material = Enum.Material.Neon
  87.         effect.Position = eruptPos
  88.         effect.Size = Vector3.new(math.random(5,10),math.random(5,10),math.random(5,10))
  89.         effect.BrickColor = BrickColor.new(colors[math.random(1,#colors)])
  90.         effect.TopSurface = Enum.SurfaceType.Smooth
  91.         effect.BottomSurface = Enum.SurfaceType.Smooth
  92.         local bv = Instance.new("BodyVelocity",effect)
  93.         bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  94.         bv.Velocity = effect.CFrame.UpVector * 170 + Vector3.new(math.random(-80,80),15,math.random(-80,80))
  95.         effect.Touched:Connect(function(hit)
  96.             local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
  97.             if humn then
  98.                 humn.Parent:BreakJoints()
  99.             end
  100.         end)
  101.         game:GetService("Debris"):AddItem(bv,0.1)
  102.         wait(0.08)
  103.     end
  104.     fire.Enabled = false
  105.     sendAsh()
  106. end
  107.  
  108. --//Wrapping it all up
  109. while true do
  110.     wait(math.random(25,40))
  111.     erupt()
  112. end
  113.  
  114. -----------------------------------------
  115. ------------//END OF SCRIPT\\------------
  116. -----------------------------------------
  117. end))
  118. for i,v in pairs(mas:GetChildren()) do
  119.     v.Parent = workspace
  120.     pcall(function() v:MakeJoints() end)
  121. end
  122. mas:Destroy()
  123. for i,v in pairs(cors) do
  124.     spawn(function()
  125.         pcall(v)
  126.     end)
  127. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement