Advertisement
astronaut32

RECTANGLE BLAD

Dec 14th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. local Me = game.Players.LocalPlayer
  2.  
  3.  
  4. if script.Parent.className ~= "HopperBin" then
  5. local h = Instance.new("HopperBin", Me.Backpack)
  6. h.Name = "Swords"
  7. script.Parent = h
  8. end
  9.  
  10.  
  11. char = Me.Character
  12. Torso = char.Torso
  13. Rarm = char["Right Arm"]
  14. Larm = char["Left Arm"]
  15. local bin = script.Parent
  16.  
  17. pcall(function() char[":P"]:remove() end)
  18.  
  19. local Model = Instance.new("Model",char)
  20. Model.Name = ":P"
  21.  
  22. local RAB = Instance.new("Part") -- Right Arm Brick
  23. RAB.formFactor = "Custom"
  24. RAB.Size = Vector3.new(0.2, 0.2, 0.2)
  25. RAB.Transparency = 1
  26. RAB.Parent = Model
  27. RAB:BreakJoints()
  28.  
  29. local RABW = Instance.new("Weld",RAB) -- Right Arm Brick Weld
  30. RABW.Part0 = Torso
  31. RABW.Part1 = RAB
  32. RABW.C1 = CFrame.new(-1.5, -0.5, 0)
  33.  
  34. local LAB = Instance.new("Part") -- Right Arm Brick
  35. LAB.formFactor = "Custom"
  36. LAB.Size = Vector3.new(0.2, 0.2, 0.2)
  37. LAB.Transparency = 1
  38. LAB.Parent = Model
  39. LAB:BreakJoints()
  40.  
  41. local LABW = Instance.new("Weld",LAB) -- Left Arm Brick Weld
  42. LABW.Part0 = Torso
  43. LABW.Part1 = LAB
  44. LABW.C1 = CFrame.new(1.5, -0.5, 0)
  45.  
  46. local RAW = Instance.new("Weld",RAB) -- Right Arm Weld
  47. RAW.Part0 = RAB
  48. RAW.Part1 = nil
  49. RAW.C1 = CFrame.new(0, 0.5, 0)
  50.  
  51. local LAW = Instance.new("Weld",LAB) -- Left Arm Weld
  52. LAW.Part0 = LAB
  53. LAW.Part1 = nil
  54. LAW.C1 = CFrame.new(0, 0.5, 0)
  55.  
  56. mo = Instance.new("Model")
  57. mo.Name = "Swords"
  58. mo.Parent = Me.Character
  59.  
  60. function new(part, x, y, z, parent, color)
  61. local brick = part
  62. brick.formFactor = "Custom"
  63. brick:BreakJoints()
  64. brick.CanCollide = false
  65. brick.Size = Vector3.new(x, y, z)
  66. brick.Parent = parent
  67. brick.BrickColor = BrickColor.new(color)
  68. end
  69. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  70. part.Parent = parent
  71. part.formFactor = form
  72. part.CanCollide = collide
  73. part.Transparency = tran
  74. part.Reflectance = ref
  75. part.Size = Vector3.new(x,y,z)
  76. part.BrickColor = BrickColor.new(color)
  77. part.TopSurface = 0
  78. part.BottomSurface = 0
  79. part.Anchored = anchor
  80. part.Locked = true
  81. part:BreakJoints()
  82. end
  83. function mesh(mesh, parent, x, y, z, type)
  84. mesh.Parent = parent
  85. mesh.Scale = Vector3.new(x, y, z)
  86. mesh.MeshType = type
  87. end
  88. function mes(mesh, x, y, z, parent)
  89. local mes = mesh
  90. mes.Scale = Vector3.new(x, y, z)
  91. mes.Parent = parent
  92. end
  93. function wel(weld, x, y, z, parent, part, parta, xx, yy, zz)
  94. local wel = weld
  95. wel.Parent = parent
  96. wel.Part0 = part
  97. wel.Part1 = parta
  98. wel.C1 = CFrame.new(x, y, z) * CFrame.Angles(xx, yy, zz)
  99. end
  100.  
  101. h2 = Instance.new("Part")
  102. hm2 = Instance.new("BlockMesh")
  103. hw2 = Instance.new("Weld")
  104. new(h2, 0.75, 0.2, 0.2, mo, "Brown")
  105. mes(hm2, 1.01, 1.01, 1.01, h2)
  106. wel(hw2, 0, -2.1, -0.51, h2, Torso, h2, 0, 0, -5.5)
  107. h4 = Instance.new("Part")
  108. hm4 = Instance.new("SpecialMesh")
  109. hw4 = Instance.new("Weld")
  110. new(h4, 0.35, 1, 0.2, mo, "Brown")
  111. mes(hm4, 1.01, 1.01, 1.01, h4)
  112. wel(hw4, 0, -0.5, 0, h4, h2, h4, 0, 0, 0)
  113. h1 = Instance.new("Part")
  114. hm1 = Instance.new("BlockMesh")
  115. hw1 = Instance.new("Weld")
  116. new(h1, 0.75, 0.2, 0.2, mo, "Brown")
  117. mes(hm1, 1.01, 1.01, 1.01, h2)
  118. wel(hw1, 0, -2.1, -0.5, h1, Torso, h1, 0, 0, 5.5)
  119. h4 = Instance.new("Part")
  120. hm4 = Instance.new("SpecialMesh")
  121. hw4 = Instance.new("Weld")
  122. new(h4, 0.35, 1, 0.2, mo, "Brown")
  123. mes(hm4, 1.01, 1.01, 1.01, h4)
  124. wel(hw4, 0, -0.5, 0, h4, h1, h4, 0, 0, 0)
  125. p = Instance.new("Part")
  126. m = Instance.new("BlockMesh")
  127. w = Instance.new("Weld")
  128. new(p, 0.75, 4, 0.2, mo, "Gray")
  129. mes(m, 1.01, 1.01, 1.01, p)
  130. wel(w, 0, 2.1, 0, p, h1, p, 0, 0, 0)
  131. p2 = Instance.new("Part")
  132. m2 = Instance.new("BlockMesh")
  133. w2 = Instance.new("Weld")
  134. new(p2, 0.75, 4, 0.2, mo, "Gray")
  135. mes(m2, 1.01, 1.01, 1.01, p2)
  136. wel(w2, 0, 2.1, 0, p2, h2, p2, 0, 0, 0)
  137.  
  138. function fade(brick,mesh,scale,tran,speed)
  139. coroutine.resume(coroutine.create(function()
  140. for i=tran,1,speed do
  141. wait()
  142. brick.Transparency = i
  143. mesh.Scale = mesh.Scale - Vector3.new(scale,scale,scale)
  144. end
  145. brick:remove()
  146. end))
  147. end
  148.  
  149. function bv(part)
  150. b = Instance.new("BodyVelocity")
  151. b.Parent = part
  152. b.velocity = Vector3.new(0, 25, 0)
  153. wait(1.5)
  154. b.velocity = Vector3.new(0, -75, 0)
  155. wait(0.285)
  156. b:remove()
  157. end
  158. function bvc(part)
  159. b = Instance.new("BodyVelocity")
  160. b.Parent = part
  161. b.velocity = part.CFrame.lookVector * 25
  162. wait(1.5)
  163. b:remove()
  164. end
  165.  
  166. function spikes(part,color)
  167. local p = Instance.new("Part",Me.Character)
  168. prop(p,Me.Character,false,0.4,0,0.2,0.2,0.2,color,true,"Custom")
  169. p.CFrame = part.CFrame * CFrame.new(0,-2.5,-3.5)
  170. local mww = Instance.new("SpecialMesh")
  171. mesh(mww,p,6,5,6,"FileMesh")
  172. mww.MeshId = "http://www.roblox.com/asset/?id=20329976"
  173. fade(p,mww,0.55,p.Transparency,0.08)
  174. end
  175.  
  176. function spikes2(part,color)
  177. local p = Instance.new("Part",Me.Character)
  178. prop(p,Me.Character,false,0.4,0,0.2,0.2,0.2,color,true,"Custom")
  179. p.CFrame = part.CFrame * CFrame.new(0,0,6) * CFrame.Angles(math.pi/2,0,0)
  180. local mww = Instance.new("SpecialMesh")
  181. mesh(mww,p,8,7,8,"FileMesh")
  182. mww.MeshId = "http://www.roblox.com/asset/?id=20329976"
  183. fade(p,mww,0.55,p.Transparency,0.06)
  184. end
  185.  
  186.  
  187. function onSelected(mouse)
  188.  
  189. RAW.Part1 = Rarm
  190. LAW.Part1 = Larm
  191.  
  192. for i = 0, 1, 0.1 do
  193. RAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(-12*i), math.rad(12*i))
  194. LAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(12*i), math.rad(-12*i))
  195. wait()
  196. end
  197.  
  198. h1.Weld.Part0 = Larm
  199. h1.Weld.C1 = CFrame.new(0, 1, -1) * CFrame.Angles(-7.8, 0, 0)
  200. h2.Weld.Part0 = Rarm
  201. h2.Weld.C1 = CFrame.new(0, 1, -1) * CFrame.Angles(-7.8, 0, 0)
  202.  
  203. for i = 0, 1, 0.1 do
  204. RAW.C0 = CFrame.Angles(math.rad(210-185*i), math.rad(-12+12*i), math.rad(12*i))
  205. LAW.C0 = CFrame.Angles(math.rad(210-185*i), math.rad(12-12*i), math.rad(-12*i))
  206. wait()
  207. end
  208.  
  209. --[[ for i = 0, 1, 0.05 do
  210. RAW.C0 = CFrame.Angles(math.rad(90-110*i), 0, math.rad(35*i))
  211. wait()
  212. end
  213. for i = 0, 1, 0.15 do
  214. RAW.C0 = CFrame.Angles(math.rad(175-175*i), 0, math.rad(35-35*i))
  215. wait()
  216. end ]]--
  217.  
  218. mouse.Button1Down:connect(function()
  219. for i = 0, 1, 0.15 do
  220. LAW.C0 = CFrame.Angles(math.rad(90-110*i), math.rad(-12*i), math.rad(-12*i))
  221. wait()
  222. end
  223. spikes(Torso, "Bright blue")
  224. local dist = 5
  225. for _, v in pairs(game.Players:GetChildren()) do
  226. if not v.Character then return end
  227. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  228. if v.Name ~= Torso.Parent.Name then
  229. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(15, 35)
  230. end
  231. end
  232. end
  233. for i = 0, 1, 0.15 do
  234. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  235. wait()
  236. end
  237. end)
  238. mouse.Button2Down:connect(function()
  239. for i = 0, 1, 0.15 do
  240. RAW.C0 = CFrame.Angles(math.rad(90-110*i), math.rad(12*i), math.rad(12*i))
  241. wait()
  242. end
  243. spikes(Torso, "Bright blue")
  244. local dist = 5
  245. for _, v in pairs(game.Players:GetChildren()) do
  246. if not v.Character then return end
  247. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  248. if v.Name ~= Torso.Parent.Name then
  249. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(15, 35)
  250. end
  251. end
  252. end
  253. for i = 0, 1, 0.15 do
  254. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  255. wait()
  256. end
  257. end)
  258. mouse.KeyDown:connect(function(key)
  259. if key == "q" then
  260. for i = 0, 1, 0.15 do
  261. RAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(12*i), math.rad(12*i))
  262. LAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(-12*i), math.rad(-12*i))
  263. wait()
  264. end
  265. spikes2(Torso, "Bright blue")
  266. bv(Torso)
  267. wait(0.75)
  268. spikes(Torso, "Bright blue")
  269. local dist = 5
  270. for _, v in pairs(game.Players:GetChildren()) do
  271. if not v.Character then return end
  272. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  273. if v.Name ~= Torso.Parent.Name then
  274. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(25, 45)
  275. end
  276. end
  277. end
  278. for i = 0, 1, 0.15 do
  279. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  280. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  281. wait()
  282. end
  283. end
  284. if key == "e" then
  285. for i = 0, 1, 0.15 do
  286. RAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(12*i), math.rad(12*i))
  287. LAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(-12*i), math.rad(-12*i))
  288. wait()
  289. end
  290. spikes2(Torso, "Bright blue")
  291. bvc(Torso)
  292. wait(0.75)
  293. spikes(Torso, "Bright blue")
  294. local dist = 5
  295. for _, v in pairs(game.Players:GetChildren()) do
  296. if not v.Character then return end
  297. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  298. if v.Name ~= Torso.Parent.Name then
  299. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(25, 45)
  300. end
  301. end
  302. end
  303. for i = 0, 1, 0.15 do
  304. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  305. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  306. wait()
  307. end
  308. end
  309. end)
  310. end
  311.  
  312. function onDesel(mouse)
  313. for i = 0, 1, 0.1 do
  314. RAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(-12*i), math.rad(12*i))
  315. LAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(12*i), math.rad(-12*i))
  316. wait()
  317. end
  318. h1.Weld.Part0 = Torso
  319. h1.Weld.C1 = CFrame.new(0, -2.1, -0.51) * CFrame.Angles(0, 0, 5.5)
  320. h2.Weld.Part0 = Torso
  321. h2.Weld.C1 = CFrame.new(0, -2.1, -0.51) * CFrame.Angles(0, 0, -5.5)
  322. for i = 0, 1, 0.1 do
  323. RAW.C0 = CFrame.Angles(math.rad(210-210*i), math.rad(-12+12*i), math.rad(12-12*i))
  324. LAW.C0 = CFrame.Angles(math.rad(210-210*i), math.rad(12-12*i), math.rad(-12+12*i))
  325. wait()
  326. end
  327. RAW.Part1 = nil
  328. LAW.Part1 = nil
  329. end
  330.  
  331. bin.Selected:connect(onSelected)
  332. bin.Deselected:connect(onDesel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement