Advertisement
Legendofawesomeness3

Scimmy

Jun 25th, 2016
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. --Scimmy Gifted by TheRedAngel, Local Script!
  2.  
  3. Plrs = game:GetService("Players")
  4.  
  5. Name = "LegendOfAwesomeness3"
  6. me = Plrs[Name]
  7. char = me.Character
  8. Modelname = "SoulKarate"
  9. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  10. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  11. AttRange = 5
  12. AttSpeed = 1.5
  13.  
  14. Add = {
  15. Sphere = function(P)
  16. local m = Instance.new("SpecialMesh",P)
  17. m.MeshType = "Sphere"
  18. return m
  19. end,
  20. BF = function(P)
  21. local bf = Instance.new("BodyForce",P)
  22. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  23. return bf
  24. end,
  25. BP = function(P)
  26. local bp = Instance.new("BodyPosition",P)
  27. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  28. bp.P = 14000
  29. return bp
  30. end,
  31. BG = function(P)
  32. local bg = Instance.new("BodyGyro",P)
  33. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  34. bg.P = 14000
  35. return bg
  36. end
  37. }
  38.  
  39. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  40. local p = Instance.new("Part")
  41. p.formFactor = "Custom"
  42. p.Anchored = Anchor
  43. p.CanCollide = Collide
  44. p.Transparency = Tran
  45. p.Reflectance = Ref
  46. p.BrickColor = BrickColor.new(Color)
  47. for _, Surf in pairs(Surfaces) do
  48. p[Surf] = "Smooth"
  49. end
  50. p.Size = Vector3.new(X, Y, Z)
  51. if Break then
  52. p:BreakJoints()
  53. else p:MakeJoints() end
  54. p.Parent = Parent
  55. return p
  56. end
  57.  
  58. function Weld(p0, p1, x, y, z, a, b, c)
  59. local w = Instance.new("Weld")
  60. w.Parent = p0
  61. w.Part0 = p0
  62. w.Part1 = p1
  63. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  64. return w
  65. end
  66.  
  67. function ComputePos(pos1, pos2)
  68. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  69. return CFrame.new(pos1, pos3)
  70. end
  71.  
  72. function getHumanoid(c)
  73. local h = nil
  74. for i,v in pairs(c:children()) do
  75. if v:IsA("Humanoid") and c ~= char then
  76. if v.Health > 0 then
  77. h = v
  78. end
  79. end
  80. end
  81. return h
  82. end
  83.  
  84. for i,v in pairs(char:children()) do
  85. if v.Name == Modelname then
  86. v:remove()
  87. end
  88. end
  89.  
  90. torso = char.Torso
  91. neck = torso.Neck
  92. hum = char.Humanoid
  93. Rarm = char["Right Arm"]
  94. Larm = char["Left Arm"]
  95. Rleg = char["Right Leg"]
  96. Lleg = char["Left Leg"]
  97.  
  98. hc = Instance.new("Humanoid")
  99. hc.Health = 0
  100. hc.MaxHealth = 0
  101.  
  102. slash = Instance.new("Sound")
  103. slash.SoundId = "rbxasset://sounds//swordslash.wav"
  104. slash.Volume = 0.8
  105. slash.Pitch = 1.4
  106. slash.Parent = Rarm
  107.  
  108. hitsound = Instance.new("Sound")
  109. hitsound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  110. hitsound.Volume = 0.55
  111. hitsound.Pitch = 2.2
  112.  
  113. Mo = Instance.new("Model")
  114. Mo.Name = Modelname
  115.  
  116. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  117. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  118. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  119. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  120.  
  121. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  122. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  123. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  124. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  125.  
  126. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  127. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  128. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  129. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  130.  
  131. HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  132. HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0)
  133. HW = Weld(HB, nil, 0, 0, 0, math.pi/2, 0, 0)
  134.  
  135. handle = Part(Mo, false, false, 0, 0, "Bright yellow", 0.35, 1.4, 0.35, true)
  136. Instance.new("SpecialMesh",handle)
  137. handle.Name = "Handle"
  138.  
  139. tip = Part(Mo, false, false, 0, 0, "Bright yellow", 0.35, 1.2, 0.2, true)
  140. Weld(handle, tip, 0, 0, -0.75, math.pi/2, 0, 0)
  141. Instance.new("BlockMesh",tip)
  142.  
  143. for i = -210/6, -210, -210/6 do
  144. local p = Part(Mo, false, false, 0, 0, "Bright yellow", 0.35, 0.18, 0.18, true)
  145. Instance.new("BlockMesh",p)
  146. local w = Weld(tip, p, 0, 0, 0, 0, 0, 0)
  147. w.C0 = CFrame.new(0, -0.49, 0.22) * CFrame.Angles(math.rad(i)+math.pi, 0, 0)
  148. w.C1 = CFrame.new(0, 0, -0.22)
  149. end
  150.  
  151. for i = -210/6, -210, -210/6 do
  152. local p = Part(Mo, false, false, 0, 0, "Bright yellow", 0.35, 0.18, 0.18, true)
  153. Instance.new("BlockMesh",p)
  154. p.Name = "TipThing"
  155. local w = Weld(tip, p, 0, 0, 0, 0, 0, 0)
  156. w.C0 = CFrame.new(0, 0.49, -0.22) * CFrame.Angles(math.rad(i), 0, 0)
  157. w.C1 = CFrame.new(0, 0, -0.22)
  158. end
  159.  
  160. local last = nil
  161. for i = -10, 35, 45/5 do
  162. local p = Part(Mo, false, false, 0, 0, "Reddish brown", 0.1, 0.5, 0.7, true)
  163. p.Name = "Blade"
  164. last = p
  165. Instance.new("BlockMesh",p)
  166. local w = Weld(tip, p, 0, 0, 0, 0, 0, 0)
  167. w.C0 = CFrame.new(0, -2.7, 0.8) * CFrame.Angles(math.rad(i) - math.pi/2, 0, 0)
  168. w.C1 = CFrame.new(0, 0, -2.8)
  169. end
  170.  
  171. tipthing = Part(Mo, false, false, 0, 0, "Reddish brown", 0.1, 0.66, 0.7, true)
  172. Instance.new("SpecialMesh",tipthing).MeshType = "Wedge"
  173. Weld(last, tipthing, 0, -0.58, 0, math.pi, 0, 0)
  174.  
  175. Mo.Parent = char
  176. HW.Part1 = handle
  177.  
  178. if script.Parent.className ~= "HopperBin" then
  179. h = Instance.new("HopperBin",me.Backpack)
  180. h.Name = "Scimmy"
  181. script.Parent = h
  182. end
  183.  
  184. bin = script.Parent
  185.  
  186. function normal(bool)
  187. LLW.C0 = CFrame.new(0, 0, 0)
  188. RLW.C0 = CFrame.new(0, 0, 0)
  189. LAW.C0 = CFrame.new(0,0,0)
  190. RAW.C0 = CFrame.new(0, 0, 0)
  191. if bool then
  192. LLW.Part1 = nil
  193. RLW.Part1 = nil
  194. RAW.Part1 = nil
  195. LAW.Part1 = nil
  196. end
  197. end
  198.  
  199. function slash(targ)
  200. RAW.Part1 = Rarm
  201. LAW.Part1 = Larm
  202. RLW.Part1 = Rleg
  203. LLW.Part1 = Lleg
  204. local Orig = torso.CFrame
  205. local bg = Add.BG(torso)
  206. local bp = Add.BP(torso)
  207. bp.position = Orig.p
  208. local CF = ComputePos(Orig.p, targ.Position)
  209. local CF2 = CF
  210. bg.cframe = CF2
  211. bp.position = CF * CFrame.new(0, 0, -1).p
  212. for i = 0, 90, 90/10 do
  213. LLW.C0 = CFrame.Angles(math.rad(-i/3), 0, 0)
  214. RLW.C0 = CFrame.Angles(math.rad(i/3), 0, 0)
  215. RAW.C0 = CFrame.Angles(math.rad(i*1.8), 0, 0)
  216. LAW.C0 = CFrame.Angles(0, 0, math.rad(-i/3))
  217. neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-i/2))
  218. CF2 = CF * CFrame.Angles(0, math.rad(i/2), 0)
  219. bg.cframe = CF2
  220. wait()
  221. end
  222. for i = 0, 90, 90/10 do
  223. LLW.C0 = CFrame.Angles(math.rad(-i/3), 0, 0)
  224. RLW.C0 = CFrame.Angles(math.rad(i/3), 0, 0)
  225. RAW.C0 = CFrame.Angles(math.rad(i*1.8), 0, 0)
  226. LAW.C0 = CFrame.Angles(0, 0, math.rad(-i/3))
  227. neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-i/2))
  228. CF2 = CF * CFrame.Angles(0, math.rad(i/2), 0)
  229. bg.cframe = CF2
  230. wait()
  231. end
  232. normal(true)
  233. bg:remove()
  234. bp:remove()
  235. end
  236.  
  237. function attack(hu)
  238. end
  239.  
  240. function select(mouse)
  241. mouse.Button1Down:connect(function()
  242. if mouse.Target ~= nil then
  243. slash(mouse.Target)
  244. end
  245. end)
  246. end
  247.  
  248. bin.Selected:connect(select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement