Advertisement
aarontje11002

katana mijn eigen

Mar 21st, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.93 KB | None | 0 0
  1. local name = "aaronremmers14"
  2. local me = game.Players.aaronremmers14
  3. local char = me.Character
  4. selected = false
  5. attacking = false
  6. attack = false
  7. dela = 0.4
  8. normdmg = 9
  9. avgdmg = normdmg
  10. normal = 14
  11. speed = 14
  12. normchance = 9333333333333
  13. criticalchance = normchance
  14. splashdist = 14333333333333333333333333333333333333333333333333
  15. plat = 1
  16. healcols = {"Bright blue", "Light blue", "Medium blue", "White"}
  17. if char:findFirstChild("Sword",true) ~= nil then
  18. char:findFirstChild("Sword",true).Parent = nil
  19. end
  20. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  21. part.Parent = parent
  22. part.formFactor = form
  23. part.CanCollide = collide
  24. part.Transparency = tran
  25. part.Reflectance = ref
  26. part.Size = Vector3.new(x,y,z)
  27. part.BrickColor = BrickColor.new(color)
  28. part.TopSurface = 0
  29. part.BottomSurface = 0
  30. part.Anchored = anchor
  31. part.Locked = true
  32. part:BreakJoints()
  33. end
  34. function weld(w, p, p1, a, b, c, x, y, z)
  35. w.Parent = p
  36. w.Part0 = p
  37. w.Part1 = p1
  38. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  39. end
  40. function mesh(mesh, parent, x, y, z, type)
  41. mesh.Parent = parent
  42. mesh.Scale = Vector3.new(x, y, z)
  43. mesh.MeshType = type
  44. end
  45. function getcharparts(path)
  46. local objs = {}
  47. for _,v in pairs(path:children()) do
  48. if v:IsA("Model") and v.Name ~= name then
  49. for _,k in pairs(v:children()) do
  50. if k.Name == "Torso" then
  51. table.insert(objs,k)
  52. end
  53. end
  54. end
  55. end
  56. return objs
  57. end
  58. sword = Instance.new("Model",me.Character)
  59. sword.Name = "Sword"
  60. --Parts-------------------------Parts-------------------------Parts-------------------------Parts----------------------
  61. rarm = char:findFirstChild("Right Arm")
  62. larm = char:findFirstChild("Left Arm")
  63. torso = char:findFirstChild("Torso")
  64. hum = char:findFirstChild("Humanoid")
  65. main = Instance.new("Part")
  66. prop(main, sword, false, 0, 0, 0.38, 2.2, 0.38, "White", false, "Custom")
  67. mme = Instance.new("SpecialMesh")
  68. mesh(mme,main,1,1,1,"Head")
  69. part1 = Instance.new("Part")
  70. prop(part1, sword, false, 0, 0, 0.7, 0.45, 0.4, "Medium blue", false, "Custom")
  71. p1m = Instance.new("BlockMesh",part1)
  72. w1 = Instance.new("Weld")
  73. weld(w1, main, part1, 0, 0, 0, 0, 0.9, 0)
  74. part2 = Instance.new("Part")
  75. prop(part2, sword, false, 0, 0, 0.7, 0.45, 0.4, "Medium blue", false, "Custom")
  76. p2m = Instance.new("BlockMesh",part2)
  77. w2 = Instance.new("Weld")
  78. weld(w2, main, part2, 0, 0, 0.8, 0.5, 0.85, 0)
  79. part3 = Instance.new("Part")
  80. prop(part3, sword, false, 0, 0, 0.7, 0.45, 0.4, "Medium blue", false, "Custom")
  81. p3m = Instance.new("BlockMesh",part3)
  82. w3 = Instance.new("Weld")
  83. weld(w3, main, part3, 0, 0, -0.8, -0.5, 0.85, 0)
  84. part4 = Instance.new("Part")
  85. prop(part4, sword, false, 0, 0, 1.3, 0.45, 0.4, "Medium blue", false, "Custom")
  86. p4m = Instance.new("BlockMesh",part4)
  87. w4 = Instance.new("Weld")
  88. weld(w4, main, part4, 0, 0, -1.25, 0.8, 1, 0)
  89. part5 = Instance.new("Part")
  90. prop(part5, sword, false, 0, 0, 1.3, 0.45, 0.4, "Medium blue", false, "Custom")
  91. p5m = Instance.new("BlockMesh",part5)
  92. w5 = Instance.new("Weld")
  93. weld(w5, main, part5, 0, 0, 1.25, -0.8, 1, 0)
  94. part6 = Instance.new("Part")
  95. prop(part6, sword, false, 0, 0, 0.45, 0.6, 0.45, "Light blue", false, "Custom")
  96. p6m = Instance.new("SpecialMesh")
  97. mesh(p6m,part6,1.3,1.2,1.3,"Sphere")
  98. w6 = Instance.new("Weld")
  99. weld(w6, main, part6, 0, 0, 0, 0, -0.9, 0)
  100. blade1 = Instance.new("Part")
  101. prop(blade1, sword, false, 0, 0.2, 0.85, 2, 0.1, "Light blue", false, "Custom")
  102. b1m = Instance.new("SpecialMesh")
  103. mesh(b1m,blade1,1,1,1,"Torso")
  104. bw1 = Instance.new("Weld")
  105. weld(bw1, main, blade1, 0, 0, 0, 0, 2, 0)
  106. uns = Instance.new("Sound",blade1)
  107. uns.Volume = 1
  108. uns.Pitch = 1
  109. uns.SoundId = "rbxasset://sounds\\unsheath.wav"
  110. slash = Instance.new("Sound",blade1)
  111. slash.Volume = 1
  112. slash.Pitch = 1
  113. slash.SoundId = "rbxasset://sounds\\swordslash.wav"
  114. shea = Instance.new("Sound",blade1)
  115. shea.Volume = 1
  116. shea.Pitch = -0.9
  117. shea.SoundId = "rbxasset://sounds\\unsheath.wav"
  118. spi = Instance.new("Sound",blade1)
  119. spi.Volume = 1
  120. spi.Pitch = 1
  121. spi.SoundId = "http://www.roblox.com/asset/?id=28144268"
  122. charge = Instance.new("Sound",blade1)
  123. charge.Volume = 1
  124. charge.Pitch = 0.5
  125. charge.SoundId = "http://www.roblox.com/asset/?id=2692844"
  126. boom = Instance.new("Sound",blade1)
  127. boom.Volume = 1
  128. boom.Pitch = 2.2
  129. boom.SoundId = "rbxasset://sounds\\Rocket shot.wav"
  130. blade2 = Instance.new("Part")
  131. prop(blade2, sword, false, 0, 0.2, 1.2, 1.2, 0.1, "Light blue", false, "Custom")
  132. b2m = Instance.new("BlockMesh",blade2)
  133. bw2 = Instance.new("Weld")
  134. weld(bw2, main, blade2, 0, 0, math.pi/4, 0, 3, 0)
  135. blade3 = Instance.new("Part")
  136. prop(blade3, sword, false, 0, 0.2, 0.1, 4.5, 0.6, "Light blue", false, "Custom")
  137. b3m = Instance.new("SpecialMesh")
  138. mesh(b3m,blade3,1,1,1,"Wedge")
  139. bw3 = Instance.new("Weld")
  140. weld(bw3, main, blade3, math.pi, math.pi/2, 0, 0.3, 5.2, 0)
  141. blade4 = Instance.new("Part")
  142. prop(blade4, sword, false, 0, 0.2, 0.1, 4.5, 0.6, "Light blue", false, "Custom")
  143. b4m = Instance.new("SpecialMesh")
  144. mesh(b4m,blade4,1,1,1,"Wedge")
  145. bw4 = Instance.new("Weld")
  146. weld(bw4, main, blade4, math.pi, -math.pi/2, 0, -0.3, 5.2, 0)
  147. blade5 = Instance.new("Part")
  148. prop(blade5, sword, false, 0, 0.2, 0.6, 0.6, 0.1, "Light blue", false, "Custom")
  149. b5m = Instance.new("BlockMesh",blade5)
  150. bw5 = Instance.new("Weld")
  151. weld(bw5, main, blade5, 0, 0, math.pi/4, 0, 6.6, 0)
  152. part7 = Instance.new("Part")
  153. prop(part7, sword, false, 0.2, 0.2, 0.7, 1.6, 0.22, "Medium blue", false, "Custom")
  154. p7m = Instance.new("SpecialMesh")
  155. mesh(p7m,part7,1.3,1.2,1.3,"Sphere")
  156. w7 = Instance.new("Weld")
  157. weld(w7, main, part7, 0, 0, 0, 0, 3, 0)
  158. tup1 = Instance.new("Part")
  159. prop(tup1, sword, false, 0, 0.4, 1.2, 0.7, 0.4, "Bright blue", false, "Custom")
  160. tw1 = Instance.new("Weld")
  161. weld(tw1, torso, tup1, -0.3+(math.pi/2), -0.3, 0.2+(math.pi/2), 1.1, 1.2, 0)
  162. holdpart = Instance.new("Part")
  163. prop(holdpart, char, false, 1, 0, 0.5, 0.5, 0.5, "White", false, "Custom")
  164. hu = Instance.new("Weld")
  165. weld(hu, rarm, holdpart, 0, 0, 0, 0, 1, 0)
  166. holdweld = Instance.new("Weld")
  167. weld(holdweld, main, tup1, 0, 0, 0, 0, 1.5, 0)
  168. weaponweld = Instance.new("Weld")
  169. weld(weaponweld, holdpart, nil, -(math.pi/2), 0, (math.pi/2), 0, 0, 0)
  170. --Arm connections----------Arm connections----------Arm connections----------Arm connections--------
  171. rb = Instance.new("Part")
  172. prop(rb, char, false, 1, 0, 1, 1, 1, "White", false, "Symmetric")
  173. rh = Instance.new("Weld")
  174. weld(rh, rb, torso, 0, 0, 0, 1.5, 0.5, 0)
  175. lb = Instance.new("Part")
  176. prop(lb, char, false, 1, 0, 1, 1, 1, "White", false, "Symmetric")
  177. lh = Instance.new("Weld")
  178. weld(lh, lb, torso, 0, 0, 0, -1.5, 0.5, 0)
  179. rw = Instance.new("Weld")
  180. weld(rw, rb, nil, 0, 0, 0, 0, 0.5, 0)
  181. lw = Instance.new("Weld")
  182. weld(lw, lb, nil, 0, 0, 0, 0, 0.5 ,0)
  183. neck = torso.Neck
  184. neor = neck.C1
  185. rightfight = CFrame.fromEulerAnglesXYZ(0.85,0.7,0) * CFrame.new(-0.23,-0.25,-0.1)
  186. leftfight = CFrame.fromEulerAnglesXYZ(0.3,0,0.4) * CFrame.new(0.2,-0.4,0.1)
  187. function selectmotion()
  188. weaponweld.C0 = CFrame.new(0,0,0)
  189. rw.C0 = CFrame.new(0,0,0)
  190. lw.C0 = CFrame.new(0,0,0)
  191. rw.Part1 = rarm
  192. lw.Part1 = larm
  193. for i=1, 15 do
  194. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(-0.04,0,-0.07) * CFrame.new(0,0,0)
  195. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.07,0.16,0.04) * CFrame.new(-0.01,-0.05,-0.04)
  196. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(0.04,0.08,0.01) * CFrame.new(0,0,0)
  197. wait()
  198. end
  199. weaponweld.Part1 = main
  200. holdweld.Part1 = nil
  201. wait(0.14)
  202. uns:play()
  203. for i=1, 4 do
  204. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0.05,0,0.03) * CFrame.new(0,0,0)
  205. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0.12,-0.03,0.26)
  206. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(-0.05,0.04,0.03) * CFrame.new(0,0,0)
  207. wait()
  208. end
  209. for i=1, 10 do
  210. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0,0,0.15) * CFrame.new(0,0,0)
  211. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.15,-0.22,0.1) * CFrame.new(0.05,0.1,0.05)
  212. weaponweld.C0 = weaponweld.C0 * CFrame.fromEulerAnglesXYZ(-0.1,0,0) * CFrame.new(0,0.07,0)
  213. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(-0.04,0.06,0.03) * CFrame.new(0,0,0)
  214. wait()
  215. end
  216. bw5 = Instance.new("Weld")
  217. weld(bw5, main, blade5, 0, 0, math.pi/4, 0, 6.6, 0)
  218. part7 = Instance.new("Part")
  219. prop(part7, sword, false, 0.2, 0.2, 0.7, 1.6, 0.22, "Medium blue", false, "Custom")
  220. p7m = Instance.new("SpecialMesh")
  221. mesh(p7m,part7,1.3,1.2,1.3,"Sphere")
  222. w7 = Instance.new("Weld")
  223. weld(w7, main, part7, 0, 0, 0, 0, 3, 0)
  224. tup1 = Instance.new("Part")
  225. prop(tup1, sword, false, 0, 0.4, 1.2, 0.7, 0.4, "Bright blue", false, "Custom")
  226. tw1 = Instance.new("Weld")
  227. weld(tw1, torso, tup1, -0.3+(math.pi/2), -0.3, 0.2+(math.pi/2), 1.1, 1.2, 0)
  228. holdpart = Instance.new("Part")
  229. prop(holdpart, char, false, 1, 0, 0.5, 0.5, 0.5, "White", false, "Custom")
  230. hu = Instance.new("Weld")
  231. weld(hu, rarm, holdpart, 0, 0, 0, 0, 1, 0)
  232. holdweld = Instance.new("Weld")
  233. weld(holdweld, main, tup1, 0, 0, 0, 0, 1.5, 0)
  234. weaponweld = Instance.new("Weld")
  235. weld(weaponweld, holdpart, nil, -(math.pi/2), 0, (math.pi/2), 0, 0, 0)
  236. --Arm connections----------Arm connections----------Arm connections----------Arm connections--------
  237. rb = Instance.new("Part")
  238. prop(rb, char, false, 1, 0, 1, 1, 1, "White", false, "Symmetric")
  239. rh = Instance.new("Weld")
  240. weld(rh, rb, torso, 0, 0, 0, 1.5, 0.5, 0)
  241. lb = Instance.new("Part")
  242. prop(lb, char, false, 1, 0, 1, 1, 1, "White", false, "Symmetric")
  243. lh = Instance.new("Weld")
  244. weld(lh, lb, torso, 0, 0, 0, -1.5, 0.5, 0)
  245. rw = Instance.new("Weld")
  246. weld(rw, rb, nil, 0, 0, 0, 0, 0.5, 0)
  247. lw = Instance.new("Weld")
  248. weld(lw, lb, nil, 0, 0, 0, 0, 0.5 ,0)
  249. neck = torso.Neck
  250. neor = neck.C1
  251. rightfight = CFrame.fromEulerAnglesXYZ(0.85,0.7,0) * CFrame.new(-0.23,-0.25,-0.1)
  252. leftfight = CFrame.fromEulerAnglesXYZ(0.3,0,0.4) * CFrame.new(0.2,-0.4,0.1)
  253. function selectmotion()
  254. weaponweld.C0 = CFrame.new(0,0,0)
  255. rw.C0 = CFrame.new(0,0,0)
  256. lw.C0 = CFrame.new(0,0,0)
  257. rw.Part1 = rarm
  258. lw.Part1 = larm
  259. for i=1, 15 do
  260. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(-0.04,0,-0.07) * CFrame.new(0,0,0)
  261. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.07,0.16,0.04) * CFrame.new(-0.01,-0.05,-0.04)
  262. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(0.04,0.08,0.01) * CFrame.new(0,0,0)
  263. wait()
  264. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement