Advertisement
voidman

Untitled

Dec 27th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.41 KB | None | 0 0
  1. --]]
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7. --[[
  8.  
  9. ]]
  10. Player = game:GetService("Players").LocalPlayer
  11. Character = Player.Character
  12. PlayerGui = Player.PlayerGui
  13. Backpack = Player.Backpack
  14. Torso = Character.Torso
  15. Head = Character.Head
  16. Humanoid = Character.Humanoid
  17. LeftArm = Character["Left Arm"]
  18. LeftLeg = Character["Left Leg"]
  19. RightArm = Character["Right Arm"]
  20. RightLeg = Character["Right Leg"]
  21. LS = Torso["Left Shoulder"]
  22. LH = Torso["Left Hip"]
  23. RS = Torso["Right Shoulder"]
  24. RH = Torso["Right Hip"]
  25. Neck = Torso.Neck
  26. it=Instance.new
  27. vt=Vector3.new
  28. cf=CFrame.new
  29. euler=CFrame.fromEulerAnglesXYZ
  30. angles=CFrame.Angles
  31. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  32. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  33. attack = false
  34. attacktype = 1
  35. damage = 5
  36. oridamage = 50
  37. attackdebounce = false
  38. ssdebounce=false
  39. MMouse=nil
  40. combo=0
  41. --player
  42. player = nil
  43. --save shoulders
  44. RSH, LSH = nil, nil
  45. --welds
  46. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  47. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  48.  
  49.  
  50. if Character:findFirstChild("Dual Swords",true) ~= nil then
  51. Character:findFirstChild("Dual Swords",true).Parent = nil
  52. end
  53.  
  54.  
  55. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  56. local fp = it("Part")
  57. fp.formFactor = formfactor
  58. fp.Parent = parent
  59. fp.Reflectance = reflectance
  60. fp.Transparency = transparency
  61. fp.CanCollide = false
  62. fp.Locked=true
  63. fp.BrickColor = brickcolor
  64. fp.Name = name
  65. fp.Size = size
  66. fp.Position = Torso.Position
  67. fp.BottomSurface="Smooth"
  68. fp.TopSurface="Smooth"
  69. fp:BreakJoints()
  70. return fp
  71. end
  72.  
  73. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  74. local mesh = it(Mesh)
  75. mesh.Parent = part
  76. if Mesh=="SpecialMesh" then
  77. mesh.MeshType = meshtype
  78. mesh.MeshId = meshid
  79. end
  80. mesh.Offset=offset
  81. mesh.Scale=scale
  82. return mesh
  83. end
  84.  
  85. function weld(parent,part0,part1,c0)
  86. local weld = it("Weld")
  87. weld.Parent = parent
  88. weld.Part0 = part0
  89. weld.Part1 = part1
  90. weld.C0 = c0
  91. return weld
  92. end
  93.  
  94. local modelzorz = Instance.new("Model")
  95. modelzorz.Parent = Character
  96. modelzorz.Name = "Dual Swords"
  97.  
  98. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(0.3,0.5,0.3))
  99. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part2",vt(0.25,1.5,0.25))
  100. local prt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part4",vt(0.3,0.6,0.21))
  101. local prt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part5",vt(0.25,0.6,0.16))
  102. local prt6=part(3,modelzorz,0.3,0,BrickColor.new("White"),"Part6",vt(0.25,3,0.16))
  103. local prt7=part(3,modelzorz,0.3,0,BrickColor.new("White"),"Part7",vt(0.1,0.5,0.25))
  104. local prt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part8",vt(0.2,1.5,0.2))
  105. local prt9=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox",vt(0.5,4,0.5))
  106.  
  107. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  108. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,1,1))
  109. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1,1,1))
  110. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,1,1))
  111. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1,1,0.25))
  112. local msh7=mesh("SpecialMesh",prt7,"Wedge","",vt(0,0,0),vt(0.25,1,1))
  113. local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(1,1,1))
  114.  
  115. local wld1=weld(prt1,prt1,Torso,euler(0,0,0.785)*cf(1,0,-0.5))
  116. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  117. local wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,-1,0))
  118. local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-0.01,0))
  119. local wld6=weld(prt6,prt6,prt4,euler(0,0,0)*cf(0,-1.5,0))
  120. local wld7=weld(prt7,prt7,prt6,euler(0,-1.57,0)*cf(0,-1.75,0))
  121. local wld8=weld(prt8,prt8,prt6,euler(0,0,0)*cf(0,0.5,0))
  122. local wld9=weld(prt9,prt9,prt6,euler(0,0,0)*cf(0,0,0))
  123.  
  124. local aprt1=part(3,modelzorz,0,0,Torso.BrickColor,"aPart1",vt(0.3,0.5,0.3))
  125. local aprt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart2",vt(0.25,1.5,0.25))
  126. local aprt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart4",vt(0.3,0.6,0.21))
  127. local aprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart5",vt(0.25,0.6,0.16))
  128. local aprt6=part(3,modelzorz,0.3,0,BrickColor.new("White"),"aPart6",vt(0.25,3,0.16))
  129. local aprt7=part(3,modelzorz,0.3,0,BrickColor.new("White"),"aPart7",vt(0.1,0.5,0.25))
  130. local aprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart8",vt(0.2,1.5,0.2))
  131. local aprt9=part(3,modelzorz,0,1,BrickColor.new("Black"),"aHitbox",vt(0.5,4,0.5))
  132.  
  133. local amsh1=mesh("BlockMesh",aprt1,"","",vt(0,0,0),vt(1,1,1))
  134. local amsh2=mesh("BlockMesh",aprt2,"","",vt(0,0,0),vt(1,1,1))
  135. local amsh4=mesh("BlockMesh",aprt4,"","",vt(0,0,0),vt(1,1,1))
  136. local amsh5=mesh("BlockMesh",aprt5,"","",vt(0,0,0),vt(1,1,1))
  137. local amsh6=mesh("BlockMesh",aprt6,"","",vt(0,0,0),vt(1,1,0.25))
  138. local amsh7=mesh("SpecialMesh",aprt7,"Wedge","",vt(0,0,0),vt(0.25,1,1))
  139. local amsh8=mesh("CylinderMesh",aprt8,"","",vt(0,0,0),vt(1,1,1))
  140.  
  141. local awld1=weld(aprt1,aprt1,Torso,euler(0,0,0.785)*cf(-1,0,-0.5))
  142. local awld2=weld(aprt2,aprt2,aprt1,euler(3.14,3.14,0)*cf(0,0,0))
  143. local awld4=weld(aprt4,aprt4,aprt2,euler(0,0,0)*cf(0,-1,0))
  144. local awld5=weld(aprt5,aprt5,aprt4,euler(0,0,0)*cf(0,-0.01,0))
  145. local awld6=weld(aprt6,aprt6,aprt4,euler(0,0,0)*cf(0,-1.5,0))
  146. local awld7=weld(aprt7,aprt7,aprt6,euler(0,-1.57,0)*cf(0,-1.75,0))
  147. local awld8=weld(aprt8,aprt8,aprt6,euler(0,0,0)*cf(0,0.5,0))
  148. local awld9=weld(aprt9,aprt9,aprt6,euler(0,0,0)*cf(0,0,0))
  149.  
  150. numb=0
  151. numb2=0
  152. for i=1,8 do
  153. local prt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.4,0.2))
  154. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2))
  155. local wld3=weld(prt3,prt3,prt2,cf(0.8,0,0)*euler(0,0,1.57-numb))
  156. local dprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.2,0.2))
  157. local dmsh3=mesh("BlockMesh",dprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2))
  158. local dwld3=weld(dprt3,dprt3,prt3,euler(0,0,1.57)*cf(0.2,0,0))
  159.  
  160. local aprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.4,0.2))
  161. local amsh3=mesh("BlockMesh",aprt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2))
  162. local awld3=weld(aprt3,aprt3,aprt2,cf(0.8,0,0)*euler(0,0,1.57-numb))
  163. local daprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.2,0.2))
  164. local damsh3=mesh("BlockMesh",daprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2))
  165. local dawld3=weld(daprt3,daprt3,aprt3,euler(0,0,1.57)*cf(0.2,0,0))
  166. numb2=numb2+0.01
  167. numb=numb+0.3925
  168. end
  169. if (script.Parent.className ~= "HopperBin") then
  170. Tool = Instance.new("HopperBin")
  171. Tool.Parent = Backpack
  172. Tool.Name = "Dual Swords"
  173. script.Parent = Tool
  174. end
  175. Bin = script.Parent
  176.  
  177. local bg = it("BodyGyro")
  178. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  179. bg.P = 20e+003
  180. bg.Parent = nil
  181.  
  182. so = function(id,par,vol,pit)
  183. coroutine.resume(coroutine.create(function()
  184. local sou = Instance.new("Sound",par or workspace)
  185. sou.Volume=vol
  186. sou.Pitch=pit or 1
  187. sou.SoundId=id
  188. wait()
  189. sou:play()
  190. wait(6)
  191. sou:Remove()
  192. end))
  193. end
  194.  
  195. function unequipweld()
  196. wld1.Part1=Torso
  197. wld1.C0=euler(0,0,0.785)*cf(1,0,-0.5)
  198. awld1.Part1=Torso
  199. awld1.C0=euler(0,0,0.785)*cf(-1,0,-0.5)
  200. end
  201.  
  202. function equipweld()
  203. wld1.Part1=RightArm
  204. wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0)
  205. awld1.Part1=LeftArm
  206. awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0)
  207. end
  208.  
  209. function hideanim()
  210. equipped=false
  211. wait(0.1)
  212. bg.Parent=nil
  213. unequipweld()
  214. end
  215.  
  216. function equipanim()
  217. equipped=true
  218. wait(0.1)
  219. equipweld()
  220. RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0)
  221. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0)
  222. LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0)
  223. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  224. end
  225.  
  226. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  227. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  228. end
  229.  
  230. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  231. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  232. prt.Anchored=true
  233. prt.CFrame=cframe*cf(x2,y2,z2)
  234. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  235. coroutine.resume(coroutine.create(function()
  236. for i=0,1,0.1 do
  237. wait()
  238. prt.CFrame=prt.CFrame
  239. prt.Transparency=i
  240. msh.Scale=msh.Scale+vt(x3,y3,z3)
  241. end
  242. prt.Parent=nil
  243. end))
  244. end
  245.  
  246. function SpecialEffect()
  247. local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
  248. prt.Anchored=true
  249. prt.CFrame=Torso.CFrame
  250. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  251. coroutine.resume(coroutine.create(function(Part,Mesh)
  252. for i=0,1,0.2 do
  253. wait(0)
  254. Part.Transparency=i
  255. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  256. end
  257. prt.Parent=nil
  258. end),prt,msh)
  259. end
  260.  
  261. function effect(Color,Ref,LP,P1,returnn)
  262. local effectsmsh = Instance.new("BlockMesh")
  263. effectsmsh.Scale = Vector3.new(0.2,1,0.2)
  264. effectsmsh.Name = "Mesh"
  265. local effectsg = Instance.new("Part")
  266. effectsg.formFactor = 3
  267. effectsg.CanCollide = false
  268. effectsg.Name = "Eff"
  269. effectsg.Locked = true
  270. effectsg.Anchored = true
  271. effectsg.Size = Vector3.new(0.5,1,0.5)
  272. effectsg.Parent = workspace
  273. effectsmsh.Parent = effectsg
  274. effectsg.BrickColor = BrickColor.new(Color)
  275. effectsg.Reflectance = Ref
  276. local point1 = P1
  277. local mg = (LP.p - point1.p).magnitude
  278. effectsg.Size = Vector3.new(0.5,mg,0.5)
  279. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  280. if returnn then return effectsg end
  281. coroutine.resume(coroutine.create(function(Part,Mesh)
  282. if not returnn then
  283. for i = 0 , 1 , 0.05 do
  284. wait()
  285. Part.Transparency = 1*i
  286. Mesh.Scale = Vector3.new(0.2-0.2*i,1,0.2-0.2*i)
  287. end
  288. wait()
  289. Part.Parent = nil
  290. end
  291. end),effectsg,effectsmsh)
  292. end
  293.  
  294. Damagefunc1=function(hit,Damage,Knockback)
  295. if hit.Parent==nil then
  296. return
  297. end
  298. CPlayer=Bin
  299. h=hit.Parent:FindFirstChild("Humanoid")
  300. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  301. if attackdebounce == false then
  302. attackdebounce = true
  303. coroutine.resume(coroutine.create(function()
  304. wait(0.2)
  305. attackdebounce = false
  306. end))
  307. Damage=Damage
  308. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  309. return
  310. end]]
  311. -- hs(hit,1.2)
  312. c=Instance.new("ObjectValue")
  313. c.Name="creator"
  314. c.Value=game.Players.LocalPlayer
  315. c.Parent=h
  316. game:GetService("Debris"):AddItem(c,.5)
  317. Damage=Damage+math.random(0,10)
  318. -- h:TakeDamage(Damage)
  319. blocked=false
  320. block=hit.Parent:findFirstChild("Block")
  321. if block~=nil then
  322. print("herp")
  323. if block.Value>0 then
  324. blocked=true
  325. block.Value=block.Value-1
  326. print(block.Value)
  327. end
  328. end
  329. if blocked==false then
  330. -- h:TakeDamage(Damage)
  331. h.Health=h.Health-Damage
  332. showDamage(hit.Parent,Damage,.5)
  333. else
  334. h:TakeDamage(1)
  335. showDamage(hit.Parent,1,.5)
  336. end
  337. vp=Instance.new("BodyVelocity")
  338. vp.P=500
  339. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  340. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  341. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  342. if Knockback>0 then
  343. vp.Parent=hit.Parent.Torso
  344. end
  345. game:GetService("Debris"):AddItem(vp,.25)
  346. game:GetService("Debris"):AddItem(r,.5)
  347. c=Instance.new("ObjectValue")
  348. c.Name="creator"
  349. c.Value=Player
  350. c.Parent=h
  351. game:GetService("Debris"):AddItem(c,.5)
  352. CRIT=false
  353. hitDeb=true
  354. AttackPos=6
  355. end
  356. end
  357. end
  358.  
  359. Damagefunc2=function(hit,Damage,Knockback)
  360. if attackdebounce == false then
  361. attackdebounce = true
  362. coroutine.resume(coroutine.create(function()
  363. wait(0.1)
  364. attackdebounce = false
  365. end))
  366. if hit.Parent==nil then
  367. return
  368. end
  369. CPlayer=Bin
  370. blocked=false
  371. h=hit.Parent:FindFirstChild("Humanoid")
  372. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  373. Damage=Damage
  374. c=it("ObjectValue")
  375. c.Name="creator"
  376. c.Value=game.Players.LocalPlayer
  377. c.Parent=h
  378. game:GetService("Debris"):AddItem(c,.5)
  379. -- print(c.Value)
  380. --[[ if math.random(0,99)+math.random()<=7.8 then
  381. CRIT=true
  382. Damage=Damage*2
  383. s=it("Sound")
  384. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  385. s.Volume=1
  386. s.Pitch=2
  387. s.Parent=hit
  388. s.PlayOnRemove=true
  389. s.Parent=nil
  390.  
  391. end]]
  392. Damage=Damage+math.random(0,10)
  393. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  394. blocked=false
  395. block=hit.Parent:findFirstChild("Block")
  396. if block~=nil then
  397. print("herp")
  398. if block.Value>0 then
  399. blocked=true
  400. block.Value=block.Value-3
  401. print(block.Value)
  402. end
  403. end
  404. if blocked==false then
  405. -- h:TakeDamage(Damage)
  406. h.Health=h.Health-Damage
  407. showDamage(hit.Parent,Damage,.5)
  408. else
  409. h:TakeDamage(1)
  410. showDamage(hit.Parent,1,.5)
  411. end
  412. --if blocked==false then
  413. local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit
  414. print(angle)
  415. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  416. rl=Instance.new("BodyAngularVelocity")
  417. rl.P=3000
  418. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  419. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  420. rl.Parent=hit
  421. coroutine.resume(coroutine.create(function(vel)
  422. wait(1)
  423. vel:Remove()
  424. end),rl)
  425. --end
  426. local bodyVelocity=Instance.new("BodyVelocity")
  427. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  428. bodyVelocity.P=5000
  429. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  430. bodyVelocity.Parent=hit
  431. coroutine.resume(coroutine.create(function(Vel)
  432. wait(0.7)
  433. Vel:Remove()
  434. end),bodyVelocity)
  435. game:GetService("Debris"):AddItem(vp,1)
  436. c=it("ObjectValue")
  437. c.Name="creator"
  438. c.Value=Player
  439. c.Parent=h
  440. game:GetService("Debris"):AddItem(c,.5)
  441. CRIT=false
  442. hitDeb=true
  443. AttackPos=6
  444. end
  445. end
  446. end
  447.  
  448. showDamage=function(Char,Dealt,du)
  449. m=Instance.new("Model")
  450. m.Name=tostring(Dealt)
  451. h=Instance.new("Humanoid")
  452. h.Health=0
  453. h.MaxHealth=0
  454. h.Parent=m
  455. c=Instance.new("Part")
  456. c.Transparency=0
  457. c.BrickColor=BrickColor:Red()
  458. if CRIT==true then
  459. c.BrickColor=BrickColor.new("Really red")
  460. end
  461. c.Name="Head"
  462. c.TopSurface=0
  463. c.BottomSurface=0
  464. c.formFactor="Plate"
  465. c.Size=Vector3.new(1,.4,1)
  466. ms=Instance.new("CylinderMesh")
  467. ms.Scale=Vector3.new(.8,.8,.8)
  468. if CRIT==true then
  469. ms.Scale=Vector3.new(1,1.25,1)
  470. end
  471. ms.Parent=c
  472. c.Reflectance=0
  473. Instance.new("BodyGyro").Parent=c
  474. c.Parent=m
  475. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  476. f=Instance.new("BodyPosition")
  477. f.P=2000
  478. f.D=100
  479. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  480. f.position=c.Position+Vector3.new(0,3,0)
  481. f.Parent=c
  482. game:GetService("Debris"):AddItem(m,.5+du)
  483. c.CanCollide=false
  484. m.Parent=workspace
  485. c.CanCollide=false
  486. end
  487.  
  488. function oneslash()
  489. attack=true
  490. combo=1
  491. for i=0,1,0.1 do
  492. wait()
  493. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+1*i,0,0)
  494. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.2*i,0)
  495. LW.C0=cf(-1.5, 0.5, 0) * euler(1+1.5*i,0,0)
  496. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  497. end
  498. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  499. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  500. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  501. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  502. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  503. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  504. for i=0,1,0.2 do
  505. wait()
  506. RW.C0=cf(1.5, 0.5, 0) * euler(2.5-3*i,0,0.6*i)
  507. LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,-0.6*i)
  508. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  509. effect("White",0.5,LastPoint,Point)
  510. LastPoint=Point
  511. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  512. effect("White",0.5,LastPoint2,Point2)
  513. LastPoint2=Point2
  514. end
  515. con1:disconnect()
  516. con2:disconnect()
  517. attack=false
  518. end
  519. function twoslash()
  520. attack=true
  521. combo=2
  522. for i=0,1,0.1 do
  523. wait()
  524. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2.07*i,0,0.6-0.6*i)
  525. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4-0.87*i,0)
  526. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+2.07*i,0,-0.6+0.6*i)
  527. LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.37*i,0)
  528. end
  529. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  530. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  531. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  532. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  533. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  534. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  535. for i=0,1,0.2 do
  536. wait()
  537. RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,2*i)
  538. RW.C1=cf(0, 0.5, 0) * euler(0,-1.27-0.3*i,0)
  539. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-2*i)
  540. LW.C1=cf(0, 0.5, 0) * euler(0,1.77-0.2*i,0)
  541. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  542. effect("White",0.5,LastPoint,Point)
  543. LastPoint=Point
  544. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  545. effect("White",0.5,LastPoint2,Point2)
  546. LastPoint2=Point2
  547. end
  548. con1:disconnect()
  549. con2:disconnect()
  550. attack=false
  551. end
  552. function threeslash()
  553. attack=true
  554. combo=3
  555. for i=0,1,0.1 do
  556. wait()
  557. RW.C0=cf(1.5-1.5*i, 0.5, -1*i) * euler(1.57,0,2-3*i)
  558. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57+0.93*i,0,-2+2*i)
  559. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  560. end
  561. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  562. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  563. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end)
  564. for i=0,1,0.2 do
  565. wait()
  566. RW.C0=cf(1.5*i, 0.5, -1+1*i) * euler(1.57,0,-1+3*i)
  567. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  568. effect("White",0.5,LastPoint,Point)
  569. LastPoint=Point
  570. end
  571. con1:disconnect()
  572. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  573. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  574. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end)
  575. for i=0,1,0.2 do
  576. wait()
  577. LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,0)
  578. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  579. effect("White",0.5,LastPoint2,Point2)
  580. LastPoint2=Point2
  581. end
  582. con2:disconnect()
  583. attack=false
  584. end
  585.  
  586. function TornadoSlash()
  587. attack=true
  588. for i=0,1,0.1 do
  589. wait()
  590. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+0.07*i,0,1.57*i)
  591. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.4*i,0)
  592. LW.C0=cf(-1.5, 0.5, 0) * euler(1+0.57*i,0,-1.57*i)
  593. LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.4*i,0)
  594. end
  595. bg.Parent=Torso
  596. bg.cframe=Torso.CFrame
  597. CF=Torso.CFrame
  598. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  599. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  600. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  601. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  602. for i=1,3 do
  603. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  604. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  605. for i=0,1,0.1 do
  606. wait()
  607. bg.cframe=CF*euler(0,6.283*i,0)
  608. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  609. effect("White",0.5,LastPoint,Point)
  610. LastPoint=Point
  611. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  612. effect("White",0.5,LastPoint2,Point2)
  613. LastPoint2=Point2
  614. end
  615. end
  616. con1:disconnect()
  617. con2:disconnect()
  618. bg.Parent=nil
  619. for i=0,1,0.1 do
  620. wait()
  621. RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,1.57-1.47*i)
  622. RW.C1=cf(0, 0.5, 0) * euler(0,1.8-2.5*i,0)
  623. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.57+1.47*i)
  624. LW.C1=cf(0, 0.5, 0) * euler(0,1.8-1.1*i,0)
  625. end
  626. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  627. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  628. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  629. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  630. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  631. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  632. for i=0,1,0.2 do
  633. wait()
  634. RW.C0=cf(1.5, 0.5, 0) * euler(1.57-2*i,0,0.1+1*i)
  635. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-2*i,0,-0.1-1*i)
  636. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  637. effect("White",0.5,LastPoint,Point)
  638. LastPoint=Point
  639. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  640. effect("White",0.5,LastPoint2,Point2)
  641. LastPoint2=Point2
  642. end
  643. con1:disconnect()
  644. con2:disconnect()
  645. wait(0.1)
  646. for i=0,1,0.1 do
  647. wait()
  648. RW.C0=cf(1.5, 0.5, 0) * euler(-0.43+1.93*i,0,1.1-1.1*i)
  649. RW.C1=cf(0, 0.5, 0) * euler(0,-0.7+0.1*i,0)
  650. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.43+1.43*i,0,-1.1+1.1*i)
  651. LW.C1=cf(0, 0.5, 0) * euler(0,0.7-0.3*i,0)
  652. end
  653. attack=false
  654. end
  655.  
  656. function MultiSpin()
  657. attack=true
  658. for i=0,1,0.1 do
  659. wait()
  660. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+2*i,0,0)
  661. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.6*i,0)
  662. LW.C0=cf(-1.5, 0.5, 0) * euler(1+2.5*i,0,0)
  663. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-0.4*i,0)
  664. end
  665. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  666. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  667. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  668. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  669. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  670. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  671. --6.28
  672. for i=0,1.05,0.05 do
  673. wait()
  674. if i==0.35 or i==0.65 then
  675. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  676. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  677. end
  678. wld1.C0=euler(1.57,(-6.28*3)*i,-1.57)*cf(0,1,0)
  679. awld1.C0=euler(-1.57,(6.28*3)*i,1.57)*cf(0,1,0)
  680. RW.C0=cf(1.5, 0.5, 0) * euler(3.5-4*i,0,0)
  681. LW.C0=cf(-1.5, 0.5, 0) * euler(3.5-4*i,0,0)
  682. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  683. effect("White",0.5,LastPoint,Point)
  684. LastPoint=Point
  685. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  686. effect("White",0.5,LastPoint2,Point2)
  687. LastPoint2=Point2
  688. end
  689. con1:disconnect()
  690. con2:disconnect()
  691. for i=0,1,0.1 do
  692. wait()
  693. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2*i,0,0)
  694. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6*i,0)
  695. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,0)
  696. LW.C1=cf(0, 0.5, 0) * euler(0,0.4*i,0)
  697. end
  698. attack=false
  699. end
  700.  
  701. function DashSlash()
  702. attack=true
  703. for i=0,1,0.1 do
  704. wait()
  705. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5-2*i,0,0.3*i)
  706. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+1.6*i,0)
  707. LW.C0=cf(-1.5, 0.5, 0) * euler(1-1.5*i,0,-0.3*i)
  708. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.4*i,0)
  709. end
  710. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  711. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  712. while holddash==true do
  713. wait()
  714. Humanoid.WalkSpeed=25
  715. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  716. effect("White",0.5,LastPoint,Point)
  717. LastPoint=Point
  718. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  719. effect("White",0.5,LastPoint2,Point2)
  720. LastPoint2=Point2
  721. end
  722. Humanoid.WalkSpeed=16
  723. for i=0,1,0.1 do
  724. wait()
  725. RW.C0=cf(1.5, 0.5, -0.25*i) * euler(-0.5+2*i,0,0.3-0.3*i)
  726. RW.C1=cf(0, 0.5, 0) * euler(0,1-1.6*i,0)
  727. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,-0.3+0.3*i)
  728. LW.C1=cf(0, 0.5, 0) * euler(0,-1+1.4*i,0)
  729. end
  730. attack=false
  731. end
  732.  
  733. function ChangeWeapon()
  734. attack=true
  735. for i=0,1,0.1 do
  736. wait()
  737. wld1.C0=euler(1.57,0.4*i,-1.57)*cf(0,1,0)
  738. awld1.C0=euler(-1.57,0.4*i,1.57-3.14*i)*cf(0,1,0)
  739. RW.C0=cf(1.5-0.5*i, 0.5, -0.25-0.25*i) * euler(1.5+0.07*i,0,-0.4*i)
  740. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.17*i,0)
  741. LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(1+0.57*i,0,0.4*i)
  742. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.97*i,0)
  743. end
  744. for i=0,1,0.1 do
  745. wait()
  746. wld1.C0=euler(1.57,0.4+0.2*i,-1.57)*cf(0,1,0)
  747. awld1.C0=euler(-1.57,0.4+0.2*i,-1.57)*cf(0,1,0)
  748. RW.C0=cf(1.5-0.5, 0.5, -0.5) * euler(1.57,0,-0.4-0.2*i)
  749. LW.C0=cf(-1.5+0.5, 0.5, -0.5) * euler(1.57,0,0.4+0.2*i)
  750. end
  751. awld1.Part1=prt1
  752. awld1.C0=cf(0,0,0)
  753. for i=0,1,0.1 do
  754. wait()
  755. wld1.C0=euler(1.57,0.6-0.6*i,-1.57)*cf(0,1,0)
  756. RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-0.57*i,0,-0.6)
  757. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  758. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-1.57*i,0,0.6-0.4*i)
  759. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.57*i,0)
  760. end
  761. attack=false
  762. end
  763.  
  764. function ob1d(mouse)
  765. if attack == true then return end
  766. hold=true
  767. --attack=true
  768. if combo==0 then
  769. oneslash()
  770. elseif combo==1 then
  771. twoslash()
  772. elseif combo==2 then
  773. threeslash()
  774. end
  775. coroutine.resume(coroutine.create(function()
  776. wait(0.5)
  777. if attack==false then
  778. combo=0
  779. wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0)
  780. awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0)
  781. RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0)
  782. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0)
  783. LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0)
  784. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  785. end
  786. end))
  787. end
  788.  
  789. function ob1u(mouse)
  790. hold = false
  791. end
  792.  
  793. buttonhold = false
  794.  
  795. eul=0
  796. holddash=false
  797. function key(key)
  798. if attack == true then return end
  799. if key=="z" then
  800. TornadoSlash()
  801. end
  802. if key=="x" then
  803. MultiSpin()
  804. end
  805. if key=="c" then
  806. holddash=true
  807. DashSlash()
  808. end
  809. if key=="v" then
  810. ChangeWeapon()
  811. end
  812. combo=0
  813. end
  814.  
  815. function key2(key)
  816. if key=="c" then
  817. holddash=false
  818. end
  819. end
  820.  
  821. function s(mouse)
  822. mouse.Button1Down:connect(function() ob1d(mouse) end)
  823. mouse.Button1Up:connect(function() ob1u(mouse) end)
  824. mouse.KeyDown:connect(key)
  825. mouse.KeyUp:connect(key2)
  826. unsheathed = true
  827. player = Player
  828. ch = Character
  829. MMouse = mouse
  830. RSH = ch.Torso["Right Shoulder"]
  831. LSH = ch.Torso["Left Shoulder"]
  832. --
  833. RSH.Parent = nil
  834. LSH.Parent = nil
  835. --
  836. RW.Part0 = ch.Torso
  837. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  838. RW.C1 = CFrame.new(0, 0.5, 0)
  839. RW.Part1 = ch["Right Arm"]
  840. RW.Parent = ch.Torso
  841. --_G.R = RW
  842. --
  843. LW.Part0 = ch.Torso
  844. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  845. LW.C1 = CFrame.new(0, 0.5, 0)
  846. LW.Part1 = ch["Left Arm"]
  847. LW.Parent = ch.Torso
  848. --_G.L = LW
  849. --
  850. equipanim()
  851. end
  852.  
  853. function ds(mouse)
  854. hideanim()
  855. wait(0)
  856. RW.Parent = nil
  857. LW.Parent = nil
  858. RSH.Parent = player.Character.Torso
  859. LSH.Parent = player.Character.Torso
  860. end
  861.  
  862. Bin.Selected:connect(s)
  863. Bin.Deselected:connect(ds)
  864. print("Dual Swords loaded.")
  865. -- mediafire
  866. --[[
  867. Copyrighted (C) Fenrier 2013
  868. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement