Advertisement
Treyzotic

arm cannon

Sep 21st, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.90 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. Player = game.Players.LocalPlayer
  3. gun = {"cy(mesh)", "front"}
  4. RightShoulder = Player.Character.Torso["Right Shoulder"]
  5. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  6. Run = game:GetService("RunService")
  7. local MyMouse = game.Players.LocalPlayer:GetMouse()
  8. cannon = false
  9. function Weld()
  10. local w = Instance.new("Weld")
  11. w.Part0 = plr.Character.cy
  12. w.Part1 = plr.Character["Right Arm"]
  13. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  14. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -.4, 0) --This is the second brick (the one you want to move most of the
  15. w.Parent = game.Workspace
  16. end
  17. function srd()
  18. local w = Instance.new("Weld")
  19. w.Part0 = plr.Character.cy
  20. w.Part1 = game.Workspace.kut
  21. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 2.5) * CFrame.new(0, .5, 0) --First CFrame is rotation, second Cframe is where it goes.
  22. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --This is the second brick (the one you want to move most of the
  23. w.Parent = game.Workspace
  24. local w = Instance.new("Weld")
  25. w.Part0 = game.Workspace.bld
  26. w.Part1 = game.Workspace.kut
  27. w.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0) --First CFrame is rotation, second Cframe is where it goes.
  28. w.C1 = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) * CFrame.new(0, 1.4, 0) --This is the second brick (the one you want to move most of the
  29. w.Parent = game.Workspace
  30. end
  31. function cyncy2()
  32. local t = Instance.new("Weld", game.Workspace)
  33. t.Part0 = plr.Character.cy
  34. t.Part1 = plr.Character.cy2
  35. t.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0)
  36. t.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -.67, 0)
  37. end
  38. MyMouse.KeyDown:connect(function(key)
  39. if string.lower(key) == "q" then
  40. cannon = true
  41. local cy = Instance.new("Part", plr.Character)
  42. cy.Name = "cy"
  43. cy.CanCollide = false
  44. cy.Shape = "Cylinder"
  45. local cy2 = Instance.new("Part", plr.Character)
  46. cy2.Name = "cy2"
  47. cy2.Shape = "Cylinder"
  48. cy2.CanCollide = true
  49. cy2.Color = Color3.new(0,0,0)
  50. local cy2m = Instance.new("CylinderMesh", cy2)
  51. cy2m.Scale = Vector3.new(.2, .4, .3)
  52. wait(.1)
  53. local cym = Instance.new("CylinderMesh", plr.Character.cy)
  54. cym.Scale = Vector3.new(.3, .7, .5)
  55. wait(.01)
  56. Weld()
  57. cyncy2()
  58. end
  59. end)
  60. MyMouse.KeyDown:connect(function(key)
  61. if string.lower(key) == "e" and cannon == true then
  62. cannon = false
  63. plr.Character.cy:Destroy()
  64. plr.Character.cy2:Destroy()
  65. if game.Workspace.kut then
  66. game.Workspace.kut:Destroy()
  67. end
  68. end
  69. end)
  70. MyMouse.KeyDown:connect(function(key)
  71. if string.lower(key) == "z" and cannon == true then
  72. local function onTouched(part)
  73. local h = part.Parent:findFirstChild("Humanoid")
  74. if h~=nil then
  75. h.Health = h.Health -35 -- -n tells how much health to subtract. You can also add health with +n
  76. end
  77. end
  78. RightShoulder = Player.Character.Torso["Right Shoulder"]
  79. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  80. Run = game:GetService("RunService")
  81. for i = 1, 1 do
  82. for i = 1, 12 do
  83. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  84. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, .13)
  85. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  86. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  87. Run.Stepped:wait(0.01)
  88. end
  89. end
  90. wait(.2)
  91. local b = Instance.new("Part", game.Workspace)
  92. b.Shape = "Ball"
  93. b.Size = Vector3.new(3,3,3)
  94. b.Color = Color3.new(0, 0, 255)
  95. b.Name = "big"
  96. b.CFrame = game.Players.LocalPlayer.Character.cy2.CFrame *CFrame.new(0, -4, -.5)
  97. local bf = Instance.new("BodyVelocity", b)
  98. bf.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  99. bf.velocity = plr.Character.Torso.CFrame.lookVector*80
  100. local se = Instance.new("ParticleEmitter", b)
  101. se.Texture = "http://www.roblox.com/asset/?id=33682777"
  102. se.Rate = 100
  103. se.Speed = NumberRange.new(1, 1)
  104. wait(.1)
  105. for i = 1, 1 do
  106. for i = 1, 12 do
  107. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  108. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  109. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -.13)
  110. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  111. Run.Stepped:wait(0.01)
  112. end
  113. end
  114. b.Touched:connect(onTouched)
  115. wait(1)
  116. b:Destroy()
  117. end
  118. end)
  119. MyMouse.KeyDown:connect(function(key)
  120. if string.lower(key) == "f" and cannon == true then
  121. cannon = true
  122. local function onTouched(part)
  123. local h = part.Parent:findFirstChild("Humanoid")
  124. if h~=nil then
  125. h.Health = h.Health -10 -- -n tells how much health to subtract. You can also add health with +n
  126. end
  127. end
  128. RightShoulder = Player.Character.Torso["Right Shoulder"]
  129. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  130. Run = game:GetService("RunService")
  131. for i = 1, 1 do
  132. for i = 1, 12 do
  133. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  134. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, .13)
  135. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  136. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  137. Run.Stepped:wait(0.01)
  138. end
  139. end
  140. wait(.2)
  141. local b = Instance.new("Part", game.Workspace)
  142. b.Shape = "Ball"
  143. b.Size = Vector3.new(1,1,1)
  144. b.Name = "lb"
  145. b.CFrame = game.Players.LocalPlayer.Character.cy2.CFrame *CFrame.new(0, -3, -.5)
  146. b.Color = Color3.new(0, 0, 255)
  147. local bf = Instance.new("BodyVelocity", b)
  148. bf.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  149. bf.velocity = plr.Character.Torso.CFrame.lookVector*80
  150. local se = Instance.new("ParticleEmitter", b)
  151. se.Texture = "http://www.roblox.com/asset/?id=33682777"
  152. se.Rate = 50
  153. se.Speed = NumberRange.new(1, 1)
  154. wait(.1)
  155. for i = 1, 1 do
  156. for i = 1, 12 do
  157. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  158. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  159. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -.13)
  160. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  161. Run.Stepped:wait(0.01)
  162. end
  163. end
  164. b.Touched:connect(onTouched)
  165. wait(1)
  166. b:Destroy()
  167. end
  168. end)
  169. MyMouse.KeyDown:connect(function(key)
  170. if string.lower(key) == "j" and cannon == true then
  171. RightShoulder = Player.Character.Torso["Right Shoulder"]
  172. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  173. Run = game:GetService("RunService")
  174. for i = 1, 1 do
  175. for i = 1, 12 do
  176. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  177. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.13)
  178. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  179. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  180. Run.Stepped:wait(0.01)
  181. end
  182. end
  183. local l = Instance.new("Part", plr.Character)
  184. l.Name = "thorn"
  185. l.CFrame = plr.Character.cy2.CFrame *CFrame.new(0, 0, 0)
  186. local f = Instance.new("SpecialMesh", l)
  187. f.MeshId = "http://www.roblox.com/asset/?id=1033714"
  188. f.MeshType = 9
  189. end
  190. end)
  191. MyMouse.KeyUp:connect(function(key)
  192. if string.lower(key) == "j" then
  193. RightShoulder = Player.Character.Torso["Right Shoulder"]
  194. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  195. Run = game:GetService("RunService")
  196. local l = plr.Character.thorn
  197. l:Destroy()
  198. wait(.01)
  199. for i = 1, 1 do
  200. for i = 1, 12 do
  201. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  202. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  203. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -.13)
  204. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  205. Run.Stepped:wait(0.01)
  206. end
  207. end
  208. end
  209. end)
  210. cannon1 = {cannon = true}
  211. MyMouse.KeyDown:connect(function(key)
  212. if string.lower(key) == "t" then
  213. RightShoulder = Player.Character.Torso["Right Shoulder"]
  214. LeftShoulder = Player.Character.Torso["Left Shoulder"]
  215. Run = game:GetService("RunService")
  216. for i = 1, 1 do
  217. for i = 1, 12 do
  218. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  219. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, .13)
  220. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  221. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  222. Run.Stepped:wait(0.01)
  223. end
  224. end
  225. local handle = Instance.new("Part", game.Workspace)
  226. handle.Name = "kut"
  227. local hm = Instance.new("BlockMesh", handle)
  228. hm.Scale = Vector3.new(.5, .2, .3)
  229. wait(.01)
  230. srd()
  231. end
  232. end)
  233. MyMouse.KeyUp:connect(function(key)
  234. if string.lower(key) == "t" then
  235. for i = 1, 1 do
  236. for i = 1, 12 do
  237. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  238. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -.13)
  239. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  240. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  241. Run.Stepped:wait(0.01)
  242. end
  243. end
  244. end
  245. end)
  246. MyMouse.KeyDown:connect(function(key)
  247. if string.lower(key) == "n" and cannon == true then
  248. for i = 1, 1 do
  249. for i = 1, 12 do
  250. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  251. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, .13)
  252. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  253. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  254. Run.Stepped:wait(0.01)
  255. end
  256. end
  257. local light = Instance.new("SpotLight", plr.Character.cy2)
  258. light.Angle = 75
  259. light.Brightness = 100
  260. light.Face = "Bottom"
  261. light.Name = "l"
  262. end
  263. end)
  264. MyMouse.KeyUp:connect(function(key)
  265. if string.lower(key) == "n" then
  266. plr.Character.cy2.l:Destroy()
  267. for i = 1, 1 do
  268. for i = 1, 12 do
  269. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  270. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -.13)
  271. RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
  272. LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
  273. Run.Stepped:wait(0.01)
  274. end
  275. end
  276. end
  277. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement