Advertisement
Darxiuss

a

Sep 26th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.89 KB | None | 0 0
  1. local player = game.Players.Darxiuss
  2. local char = player.Character
  3. local Hea = char.Head
  4. local tor = char.Torso
  5. local ra = char['Right Arm']
  6. local la = char['Left Arm']
  7. local camera = game.Workspace.CurrentCamera
  8. function weld(p0,p1,c0)
  9. local w=Instance.new("Weld",p0)
  10. w.Part0=p0
  11. w.Part1=p1
  12. w.C0=c0
  13. return w
  14. end
  15.  
  16. bin=Instance.new('HopperBin',player.Backpack)
  17. bin.Name='Mortar'
  18.  
  19. bin.Selected:connect(function(mouse)
  20. pcall(function()
  21. local canfire = false
  22. local cancrouch = true
  23. local crouched = 0
  24. local mortar = Instance.new("Model", workspace)
  25. mortar.Name = "Mortar"
  26.  
  27. handle = Instance.new("Part", mortar)
  28. handle.FormFactor = Enum.FormFactor.Symmetric
  29. handle.CanCollide = false
  30. handle.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  31. handle.Transparency = 1
  32. handle.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  33. handle.Size = Vector3.new(0.693, 0.693, 0.693)
  34. handle.Name = "Handle"
  35. handle.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  36. handle.CFrame = CFrame.new(3.966, 1.658, 101.632)* CFrame.Angles(3.1414759159088, 0.019993921741843, -3.1415531635284)
  37. handle.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  38. handle.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  39. handle.BrickColor = BrickColor.new("Black")
  40. handle.Friction = 0.3
  41. handle.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  42.  
  43. barrel = Instance.new("Part", mortar)
  44. barrel.RightParamB = 0
  45. barrel.Velocity = Vector3.new(0, -0.004, 0.001)
  46. barrel.FormFactor = Enum.FormFactor.Symmetric
  47. barrel.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  48. barrel.Transparency = 1
  49. barrel.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  50. barrel.RightParamA = 0
  51. barrel.RotVelocity = Vector3.new(0.001, 0, 0.001)
  52. barrel.Size = Vector3.new(0.693, 0.693, 0.693)
  53. barrel.Name = "barrel"
  54. barrel.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  55. barrel.CFrame = CFrame.new(3.929, 3.889, 105.291)* CFrame.Angles(3.1413631439209, -1.5544989109039, -2.332640171051)
  56. barrel.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  57. barrel.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  58. barrel.BrickColor = BrickColor.new("Really black")
  59. barrel.Friction = 0.3
  60. barrel.Shape = Enum.PartType.Cylinder
  61. barrel.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  62.  
  63. part = Instance.new("Part", mortar)
  64. part.FormFactor = Enum.FormFactor.Plate
  65. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  66. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  67. part.Material = Enum.Material.Metal
  68. part.Size = Vector3.new(0.693, 4.374, 0.693)
  69. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  70. part.CFrame = CFrame.new(3.963, 1.653, 103.16)* CFrame.Angles(0.76158285140991, -0.011491015553474, 0.010960195213556)
  71. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  72. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  73. part.BrickColor = BrickColor.new("Dark stone grey")
  74. part.Friction = 0.3
  75. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  76. part.Name = "shroud"
  77.  
  78. mesh = Instance.new("CylinderMesh", part)
  79. mesh.Scale = Vector3.new(1.5, 1, 1.5)
  80.  
  81. part_2 = Instance.new("Part", mortar)
  82. part_2.Velocity = Vector3.new(0.002, -0.006, -0.001)
  83. part_2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  84. part_2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  85. part_2.RotVelocity = Vector3.new(0.001, 0, 0.001)
  86. part_2.Material = Enum.Material.SmoothPlastic
  87. part_2.Size = Vector3.new(0.693, 2.864, 0.693)
  88. part_2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  89. part_2.CFrame = CFrame.new(4.705, 1.483, 104.777)* CFrame.Angles(1.4333664178848, -1.1402186155319, 1.606097817421)
  90. part_2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  91. part_2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  92. part_2.BrickColor = BrickColor.new("Really black")
  93. part_2.Friction = 0.3
  94. part_2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  95.  
  96. mesh_2 = Instance.new("BlockMesh", part_2)
  97. mesh_2.Scale = Vector3.new(0.5, 1.5, 0.5)
  98.  
  99. part_3 = Instance.new("Part", mortar)
  100. part_3.Velocity = Vector3.new(0, -0.004, 0.001)
  101. part_3.FormFactor = Enum.FormFactor.Plate
  102. part_3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  103. part_3.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  104. part_3.RotVelocity = Vector3.new(0.001, 0, 0.001)
  105. part_3.Material = Enum.Material.Metal
  106. part_3.Size = Vector3.new(0.693, 0.277, 0.693)
  107. part_3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  108. part_3.CFrame = CFrame.new(3.934, 3.537, 104.956)* CFrame.Angles(0.76158618927002, -0.011490537784994, -3.1306319236755)
  109. part_3.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  110. part_3.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  111. part_3.BrickColor = BrickColor.new("Really black")
  112. part_3.Friction = 0.3
  113. part_3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  114. part_3.Name = "realbarrel"
  115.  
  116. mesh_3 = Instance.new("CylinderMesh", part_3)
  117. mesh_3.Scale = Vector3.new(1, 0.05, 1)
  118.  
  119. part_4 = Instance.new("Part", mortar)
  120. part_4.Velocity = Vector3.new(0.002, -0.003, 0)
  121. part_4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  122. part_4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  123. part_4.RotVelocity = Vector3.new(0.001, 0, 0.001)
  124. part_4.Material = Enum.Material.SmoothPlastic
  125. part_4.Size = Vector3.new(0.693, 2.864, 0.693)
  126. part_4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  127. part_4.CFrame = CFrame.new(3.012, 1.542, 104.668)* CFrame.Angles(1.3755918741226, 1.0502614974976, -1.5411701202393)
  128. part_4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  129. part_4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  130. part_4.BrickColor = BrickColor.new("Really black")
  131. part_4.Friction = 0.3
  132. part_4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  133.  
  134. mesh_4 = Instance.new("BlockMesh", part_4)
  135. mesh_4.Scale = Vector3.new(0.5, 1.5, 0.5)
  136.  
  137. part_5 = Instance.new("Part", mortar)
  138. part_5.Velocity = Vector3.new(0.001, -0.004, 0.001)
  139. part_5.FormFactor = Enum.FormFactor.Plate
  140. part_5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  141. part_5.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  142. part_5.RotVelocity = Vector3.new(0.001, 0, 0.001)
  143. part_5.Material = Enum.Material.Metal
  144. part_5.Size = Vector3.new(0.693, 0.277, 0.693)
  145. part_5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  146. part_5.CFrame = CFrame.new(3.937, 3.336, 104.765)* CFrame.Angles(0.76158618927002, -0.011490537784994, -3.1306319236755)
  147. part_5.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  148. part_5.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  149. part_5.BrickColor = BrickColor.new("Dark stone grey")
  150. part_5.Friction = 0.3
  151. part_5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  152.  
  153. mesh_5 = Instance.new("CylinderMesh", part_5)
  154. mesh_5.Scale = Vector3.new(1.8, 2, 1.8)
  155.  
  156. local rocket = Instance.new("Model")
  157. rocket.Name = "Rocket"
  158.  
  159. detection = Instance.new("Part", rocket)
  160. detection.FormFactor = Enum.FormFactor.Plate
  161. detection.Transparency = 1
  162. detection.TopSurface = Enum.SurfaceType.Smooth
  163. detection.Size = Vector3.new(1, 2.948, 1)
  164. detection.Name = "detection"
  165. detection.CFrame = CFrame.new(3.942, 3.349, 104.659)* CFrame.Angles(-2.3487484455109, -0.00067903328454122, 3.1409056186676)
  166. detection.BrickColor = BrickColor.new("Dark stone grey")
  167. detection.Friction = 0.3
  168. detection.BottomSurface = Enum.SurfaceType.Smooth
  169.  
  170. part_6 = Instance.new("Part", rocket)
  171. part_6.FormFactor = Enum.FormFactor.Plate
  172. part_6.TopSurface = Enum.SurfaceType.Smooth
  173. part_6.Size = Vector3.new(1, 0.4, 1)
  174. part_6.CFrame = CFrame.new(3.942, 2.547, 103.973)* CFrame.Angles(0.79284429550171, -1.5707963705063, 0)
  175. part_6.BrickColor = BrickColor.new("Dark stone grey")
  176. part_6.Friction = 0.3
  177. part_6.BottomSurface = Enum.SurfaceType.Smooth
  178.  
  179. mesh_6 = Instance.new("SpecialMesh", part_6)
  180. mesh_6.Scale = Vector3.new(0.3, 5, 0.3)
  181.  
  182. part_7 = Instance.new("Part", rocket)
  183. part_7.FormFactor = Enum.FormFactor.Plate
  184. part_7.TopSurface = Enum.SurfaceType.Smooth
  185. part_7.Size = Vector3.new(1, 0.4, 1)
  186. part_7.CFrame = CFrame.new(3.941, 2.961, 104.393)* CFrame.Angles(0.79284429550171, 1.5707963705063, 0)
  187. part_7.BrickColor = BrickColor.new("Dark stone grey")
  188. part_7.Friction = 0.3
  189. part_7.BottomSurface = Enum.SurfaceType.Smooth
  190. part_7.Name = "rockethandle"
  191.  
  192. mesh_7 = Instance.new("SpecialMesh", part_7)
  193. mesh_7.Scale = Vector3.new(0.4, 0.4, 0.34)
  194.  
  195. part_8 = Instance.new("Part", rocket)
  196. part_8.FormFactor = Enum.FormFactor.Plate
  197. part_8.TopSurface = Enum.SurfaceType.Smooth
  198. part_8.Size = Vector3.new(1, 0.4, 1)
  199. part_8.CFrame = CFrame.new(3.94, 3.972, 105.405)* CFrame.Angles(0.79284429550171, -1.5707963705063, 0)
  200. part_8.BrickColor = BrickColor.new("Earth green")
  201. part_8.Friction = 0.3
  202. part_8.BottomSurface = Enum.SurfaceType.Smooth
  203.  
  204. mesh_8 = Instance.new("SpecialMesh", part_8)
  205. mesh_8.Scale = Vector3.new(0.2, 2.5, 0.3)
  206.  
  207. part_9 = Instance.new("Part", rocket)
  208. part_9.FormFactor = Enum.FormFactor.Plate
  209. part_9.TopSurface = Enum.SurfaceType.Smooth
  210. part_9.Size = Vector3.new(1, 0.4, 1)
  211. part_9.CFrame = CFrame.new(3.941, 3.263, 104.7)* CFrame.Angles(0.79284429550171, -1.5707963705063, 0)
  212. part_9.BrickColor = BrickColor.new("Earth green")
  213. part_9.Friction = 0.3
  214. part_9.BottomSurface = Enum.SurfaceType.Smooth
  215.  
  216. mesh_9 = Instance.new("SpecialMesh", part_9)
  217. mesh_9.Scale = Vector3.new(0.31, 1.5, 0.39)
  218.  
  219. part_10 = Instance.new("Part", rocket)
  220. part_10.FormFactor = Enum.FormFactor.Plate
  221. part_10.TopSurface = Enum.SurfaceType.Smooth
  222. part_10.Size = Vector3.new(1, 0.4, 1)
  223. part_10.CFrame = CFrame.new(3.941, 3.656, 105.084)* CFrame.Angles(0.79284429550171, -1.5707963705063, 0)
  224. part_10.BrickColor = BrickColor.new("Earth green")
  225. part_10.Friction = 0.3
  226. part_10.BottomSurface = Enum.SurfaceType.Smooth
  227.  
  228. mesh_10 = Instance.new("SpecialMesh", part_10)
  229. mesh_10.Scale = Vector3.new(0.365, 0.65, 0.365)
  230. mesh_10.MeshId = "http://www.roblox.com/asset/?id=1527559"
  231. mesh_10.MeshType = Enum.MeshType.FileMesh
  232.  
  233. detector = Instance.new("Part", rocket)
  234. detector.FormFactor = Enum.FormFactor.Plate
  235. detector.Transparency = 1
  236. detector.TopSurface = Enum.SurfaceType.Smooth
  237. detector.Size = Vector3.new(1, 0.4, 1)
  238. detector.Name = "detector"
  239. detector.CFrame = CFrame.new(3.94, 3.8, 105.19)* CFrame.Angles(-3.1415927410126, 0.00041140167741105, -3.8131439339395e-008)
  240. detector.BrickColor = BrickColor.new("Earth green")
  241. detector.Friction = 0.3
  242. detector.BottomSurface = Enum.SurfaceType.Smooth
  243.  
  244. part_11 = Instance.new("Part", mortar)
  245. part_11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  246. part_11.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  247. part_11.Material = Enum.Material.SmoothPlastic
  248. part_11.Size = Vector3.new(1.968, 0.2, 2)
  249. part_11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  250. part_11.CFrame = CFrame.new(3.987, 0.102, 102)
  251. part_11.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  252. part_11.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  253. part_11.BrickColor = BrickColor.new("Really black")
  254. part_11.Friction = 0.3
  255. part_11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  256. part_11.Name = "floor"
  257.  
  258. mortar.Parent = char
  259. mortar:BreakJoints()
  260. rocket:BreakJoints()
  261.  
  262. local prev
  263. local parts = mortar:GetChildren()
  264.  
  265. for i = 1,#parts do
  266. 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
  267. if (prev ~= nil)then
  268. if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end
  269. local weld = Instance.new("Weld")
  270. weld.Part0 = prev
  271. weld.Part1 = parts[i]
  272. weld.C0 = prev.CFrame:inverse()
  273. weld.C1 = parts[i].CFrame:inverse()
  274. weld.Parent = prev
  275. parts[i].CanCollide = false
  276. end
  277. prev = parts[i]
  278. end
  279. end
  280. mortar:MakeJoints()
  281.  
  282. local prev
  283. local parts = rocket:GetChildren()
  284.  
  285. for i = 1,#parts do
  286. 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
  287. if (prev ~= nil)then
  288. if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end
  289. local weld = Instance.new("Weld")
  290. weld.Part0 = prev
  291. weld.Part1 = parts[i]
  292. weld.C0 = prev.CFrame:inverse()
  293. weld.C1 = parts[i].CFrame:inverse()
  294. weld.Parent = prev
  295. parts[i].CanCollide = false
  296. end
  297. prev = parts[i]
  298. end
  299. end
  300. rocket:MakeJoints()
  301.  
  302. tor["Left Shoulder"].Part1 = nil
  303. weld(la, tor, CFrame.new(1.5,.2,.2)*CFrame.Angles(math.rad(-30),0,0))
  304. weld(mortar.Handle, la, CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0))
  305. mortar.Handle.Weld.Name = "Weld2"
  306.  
  307. local Handle = mortar.Handle
  308. local apressed = false
  309. local dpressed = false
  310. local wpressed = false
  311. local spressed = false
  312. local ppressed = 0
  313. local vpressed = 0
  314. local angle = 0
  315. local angle2 = -30
  316. local crouched = 0
  317. local loaded = false
  318. local watchcam = false
  319. local mortarstrength = -150
  320. local mortarheight = 150
  321. local blastpressure= 21000
  322. local blastradius = 14
  323. local exploding = false
  324.  
  325. local mortarfire = Instance.new("Sound")
  326. mortarfire.SoundId="rbxassetid://151776307"
  327. mortarfire.PlayOnRemove=false
  328. mortarfire.Volume=1
  329. mortarfire.Looped=false
  330. mortarfire.Pitch = 1
  331. mortarfire.Parent=mortar.shroud
  332.  
  333. local mortarreload = Instance.new("Sound")
  334. mortarreload.SoundId="rbxassetid://406798420"
  335. mortarreload.PlayOnRemove=false
  336. mortarreload.Volume=.8
  337. mortarreload.Looped=false
  338. mortarreload.Pitch = 1
  339. mortarreload.Parent=mortar.shroud
  340.  
  341. local mortargui = Instance.new("ScreenGui", player.PlayerGui)
  342. mortargui.Name = "MortarGui"
  343.  
  344. local textlabel = Instance.new("TextLabel", mortargui)
  345. textlabel.BorderSizePixel = 0
  346. textlabel.BackgroundColor3 = Color3.new(0.466667, 0.466667, 0.466667)
  347. textlabel.Size = UDim2.new(0, 60, 0, 20)
  348. textlabel.TextColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
  349. textlabel.BorderColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
  350. textlabel.Text = "Height:"
  351. textlabel.Position = UDim2.new(0.841, 0, 0.204, 7)
  352.  
  353. local textlabel2 = Instance.new("TextLabel", mortargui)
  354. textlabel2.BorderSizePixel = 0
  355. textlabel2.BackgroundColor3 = Color3.new(0.466667, 0.466667, 0.466667)
  356. textlabel2.Size = UDim2.new(0, 60, 0, 20)
  357. textlabel2.TextColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
  358. textlabel2.BorderColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
  359. textlabel2.Text = "X Axis:"
  360. textlabel2.Position = UDim2.new(0.841, 0, 0.254, 7)
  361.  
  362. local armyhelmet = Instance.new("Model", char)
  363. armyhelmet.Name = "ArmyHelmet"
  364.  
  365. part = Instance.new("Part", armyhelmet)
  366. part.FormFactor = Enum.FormFactor.Custom
  367. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  368. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  369. part.Size = Vector3.new(0.45, 0.2, 0.2)
  370. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  371. part.CFrame = CFrame.new(3.779, 0.7, -176.625)* CFrame.Angles(1.3066229820251, -1.1172529459, -0.28729918599129)
  372. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  373. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  374. part.BrickColor = BrickColor.new("Brown")
  375. part.Friction = 0.3
  376. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  377.  
  378. texture = Instance.new("Texture", part)
  379. texture.Texture = "http://www.roblox.com/asset/?id=11063690"
  380. texture.Transparency = 0.6
  381. texture.StudsPerTileV = 40
  382. texture.Face = Enum.NormalId.Bottom
  383. texture.StudsPerTileU = 40
  384.  
  385. texture_2 = Instance.new("Texture", part)
  386. texture_2.Texture = "http://www.roblox.com/asset/?id=11063690"
  387. texture_2.Transparency = 0.6
  388. texture_2.StudsPerTileV = 40
  389. texture_2.Face = Enum.NormalId.Top
  390. texture_2.StudsPerTileU = 40
  391.  
  392. texture_3 = Instance.new("Texture", part)
  393. texture_3.Texture = "http://www.roblox.com/asset/?id=11063690"
  394. texture_3.Transparency = 0.6
  395. texture_3.StudsPerTileV = 40
  396. texture_3.Face = Enum.NormalId.Back
  397. texture_3.StudsPerTileU = 40
  398.  
  399. texture_4 = Instance.new("Texture", part)
  400. texture_4.Texture = "http://www.roblox.com/asset/?id=11063690"
  401. texture_4.Transparency = 0.6
  402. texture_4.StudsPerTileV = 40
  403. texture_4.Face = Enum.NormalId.Right
  404. texture_4.StudsPerTileU = 40
  405.  
  406. texture_5 = Instance.new("Texture", part)
  407. texture_5.Texture = "http://www.roblox.com/asset/?id=11063690"
  408. texture_5.Transparency = 0.6
  409. texture_5.StudsPerTileV = 40
  410. texture_5.Face = Enum.NormalId.Left
  411. texture_5.StudsPerTileU = 40
  412.  
  413. texture_6 = Instance.new("Texture", part)
  414. texture_6.Texture = "http://www.roblox.com/asset/?id=11063690"
  415. texture_6.StudsPerTileV = 40
  416. texture_6.Face = Enum.NormalId.Bottom
  417. texture_6.StudsPerTileU = 40
  418.  
  419. part_2 = Instance.new("Part", armyhelmet)
  420. part_2.FormFactor = Enum.FormFactor.Custom
  421. part_2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  422. part_2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  423. part_2.Size = Vector3.new(0.219, 0.2, 0.2)
  424. part_2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  425. part_2.CFrame = CFrame.new(3.971, 0.258, -176.77)* CFrame.Angles(1.3064686059952, -1.1172366142273, -1.2862546443939)
  426. part_2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  427. part_2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  428. part_2.BrickColor = BrickColor.new("Brown")
  429. part_2.Friction = 0.3
  430. part_2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  431.  
  432. texture_7 = Instance.new("Texture", part_2)
  433. texture_7.Texture = "http://www.roblox.com/asset/?id=11063690"
  434. texture_7.Transparency = 0.6
  435. texture_7.StudsPerTileV = 40
  436. texture_7.Face = Enum.NormalId.Bottom
  437. texture_7.StudsPerTileU = 40
  438.  
  439. texture_8 = Instance.new("Texture", part_2)
  440. texture_8.Texture = "http://www.roblox.com/asset/?id=11063690"
  441. texture_8.StudsPerTileV = 40
  442. texture_8.Face = Enum.NormalId.Bottom
  443. texture_8.StudsPerTileU = 40
  444.  
  445. texture_9 = Instance.new("Texture", part_2)
  446. texture_9.Texture = "http://www.roblox.com/asset/?id=11063690"
  447. texture_9.Transparency = 0.6
  448. texture_9.StudsPerTileV = 40
  449. texture_9.Face = Enum.NormalId.Top
  450. texture_9.StudsPerTileU = 40
  451.  
  452. texture_10 = Instance.new("Texture", part_2)
  453. texture_10.Texture = "http://www.roblox.com/asset/?id=11063690"
  454. texture_10.Transparency = 0.6
  455. texture_10.StudsPerTileV = 40
  456. texture_10.Face = Enum.NormalId.Left
  457. texture_10.StudsPerTileU = 40
  458.  
  459. texture_11 = Instance.new("Texture", part_2)
  460. texture_11.Texture = "http://www.roblox.com/asset/?id=11063690"
  461. texture_11.Transparency = 0.6
  462. texture_11.StudsPerTileV = 40
  463. texture_11.Face = Enum.NormalId.Back
  464. texture_11.StudsPerTileU = 40
  465.  
  466. texture_12 = Instance.new("Texture", part_2)
  467. texture_12.Texture = "http://www.roblox.com/asset/?id=11063690"
  468. texture_12.Transparency = 0.6
  469. texture_12.StudsPerTileV = 40
  470. texture_12.Face = Enum.NormalId.Right
  471. texture_12.StudsPerTileU = 40
  472.  
  473. part_3 = Instance.new("Part", armyhelmet)
  474. part_3.FormFactor = Enum.FormFactor.Custom
  475. part_3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  476. part_3.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  477. part_3.Size = Vector3.new(0.252, 0.2, 0.2)
  478. part_3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  479. part_3.CFrame = CFrame.new(3.915, 0.397, -176.666)* CFrame.Angles(1.3064651489258, -1.1172343492508, -0.50085496902466)
  480. part_3.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  481. part_3.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  482. part_3.BrickColor = BrickColor.new("Brown")
  483. part_3.Friction = 0.3
  484. part_3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  485.  
  486. texture_13 = Instance.new("Texture", part_3)
  487. texture_13.Texture = "http://www.roblox.com/asset/?id=11063690"
  488. texture_13.Transparency = 0.6
  489. texture_13.StudsPerTileV = 40
  490. texture_13.Face = Enum.NormalId.Right
  491. texture_13.StudsPerTileU = 40
  492.  
  493. texture_14 = Instance.new("Texture", part_3)
  494. texture_14.Texture = "http://www.roblox.com/asset/?id=11063690"
  495. texture_14.Transparency = 0.6
  496. texture_14.StudsPerTileV = 40
  497. texture_14.Face = Enum.NormalId.Left
  498. texture_14.StudsPerTileU = 40
  499.  
  500. texture_15 = Instance.new("Texture", part_3)
  501. texture_15.Texture = "http://www.roblox.com/asset/?id=11063690"
  502. texture_15.Transparency = 0.6
  503. texture_15.StudsPerTileV = 40
  504. texture_15.Face = Enum.NormalId.Top
  505. texture_15.StudsPerTileU = 40
  506.  
  507. texture_16 = Instance.new("Texture", part_3)
  508. texture_16.Texture = "http://www.roblox.com/asset/?id=11063690"
  509. texture_16.Transparency = 0.6
  510. texture_16.StudsPerTileV = 40
  511. texture_16.Face = Enum.NormalId.Back
  512. texture_16.StudsPerTileU = 40
  513.  
  514. texture_17 = Instance.new("Texture", part_3)
  515. texture_17.Texture = "http://www.roblox.com/asset/?id=11063690"
  516. texture_17.StudsPerTileV = 40
  517. texture_17.Face = Enum.NormalId.Bottom
  518. texture_17.StudsPerTileU = 40
  519.  
  520. texture_18 = Instance.new("Texture", part_3)
  521. texture_18.Texture = "http://www.roblox.com/asset/?id=11063690"
  522. texture_18.Transparency = 0.6
  523. texture_18.StudsPerTileV = 40
  524. texture_18.Face = Enum.NormalId.Bottom
  525. texture_18.StudsPerTileU = 40
  526.  
  527. part_4 = Instance.new("Part", armyhelmet)
  528. part_4.FormFactor = Enum.FormFactor.Custom
  529. part_4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  530. part_4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  531. part_4.Size = Vector3.new(0.276, 0.244, 0.244)
  532. part_4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  533. part_4.CFrame = CFrame.new(3.889, 0.227, -177.778)* CFrame.Angles(-1.8351237773895, 1.1172391176224, -0.80814719200134)
  534. part_4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  535. part_4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  536. part_4.BrickColor = BrickColor.new("Brown")
  537. part_4.Friction = 0.3
  538. part_4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  539.  
  540. mesh = Instance.new("BlockMesh", part_4)
  541. mesh.Scale = Vector3.new(1, 0.337, 0.449)
  542.  
  543. texture_19 = Instance.new("Texture", part_4)
  544. texture_19.Texture = "http://www.roblox.com/asset/?id=11063690"
  545. texture_19.Transparency = 0.6
  546. texture_19.StudsPerTileV = 40
  547. texture_19.Face = Enum.NormalId.Bottom
  548. texture_19.StudsPerTileU = 40
  549.  
  550. texture_20 = Instance.new("Texture", part_4)
  551. texture_20.Texture = "http://www.roblox.com/asset/?id=11063690"
  552. texture_20.Transparency = 0.6
  553. texture_20.StudsPerTileV = 40
  554. texture_20.Face = Enum.NormalId.Left
  555. texture_20.StudsPerTileU = 40
  556.  
  557. texture_21 = Instance.new("Texture", part_4)
  558. texture_21.Texture = "http://www.roblox.com/asset/?id=11063690"
  559. texture_21.Transparency = 0.6
  560. texture_21.StudsPerTileV = 40
  561. texture_21.Face = Enum.NormalId.Top
  562. texture_21.StudsPerTileU = 40
  563.  
  564. texture_22 = Instance.new("Texture", part_4)
  565. texture_22.Texture = "http://www.roblox.com/asset/?id=11063690"
  566. texture_22.Transparency = 0.6
  567. texture_22.StudsPerTileV = 40
  568. texture_22.Face = Enum.NormalId.Right
  569. texture_22.StudsPerTileU = 40
  570.  
  571. texture_23 = Instance.new("Texture", part_4)
  572. texture_23.Texture = "http://www.roblox.com/asset/?id=11063690"
  573. texture_23.Transparency = 0.6
  574. texture_23.StudsPerTileV = 40
  575. texture_23.Face = Enum.NormalId.Back
  576. texture_23.StudsPerTileU = 40
  577.  
  578. texture_24 = Instance.new("Texture", part_4)
  579. texture_24.Texture = "http://www.roblox.com/asset/?id=11063690"
  580. texture_24.StudsPerTileV = 40
  581. texture_24.Face = Enum.NormalId.Bottom
  582. texture_24.StudsPerTileU = 40
  583.  
  584. part_5 = Instance.new("Part", armyhelmet)
  585. part_5.FormFactor = Enum.FormFactor.Custom
  586. part_5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  587. part_5.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  588. part_5.Size = Vector3.new(0.277, 0.244, 0.244)
  589. part_5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  590. part_5.CFrame = CFrame.new(3.802, 0.374, -177.896)* CFrame.Angles(-1.8388863801956, 1.1238970756531, -0.019356932491064)
  591. part_5.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  592. part_5.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  593. part_5.BrickColor = BrickColor.new("Brown")
  594. part_5.Friction = 0.3
  595. part_5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  596.  
  597. mesh_2 = Instance.new("BlockMesh", part_5)
  598. mesh_2.Scale = Vector3.new(1, 0.444, 0.449)
  599.  
  600. texture_25 = Instance.new("Texture", part_5)
  601. texture_25.Texture = "http://www.roblox.com/asset/?id=11063690"
  602. texture_25.Transparency = 0.6
  603. texture_25.StudsPerTileV = 40
  604. texture_25.Face = Enum.NormalId.Back
  605. texture_25.StudsPerTileU = 40
  606.  
  607. texture_26 = Instance.new("Texture", part_5)
  608. texture_26.Texture = "http://www.roblox.com/asset/?id=11063690"
  609. texture_26.Transparency = 0.6
  610. texture_26.StudsPerTileV = 40
  611. texture_26.Face = Enum.NormalId.Left
  612. texture_26.StudsPerTileU = 40
  613.  
  614. texture_27 = Instance.new("Texture", part_5)
  615. texture_27.Texture = "http://www.roblox.com/asset/?id=11063690"
  616. texture_27.Transparency = 0.6
  617. texture_27.StudsPerTileV = 40
  618. texture_27.Face = Enum.NormalId.Right
  619. texture_27.StudsPerTileU = 40
  620.  
  621. texture_28 = Instance.new("Texture", part_5)
  622. texture_28.Texture = "http://www.roblox.com/asset/?id=11063690"
  623. texture_28.Transparency = 0.6
  624. texture_28.StudsPerTileV = 40
  625. texture_28.Face = Enum.NormalId.Top
  626. texture_28.StudsPerTileU = 40
  627.  
  628. texture_29 = Instance.new("Texture", part_5)
  629. texture_29.Texture = "http://www.roblox.com/asset/?id=11063690"
  630. texture_29.Transparency = 0.6
  631. texture_29.StudsPerTileV = 40
  632. texture_29.Face = Enum.NormalId.Bottom
  633. texture_29.StudsPerTileU = 40
  634.  
  635. texture_30 = Instance.new("Texture", part_5)
  636. texture_30.Texture = "http://www.roblox.com/asset/?id=11063690"
  637. texture_30.StudsPerTileV = 40
  638. texture_30.Face = Enum.NormalId.Bottom
  639. texture_30.StudsPerTileU = 40
  640.  
  641. part_6 = Instance.new("Part", armyhelmet)
  642. part_6.FormFactor = Enum.FormFactor.Custom
  643. part_6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  644. part_6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  645. part_6.Size = Vector3.new(0.481, 0.244, 0.244)
  646. part_6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  647. part_6.CFrame = CFrame.new(3.652, 0.678, -177.931)* CFrame.Angles(-1.8388862609863, 1.1238969564438, 0.24244838953018)
  648. part_6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  649. part_6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  650. part_6.BrickColor = BrickColor.new("Brown")
  651. part_6.Friction = 0.3
  652. part_6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  653.  
  654. mesh_3 = Instance.new("BlockMesh", part_6)
  655. mesh_3.Scale = Vector3.new(1, 0.444, 0.449)
  656.  
  657. texture_31 = Instance.new("Texture", part_6)
  658. texture_31.Texture = "http://www.roblox.com/asset/?id=11063690"
  659. texture_31.Transparency = 0.6
  660. texture_31.StudsPerTileV = 40
  661. texture_31.Face = Enum.NormalId.Bottom
  662. texture_31.StudsPerTileU = 40
  663.  
  664. texture_32 = Instance.new("Texture", part_6)
  665. texture_32.Texture = "http://www.roblox.com/asset/?id=11063690"
  666. texture_32.Transparency = 0.6
  667. texture_32.StudsPerTileV = 40
  668. texture_32.Face = Enum.NormalId.Back
  669. texture_32.StudsPerTileU = 40
  670.  
  671. texture_33 = Instance.new("Texture", part_6)
  672. texture_33.Texture = "http://www.roblox.com/asset/?id=11063690"
  673. texture_33.Transparency = 0.6
  674. texture_33.StudsPerTileV = 40
  675. texture_33.Face = Enum.NormalId.Right
  676. texture_33.StudsPerTileU = 40
  677.  
  678. texture_34 = Instance.new("Texture", part_6)
  679. texture_34.Texture = "http://www.roblox.com/asset/?id=11063690"
  680. texture_34.Transparency = 0.6
  681. texture_34.StudsPerTileV = 40
  682. texture_34.Face = Enum.NormalId.Left
  683. texture_34.StudsPerTileU = 40
  684.  
  685. texture_35 = Instance.new("Texture", part_6)
  686. texture_35.Texture = "http://www.roblox.com/asset/?id=11063690"
  687. texture_35.Transparency = 0.6
  688. texture_35.StudsPerTileV = 40
  689. texture_35.Face = Enum.NormalId.Top
  690. texture_35.StudsPerTileU = 40
  691.  
  692. texture_36 = Instance.new("Texture", part_6)
  693. texture_36.Texture = "http://www.roblox.com/asset/?id=11063690"
  694. texture_36.StudsPerTileV = 40
  695. texture_36.Face = Enum.NormalId.Bottom
  696. texture_36.StudsPerTileU = 40
  697.  
  698. handle = Instance.new("Part", armyhelmet)
  699. handle.FormFactor = Enum.FormFactor.Custom
  700. handle.CanCollide = false
  701. handle.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  702. handle.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  703. handle.Size = Vector3.new(1.049, 0.993, 1.019)
  704. handle.Name = "Handle"
  705. handle.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  706. handle.CFrame = CFrame.new(3.561, 1.276, -177.263)* CFrame.Angles(-0.02995970658958, -1.4560277462006, -0.029769770801067)
  707. handle.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  708. handle.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  709. handle.Friction = 0.3
  710. handle.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  711.  
  712. texture_37 = Instance.new("Texture", handle)
  713. texture_37.Texture = "http://www.roblox.com/asset/?id=155320546"
  714. texture_37.Transparency = 0.6
  715. texture_37.StudsPerTileV = 25
  716. texture_37.Face = Enum.NormalId.Right
  717. texture_37.StudsPerTileU = 25
  718.  
  719. texture_38 = Instance.new("Texture", handle)
  720. texture_38.Texture = "http://www.roblox.com/asset/?id=155320546"
  721. texture_38.Transparency = 0.6
  722. texture_38.StudsPerTileV = 25
  723. texture_38.Face = Enum.NormalId.Right
  724. texture_38.StudsPerTileU = 25
  725.  
  726. mesh_4 = Instance.new("SpecialMesh", handle)
  727. mesh_4.Scale = Vector3.new(1.2, 1.4, 1.3)
  728. mesh_4.MeshId = "http://www.roblox.com/asset/?id=45609892"
  729. mesh_4.TextureId = "http://www.roblox.com/asset/?id=39468059"
  730. mesh_4.MeshType = Enum.MeshType.FileMesh
  731.  
  732. mesh_5 = Instance.new("SpecialMesh", handle)
  733. mesh_5.Scale = Vector3.new(1.259, 1.39, 1.325)
  734. mesh_5.MeshId = "http://www.roblox.com/asset/?id=45609892"
  735. mesh_5.TextureId = "http://www.roblox.com/asset/?id=39468059"
  736. mesh_5.MeshType = Enum.MeshType.FileMesh
  737.  
  738. part_7 = Instance.new("Part", armyhelmet)
  739. part_7.FormFactor = Enum.FormFactor.Custom
  740. part_7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  741. part_7.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  742. part_7.Material = Enum.Material.Granite
  743. part_7.Size = Vector3.new(0.304, 0.244, 0.768)
  744. part_7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  745. part_7.CFrame = CFrame.new(3.894, 0.25, -177.288)* CFrame.Angles(0.97581106424332, -1.3651745319366, -2.1557352542877)
  746. part_7.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  747. part_7.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  748. part_7.BrickColor = BrickColor.new("Brown")
  749. part_7.Friction = 0.3
  750. part_7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  751.  
  752. mesh_6 = Instance.new("SpecialMesh", part_7)
  753. mesh_6.Scale = Vector3.new(1.106, 0.523, 0.537)
  754. mesh_6.MeshId = "http://www.roblox.com/Asset/?id=9944765"
  755. mesh_6.MeshType = Enum.MeshType.FileMesh
  756.  
  757. texture_39 = Instance.new("Texture", part_7)
  758. texture_39.Texture = "http://www.roblox.com/asset/?id=11063690"
  759. texture_39.StudsPerTileV = 40
  760. texture_39.Face = Enum.NormalId.Bottom
  761. texture_39.StudsPerTileU = 40
  762.  
  763. texture_40 = Instance.new("Texture", part_7)
  764. texture_40.Texture = "http://www.roblox.com/asset/?id=11063690"
  765. texture_40.Transparency = 0.6
  766. texture_40.StudsPerTileV = 40
  767. texture_40.Face = Enum.NormalId.Bottom
  768. texture_40.StudsPerTileU = 40
  769.  
  770. texture_41 = Instance.new("Texture", part_7)
  771. texture_41.Texture = "http://www.roblox.com/asset/?id=11063690"
  772. texture_41.Transparency = 0.6
  773. texture_41.StudsPerTileV = 40
  774. texture_41.Face = Enum.NormalId.Left
  775. texture_41.StudsPerTileU = 40
  776.  
  777. texture_42 = Instance.new("Texture", part_7)
  778. texture_42.Texture = "http://www.roblox.com/asset/?id=11063690"
  779. texture_42.Transparency = 0.6
  780. texture_42.StudsPerTileV = 40
  781. texture_42.Face = Enum.NormalId.Right
  782. texture_42.StudsPerTileU = 40
  783.  
  784. texture_43 = Instance.new("Texture", part_7)
  785. texture_43.Texture = "http://www.roblox.com/asset/?id=11063690"
  786. texture_43.Transparency = 0.6
  787. texture_43.StudsPerTileV = 40
  788. texture_43.Face = Enum.NormalId.Back
  789. texture_43.StudsPerTileU = 40
  790.  
  791. texture_44 = Instance.new("Texture", part_7)
  792. texture_44.Texture = "http://www.roblox.com/asset/?id=11063690"
  793. texture_44.Transparency = 0.6
  794. texture_44.StudsPerTileV = 40
  795. texture_44.Face = Enum.NormalId.Top
  796. texture_44.StudsPerTileU = 40
  797.  
  798. middle = Instance.new("Part", armyhelmet)
  799. middle.FormFactor = Enum.FormFactor.Symmetric
  800. middle.CanCollide = false
  801. middle.Transparency = 1
  802. middle.TopSurface = Enum.SurfaceType.Smooth
  803. middle.Material = Enum.Material.SmoothPlastic
  804. middle.Size = Vector3.new(2, 1, 1)
  805. middle.Name = "Middle"
  806. middle.CFrame = CFrame.new(3.503, 0.693, -177.288)* CFrame.Angles(-1.4918479962489e-007, -1.5707963705063, 0)
  807. middle.BrickColor = BrickColor.new("Brick yellow")
  808. middle.Friction = 0.3
  809.  
  810. mesh_7 = Instance.new("SpecialMesh", middle)
  811. mesh_7.Scale = Vector3.new(1.25, 1.25, 2)
  812. armyhelmet:BreakJoints()
  813. local prev
  814. local parts = armyhelmet:GetChildren()
  815.  
  816. for i = 1,#parts do
  817. 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
  818. if (prev ~= nil)then
  819. if parts[i]:FindFirstChild("Weld") then parts[i]:FindFirstChild("Weld"):Destroy() end
  820. local weld = Instance.new("Weld")
  821. weld.Part0 = prev
  822. weld.Part1 = parts[i]
  823. weld.C0 = prev.CFrame:inverse()
  824. weld.C1 = parts[i].CFrame:inverse()
  825. weld.Parent = prev
  826. parts[i].Anchored = false
  827. end
  828. prev = parts[i]
  829. end
  830. end
  831. armyhelmet:MakeJoints()
  832. weld(armyhelmet.Middle, char.Head, CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0))
  833.  
  834.  
  835. function crouch()
  836. local newl = char["Left Leg"]:Clone()
  837. newl.Parent = char
  838. weld(newl, char.Torso, CFrame.new(-0.5, 0.75, 1))
  839. newl.CanCollide = false
  840. local newr = char["Right Leg"]:Clone()
  841. newr.Parent = char
  842. weld(newr, char.Torso, CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0))
  843. newr.CanCollide = false
  844. local collider = Instance.new("Part",char)
  845. collider.Transparency = 1
  846. collider.CanCollide = true
  847. collider.Size = Vector3.new(2, 0.2, 3)
  848. collider.Name = "Collider"
  849. collider:BreakJoints()
  850. weld(collider, newl, CFrame.new(0,.968,0))
  851. char["Left Leg"].Transparency = 1
  852. char["Right Leg"].Transparency = 1
  853. char.Torso["Left Hip"].Parent = char.Head
  854. char.Torso["Right Hip"].Parent = char.Head
  855. char["Left Leg"].Parent = char.Head
  856. char["Right Leg"].Parent = char.Head
  857. Handle.Weld.C0 = CFrame.new(-1,.2,0)*CFrame.Angles(math.rad(30),0,0)
  858. tor["Right Shoulder"].Part1 = nil
  859. weld(ra, tor, CFrame.new(-.5,.8,.5)*CFrame.Angles(math.rad(-90),-.2,0))
  860.  
  861. coroutine.resume(coroutine.create(function()
  862. wait(.3)
  863. char.Head.Anchored = true
  864. char["Left Leg"].Anchored = true
  865. char["Right Leg"].Anchored = true
  866. end))
  867. end
  868. function uncrouch()
  869. char.Collider:Destroy()
  870. char["Left Leg"]:Destroy()
  871. char["Right Leg"]:Destroy()
  872. char.Head["Left Hip"].Parent = char.Torso
  873. char.Head["Right Hip"].Parent = char.Torso
  874. char.Head["Left Leg"].Parent = char
  875. char.Head["Right Leg"].Parent = char
  876. char["Left Leg"].Transparency = 0
  877. char["Right Leg"].Transparency = 0
  878. Handle.Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  879. if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end
  880. tor["Right Shoulder"].Part1 = ra
  881. coroutine.resume(coroutine.create(function()
  882. wait()
  883. char.Head.Anchored = false
  884. char["Left Leg"].Anchored = false
  885. char["Right Leg"].Anchored = false
  886. end))
  887. end
  888.  
  889. mouse.KeyDown:connect(function(key)
  890. if key == "c" and cancrouch == true then
  891. crouched = crouched + 1
  892. if crouched == 1 then
  893. crouch()
  894. end
  895. if crouched == 2 then
  896. uncrouch()
  897. crouched = 0
  898. end
  899. end
  900. end)
  901.  
  902. mouse.KeyDown:connect(function(key)
  903. if key == "a" and crouched == 1 then
  904. apressed = true
  905. while apressed == true and crouched == 1 do wait(.05)
  906. angle = angle - .05
  907. textlabel2.Text = "X Axis:"..angle
  908. if angle <= -0.5 then angle = -0.5 end
  909. la.Weld.C0 = CFrame.new(1.5,.2,.2)*CFrame.Angles(math.rad(angle2),angle,0)
  910. end
  911. end
  912. end)
  913. mouse.KeyUp:connect(function(key)
  914. if key == "a" then
  915. apressed = false
  916. end
  917. end)
  918. mouse.KeyDown:connect(function(key)
  919. if key == "d" and crouched == 1 then
  920. dpressed = true
  921. while dpressed == true and crouched == 1 do wait(.05)
  922. angle = angle + .05
  923. textlabel2.Text = "X Axis:"..angle
  924. if angle >= 0.5 then angle = 0.5 end
  925. la.Weld.C0 = CFrame.new(1.5,.2,.2)*CFrame.Angles(math.rad(angle2),angle,0)
  926. end
  927. end
  928. end)
  929. mouse.KeyUp:connect(function(key)
  930. if key == "d" then
  931. dpressed = false
  932. end
  933. end)
  934. mouse.KeyDown:connect(function(key)
  935. if key == "w" and crouched == 1 then
  936. wpressed = true
  937. while wpressed == true and crouched == 1 do wait(.05)
  938. angle2 = angle2 - .5
  939. textlabel.Text = "Height:"..-angle2
  940. la.Weld.C0 = CFrame.new(1.5,.2,.2)*CFrame.Angles(math.rad(angle2),angle,0)
  941. end
  942. end
  943. end)
  944. mouse.KeyUp:connect(function(key)
  945. if key == "w" then
  946. wpressed = false
  947. end
  948. end)
  949. mouse.KeyDown:connect(function(key)
  950. if key == "s" and crouched == 1 then
  951. spressed = true
  952. while spressed == true and crouched == 1 do wait(.05)
  953. angle2 = angle2 + .5
  954. textlabel.Text = "Height:"..-angle2
  955. la.Weld.C0 = CFrame.new(1.5,.2,.2)*CFrame.Angles(math.rad(angle2),angle,0)
  956. end
  957. end
  958. end)
  959. mouse.KeyUp:connect(function(key)
  960. if key == "s" then
  961. spressed = false
  962. end
  963. end)
  964.  
  965. function reload()
  966. if loaded == false then
  967. loaded = true
  968. cancrouch = false
  969. local rocketc = rocket:Clone()
  970. rocketc.Parent = char
  971. weld(rocketc.detector, ra, CFrame.new(0,2,1)*CFrame.Angles(math.rad(0),.2,0))
  972. --X is left and right Y is fowards and backwards Z is up and down
  973. mortarreload:Play()
  974. ra.Weld.C0 = CFrame.new(-1,1,.5)*CFrame.Angles(math.rad(-90),-.2,0)
  975. wait(.1)
  976. ra.Weld.C0 = CFrame.new(-1,1.2,1)*CFrame.Angles(math.rad(-90),-.2,0)
  977. wait(.1)
  978. ra.Weld.C0 = CFrame.new(-1,1.4,1.2)*CFrame.Angles(math.rad(-90),-.2,0)
  979. wait(.1)
  980. ra.Weld.C0 = CFrame.new(-1,1.6,1.2)*CFrame.Angles(math.rad(-90),-.4,0)
  981. wait(.1)
  982. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-90),-.45,0)
  983. wait(.5)
  984. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-88),-.45,0)
  985. wait(.1)
  986. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-86),-.45,0)
  987. wait(.1)
  988. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-84),-.45,0)
  989. mortarreload:Stop()
  990. rocketc.detector.Weld:Destroy()
  991. rocketc.Parent = mortar
  992. weld(rocketc.detector, mortar.shroud, CFrame.new(0,2.2,1.8)* CFrame.Angles(-15, 0.00041140167741105, -3.8131439339395e-008))
  993. wait(.1)
  994. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-86),-.45,0)
  995. wait(.1)
  996. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-88),-.45,0)
  997. wait(.1)
  998. ra.Weld.C0 = CFrame.new(-1,1.8,1.2)*CFrame.Angles(math.rad(-90),-.45,0)
  999. wait(.1)
  1000. ra.Weld.C0 = CFrame.new(-1,1.6,1.2)*CFrame.Angles(math.rad(-90),-.4,0)
  1001. wait(.1)
  1002. ra.Weld.C0 = CFrame.new(-1,1.4,1.2)*CFrame.Angles(math.rad(-90),-.2,0)
  1003. wait(.1)
  1004. ra.Weld.C0 = CFrame.new(-1,1,.5)*CFrame.Angles(math.rad(-90),-.2,0)
  1005. wait(.1)
  1006. ra.Weld.C0 = CFrame.new(-.5,.8,.5)*CFrame.Angles(math.rad(-90),-.2,0)
  1007. cancrouch = true
  1008. end
  1009. end
  1010.  
  1011. function fire()
  1012. if loaded == true and crouched == 1 and cancrouch == true then
  1013. loaded = false
  1014. mortarfire:Play()
  1015. local rocketc = mortar.Rocket
  1016. rocketc.detector.Weld:Destroy()
  1017. rocketc.Parent = workspace
  1018. rocketc.detector.CFrame = rocketc.detector.CFrame*CFrame.new(0,0,-3)
  1019. if watchcam == true then camera.CameraSubject = rocketc.detector end
  1020. local fire = Instance.new("Fire",rocketc.rockethandle)
  1021. game.Debris:AddItem(rocketc,8)
  1022. rocketc.rockethandle.Velocity = mortar.shroud.CFrame.lookVector * mortarstrength + Vector3.new(0,mortarheight,0)
  1023. local bodythrust = Instance.new("BodyThrust", rocketc.rockethandle)
  1024. bodythrust.force = Vector3.new(0, 100, 0)
  1025. local mortarwhistle = Instance.new("Sound")
  1026. mortarwhistle.SoundId="rbxassetid://377331780"
  1027. mortarwhistle.PlayOnRemove=false
  1028. mortarwhistle.Volume=1.5
  1029. mortarwhistle.Looped=true
  1030. mortarwhistle.Pitch = 1
  1031. mortarwhistle.Parent=rocketc.detection
  1032. mortarwhistle:Play()
  1033. coroutine.resume(coroutine.create(function()
  1034. mortar.realbarrel.BrickColor = BrickColor.new("Bright orange")
  1035. wait(.1)
  1036. mortar.realbarrel.BrickColor = BrickColor.new("Really black")
  1037. end))
  1038. rocketc.detection.Touched:connect(function(h)
  1039. if exploding == false then
  1040. exploding = true
  1041. wait()
  1042. print(h)
  1043. if (not h:isDescendantOf(rocketc)) then
  1044. if not h.Name:lower():find("base") then
  1045. h.Anchored = false
  1046. h.Velocity = char.Head.CFrame.lookVector*50
  1047. h:BreakJoints()
  1048. if h.Parent:FindFirstChild("Humanoid") then h.Parent.Humanoid:TakeDamage(9000) end
  1049. if h.Parent.className=="Model" then
  1050. h.Parent:BreakJoints()
  1051. end
  1052. end
  1053. --local boom = Instance.new("Part", workspace)
  1054. --boom.TopSurfaceInput = Enum.InputType.Constant
  1055. --boom.Transparency = 0.4
  1056. --boom.TopSurface = Enum.SurfaceType.Smooth
  1057. --boom.TopParamA = -0.1
  1058. --boom.TopParamB = 0.1
  1059. --boom.Size = Vector3.new(2, 1.2, 2)
  1060. --boom.Name = "boom"
  1061. --boom.Anchored = true
  1062. --boom.BrickColor = BrickColor.new("Bright yellow")
  1063. --boom.Friction = 0.3
  1064. --boom.BottomSurface = Enum.SurfaceType.Smooth
  1065. --if rocketc:FindFirstChild("detection") then boom.Position = rocketc.detection.Position end
  1066. --game.Debris:AddItem(boom,2.5)
  1067.  
  1068. --local blastmesh = Instance.new("SpecialMesh", boom)
  1069. --blastmesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  1070. --blastmesh.Name = "BlastMesh"
  1071. --blastmesh.MeshType = Enum.MeshType.FileMesh
  1072.  
  1073. rocketc.detection.Velocity = Vector3.new(0,0,0)
  1074. bodythrust:Destroy()
  1075.  
  1076. wait(.1)
  1077.  
  1078. local explosion = Instance.new("Explosion",workspace)
  1079. explosion.Position = rocketc.Part.Position
  1080. explosion.BlastPressure = blastpressure
  1081. explosion.BlastRadius = blastradius
  1082. explosion.DestroyJointRadiusPercent = 1
  1083. explosion.ExplosionType = Enum.ExplosionType.CratersAndDebris
  1084.  
  1085. local s=Instance.new("Sound")
  1086. s.SoundId="http://www.roblox.com/asset/?id=180199726"
  1087. s.PlayOnRemove=false
  1088. s.Volume=1
  1089. s.Looped=false
  1090. s.Pitch = 1
  1091. s.Parent=explosion
  1092. s:Play()
  1093.  
  1094. rocketc:Destroy()
  1095. exploding = false
  1096.  
  1097. if watchcam == true then camera.CameraSubject = char.Humanoid end
  1098.  
  1099.  
  1100. --coroutine.resume(coroutine.create(function()
  1101. --blastmesh.Scale = Vector3.new(1,1,1)
  1102. --wait()
  1103. --blastmesh.Scale = Vector3.new(2,2,2)
  1104. --wait()
  1105. --blastmesh.Scale = Vector3.new(3,3,3)
  1106. --wait()
  1107. --blastmesh.Scale = Vector3.new(4,4,4)
  1108. --end))
  1109. --coroutine.resume(coroutine.create(function()
  1110. --while (boom) do
  1111. --wait()
  1112. --boom.Transparency=boom.Transparency+.1
  1113. --end
  1114. --end))
  1115. end
  1116. end
  1117. end)
  1118. end
  1119. end
  1120.  
  1121. mouse.KeyDown:connect(function(key)
  1122. if key == "r" and crouched == 1 then
  1123. reload()
  1124. end
  1125. end)
  1126.  
  1127. mouse.Button1Down:connect(function()
  1128. fire()
  1129. end)
  1130.  
  1131. mouse.KeyDown:connect(function(key)
  1132. if key == "p" then
  1133. ppressed = ppressed + 1
  1134. if ppressed == 1 then
  1135. watchcam = true
  1136. print("Watching Missile")
  1137. end
  1138. if ppressed == 2 then
  1139. ppressed = 0
  1140. watchcam = false
  1141. print("Not Watching Missile")
  1142. end
  1143. end
  1144. end)
  1145. mouse.KeyDown:connect(function(key)
  1146. if key == "v" then
  1147. vpressed = vpressed + 1
  1148. if vpressed == 1 then
  1149. print("Realistic Mortar Strength")
  1150. mortarstrength = -50
  1151. mortarheight = 400
  1152. blastradius = 20
  1153. end
  1154. if vpressed == 2 then
  1155. print("Long Range Mortar Strength")
  1156. mortarstrength = -150
  1157. mortarheight = 400
  1158. blastradius = 30
  1159. end
  1160. if vpressed == 3 then
  1161. vpressed = 0
  1162. print("Arcade Mortar Strength")
  1163. mortarstrength = -150
  1164. mortarheight = 150
  1165. blastpressure= 21000
  1166. blastradius = 14
  1167. end
  1168. end
  1169. end)
  1170.  
  1171. bin.Deselected:connect(function()
  1172. mortar:Destroy()
  1173. canfire = false
  1174. if crouched == 1 then crouched = 0 uncrouch() end
  1175. if la:FindFirstChild("Weld") then la.Weld:Destroy() end
  1176. tor["Left Shoulder"].Part1 = la
  1177. if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end
  1178. tor["Right Shoulder"].Part1 = ra
  1179. camera.CameraSubject = char.Humanoid
  1180. mortargui:Destroy()
  1181. armyhelmet:Destroy()
  1182. end)
  1183. end)
  1184. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement