Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By iiJoeCats
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Fire3 = Instance.new("Fire")
- Smoke4 = Instance.new("Smoke")
- Script5 = Instance.new("Script")
- Model0.Name = "Volcano"
- Model0.Parent = mas
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(54, 10, -107, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Part1.Orientation = Vector3.new(0, -90, 0)
- Part1.Position = Vector3.new(54, 10, -107)
- Part1.Rotation = Vector3.new(0, -90, 0)
- Part1.Size = Vector3.new(12, 20, 12)
- Part1.Anchored = true
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=17438728"
- SpecialMesh2.Scale = Vector3.new(9, 10, 9)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=17521809"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Fire3.Parent = Part1
- Fire3.Enabled = false
- Fire3.Size = 30
- Fire3.Heat = 25
- Fire3.size = 30
- Smoke4.Parent = Part1
- Smoke4.Color = Color3.new(0, 0, 0)
- Smoke4.Enabled = false
- Smoke4.Size = 5
- Smoke4.Opacity = 1
- Smoke4.RiseVelocity = 10
- Script5.Parent = Model0
- table.insert(cors,sandbox(Script5,function()
- -----------------------------------------
- -------//VOLCANO AI BY iiJoeCats\\-------
- -----------------------------------------
- repeat wait(5) until script.Parent.Part
- print("Running")
- --//Variables
- local handle = script.Parent.Part
- local fire = handle.Fire
- local smoke = handle.Smoke
- local eruptPos = handle.Position + Vector3.new(0,10,0)
- local howMuchAsh = 50
- local colors = {"Bright red","Br. yellowish orange","New Yeller"}
- --//Functions
- local function sendAsh()
- smoke.Enabled = true
- wait(5)
- smoke.Enabled = false
- end
- local function erupt()
- fire.Enabled = true
- wait(math.random(1,5))
- for i = 1,howMuchAsh do
- local effect = Instance.new("Part",script.Parent)
- game:GetService("Debris"):AddItem(effect,4)
- effect.Material = Enum.Material.Neon
- effect.Position = eruptPos
- effect.Size = Vector3.new(math.random(5,10),math.random(5,10),math.random(5,10))
- effect.BrickColor = BrickColor.new(colors[math.random(1,#colors)])
- effect.TopSurface = Enum.SurfaceType.Smooth
- effect.BottomSurface = Enum.SurfaceType.Smooth
- local bv = Instance.new("BodyVelocity",effect)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = effect.CFrame.UpVector * 170 + Vector3.new(math.random(-80,80),15,math.random(-80,80))
- effect.Touched:Connect(function(hit)
- local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
- if humn then
- humn.Parent:BreakJoints()
- end
- end)
- game:GetService("Debris"):AddItem(bv,0.1)
- wait(0.08)
- end
- fire.Enabled = false
- sendAsh()
- end
- --//Wrapping it all up
- while true do
- wait(math.random(25,40))
- erupt()
- end
- -----------------------------------------
- ------------//END OF SCRIPT\\------------
- -----------------------------------------
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement