Hebablazin

Plasma Cannon

May 30th, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.55 KB | None | 0 0
  1. --Plasma Cannon Gifted by machontz, Local Script!
  2.  
  3. Player = game.Players.LocalPlayer
  4. Character = Player.Character
  5. script.Parent = Character
  6.  
  7. HColor = "Medium stone grey"
  8. HWidth = 0.5
  9. HBevel = 0.01
  10. HMesh = 0.06
  11.  
  12. --[[ * Fire Handle * ]]--
  13.  
  14. pcall(function() Character.Gun:Remove() end)
  15.  
  16. Gun = Instance.new("Model")
  17. Gun.Name = "Gun"
  18. Gun.Parent = Character
  19.  
  20. --[[ * Gui * ]]--
  21. --[[
  22. MG = Instance.new("ScreenGui",Player.PlayerGui)
  23.  
  24. BS = Instance.new("Frame")
  25. BS.Parent = MG
  26. BS.Size = UDim2.new(1,0,1,0)
  27. BS.Position = UDim2.new(0,0,0,0)
  28. BS.BackgroundColor3 = Color3.new(0,0,0)
  29. BS.BorderSizePixel = 0
  30. BS.BackgroundTransparency = 0
  31. wait(0.5)
  32. for i = 1,10 do wait()
  33. BS.BackgroundTransparency = BS.BackgroundTransparency + 0.1
  34. end
  35. ]]
  36. --[[ * Arm Weld * ]]--
  37.  
  38. ArmWeld = Instance.new("Weld")
  39. ArmWeld.Parent = Character["Torso"]
  40. ArmWeld.Part0 = ArmWeld.Parent
  41. ArmWeld.Part1 = Character["Right Arm"]
  42. ArmWeld.C0 = CFrame.new(1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  43.  
  44. --[[ * Arm Weld * ]]--
  45.  
  46. ArmWeldR = Instance.new("Weld")
  47. ArmWeldR.Parent = Character["Torso"]
  48. ArmWeldR.Part0 = ArmWeldR.Parent
  49. ArmWeldR.Part1 = Character["Left Arm"]
  50. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  51.  
  52. --[[ * Neck Weld * ]]--
  53.  
  54. Neck = Instance.new("Weld")
  55. Neck.Parent = Character["Torso"]
  56. Neck.Part0 = Neck.Parent
  57. Neck.Part1 = Character["Head"]
  58. Neck.C0 = CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  59.  
  60. --[[ * Handle * ]]--
  61.  
  62. Handle = Instance.new("Part")
  63. Handle.formFactor = "Custom"
  64. Handle.Locked = true
  65. Handle.CanCollide = false
  66. Handle.BrickColor = BrickColor.new("Medium stone grey")
  67. Handle.Anchored = false
  68. Handle.Size = Vector3.new(0.5,1,0.5)
  69. Handle.TopSurface = 0
  70. Handle.BottomSurface = 0
  71. Handle.Parent = Gun
  72. MeshA = Instance.new("BlockMesh",Handle)
  73. MeshA.Bevel = 0.03
  74. WeldA = Instance.new("Weld")
  75. WeldA.Parent = Handle
  76. WeldA.Part0 = Character["Right Arm"]
  77. WeldA.Part1 = Handle
  78. WeldA.C0 = CFrame.new(0,-1.1,-0.1) * CFrame.Angles(math.pi/2-0.2,0,0)
  79.  
  80. --[[ * Trigger * ]]--
  81.  
  82. Trigger = Instance.new("Part")
  83. Trigger.formFactor = "Custom"
  84. Trigger.Locked = true
  85. Trigger.CanCollide = false
  86. Trigger.BrickColor = BrickColor.Black()
  87. Trigger.Anchored = false
  88. Trigger.Size = Vector3.new(0.3,0.3,0.6)
  89. Trigger.TopSurface = 0
  90. Trigger.BottomSurface = 0
  91. Trigger.Parent = Gun
  92. MeshB = Instance.new("BlockMesh",Trigger)
  93. MeshB.Bevel = 0.03
  94. WeldB = Instance.new("Weld")
  95. WeldB.Parent = Trigger
  96. WeldB.Part0 = Handle
  97. WeldB.Part1 = Trigger
  98. WeldB.C0 = CFrame.new(0,-0.5,0.4) * CFrame.Angles(0.2,0,0)
  99.  
  100. --[[ * Barrel * ]]--
  101.  
  102. Barrel = Instance.new("Part")
  103. Barrel.formFactor = "Custom"
  104. Barrel.Locked = true
  105. Barrel.CanCollide = false
  106. Barrel.BrickColor = BrickColor.new("Medium stone grey")
  107. Barrel.Anchored = false
  108. Barrel.Size = Vector3.new(1.4,2,1.4)
  109. Barrel.TopSurface = 0
  110. Barrel.BottomSurface = 0
  111. Barrel.Parent = Gun
  112. MeshC = Instance.new("CylinderMesh",Barrel)
  113. MeshC.Bevel = 0.03
  114. WeldC = Instance.new("Weld")
  115. WeldC.Parent = Barrel
  116. WeldC.Part0 = Trigger
  117. WeldC.Part1 = Barrel
  118. WeldC.C0 = CFrame.new(0,-0.6,-0.4) * CFrame.Angles(math.pi/2,0,0)
  119.  
  120. --[[ * Fluid * ]]--
  121.  
  122. Fluid = Instance.new("Part")
  123. Fluid.formFactor = "Custom"
  124. Fluid.Locked = true
  125. Fluid.CanCollide = false
  126. Fluid.BrickColor = BrickColor.new(104)
  127. Fluid.Anchored = false
  128. Fluid.Transparency = 0
  129. Fluid.Reflectance = 0.25
  130. Fluid.Size = Vector3.new(1,1,1)
  131. Fluid.TopSurface = 0
  132. Fluid.BottomSurface = 0
  133. Fluid.Parent = Gun
  134. MeshD = Instance.new("CylinderMesh",Fluid)
  135. MeshD.Bevel = 0.03
  136. WeldD = Instance.new("Weld")
  137. WeldD.Parent = Fluid
  138. WeldD.Part0 = Barrel
  139. WeldD.Part1 = Fluid
  140. WeldD.C0 = CFrame.new(0,-1,0) * CFrame.Angles(0,0,0)
  141.  
  142. --[[ * CTrigger * ]]--
  143.  
  144. CTrigger = Instance.new("Part")
  145. CTrigger.formFactor = "Custom"
  146. CTrigger.Locked = true
  147. CTrigger.CanCollide = false
  148. CTrigger.BrickColor = BrickColor.new("Medium stone grey")
  149. CTrigger.Anchored = false
  150. CTrigger.Size = Vector3.new(1.25,0.5,1.25)
  151. CTrigger.TopSurface = 0
  152. CTrigger.BottomSurface = 0
  153. CTrigger.Parent = Gun
  154. MeshE = Instance.new("CylinderMesh",CTrigger)
  155. MeshE.Bevel = 0.03
  156. WeldE = Instance.new("Weld")
  157. WeldE.Parent = CTrigger
  158. WeldE.Part0 = Fluid
  159. WeldE.Part1 = CTrigger
  160. WeldE.C0 = CFrame.new(0,-0.5,0) * CFrame.Angles(0,0,0)
  161.  
  162. --[[ * BCap * ]]--
  163.  
  164. BCap = Instance.new("Part")
  165. BCap.formFactor = "Custom"
  166. BCap.Locked = true
  167. BCap.CanCollide = false
  168. BCap.BrickColor = BrickColor.new("Medium stone grey")
  169. BCap.Anchored = false
  170. BCap.Size = Vector3.new(1.25,0.5,1.25)
  171. BCap.TopSurface = 0
  172. BCap.BottomSurface = 0
  173. BCap.Parent = Gun
  174. MeshF = Instance.new("CylinderMesh",BCap)
  175. MeshF.Bevel = 0.03
  176. WeldF = Instance.new("Weld")
  177. WeldF.Parent = BCap
  178. WeldF.Part0 = Fluid
  179. WeldF.Part1 = BCap
  180. WeldF.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(0,0,0)
  181.  
  182. --[[ * Hole * ]]--
  183.  
  184. Hole = Instance.new("Part")
  185. Hole.formFactor = "Custom"
  186. Hole.Locked = true
  187. Hole.CanCollide = false
  188. Hole.BrickColor = BrickColor.new("Really black")
  189. Hole.Anchored = false
  190. Hole.Size = Vector3.new(0.7,1,0.7)
  191. Hole.TopSurface = 0
  192. Hole.BottomSurface = 0
  193. Hole.Parent = Gun
  194. MeshG = Instance.new("CylinderMesh",Hole)
  195. MeshG.Bevel = 0.03
  196. WeldG = Instance.new("Weld")
  197. WeldG.Parent = Hole
  198. WeldG.Part0 = Barrel
  199. WeldG.Part1 = Hole
  200. WeldG.C0 = CFrame.new(0,0.51,0) * CFrame.Angles(0,0,0)
  201.  
  202. --[[ * JointA * ]]--
  203.  
  204. JointA = Instance.new("Part")
  205. JointA.formFactor = "Custom"
  206. JointA.Locked = true
  207. JointA.CanCollide = false
  208. JointA.BrickColor = BrickColor.new(HColor)
  209. JointA.Anchored = false
  210. JointA.Size = Vector3.new(HWidth,1,0.2)
  211. JointA.TopSurface = 0
  212. JointA.BottomSurface = 0
  213. JointA.Parent = Gun
  214. MeshH = Instance.new("BlockMesh",JointA)
  215. MeshH.Bevel = HBevel
  216. WeldH = Instance.new("Weld")
  217. WeldH.Parent = JointA
  218. WeldH.Part0 = Hole
  219. WeldH.Part1 = JointA
  220. WeldH.C0 = CFrame.new(0,0.5,0.5) * CFrame.Angles(0,0,0)
  221.  
  222. --[[ * JointB * ]]--
  223.  
  224. JointB = Instance.new("Part")
  225. JointB.formFactor = "Custom"
  226. JointB.Locked = true
  227. JointB.CanCollide = false
  228. JointB.BrickColor = BrickColor.new(HColor)
  229. JointB.Anchored = false
  230. JointB.Size = Vector3.new(HWidth,1,0.2)
  231. JointB.TopSurface = 0
  232. JointB.BottomSurface = 0
  233. JointB.Parent = Gun
  234. MeshI = Instance.new("BlockMesh",JointB)
  235. MeshI.Bevel = HBevel
  236. WeldI = Instance.new("Weld")
  237. WeldI.Parent = JointB
  238. WeldI.Part0 = Hole
  239. WeldI.Part1 = JointB
  240. WeldI.C0 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0,math.pi,0)
  241.  
  242. --[[ * JointC * ]]--
  243.  
  244. JointC = Instance.new("Part")
  245. JointC.formFactor = "Custom"
  246. JointC.Locked = true
  247. JointC.CanCollide = false
  248. JointC.BrickColor = BrickColor.new(HColor)
  249. JointC.Anchored = false
  250. JointC.Size = Vector3.new(HWidth,1,0.2)
  251. JointC.TopSurface = 0
  252. JointC.BottomSurface = 0
  253. JointC.Parent = Gun
  254. MeshJ = Instance.new("BlockMesh",JointC)
  255. MeshJ.Bevel = HBevel
  256. WeldJ = Instance.new("Weld")
  257. WeldJ.Parent = JointC
  258. WeldJ.Part0 = Hole
  259. WeldJ.Part1 = JointC
  260. WeldJ.C0 = CFrame.new(0.5,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  261.  
  262. --[[ * JointD * ]]--
  263.  
  264. JointD = Instance.new("Part")
  265. JointD.formFactor = "Custom"
  266. JointD.Locked = true
  267. JointD.CanCollide = false
  268. JointD.BrickColor = BrickColor.new(HColor)
  269. JointD.Anchored = false
  270. JointD.Size = Vector3.new(HWidth,1,0.2)
  271. JointD.TopSurface = 0
  272. JointD.BottomSurface = 0
  273. JointD.Parent = Gun
  274. MeshK = Instance.new("BlockMesh",JointD)
  275. MeshK.Bevel = HBevel
  276. WeldK = Instance.new("Weld")
  277. WeldK.Parent = JointD
  278. WeldK.Part0 = Hole
  279. WeldK.Part1 = JointD
  280. WeldK.C0 = CFrame.new(-0.5,0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  281.  
  282. --[[ * JointE * ]]--
  283.  
  284. JointE = Instance.new("Part")
  285. JointE.formFactor = "Custom"
  286. JointE.Locked = true
  287. JointE.CanCollide = false
  288. JointE.BrickColor = BrickColor.new(HColor)
  289. JointE.Anchored = false
  290. JointE.Size = Vector3.new(HWidth,1,0.2)
  291. JointE.TopSurface = 0
  292. JointE.BottomSurface = 0
  293. JointE.Parent = Gun
  294. MeshL = Instance.new("BlockMesh",JointE)
  295. MeshL.Bevel = HBevel
  296. WeldL = Instance.new("Weld")
  297. WeldL.Parent = JointE
  298. WeldL.Part0 = Hole
  299. WeldL.Part1 = JointE
  300. WeldL.C0 = CFrame.new(-0.35,0.5,0.35) * CFrame.Angles(0,-math.pi/2/2,0)
  301.  
  302. --[[ * JointF * ]]--
  303.  
  304. JointF = Instance.new("Part")
  305. JointF.formFactor = "Custom"
  306. JointF.Locked = true
  307. JointF.CanCollide = false
  308. JointF.BrickColor = BrickColor.new(HColor)
  309. JointF.Anchored = false
  310. JointF.Size = Vector3.new(HWidth,1,0.2)
  311. JointF.TopSurface = 0
  312. JointF.BottomSurface = 0
  313. JointF.Parent = Gun
  314. MeshM = Instance.new("BlockMesh",JointF)
  315. MeshM.Bevel = HBevel
  316. WeldM = Instance.new("Weld")
  317. WeldM.Parent = JointF
  318. WeldM.Part0 = Hole
  319. WeldM.Part1 = JointF
  320. WeldM.C0 = CFrame.new(0.35,0.5,0.35) * CFrame.Angles(0,math.pi/2/2,0)
  321.  
  322. --[[ * JointG * ]]--
  323.  
  324. JointG = Instance.new("Part")
  325. JointG.formFactor = "Custom"
  326. JointG.Locked = true
  327. JointG.CanCollide = false
  328. JointG.BrickColor = BrickColor.new(HColor)
  329. JointG.Anchored = false
  330. JointG.Size = Vector3.new(HWidth,1,0.2)
  331. JointG.TopSurface = 0
  332. JointG.BottomSurface = 0
  333. JointG.Parent = Gun
  334. MeshN = Instance.new("BlockMesh",JointG)
  335. MeshN.Bevel = HBevel
  336. WeldN = Instance.new("Weld")
  337. WeldN.Parent = JointG
  338. WeldN.Part0 = Hole
  339. WeldN.Part1 = JointG
  340. WeldN.C0 = CFrame.new(-0.35,0.5,-0.35) * CFrame.Angles(0,math.pi/2/2,0)
  341.  
  342. --[[ * JointH * ]]--
  343.  
  344. JointH = Instance.new("Part")
  345. JointH.formFactor = "Custom"
  346. JointH.Locked = true
  347. JointH.CanCollide = false
  348. JointH.BrickColor = BrickColor.new(HColor)
  349. JointH.Anchored = false
  350. JointH.Size = Vector3.new(HWidth,1,0.2)
  351. JointH.TopSurface = 0
  352. JointH.BottomSurface = 0
  353. JointH.Parent = Gun
  354. MeshO = Instance.new("BlockMesh",JointH)
  355. MeshO.Bevel = HBevel
  356. WeldO = Instance.new("Weld")
  357. WeldO.Parent = JointH
  358. WeldO.Part0 = Hole
  359. WeldO.Part1 = JointH
  360. WeldO.C0 = CFrame.new(0.35,0.5,-0.35) * CFrame.Angles(0,-math.pi/2/2,0)
  361.  
  362. --[[ * PartX * ]]--
  363.  
  364. PartX = Instance.new("Part")
  365. PartX.formFactor = "Custom"
  366. PartX.Locked = true
  367. PartX.CanCollide = false
  368. PartX.BrickColor = BrickColor.new(HColor)
  369. PartX.Anchored = false
  370. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  371. PartX.TopSurface = 0
  372. PartX.BottomSurface = 0
  373. PartX.Parent = Gun
  374. MeshX1 = Instance.new("BlockMesh",PartX)
  375. MeshX1.Bevel = HBevel
  376. WeldX = Instance.new("Weld")
  377. WeldX.Parent = PartX
  378. WeldX.Part0 = JointA
  379. WeldX.Part1 = PartX
  380. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  381.  
  382. --[[ * PartX * ]]--
  383.  
  384. PartX = Instance.new("Part")
  385. PartX.formFactor = "Custom"
  386. PartX.Locked = true
  387. PartX.CanCollide = false
  388. PartX.BrickColor = BrickColor.new(HColor)
  389. PartX.Anchored = false
  390. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  391. PartX.TopSurface = 0
  392. PartX.BottomSurface = 0
  393. PartX.Parent = Gun
  394. MeshX2 = Instance.new("BlockMesh",PartX)
  395. MeshX2.Bevel = HBevel
  396. WeldX = Instance.new("Weld")
  397. WeldX.Parent = PartX
  398. WeldX.Part0 = JointB
  399. WeldX.Part1 = PartX
  400. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  401.  
  402. --[[ * PartX * ]]--
  403.  
  404. PartX = Instance.new("Part")
  405. PartX.formFactor = "Custom"
  406. PartX.Locked = true
  407. PartX.CanCollide = false
  408. PartX.BrickColor = BrickColor.new(HColor)
  409. PartX.Anchored = false
  410. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  411. PartX.TopSurface = 0
  412. PartX.BottomSurface = 0
  413. PartX.Parent = Gun
  414. MeshX3 = Instance.new("BlockMesh",PartX)
  415. MeshX3.Bevel = HBevel
  416. WeldX = Instance.new("Weld")
  417. WeldX.Parent = PartX
  418. WeldX.Part0 = JointC
  419. WeldX.Part1 = PartX
  420. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  421.  
  422. --[[ * PartX * ]]--
  423.  
  424. PartX = Instance.new("Part")
  425. PartX.formFactor = "Custom"
  426. PartX.Locked = true
  427. PartX.CanCollide = false
  428. PartX.BrickColor = BrickColor.new(HColor)
  429. PartX.Anchored = false
  430. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  431. PartX.TopSurface = 0
  432. PartX.BottomSurface = 0
  433. PartX.Parent = Gun
  434. MeshX4 = Instance.new("BlockMesh",PartX)
  435. MeshX4.Bevel = HBevel
  436. WeldX = Instance.new("Weld")
  437. WeldX.Parent = PartX
  438. WeldX.Part0 = JointD
  439. WeldX.Part1 = PartX
  440. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  441.  
  442. --[[ * PartX * ]]--
  443.  
  444. PartX = Instance.new("Part")
  445. PartX.formFactor = "Custom"
  446. PartX.Locked = true
  447. PartX.CanCollide = false
  448. PartX.BrickColor = BrickColor.new(HColor)
  449. PartX.Anchored = false
  450. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  451. PartX.TopSurface = 0
  452. PartX.BottomSurface = 0
  453. PartX.Parent = Gun
  454. MeshX5 = Instance.new("BlockMesh",PartX)
  455. MeshX5.Bevel = HBevel
  456. WeldX = Instance.new("Weld")
  457. WeldX.Parent = PartX
  458. WeldX.Part0 = JointE
  459. WeldX.Part1 = PartX
  460. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  461.  
  462. --[[ * PartX * ]]--
  463.  
  464. PartX = Instance.new("Part")
  465. PartX.formFactor = "Custom"
  466. PartX.Locked = true
  467. PartX.CanCollide = false
  468. PartX.BrickColor = BrickColor.new(HColor)
  469. PartX.Anchored = false
  470. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  471. PartX.TopSurface = 0
  472. PartX.BottomSurface = 0
  473. PartX.Parent = Gun
  474. MeshX6 = Instance.new("BlockMesh",PartX)
  475. MeshX6.Bevel = HBevel
  476. WeldX = Instance.new("Weld")
  477. WeldX.Parent = PartX
  478. WeldX.Part0 = JointF
  479. WeldX.Part1 = PartX
  480. WeldX.C0 = CFrame.new(0,0.4,-0.2) * CFrame.Angles(0,0,0)
  481.  
  482. --[[ * PartX * ]]--
  483.  
  484. PartX = Instance.new("Part")
  485. PartX.formFactor = "Custom"
  486. PartX.Locked = true
  487. PartX.CanCollide = false
  488. PartX.BrickColor = BrickColor.new(HColor)
  489. PartX.Anchored = false
  490. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  491. PartX.TopSurface = 0
  492. PartX.BottomSurface = 0
  493. PartX.Parent = Gun
  494. MeshX7 = Instance.new("BlockMesh",PartX)
  495. MeshX7.Bevel = HBevel
  496. WeldX = Instance.new("Weld")
  497. WeldX.Parent = PartX
  498. WeldX.Part0 = JointG
  499. WeldX.Part1 = PartX
  500. WeldX.C0 = CFrame.new(0,0.4,0.2) * CFrame.Angles(0,0,0)
  501.  
  502. --[[ * PartX * ]]--
  503.  
  504. PartX = Instance.new("Part")
  505. PartX.formFactor = "Custom"
  506. PartX.Locked = true
  507. PartX.CanCollide = false
  508. PartX.BrickColor = BrickColor.new(HColor)
  509. PartX.Anchored = false
  510. PartX.Size = Vector3.new(HWidth,0.2,0.5)
  511. PartX.TopSurface = 0
  512. PartX.BottomSurface = 0
  513. PartX.Parent = Gun
  514. MeshX8 = Instance.new("BlockMesh",PartX)
  515. MeshX8.Bevel = HBevel
  516. WeldX = Instance.new("Weld")
  517. WeldX.Parent = PartX
  518. WeldX.Part0 = JointH
  519. WeldX.Part1 = PartX
  520. WeldX.C0 = CFrame.new(0,0.4,0.2) * CFrame.Angles(0,0,0)
  521.  
  522. for i = 1,7 do
  523. WeldD.C0 = WeldD.C0 - Vector3.new(0,0.1*i,0)
  524. end
  525. for i = 1,7 do wait()
  526. WeldD.C0 = WeldD.C0 + Vector3.new(0,0.1*i,0)
  527. end
  528.  
  529. function ShootOn()
  530.  
  531. for i = 1,7 do wait()
  532. WeldD.C0 = WeldD.C0 - Vector3.new(0,0.01*i,0)
  533. WeldA.C0 = WeldA.C0 + Vector3.new(0,0.01*i,0)
  534. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0,0,0.01*i/2)
  535. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.02*i/2)
  536. WeldH.C0 = WeldH.C0 * CFrame.Angles(0.1*i/3,0,0)
  537. WeldI.C0 = WeldI.C0 * CFrame.Angles(0.1*i/3,0,0)
  538. WeldJ.C0 = WeldJ.C0 * CFrame.Angles(0.1*i/3,0,0)
  539. WeldK.C0 = WeldK.C0 * CFrame.Angles(0.1*i/3,0,0)
  540. WeldL.C0 = WeldL.C0 * CFrame.Angles(0.1*i/3,0,0)
  541. WeldM.C0 = WeldM.C0 * CFrame.Angles(0.1*i/3,0,0)
  542. WeldN.C0 = WeldN.C0 * CFrame.Angles(-0.1*i/3,0,0)
  543. WeldO.C0 = WeldO.C0 * CFrame.Angles(-0.1*i/3,0,0)
  544. MeshH.Scale = MeshH.Scale + Vector3.new(HMesh,0,0)
  545. MeshI.Scale = MeshI.Scale + Vector3.new(HMesh,0,0)
  546. MeshJ.Scale = MeshJ.Scale + Vector3.new(HMesh,0,0)
  547. MeshK.Scale = MeshK.Scale + Vector3.new(HMesh,0,0)
  548. MeshL.Scale = MeshL.Scale + Vector3.new(HMesh,0,0)
  549. MeshM.Scale = MeshM.Scale + Vector3.new(HMesh,0,0)
  550. MeshN.Scale = MeshN.Scale + Vector3.new(HMesh,0,0)
  551. MeshO.Scale = MeshO.Scale + Vector3.new(HMesh,0,0)
  552. MeshX1.Scale = MeshX1.Scale + Vector3.new(HMesh,0,0)
  553. MeshX2.Scale = MeshX1.Scale
  554. MeshX3.Scale = MeshX1.Scale
  555. MeshX4.Scale = MeshX1.Scale
  556. MeshX5.Scale = MeshX1.Scale
  557. MeshX6.Scale = MeshX1.Scale
  558. MeshX7.Scale = MeshX1.Scale
  559. MeshX8.Scale = MeshX1.Scale
  560. end
  561. end
  562.  
  563. function ShootOff()
  564. for i = 1,7 do wait()
  565. WeldD.C0 = WeldD.C0 + Vector3.new(0,0.01*i,0)
  566. WeldA.C0 = WeldA.C0 - Vector3.new(0,0.01*i,0)
  567. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0,0,0.01*i/2)
  568. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.02*i/2)
  569. WeldH.C0 = WeldH.C0 * CFrame.Angles(-0.1*i/3,0,0)
  570. WeldI.C0 = WeldI.C0 * CFrame.Angles(-0.1*i/3,0,0)
  571. WeldJ.C0 = WeldJ.C0 * CFrame.Angles(-0.1*i/3,0,0)
  572. WeldK.C0 = WeldK.C0 * CFrame.Angles(-0.1*i/3,0,0)
  573. WeldL.C0 = WeldL.C0 * CFrame.Angles(-0.1*i/3,0,0)
  574. WeldM.C0 = WeldM.C0 * CFrame.Angles(-0.1*i/3,0,0)
  575. WeldN.C0 = WeldN.C0 * CFrame.Angles(0.1*i/3,0,0)
  576. WeldO.C0 = WeldO.C0 * CFrame.Angles(0.1*i/3,0,0)
  577. MeshH.Scale = MeshH.Scale - Vector3.new(HMesh,0,0)
  578. MeshI.Scale = MeshI.Scale - Vector3.new(HMesh,0,0)
  579. MeshJ.Scale = MeshJ.Scale - Vector3.new(HMesh,0,0)
  580. MeshK.Scale = MeshK.Scale - Vector3.new(HMesh,0,0)
  581. MeshL.Scale = MeshL.Scale - Vector3.new(HMesh,0,0)
  582. MeshM.Scale = MeshM.Scale - Vector3.new(HMesh,0,0)
  583. MeshN.Scale = MeshN.Scale - Vector3.new(HMesh,0,0)
  584. MeshO.Scale = MeshO.Scale - Vector3.new(HMesh,0,0)
  585. MeshX1.Scale = MeshX1.Scale - Vector3.new(HMesh,0,0)
  586. MeshX2.Scale = MeshX1.Scale
  587. MeshX3.Scale = MeshX1.Scale
  588. MeshX4.Scale = MeshX1.Scale
  589. MeshX5.Scale = MeshX1.Scale
  590. MeshX6.Scale = MeshX1.Scale
  591. MeshX7.Scale = MeshX1.Scale
  592. MeshX8.Scale = MeshX1.Scale
  593. end
  594. end
  595.  
  596. ReloadT = false
  597.  
  598. function Reload()
  599. if EndBlah == false and ReloadT == true then
  600. for i = 1,10 do wait()
  601. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-0.1,0,0.1)
  602. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0.04,-0.05,0)
  603. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0.04,0,0)
  604. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.11,0.02,0)
  605. end
  606. for i = 1,10 do wait()
  607. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0.04,0,0)
  608. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.05,-0.04,0)
  609. WeldD.C0 = WeldD.C0 - Vector3.new(0,0.1,0)
  610. end
  611. WeldD.Part0 = Character["Left Arm"]
  612. WeldD.C0 = CFrame.new(0.3,-0.65,0.85) * CFrame.Angles(math.pi/2-0.3,0,-0.2)
  613. for i = 1,10 do wait()--
  614. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0.04,0,0)
  615. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.05,-0.04,0)
  616. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0.05,-0.1)
  617. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,-0.031,0)
  618. end
  619. for i = 1,10 do wait() --
  620. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-0.1,0,0)
  621. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0.03,0.01,-0.05)
  622. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-0.1,-0.1,-0.05)
  623. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.06,0.03)
  624. end
  625. for i = 1,10 do wait() --
  626. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,0,0)
  627. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0.1,-0.1)
  628. end
  629. for i = 1,10 do wait() --
  630. Fluid.Transparency = Fluid.Transparency - 0.1
  631. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2/2/2/2,0,math.pi/10/2/2/2)
  632. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.01,0.01,0)
  633. end
  634. Fluid.Transparency = 0
  635. for i = 1,10 do wait()
  636. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.01,0.01,0)
  637. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2/2/2/2,0,-math.pi/10/2/2/2)
  638. end
  639. for i = 1,10 do wait()
  640. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0.1,-0.1)
  641. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,0,0)
  642. end
  643. for i = 1,10 do wait()
  644. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.06,0.03)
  645. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0.1,0.1,0.05)
  646. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0.03,0.01,-0.05)
  647. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0.1,0,0)
  648. end
  649. for i = 1,10 do wait()
  650. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,0.031,0)
  651. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,-0.05,0.1)
  652. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.05,-0.04,0)
  653. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-0.04,0,0)
  654. end
  655. for i = 1,10 do wait()
  656. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.05,-0.04,0)
  657. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-0.04,0,0)
  658. WeldD.C0 = WeldD.C0 * CFrame.Angles(0.05,0,0)
  659. WeldD.C0 = WeldD.C0 + Vector3.new(0,-0.04,0.07)
  660. end
  661. WeldD.Part0 = Barrel
  662. WeldD.C0 = CFrame.new(0,-1,0) * CFrame.Angles(0,0,0)
  663. for i = 1,10 do wait()
  664. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.11,0.02,0)
  665. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-0.04,0,0)
  666. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0.04,-0.05,0)
  667. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0.1,0,-0.1)
  668. end
  669. ArmWeld.C0 = CFrame.new(1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  670. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  671. for i = 1,10 do
  672. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  673. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0,0,0.05)
  674. end
  675. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  676. for i = 1,10 do
  677. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  678. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.04,0.06,0.03)
  679. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-0.05,0.1)
  680. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.12,-0.05,0.05)
  681. end
  682. ReloadT = false
  683. end
  684. end
  685.  
  686. function Shoot(a)
  687. local p = Instance.new("Part")
  688. p.Locked = true
  689. p.CanCollide = false
  690. p.Anchored = false
  691. p.formFactor = "Custom"
  692. p.Shape = "Ball"
  693. p.TopSurface = 0
  694. p.BottomSurface = 0
  695. p.BrickColor = BrickColor.new(104)
  696. p.Size = Vector3.new(0.8,0.8,0.8)
  697. p.Reflectance = 0.25
  698. local s = Instance.new("Sparkles")
  699. s.Parent = p
  700. local g = Instance.new("BodyGyro")
  701. g.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  702. g.Parent = p
  703. local b = Instance.new("BodyVelocity")
  704. b.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  705. b.Parent = p
  706. p.Parent = game.Workspace
  707. p.CFrame = Hole.CFrame
  708. g.cframe = CFrame.new(Hole.Position,a)
  709. b.velocity = g.cframe.lookVector * 50
  710. p.Touched:connect(function(h)
  711. if h.Parent.Name ~= "Gun" and h.Parent.Name ~= "bob371" then
  712. local e = Instance.new("Explosion")
  713. e.BlastRadius = 20
  714. e.Position = p.Position
  715. e.Parent = game.Workspace
  716. end
  717. end)
  718. end
  719.  
  720. --[[ * Tool * ]]--
  721.  
  722. repeat wait() until script.Parent.Name == Player.Name
  723.  
  724. Hopper = Instance.new("HopperBin")
  725. Hopper.Name = "Plasma Cannon"
  726. Hopper.Parent = Player.Backpack
  727.  
  728.  
  729. Blah = true
  730. EndBlah = true
  731.  
  732. function Clicked(Mouse)
  733. if Blah == true and EndBlah == false then
  734. Blah = false
  735. if Fluid.Transparency <= 0.9 then
  736. ShootOn()
  737. Shoot(Mouse.Hit.p)
  738. Fluid.Transparency = Fluid.Transparency + 0.1
  739. ShootOff()
  740. else
  741. ReloadT = true
  742. end
  743. Blah = true
  744. end
  745. end
  746.  
  747. function onKeyDown(key)
  748. if Blah == true then
  749. Blah = false
  750.  
  751. if key == "p" then
  752. if EndBlah == true then
  753. for i = 1,10 do wait()
  754. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  755. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0,0,0.05)
  756. end
  757. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  758. for i = 1,10 do wait()
  759. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  760. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.04,0.06,0.03)
  761. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-0.05,0.1)
  762. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.12,-0.05,0.05)
  763. end
  764. EndBlah = false
  765. elseif EndBlah == false then
  766. for i = 1,10 do wait()
  767. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0)
  768. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(-0.04,0.06,0.03)
  769. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,0.05,-0.1)
  770. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.12,-0.05,0.05)
  771. end
  772. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  773. for i = 1,10 do wait()
  774. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0)
  775. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0,0,0.05)
  776. end
  777. EndBlah = true
  778. end
  779. end
  780.  
  781. if key == "r" then
  782. Reload()
  783. end
  784.  
  785. Blah = true
  786. return
  787. end
  788. end
  789.  
  790.  
  791. function Selected(Mouse)
  792. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  793. Mouse.KeyDown:connect(onKeyDown)
  794. Mouse.Button1Down:connect(function()Clicked(Mouse)end)
  795. end
  796.  
  797. function Deselected(Mouse)
  798. end
  799.  
  800. function Dead()
  801. end
  802.  
  803. Character.Humanoid.Died:connect(Dead)
  804. Hopper.Selected:connect(Selected)
  805. Hopper.Deselected:connect(Deselected)
Add Comment
Please, Sign In to add comment