Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local char = player.Character
- local mouse = player:GetMouse()
- local camera = game.Workspace.CurrentCamera
- function weld(p0,p1,c0)
- local w=Instance.new("Weld",p0)
- w.Part0=p0
- w.Part1=p1
- w.C0=c0
- return w
- end
- local missilesilo = Instance.new("Model")
- missilesilo.Name = "Missile Silo"
- part = Instance.new("Part", missilesilo)
- part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part.Anchored = true
- part.Material = Enum.Material.Metal
- part.Size = Vector3.new(15, 91, 37)
- part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part.CFrame = CFrame.new(2517.3, 1413.5, 95.5)* CFrame.Angles(0, 1.5707963705063, 0)
- part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part.Friction = 0.3
- part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2 = Instance.new("Part", missilesilo)
- part_2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2.Anchored = true
- part_2.Material = Enum.Material.Grass
- part_2.Size = Vector3.new(37, 1, 81)
- part_2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2.CFrame = CFrame.new(2517.3, 1458.5, 4.5)* CFrame.Angles(0, 1.5707963705063, 0)
- part_2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_2.BrickColor = BrickColor.new("Earth green")
- part_2.Friction = 0.3
- part_2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3 = Instance.new("Part", missilesilo)
- part_3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3.Anchored = true
- part_3.Material = Enum.Material.Metal
- part_3.Size = Vector3.new(53, 1, 41)
- part_3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3.CFrame = CFrame.new(2517.3, 1365.5, 62.5)* CFrame.Angles(0, 1.5707963705063, 0)
- part_3.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_3.Friction = 0.3
- part_3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4 = Instance.new("Part", missilesilo)
- part_4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4.Anchored = true
- part_4.Material = Enum.Material.Grass
- part_4.Size = Vector3.new(37, 1, 81)
- part_4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4.CFrame = CFrame.new(2517.3, 1458.5, 121.5)* CFrame.Angles(3.1415927410126, 1.5707963705063, 0)
- part_4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_4.BrickColor = BrickColor.new("Earth green")
- part_4.Friction = 0.3
- part_4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5 = Instance.new("Part", missilesilo)
- part_5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5.Anchored = true
- part_5.Material = Enum.Material.Grass
- part_5.Size = Vector3.new(37, 1, 154)
- part_5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5.CFrame = CFrame.new(2576.3, 1458.5, 63)* CFrame.Angles(-3.1415927410126, 0, -3.1415927410126)
- part_5.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_5.BrickColor = BrickColor.new("Earth green")
- part_5.Friction = 0.3
- part_5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- button1 = Instance.new("Part", missilesilo)
- button1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- button1.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- button1.Anchored = true
- button1.Material = Enum.Material.Metal
- button1.Size = Vector3.new(1, 1, 0.2)
- button1.Name = "button1"
- button1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- button1.CFrame = CFrame.new(2519.5, 1463.5, 95.1)
- button1.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- button1.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- button1.BrickColor = BrickColor.new("Really red")
- button1.Friction = 0.3
- button1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn = Instance.new("Part", missilesilo)
- spawn.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn.Transparency = 1
- spawn.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn.Anchored = true
- spawn.Material = Enum.Material.Metal
- spawn.Size = Vector3.new(12, 8, 1)
- spawn.Name = "spawn"
- spawn.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn.CFrame = CFrame.new(2520.8, 1459.5, 123)* CFrame.Angles(-1.5707963705063, 0, -3.1415927410126)
- spawn.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- spawn.BrickColor = BrickColor.new("Dark stone grey")
- spawn.Friction = 0.3
- spawn.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6 = Instance.new("Part", missilesilo)
- part_6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6.Anchored = true
- part_6.Material = Enum.Material.Metal
- part_6.Size = Vector3.new(12, 8, 1)
- part_6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6.CFrame = CFrame.new(2522, 1463, 94.5)
- part_6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_6.BrickColor = BrickColor.new("Dark stone grey")
- part_6.Friction = 0.3
- part_6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7 = Instance.new("Part", missilesilo)
- part_7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7.Anchored = true
- part_7.Material = Enum.Material.Grass
- part_7.Size = Vector3.new(37, 1, 154)
- part_7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7.CFrame = CFrame.new(2458.3, 1458.5, 63)* CFrame.Angles(-3.1415927410126, 0, -3.1415927410126)
- part_7.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_7.BrickColor = BrickColor.new("Earth green")
- part_7.Friction = 0.3
- part_7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8 = Instance.new("Part", missilesilo)
- part_8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8.Anchored = true
- part_8.Material = Enum.Material.Metal
- part_8.Size = Vector3.new(22, 91, 80)
- part_8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8.CFrame = CFrame.new(2487.8, 1413.5, 63)
- part_8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_8.Friction = 0.3
- part_8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9 = Instance.new("Part", missilesilo)
- part_9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9.Anchored = true
- part_9.Material = Enum.Material.Metal
- part_9.Size = Vector3.new(15, 91, 37)
- part_9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9.CFrame = CFrame.new(2517.3, 1413.5, 30.5)* CFrame.Angles(0, 1.5707963705063, 0)
- part_9.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_9.Friction = 0.3
- part_9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10 = Instance.new("Part", missilesilo)
- part_10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10.Anchored = true
- part_10.Material = Enum.Material.Metal
- part_10.Size = Vector3.new(22, 91, 80)
- part_10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10.CFrame = CFrame.new(2546.8, 1413.551, 63)
- part_10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_10.Friction = 0.3
- part_10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- local missile = Instance.new("Model", missilesilo)
- missile.Name = "Missile"
- center = Instance.new("Part", missile)
- center.FormFactor = Enum.FormFactor.Symmetric
- center.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- center.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- center.Material = Enum.Material.Metal
- center.Size = Vector3.new(17.191, 19.666, 20.191)
- center.Name = "Center"
- center.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- center.CFrame = CFrame.new(2517.1, 1434.605, 62.5)* CFrame.Angles(-1.5707963705063, -1.5707963705063, 0)
- center.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- center.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- center.BrickColor = BrickColor.new("Slime green")
- center.Friction = 0.3
- center.Shape = Enum.PartType.Cylinder
- center.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- tip = Instance.new("Part", missile)
- tip.FormFactor = Enum.FormFactor.Plate
- tip.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- tip.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- tip.Reflectance = 0.1
- tip.Material = Enum.Material.Metal
- tip.Size = Vector3.new(20.191, 27.866, 20.191)
- tip.Name = "Tip"
- tip.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- tip.CFrame = CFrame.new(2517.1, 1449.134, 62.5)* CFrame.Angles(-0, -1.5707963705063, 0)
- tip.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- tip.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- tip.BrickColor = BrickColor.new("Smoky grey")
- tip.Friction = 0.3
- tip.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- mesh = Instance.new("SpecialMesh", tip)
- mesh.Scale = Vector3.new(1, 1.2, 1)
- mesh.MeshType = Enum.MeshType.Sphere
- part_11 = Instance.new("Part", missile)
- part_11.FormFactor = Enum.FormFactor.Symmetric
- part_11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- part_11.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- part_11.Reflectance = 0.1
- part_11.Material = Enum.Material.Metal
- part_11.Size = Vector3.new(9.191, 19.666, 20.191)
- part_11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- part_11.CFrame = CFrame.new(2517.1, 1421.563, 62.5)* CFrame.Angles(-1.5707963705063, -1.5707963705063, 0)
- part_11.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- part_11.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- part_11.BrickColor = BrickColor.new("Dark stone grey")
- part_11.Friction = 0.3
- part_11.Shape = Enum.PartType.Cylinder
- part_11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- extension = Instance.new("Part", missile)
- extension.FormFactor = Enum.FormFactor.Symmetric
- extension.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- extension.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- extension.Reflectance = 0.1
- extension.Material = Enum.Material.Metal
- extension.Size = Vector3.new(50.191, 15.666, 20.191)
- extension.Name = "extension"
- extension.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- extension.CFrame = CFrame.new(2517.1, 1391.962, 62.5)* CFrame.Angles(-1.5707963705063, -1.5707963705063, 0)
- extension.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- extension.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- extension.BrickColor = BrickColor.new("Dark stone grey")
- extension.Friction = 0.3
- extension.Shape = Enum.PartType.Cylinder
- extension.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- local orientation = Instance.new("Part", missile)
- orientation.FormFactor = Enum.FormFactor.Plate
- orientation.CanCollide = false
- orientation.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- orientation.Transparency = 1
- orientation.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- orientation.Reflectance = 0.1
- orientation.Material = Enum.Material.Metal
- orientation.Size = Vector3.new(20.191, 27.866, 20.191)
- orientation.Name = "orientation"
- orientation.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- orientation.CFrame = CFrame.new(2517.1, 1445.6, 62.5)* CFrame.Angles(1.5707963705063, 4.3711388286738e-008, 1.5707963705063)
- orientation.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- orientation.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- orientation.BrickColor = BrickColor.new("Smoky grey")
- orientation.Friction = 0.3
- orientation.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- missile:BreakJoints()
- missile:MakeJoints()
- local prev
- local parts = missile:GetChildren()
- for i = 1,#parts do
- if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then
- if (prev ~= nil)then
- if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- parts[i].Anchored = false
- end
- prev = parts[i]
- end
- end
- missile:MakeJoints()
- missilesilo.Parent = game.Workspace.Terrain
- char.Torso.CFrame = missilesilo.spawn.CFrame
- local fired = false
- local control = false
- local alarm = Instance.new("Sound")
- alarm.SoundId="http://www.roblox.com/asset/?id=433848566"
- alarm.PlayOnRemove=false
- alarm.Volume=1
- alarm.Looped=true
- alarm.Pitch = 1
- alarm.Parent=missilesilo.button1
- local missilec = nil
- function fire()
- missilec = missile:Clone()
- local missilelaunch = Instance.new("Sound")
- missilelaunch.SoundId="http://www.roblox.com/asset/?id=717392973"
- missilelaunch.PlayOnRemove=false
- missilelaunch.Volume=1
- missilelaunch.Looped=false
- missilelaunch.Pitch = 1
- missilelaunch.Parent=missile.extension
- local flight = Instance.new("Sound")
- flight.SoundId="http://www.roblox.com/asset/?id=314470592"
- flight.PlayOnRemove=false
- flight.Volume=1
- flight.Looped=true
- flight.Pitch = 1
- flight.Parent=missile.Center
- local smoke = Instance.new("Smoke",missile.extension)
- smoke.Color = Color3.new(0.603922, 0.603922, 0.603922)
- smoke.Opacity = 0.3
- smoke.Size = 10
- local fire = Instance.new("Fire",missile.Tip)
- fire.Heat = 25
- fire.Size = 30
- alarm:Play()
- coroutine.resume(coroutine.create(function()
- button1.BrickColor = BrickColor.new("Really black")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really red")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really black")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really red")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really black")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really red")
- wait(.2)
- button1.BrickColor = BrickColor.new("Really black")
- end))
- wait(2)
- alarm:Stop()
- missilelaunch:Play()
- local bodythrust = Instance.new("BodyThrust", missile.Tip)
- bodythrust.force = Vector3.new(0, 100000000, 0)
- wait(2)
- camera.CameraSubject = missile.Center
- wait(1)
- bodythrust:Destroy()
- control = true
- flight:Play()
- local bg = Instance.new("BodyGyro",missile.orientation)
- bg.D = 500
- bg.MaxTorque = Vector3.new(0,0,0)
- bg.P = 1000
- local bv = Instance.new("BodyVelocity",missile.orientation)
- bv.MaxForce = Vector3.new(9e20,9e20,9e20)
- bv.P = 1250
- bv.Velocity = Vector3.new(0,0.16,0)
- missile.Tip.Touched:connect(function(h)
- if fired == true then
- print("boom")
- control = false
- flight:Stop()
- missile.orientation.BodyGyro:Destroy()
- missile.orientation.BodyVelocity:Destroy()
- missile:BreakJoints()
- wait()
- local boom = Instance.new("Part", workspace)
- boom.FormFactor = Enum.FormFactor.Plate
- boom.CanCollide = false
- boom.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.Transparency = 0.4
- boom.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.Reflectance = 0.1
- boom.Anchored = true
- boom.Material = Enum.Material.Metal
- boom.Size = Vector3.new(50.191, 32.666, 37.191)
- boom.Name = "boom"
- boom.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.CFrame = CFrame.new(759.6, 65.4, 63.5)* CFrame.Angles(-0, -1.5707963705063, 0)
- boom.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.BrickColor = BrickColor.new("Bright yellow")
- boom.Friction = 0.3
- boom.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- boom.CFrame = missile.Tip.CFrame*CFrame.new(0,-.5,0)
- missile:Destroy()
- local blastmesh = Instance.new("SpecialMesh", boom)
- blastmesh.Scale = Vector3.new(2, 2, 2)
- blastmesh.MeshType = Enum.MeshType.Sphere
- game.Debris:AddItem(boom,3.5)
- local explosion = Instance.new("Explosion",boom)
- explosion.Position = boom.Position
- explosion.BlastRadius = 80
- explosion.ExplosionType = Enum.ExplosionType.CratersAndDebris
- local explosionsound = Instance.new("Sound")
- explosionsound.SoundId="http://www.roblox.com/asset/?id=341301373"
- explosionsound.PlayOnRemove=false
- explosionsound.Volume=1
- explosionsound.Looped=false
- explosionsound.Pitch = 1
- explosionsound.Parent=boom
- explosionsound:Play()
- coroutine.resume(coroutine.create(function()
- blastmesh.Scale = Vector3.new(2.5,2.5,2.5)
- wait(1)
- blastmesh.Scale = Vector3.new(3,3,3)
- wait(1)
- blastmesh.Scale = Vector3.new(3.5,3.5,3.5)
- wait(1)
- blastmesh.Scale = Vector3.new(4,4,4)
- end))
- coroutine.resume(coroutine.create(function()
- while (boom) do
- wait(.5)
- boom.Transparency=boom.Transparency+.1
- end
- end))
- wait(5)
- camera.CameraSubject = char.Humanoid
- fired = false
- print("fired = false")
- missilec.Parent = missilesilo
- missile = missilec
- end
- end)
- end
- mouse.TargetFilter = workspace
- mouse.Move:connect(function(key)
- if control == true then
- missile.orientation.BodyGyro.MaxTorque = Vector3.new(9e20,9e20,9e20)
- missile.orientation.BodyGyro.CFrame = CFrame.new(missile.orientation.CFrame.p, mouse.Hit.p)
- missile.orientation.BodyVelocity.Velocity = (missile.orientation.CFrame.lookVector * 300)
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "f" and fired == false then
- fired = true
- fire()
- end
- end)
Add Comment
Please, Sign In to add comment