TheProNoob2004

Dual Daggers

Jun 20th, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.88 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. Char = Player.Character
  3. Head = Char.Head
  4. Torso = Char.Torso
  5. Ra = Char["Right Arm"]
  6. La = Char["Left Arm"]
  7. Rl = Char["Right Leg"]
  8. Ll = Char["Left Leg"]
  9.  
  10. pcall(function() Player.Backpack.Tool:Destroy() end)
  11. pcall(function() Char.Model:Destroy() end)
  12. Hb = Instance.new("HopperBin",Player.Backpack)Hb.Name = "Tool"
  13. Main = Instance.new("Model",Char)
  14.  
  15. cc=coroutine.create;cr=coroutine.resume;v3=Vector3.new;cf=CFrame.new;ca=CFrame.Angles;bc=BrickColor.new;inst=Instance.new;c3=Color3.new;
  16. mr=math.rad;mrd=math.random;
  17. http="http://www.roblox.com/asset/?id=";mouse=nil;attack=false;torface=false;
  18.  
  19. attack=false;facetorso=nil;swords=false;
  20.  
  21. Meshes = {["Ring"] = 3270017,["Spike"] = 1033714,["Cone"] = 1082802,["Crown"] = 20329976,["Cloud"] = 1095708,
  22. ["Mjolnir"] = 1279013,["Diamond"] = 9756362,["Hand"] = 37241605,["Fist"] = 65322375,["Skull"] = 36869983,
  23. ["Totem"] = 35624068,["Spikeb"] = 9982590,["Dragon"] = 58430372,["Fish"] = 31221717,["Coffee"] = 15929962,
  24. ["Spiral"] = 1051557,["Ramen"] = 19380188}; -- >:D
  25. Textures = {["Cone"] = 1082804,["Rainbow"] = 28488599,["Fish"] = 31221733, ["Coffee"] = 24181455,
  26. ["Monster"] = 33366441,["Ramen"] = 19380153};
  27. function partmaker(parent,size,color,trans)local p=inst("Part",parent)p.FormFactor = "Custom" p.TopSurface=0 p.BottomSurface=0 p.Size=size p.BrickColor=bc(color)p.Transparency=trans p:BreakJoints() return p end
  28. function weld0(parent,p0,p1,c0)local w=inst("Weld",parent)w.Part0=p0 w.Part1=p1 w.C0 = c0 return w end
  29. function weld1(parent,p0,p1,c1)local w=Instance.new("Weld",parent)w.Part0=p0 w.Part1=p1 w.C1 = c1 return w end
  30. function mesh(parent,id,text,typez)local m=inst("SpecialMesh",parent)m.MeshId=id m.TextureId=text m.MeshType=typez return m end
  31. function fakejoint(parent,hand,tor,c1,c12)local p=partmaker(parent,v3(1,1,1),1,1)p:BreakJoints()local w=weld1(p,p,tor,c1)local w1=weld1(p,hand,p,c12)return w end
  32.  
  33. function damage(hit,damage,cooldown)
  34. for i,v in pairs(hit:GetChildren()) do
  35. if v:IsA("Humanoid") and hit.Name ~= Player.Name then
  36. local find = v:FindFirstChild("Hitz")
  37. if not find then
  38. if v.Parent:findFirstChild("Head") then
  39. local BillG = Instance.new("BillboardGui",v.Parent.Head)BillG.Size = UDim2.new(1,0,1,0)
  40. BillG.Adornee = v.Parent.Head BillG.StudsOffset = Vector3.new(mrd(-3,3),mrd(3,5),mrd(-3,3))
  41. local TL = Instance.new("TextLabel",BillG)TL.Size = UDim2.new(1,0,1,0)
  42. TL.BackgroundTransparency = 1 TL.Text = tostring(damage).."-"
  43. TL.TextColor3 = BrickColor.new("Really black").Color TL.TextStrokeColor3 = BrickColor.new("Bright red").Color
  44. TL.TextStrokeTransparency = 0 TL.TextXAlignment = Enum.TextXAlignment.Center
  45. TL.TextYAlignment = Enum.TextYAlignment.Center TL.FontSize = Enum.FontSize.Size18
  46. TL.Font = "ArialBold"
  47. coroutine.resume(coroutine.create(function()
  48. wait(1)
  49. for i = 0,1,.1 do wait(.1) BillG.StudsOffset = BillG.StudsOffset+Vector3.new(0,.1,0) end
  50. BillG:Destroy()
  51. end))
  52. end
  53. v.Health = v.Health - damage local bool = Instance.new("BoolValue",v)bool.Name = 'Hitz'game:GetService("Debris"):AddItem(bool,cooldown)
  54. end
  55. end
  56. end
  57. end
  58. function weaponmake()
  59. --Right hand weapon. c:
  60. local rmod = Instance.new("Model",Main)
  61. RHandle = partmaker(rmod,v3(.25,1.5,.25),"Brown",0)inst("CylinderMesh",RHandle)RHandleW = weld0(RHandle,Ra,RHandle,cf(0,-1,0)*ca(mr(90),0,0))
  62. local p = partmaker(rmod,v3(.3,1.1,.3),"Bright blue",0)inst("CylinderMesh",p)local w = weld0(p,RHandle,p,cf(0,0,0))
  63. local p = partmaker(rmod,v3(.5,.5,.5),"Brown",0)mesh(p,0,0,"Sphere")local w = weld0(p,RHandle,p,cf(0,(-1.5/2),0))
  64. local p = partmaker(rmod,v3(1,.2,.5),"Brown",0)mesh(p,0,0,"Torso")local w = weld0(p,RHandle,p,cf(0,(1.5/2),0)*ca(0,mr(90),0))
  65. local p = partmaker(rmod,v3(.25,.3,.55),"Brown",0)inst("BlockMesh",p)local w = weld0(p,RHandle,p,cf(0,(1.5/2)+.25,0))
  66. local b = partmaker(rmod,v3(.2,1.5,.5),"Gray",0)inst("BlockMesh",b)local w = weld0(b,RHandle,b,cf(0,(1.5/2)+1,0))
  67. local p = partmaker(rmod,v3(.2,.4,.5),"Gray",0)mesh(p,0,0,"Wedge")local w = weld0(p,RHandle,p,cf(0,(1.5/2)+2-.05,0))
  68. RHurt = partmaker(rmod,v3(.3,1.5,.6),"Gray",.8)local w = weld0(RHurt,b,RHurt,cf(0,0,0))
  69.  
  70. local lmod = Instance.new("Model",Main)
  71. LHandle = partmaker(lmod,v3(.25,1.5,.25),"Brown",0)inst("CylinderMesh",RHandle)LHandleW = weld0(LHandle,La,LHandle,cf(0,-1,0)*ca(mr(90),0,0))
  72. local p = partmaker(lmod,v3(.3,1.1,.3),"Bright blue",0)inst("CylinderMesh",p)local w = weld0(p,LHandle,p,cf(0,0,0))
  73. local p = partmaker(lmod,v3(.5,.5,.5),"Brown",0)mesh(p,0,0,"Sphere")local w = weld0(p,LHandle,p,cf(0,(-1.5/2),0))
  74. local p = partmaker(lmod,v3(1,.2,.5),"Brown",0)mesh(p,0,0,"Torso")local w = weld0(p,LHandle,p,cf(0,(1.5/2),0)*ca(0,mr(90),0))
  75. local p = partmaker(lmod,v3(.25,.3,.55),"Brown",0)inst("BlockMesh",p)local w = weld0(p,LHandle,p,cf(0,(1.5/2)+.25,0))
  76. local b = partmaker(lmod,v3(.2,1.5,.5),"Gray",0)inst("BlockMesh",b)local w = weld0(b,LHandle,b,cf(0,(1.5/2)+1,0))
  77. local p = partmaker(lmod,v3(.2,.4,.5),"Gray",0)mesh(p,0,0,"Wedge")local w = weld0(p,LHandle,p,cf(0,(1.5/2)+2-.05,0))
  78. LHurt = partmaker(rmod,v3(.3,1.5,.6),"Gray",.8)local w = weld0(LHurt,b,LHurt,cf(0,0,0))
  79. swords = true
  80. for i,v in pairs (Char:GetChildren()) do
  81. if v:IsA("CharacterMesh") then
  82. v:Destroy()
  83. end
  84. end
  85. pcall(function()Torso.roblox:Destroy()end)
  86. end
  87. function rhandslash()
  88. if attack == false and swords == true then
  89. attack = true
  90. local Tor = Torso:Clone()
  91. Torso.Transparency = 1
  92. Tor.Parent = Torso.Parent
  93. Tor.BrickColor = bc("White")
  94. Tor.Name = "fakeTorso"
  95. local TorsoWeld = weld0(Main,Torso,Tor,cf(0,0,0))
  96. local LegWeld = fakejoint(Main,Rl,Tor,cf(.5,-1.5,0),cf(0,-.5,0))
  97. local LegWeld2 = fakejoint(Main,Ll,Tor,cf(-.5,-1.5,0),cf(0,-.5,0))
  98. local RightW = fakejoint(Main,Ra,Tor,cf(1.5,.5,0),cf(0,-.5,0))
  99. local LeftW = fakejoint(Main,La,Tor,cf(-1.5,.5,0),cf(0,-.5,0))
  100. local HeadW = weld0(Main,Tor,Head,cf(0,1.5,0)*ca(0,mr(0),0))
  101. local Var = RHurt.Touched:connect(function(Hit) damage(Hit.Parent,mrd(10,15),1)end)
  102. if Tor then
  103. local CFZ
  104. local CAZ
  105. cr(cc(function()
  106. for i = 0, -.5,-.05 do
  107. wait(.03)
  108. TorsoWeld.C0 = cf(0,0,i)*ca(0,mr(CAZ),0)
  109. CFZ = i
  110. end
  111. end))
  112. cr(cc(function()
  113. for i = 0, 45,15/3 do
  114. wait(.03)
  115. TorsoWeld.C0 = cf(0,0,CFZ)*ca(0,mr(i),0)
  116. CAZ = i
  117. HeadW.C0 = cf(0,1.5,0)*ca(0,mr(-i),0)
  118. end
  119. end))
  120. end
  121. if RightW~=nil then
  122. for i = 0,90,20 do
  123. wait(.03)
  124. RightW.C1 = cf(1.5,.5,0)*ca(mr(0),mr(0),mr(i))
  125. end
  126. wait(.2)
  127. for i = 0,160,40 do
  128. wait(.03)
  129. RightW.C1 = cf(1.5,.5,0)*ca(mr(0),mr(i),mr(90))
  130. end
  131. wait(.1)
  132. cr(cc(function()
  133. for i = 90, 180+90, 20 do
  134. wait(.03)
  135. RHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  136. end
  137. end))
  138. wait(.1)
  139. for i = 160,0,-40 do
  140. wait(.03)
  141. RightW.C1 = cf(1.5,.5,0)*ca(mr(0),mr(i),mr(90))
  142. end
  143. wait(.2)
  144. if Tor then
  145. local CAZ
  146. local CFZ
  147. cr(cc(function()
  148. for i = -.5, 0,.05 do
  149. wait(.03)
  150. TorsoWeld.C0 = cf(0,0,i)*ca(0,mr(CAZ),0)
  151. CFZ = i
  152. end
  153. end))
  154. cr(cc(function()
  155. for i = 45, 0,-15/3 do
  156. wait(.03)
  157. TorsoWeld.C0 = cf(0,0,CFZ)*ca(0,mr(i),0)
  158. CAZ = i
  159. HeadW.C0 = cf(0,1.5,0)*ca(0,mr(-i),0)
  160. end
  161. end))
  162. end
  163. cr(cc(function()
  164. for i = 180+90,90, -20 do
  165. wait(.03)
  166. RHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  167. end
  168. end))
  169. for i = 90,0,-20 do
  170. wait(.03)
  171. RightW.C1 = cf(1.5,.5,0)*ca(mr(0),mr(0),mr(i))
  172. end
  173. end
  174. LegWeld:Destroy()RightW:Destroy()LeftW:Destroy()Tor:Destroy()HeadW:remove()LegWeld2:Destroy()TorsoWeld:Destroy()
  175. Torso.Transparency = 0 Var:disconnect()
  176. attack = false
  177. end
  178. end
  179. function lhandslash()
  180. if attack == false and swords == true then
  181. attack = true
  182. local Tor = Torso:Clone()
  183. Torso.Transparency = 1
  184. Tor.Parent = Torso.Parent
  185. Tor.BrickColor = bc("White")
  186. Tor.Name = "fakeTorso"
  187. local TorsoWeld = weld0(Main,Torso,Tor,cf(0,0,0))
  188. local LegWeld = fakejoint(Main,Ll,Tor,cf(.5,-1.5,0),cf(0,-.5,0))
  189. local LegWeld2 = fakejoint(Main,Rl,Tor,cf(-.5,-1.5,0),cf(0,-.5,0))
  190. local RightW = fakejoint(Main,Ra,Tor,cf(1.5,.5,0),cf(0,-.5,0))
  191. local LeftW = fakejoint(Main,La,Tor,cf(-1.5,.5,0),cf(0,-.5,0))
  192. local HeadW = weld0(Main,Tor,Head,cf(0,1.5,0)*ca(0,mr(0),0))
  193. local Var = LHurt.Touched:connect(function(Hit) damage(Hit.Parent,mrd(10,15),1) end)
  194. if Tor then
  195. local CFZ
  196. local CAZ
  197. cr(cc(function()
  198. for i = 0, .5,.05 do
  199. wait(.03)
  200. TorsoWeld.C0 = cf(0,0,i)*ca(0,mr(CAZ),0)
  201. CFZ = i
  202. end
  203. end))
  204. cr(cc(function()
  205. for i = 0, -45,-15/3 do
  206. wait(.03)
  207. TorsoWeld.C0 = cf(0,0,CFZ)*ca(0,mr(i),0)
  208. CAZ = i
  209. HeadW.C0 = cf(0,1.5,0)*ca(0,mr(-i),0)
  210. end
  211. end))
  212. end
  213. if RightW~=nil then
  214. for i = 0,-90,-20 do
  215. wait(.03)
  216. LeftW.C1 = cf(-1.5,.5,0)*ca(mr(0),mr(0),mr(i))
  217. end
  218. wait(.2)
  219. for i = 0,-160,-40 do
  220. wait(.03)
  221. LeftW.C1 = cf(-1.5,.5,0)*ca(mr(0),mr(i),mr(-90))
  222. end
  223. wait(.1)
  224. cr(cc(function()
  225. for i = 90, 180+90, 20 do
  226. wait(.03)
  227. LHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  228. end
  229. end))
  230. wait(.1)
  231. for i = -160,0,40 do
  232. wait(.03)
  233. LeftW.C1 = cf(-1.5,.5,0)*ca(mr(0),mr(i),mr(-90))
  234. end
  235. wait(.2)
  236. if Tor then
  237. local CAZ
  238. local CFZ
  239. cr(cc(function()
  240. for i = .5, 0,-.05 do
  241. wait(.03)
  242. TorsoWeld.C0 = cf(0,0,i)*ca(0,mr(CAZ),0)
  243. CFZ = i
  244. end
  245. end))
  246. cr(cc(function()
  247. for i = -45, 0,15/3 do
  248. wait(.03)
  249. TorsoWeld.C0 = cf(0,0,CFZ)*ca(0,mr(i),0)
  250. CAZ = i
  251. HeadW.C0 = cf(0,1.5,0)*ca(0,mr(-i),0)
  252. end
  253. end))
  254. end
  255. cr(cc(function()
  256. for i = 180+90,90, -20 do
  257. wait(.03)
  258. LHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  259. end
  260. end))
  261. for i = -90,0,20 do
  262. wait(.03)
  263. LeftW.C1 = cf(-1.5,.5,0)*ca(mr(0),mr(0),mr(i))
  264. end
  265. end
  266. LegWeld:Destroy()RightW:Destroy()LeftW:Destroy()Tor:Destroy()HeadW:remove()LegWeld2:Destroy()TorsoWeld:Destroy()
  267. Torso.Transparency = 0 Var:disconnect()
  268. attack = false
  269. end
  270. end
  271.  
  272. function spin()
  273. if attack == false and swords == true then
  274. attack = true
  275. local Tor = Torso:Clone()
  276. Torso.Transparency = 1
  277. Tor.Parent = Torso.Parent
  278. Tor.BrickColor = bc("White")
  279. Tor.Name = "fakeTorso"
  280. local TorsoWeld = weld0(Main,Torso,Tor,cf(0,0,0))
  281. local LegWeld = fakejoint(Main,Rl,Tor,cf(.5,-1.5,0),cf(0,-.5,0))
  282. local LegWeld2 = fakejoint(Main,Ll,Tor,cf(-.5,-1.5,0),cf(0,-.5,0))
  283. local RightW = fakejoint(Main,Ra,Tor,cf(1.5,.5,0),cf(0,-.5,0))
  284. local LeftW = fakejoint(Main,La,Tor,cf(-1.5,.5,0),cf(0,-.5,0))
  285. local HeadW = weld0(Main,Tor,Head,cf(0,1.5,0)*ca(0,mr(0),0))
  286. local Var1 = RHurt.Touched:connect(function(Hit) damage(Hit.Parent,mrd(10,15),1) end)
  287. local Var2 = LHurt.Touched:connect(function(Hit) damage(Hit.Parent,mrd(10,15),1) end)
  288. if LeftW and RightW then
  289. cr(cc(function()
  290. for i = 0,90,18*2 do
  291. wait(.03)
  292. RightW.C1 = cf(1.5,.5,0)*ca(0,0,mr(i))
  293. LeftW.C1 = cf(-1.5,.5,0)*ca(0,0,mr(-i))
  294. end
  295. end))
  296. cr(cc(function()
  297. for i = 90,180,20 do
  298. wait(.03)
  299. LHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  300. RHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  301. end
  302. end))
  303. wait(.2)
  304. if Tor and TorsoWeld then
  305. for i = 0,360*2,20*4 do
  306. wait(.03)
  307. TorsoWeld.C0 = cf(0,0,0)*ca(0,mr(i),0)
  308. end
  309. end
  310. cr(cc(function()
  311. for i = 180,90,-18*2 do
  312. wait(.03)
  313. LHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  314. RHandleW.C0 = cf(0,-1,0)*ca(mr(i),0,0)
  315. end
  316. end))
  317. for i = 90,0,-20 do
  318. wait(.03)
  319. RightW.C1 = cf(1.5,.5,0)*ca(0,0,mr(i))
  320. LeftW.C1 = cf(-1.5,.5,0)*ca(0,0,mr(-i))
  321. end
  322. end
  323. LegWeld:Destroy()RightW:Destroy()LeftW:Destroy()Tor:Destroy()HeadW:remove()LegWeld2:Destroy()TorsoWeld:Destroy()
  324. Torso.Transparency = 0 Var1:disconnect()Var2:disconnect()
  325. attack = false
  326. end
  327. end
  328.  
  329. function sidestepr()
  330. if attack == false and swords == true then
  331. attack = true
  332. if Torso then -- Why would this ever happen? xD
  333. Torso.CFrame = Torso.CFrame*CFrame.new(5,0,0)
  334. wait(.1)
  335. Torso.CFrame = Torso.CFrame*CFrame.new(5,0,0)
  336. end
  337. attack = false
  338. end
  339. end
  340. function sidestepl()
  341. if attack == false and swords == true then
  342. attack = true
  343. if Torso then
  344. Torso.CFrame = Torso.CFrame*CFrame.new(-5,0,0)
  345. wait(.1)
  346. Torso.CFrame = Torso.CFrame*CFrame.new(-5,0,0)
  347. --local bp = Instance.new("BodyPosition",Torso)
  348. -- bp.maxForce = v3()*math.huge
  349. -- bp.position = v3(Torso.CFrame*CFrame.new(-5,0,0))
  350. end
  351. attack = false
  352. end
  353. end
  354. function bigfinnish()
  355.  
  356. end
  357.  
  358. Hb.Selected:connect(function(Mouse)
  359. if swords == false then
  360. weaponmake()
  361. end
  362. Mouse.KeyDown:connect(function(Key)
  363. if Key == "q" then lhandslash()
  364. elseif Key == "e" then rhandslash()
  365. elseif Key == "r" then spin()
  366. elseif Key == "x" then bigfinnish()
  367. elseif Key == "c" then sidestepr()
  368. elseif Key == "z" then sidestepl()
  369. end
  370. end)
  371. end)
Add Comment
Please, Sign In to add comment