Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Workspace = game:GetService("Workspace")
- local Debris = game:GetService("Debris")
- local TweenService = game:GetService("TweenService")
- local function getMapCenter()
- local baseplate = Workspace:FindFirstChild("Baseplate")
- if baseplate and baseplate:IsA("BasePart") then
- return baseplate.Position
- end
- local biggestPart
- local biggestSize = 0
- for _, v in ipairs(Workspace:GetDescendants()) do
- if v:IsA("BasePart") then
- local sizeValue = v.Size.X * v.Size.Y * v.Size.Z
- if sizeValue > biggestSize then
- biggestSize = sizeValue
- biggestPart = v
- end
- end
- end
- return biggestPart and biggestPart.Position or Vector3.zero
- end
- local function rustifyMap()
- for _, part in ipairs(Workspace:GetDescendants()) do
- if part:IsA("BasePart") and part.Name ~= "Baseplate" then
- part.Anchored = false
- part.Material = Enum.Material.CorrodedMetal
- part.BrickColor = BrickColor.new("Reddish brown")
- end
- end
- end
- local center = getMapCenter()
- local startPos = center + Vector3.new(0, 2000, 0)
- local msg = Instance.new("Hint")
- msg.Parent = Workspace
- msg.Text = "A meteor is heading towards us!!!"
- task.wait(2)
- msg.Text = "RUN!!!"
- task.wait(2)
- msg:Destroy()
- local meteor = Instance.new("Part")
- meteor.Parent = Workspace
- meteor.Position = startPos
- meteor.Size = Vector3.new(60, 60, 60)
- meteor.Shape = Enum.PartType.Ball
- meteor.Material = Enum.Material.Rock
- meteor.BrickColor = BrickColor.new("Really black")
- meteor.Anchored = false
- local smoke = Instance.new("Smoke")
- smoke.Parent = meteor
- smoke.Size = 20
- smoke.RiseVelocity = 20
- local light = Instance.new("PointLight")
- light.Parent = meteor
- light.Brightness = 15
- light.Range = 400
- local bodyVelocity = Instance.new("BodyVelocity")
- bodyVelocity.Velocity = Vector3.new(0, -500, 0)
- bodyVelocity.MaxForce = Vector3.new(0, math.huge, 0)
- bodyVelocity.Parent = meteor
- task.spawn(function()
- while meteor.Parent do
- local trail = Instance.new("Part")
- trail.Anchored = true
- trail.CanCollide = false
- trail.Shape = Enum.PartType.Ball
- trail.Material = Enum.Material.Neon
- trail.Size = Vector3.new(
- math.random(6, 14),
- math.random(6, 14),
- math.random(6, 14)
- )
- trail.Position = meteor.Position
- trail.Parent = Workspace
- TweenService:Create(
- trail,
- TweenInfo.new(0.5),
- {
- Transparency = 1,
- Size = Vector3.new(1,1,1)
- }
- ):Play()
- Debris:AddItem(trail, 0.5)
- task.wait(0.03)
- end
- end)
- task.wait(5)
- local explosion = Instance.new("Explosion")
- explosion.Position = center
- explosion.BlastRadius = 120
- explosion.BlastPressure = 1000000
- explosion.Parent = Workspace
- rustifyMap()
- meteor:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment