ScriptBuilderSHEHAB

Untitled

Jul 25th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. --UttermostExedra's Lance.
  2.  
  3. local name = "luxulux"
  4. local plr = game.Players[name]
  5. local char = plr.Character
  6.  
  7. Anim = {}
  8. Anim.Welding = 0
  9. c0 = function(wexx,smmx,xx,yy,zz)
  10. local xx2,yy2,zz2 = wexx.C0:toEulerAnglesXYZ()
  11. local aa,bb,cc = wexx.C0.x,wexx.C0.y,wexx.C0.z
  12. local twa = smmx/.03
  13. Anim.Welding = Anim.Welding + 1
  14. for i=0,twa,1 do
  15. wexx.C0 = CFrame.new(aa,bb,cc)*CFrame.Angles(xx2-(((xx2-math.rad(xx))/twa)*i),yy2-(((yy2-math.rad(yy))/twa)*i),zz2-(((zz2-math.rad(zz))/twa)*i))
  16. wait()
  17. end
  18. Anim.Welding = Anim.Welding - 1
  19. end
  20.  
  21. if script.Parent.ClassName ~= "HopperBin" then
  22. local bin = Instance.new("HopperBin",plr.Backpack)
  23. bin.Name = "Lance"
  24. bin.BinType = "Script"
  25. script:clone().Parent = bin
  26. script:remove()
  27. else
  28. bin = script.Parent;
  29.  
  30. pcall(function() char.LanceModel:remove() end)
  31. local s = Instance.new("Model",char)
  32. s.Name = "LanceModel"
  33. local p1 = Instance.new("Part",s)
  34. p1.Name = "Lance"
  35. p1.formFactor = "Custom"
  36. p1.Anchored = false
  37. p1.Locked = true
  38. p1.TopSurface = "Smooth"
  39. p1.BottomSurface = "Smooth"
  40. p1.BrickColor = BrickColor.new("Brown")
  41. p1.Size = Vector3.new(.5,5,.5)
  42. local m1 = Instance.new("CylinderMesh",p1)
  43. local p2 = Instance.new("Part",s)
  44. p2.Name = "LanceTip"
  45. p2.formFactor = "Custom"
  46. p2.Anchored = false
  47. p2.Locked = true
  48. p2.TopSurface = "Smooth"
  49. p2.BottomSurface = "Smooth"
  50. p2.BrickColor = BrickColor.new("Medium stone grey")
  51. p2.Size = Vector3.new(.2,1,.2)
  52. local m2 = Instance.new("SpecialMesh",p2)
  53. m2.MeshId = "http://www.roblox.com/asset?id=1033714"
  54. m2.Scale = Vector3.new(.3,1,.3) --.27,1,.27
  55. local w1 = Instance.new("Weld",s)
  56. w1.Part0 = p1
  57. w1.Part1 = char.Torso
  58. w1.C0 = CFrame.new(0,0,-.7) * CFrame.Angles(0,0,math.rad(-25))
  59. local w2 = Instance.new("Weld",s)
  60. w2.Part0 = p1
  61. w2.Part1 = p2
  62. w2.C0 = CFrame.new(0,-2.8,0) * CFrame.Angles(math.rad(180),0,0)
  63.  
  64. slash = function(w)
  65. coroutine.wrap(function()
  66. for i=1,12 do
  67. local posz1 = p1.CFrame * CFrame.Angles(0,math.pi,0)
  68. posz1 = posz1 * CFrame.new(0,0,1) -- extra start point moving :3
  69. local r = Ray.new(posz1.p, posz1.lookVector*6)
  70. local hit, pos = workspace:FindPartOnRay(r, char)
  71. if hit then
  72. for i,v in pairs(hit.Parent:children()) do
  73. if v:IsA("Humanoid") then
  74. v:TakeDamage(9)
  75. end
  76. end
  77. end
  78. wait()
  79. end
  80. end)()
  81. for i = 0, 1, 0.1 do
  82. w.C0 = CFrame.new(1.5,.45,-.45) * CFrame.Angles(math.rad(90+35*i), 0, math.rad(0))
  83. wait()
  84. end
  85. for i = 0, 1, 0.1 do
  86. w.C0 = CFrame.new(1.5,.45,-.45) * CFrame.Angles(math.rad(125-100*i), 0, math.rad(0))
  87. wait()
  88. end
  89. for i = 0, 1, 0.1 do
  90. w.C0 = CFrame.new(1.5,.45,-.45) * CFrame.Angles(math.rad(25+65*i), 0, math.rad(0))
  91. wait()
  92. end
  93. end
  94.  
  95. equip = function(mouse)
  96. w3 = Instance.new("Weld",s)
  97. w3.Part0 = char.Torso
  98. w3.Part1 = char["Right Arm"]
  99. w3.C0 = CFrame.new(1.5,0,0)
  100. for i = 0, 1, 0.1 do
  101. w3.C0 = CFrame.new(1.5,i,0) * CFrame.Angles(math.rad(225*i), 0, math.rad(-25*i))
  102. wait()
  103. end
  104. w1.Part1 = char["Right Arm"]
  105. w1.C0 = CFrame.Angles(0,0,0)
  106. w1.C1 = CFrame.new(0, -1, 0) * CFrame.Angles(7.83, 8, 0)
  107. for i = 0, 1, 0.1 do
  108. w3.C0 = CFrame.new(1.5,i,0) * CFrame.Angles(math.rad(225-135*i), 0, math.rad(-25+25*i))
  109. wait()
  110. end
  111. w3.C0 = CFrame.new(1.5,.45,-.45) * CFrame.Angles(math.rad(90),0,0)
  112. mouse.Button1Down:connect(function()
  113. coroutine.wrap(function()
  114. slash(w3)
  115. end)()
  116. end)
  117. end
  118.  
  119. unequip = function()
  120. for i = 0, 1, .1 do
  121. w3.C0 = CFrame.Angles(math.rad(90+135*i), 0, math.rad(-25+0*i))
  122. wait()
  123. end
  124. w3.Part1 = char.Torso
  125. w3.C1 = CFrame.new(0.75, 1, 0.5) * CFrame.Angles(0, 0, -7)
  126. for i = 0, 1, 0.1 do
  127. w3.C0 = CFrame.Angles(math.rad(225-225*i), 0, math.rad(-25+25*i))
  128. wait()
  129. end
  130. w3.Part1 = nil
  131. end
  132.  
  133. bin.Selected:connect(function(mouse)
  134. equip(mouse)
  135. end)
  136.  
  137. bin.Deselected:connect(function()
  138. unequip()
  139. end)
  140.  
  141.  
  142. end
Add Comment
Please, Sign In to add comment