kaualima12

oooooooooooooooooooooooooooooooooo

Jun 27th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.49 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Edit by meunomenaoereal, the duolingo")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. Character = game.Players.LocalPlayer.Character
  149. Head = Character.Head
  150.  
  151.  
  152. --[[
  153. Cyber Samurai Class Made by Fenrier.
  154. ]]
  155. Player=game:GetService("Players").LocalPlayer
  156. Character=Player.Character
  157. PlayerGui=Player.PlayerGui
  158. Backpack=Player.Backpack
  159. Torso=Character.Torso
  160. Head=Character.Head
  161. Humanoid=Character.Humanoid
  162. LeftArm=Character["Left Arm"]
  163. LeftLeg=Character["Left Leg"]
  164. RightArm=Character["Right Arm"]
  165. RightLeg=Character["Right Leg"]
  166. LS=Torso["Left Shoulder"]
  167. LH=Torso["Left Hip"]
  168. RS=Torso["Right Shoulder"]
  169. RH=Torso["Right Hip"]
  170. Neck=Torso.Neck
  171. it=Instance.new
  172. vt=Vector3.new
  173. cf=CFrame.new
  174. euler=CFrame.fromEulerAnglesXYZ
  175. angles=CFrame.Angles
  176. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  177. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  178. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  179. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  180. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  181. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  182. RootPart=Character.HumanoidRootPart
  183. RootJoint=RootPart.RootJoint
  184. RootCF=euler(-1.57,0,3.14)
  185. attack = false
  186. attackdebounce = false
  187. MMouse=nil
  188. combo=0
  189. mana=0
  190. heat=0
  191. heatcooldown=false
  192. --player
  193. player=nil
  194. --save shoulders
  195. RSH, LSH=nil, nil
  196. --welds
  197. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  198. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  199. LH=Torso["Left Hip"]
  200. RH=Torso["Right Hip"]
  201. Sheathed=true
  202. SwordStance=false
  203. Charge=0
  204.  
  205. function swait(num)
  206. if num==0 or num==nil then
  207. game:service'RunService'.RenderStepped:wait()
  208. else
  209. for i=0,num do
  210. game:service'RunService'.RenderStepped:wait()
  211. end
  212. end
  213. end
  214.  
  215. if Character:findFirstChild("Cyber Edge",true) ~= nil then
  216. Character:findFirstChild("Cyber Edge",true).Parent = nil
  217. end
  218. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  219. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  220. end
  221.  
  222.  
  223. function NoOutline(Part)
  224. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  225. end
  226.  
  227. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  228. local fp=it("Part")
  229. fp.formFactor=formfactor
  230. fp.Parent=parent
  231. fp.Reflectance=reflectance
  232. fp.Transparency=transparency
  233. fp.CanCollide=false
  234. fp.Locked=true
  235. fp.BrickColor=brickcolor
  236. fp.Name=name
  237. fp.Size=size
  238. fp.Position=Torso.Position
  239. NoOutline(fp)
  240. fp.Material="SmoothPlastic"
  241. fp:BreakJoints()
  242. return fp
  243. end
  244.  
  245. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  246. local mesh=it(Mesh)
  247. mesh.Parent=part
  248. if Mesh=="SpecialMesh" then
  249. mesh.MeshType=meshtype
  250. mesh.MeshId=meshid
  251. end
  252. mesh.Offset=offset
  253. mesh.Scale=scale
  254. return mesh
  255. end
  256.  
  257. function weld(parent,part0,part1,c0)
  258. local weld=it("Weld")
  259. weld.Parent=parent
  260. weld.Part0=part0
  261. weld.Part1=part1
  262. weld.C0=c0
  263. return weld
  264. end
  265.  
  266. local fengui=it("GuiMain")
  267. fengui.Parent=Player.PlayerGui
  268. fengui.Name="WeaponGUI"
  269.  
  270. local modelzorz=Instance.new("Model")
  271. modelzorz.Parent=Character
  272. modelzorz.Name="Cyber Edge"
  273.  
  274. local handle=part(3,modelzorz,0,0.5,BrickColor.new("Dark stone grey"),"Handle",vt())
  275. local prt1=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part1",vt())
  276. local prt2=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Part2",vt())
  277. local prt3=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part3",vt())
  278. local prt4=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part4",vt())
  279. local prt11=part(3,modelzorz,0,0,Torso.BrickColor,"Part11",vt())
  280. local prt12=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part12",vt())
  281. local prt13=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part13",vt())
  282. local prt14=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part14",vt())
  283. prt14.Material="Plastic"
  284. local prt15=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part15",vt())
  285. local prt16=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part16",vt())
  286. prt16.Material="Plastic"
  287. local prt17=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part17",vt())
  288. prt17.Material="Plastic"
  289.  
  290. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1.5,20,2))
  291. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1.25,20.1,1.75))
  292. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1.6,5,2.1))
  293. local msh4=mesh("SpecialMesh",prt4,"Wedge","",vt(0,0,0),vt(1.6,2,2.1))
  294. local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(1,4,1))
  295. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.9,5,0.9))
  296. local msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(2.5,0.5,2.5))
  297. local msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(2,0.5,2))
  298. local msh15=mesh("BlockMesh",prt15,"","",vt(0,0,0),vt(0.5,15,0.5))
  299. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(0.2,15,1))
  300. local msh17=mesh("SpecialMesh",prt17,"Wedge","",vt(0,0,0),vt(0.2,2,1.2))
  301.  
  302. --local handlewld=weld(handle,handle,Torso,euler(0,0,0)*cf(0,0,-1))
  303. local handlewld=weld(handle,handle,LeftArm,euler(1.57,0,0)*cf(0,1,0))
  304. local wld1=weld(prt1,prt1,handle,euler(0,0,0)*cf(0,1,0))
  305. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  306. local wld3=weld(prt3,prt3,prt1,euler(0,0,0)*cf(0,1.7,0))
  307. local wld4=weld(prt4,prt4,prt3,euler(3.14,3.14,0)*cf(0,0.7,0))
  308. local wld11=weld(prt11,prt11,prt1,euler(0,0,0)*cf(0,-2.55,-0.05))
  309. --local wld11=weld(prt11,prt11,RightArm,euler(1.57,3.14,0)*cf(0,1,0))
  310. local wld12=weld(prt12,prt12,prt11,euler(0,0,0)*cf(0,0,0))
  311. local wld13=weld(prt13,prt13,prt12,euler(0,0,0)*cf(0,0.5,0.1))
  312. local wld14=weld(prt14,prt14,prt13,euler(0,0,0)*cf(0,0.01,0))
  313. local wld15=weld(prt15,prt15,prt12,euler(0,0,0)*cf(0,2,0))
  314. local wld16=weld(prt16,prt16,prt12,euler(0,0,0)*cf(0,2,0.1))
  315. local wld17=weld(prt17,prt17,prt16,euler(3.14,3.14,0)*cf(0,1.7,-0.02))
  316.  
  317. n=0.2
  318. n2=5
  319. for i=1,3 do
  320. Name="Part"..n2
  321. local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),Name,vt())
  322. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1.6,1,2.1))
  323. local wld5=weld(prt5,prt5,prt1,euler(0,0,0)*cf(0,n,0))
  324. n2=n2+1
  325. Name="Part"..n2
  326. local prt6=part(3,modelzorz,0,0,BrickColor.new("Really red"),Name,vt())
  327. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1.61,0.5,2.11))
  328. local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,0,0))
  329. n2=n2+1
  330. n=n+0.4
  331. end
  332.  
  333. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  334. hitbox.Anchored=false
  335.  
  336. if (script.Parent.className~="HopperBin") then
  337. Tool=Instance.new("HopperBin")
  338. Tool.Parent=Backpack
  339. Tool.Name="Cyber Edge"
  340. script.Parent=Tool
  341. end
  342. Bin=script.Parent
  343.  
  344. local bodvel=Instance.new("BodyVelocity")
  345. local bg=Instance.new("BodyGyro")
  346.  
  347. so = function(id,par,vol,pit)
  348. coroutine.resume(coroutine.create(function()
  349. local sou = Instance.new("Sound",par or workspace)
  350. sou.Volume=vol
  351. sou.Pitch=pit or 1
  352. sou.SoundId=id
  353. swait()
  354. sou:play()
  355. game:GetService("Debris"):AddItem(sou,6)
  356. end))
  357. end
  358.  
  359. function hideanim()
  360. equipped=false
  361. for i=0,1,0.1 do
  362. swait()
  363. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  364. handlewld.C1=euler(0.2-0.2*i,0,0)
  365. Torso.Neck.C0=necko*euler(0,0,-1+1*i)
  366. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  367. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  368. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7-0.7*i,0,-0.6+0.6*i)
  369. RW.C1=cf(0,0.5,0)*euler(0,-1.57+1.57*i,0)
  370. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(0,-0.8+0.8*i,0)
  371. LW.C1=cf(0,0.5,0)*euler(0.1-0.1*i,0,0)
  372. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  373. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  374. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  375. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  376. end
  377. wld11.Part1=prt1
  378. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  379. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  380. handlewld.C1=euler(0,0,0)
  381. Torso.Neck.C0=necko
  382. Torso.Neck.C1=necko2
  383. RootJoint.C0=RootCF
  384. RW.C0=cf(1.5,0.5,0)*euler(0,0,0)
  385. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  386. LW.C0=cf(-1.5,0.5,0)*euler(0,0,0)
  387. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  388. RH.C0=RHC0
  389. RH.C1=RHC1
  390. LH.C0=LHC0
  391. LH.C1=LHC1
  392. end
  393.  
  394. function equipanim()
  395. equipped=true
  396. for i=0,1,0.1 do
  397. swait()
  398. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  399. handlewld.C1=euler(0.2*i,0,0)
  400. Torso.Neck.C0=necko*euler(0,0,-1*i)
  401. Torso.Neck.C1=necko2*euler(-0.2*i,0,0)
  402. RootJoint.C0=RootCF*euler(0,0,1*i)
  403. RW.C0=cf(1.5-1*i,0.5-0.3*i,-0.5*i)*euler(0.7*i,0,-0.6*i)
  404. RW.C1=cf(0,0.5,0)*euler(0,-1.57*i,0)
  405. LW.C0=cf(-1.5+0.2*i,0.5,-0.3*i)*euler(0,-0.8*i,0)
  406. LW.C1=cf(0,0.5,0)*euler(0.1*i,0,0)
  407. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1*i,0)
  408. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  409. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i,-1.57-1*i,0)
  410. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  411. end
  412. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  413. handlewld.C1=euler(0.2,0,0)
  414. Torso.Neck.C0=necko*euler(0,0,-1)
  415. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  416. RootJoint.C0=RootCF*euler(0,0,1)
  417. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  418. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  419. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  420. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  421. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  422. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  423. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  424. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  425. end
  426.  
  427. function IaidoStrike()
  428. attack=true
  429. wld11.Part1=RightArm
  430. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  431. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  432. LastPoint=Point
  433. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.4)
  434. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  435. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  436. ef.Anchored=true
  437. ef.CFrame=RootPart.CFrame*cf(0,0,-6)
  438. MagniDamage(ef,7,10,20,math.random(10,20),"Normal")
  439. game:GetService("Debris"):AddItem(ef,2)
  440. for i=0,1,0.1 do
  441. wld11.C0=euler(1.57-0.2-1.37*i,2.5+0.2*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  442. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  443. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  444. RootJoint.C0=RootCF*euler(0,0,1-0.5*i)
  445. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+1.4*i,0,-0.6+1.4*i)
  446. RW.C1=cf(0,0.5+4*i,0)*euler(0,-1.57-0.43*i,0)
  447. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  448. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  449. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  450. effect("Bright red",0.4,LastPoint,Point)
  451. LastPoint=Point
  452. end
  453. n=2
  454. for i=0,1,0.05 do
  455. swait()
  456. Torso.Neck.C0=necko*euler(0,0,-0.5)
  457. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  458. RootJoint.C0=RootCF*euler(0,0,0.5)
  459. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  460. RW.C1=cf(0,0.5,0)*euler(0,-2.07-0.2*i*n,0)
  461. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  462. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  463. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  464. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  465. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  466. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  467. n=n-0.05
  468. end
  469. for i=0,1,0.1 do
  470. swait()
  471. handlewld.C1=euler(0.2-0.2*i,0,0)
  472. wld11.C0=euler(1.57*i,2.7+0.44*i,0)*cf(0,1,0)
  473. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(2.3-1*i,1.57*i,1-1*i)
  474. RW.C1=cf(0,0.5,0)*euler(-0.3*i,-2.27+2.27*i,0)
  475. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8+0.2*i,-0.4+0.2*i)
  476. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  477. end
  478. handlewld.C1=euler(0,0,0)
  479. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  480. RW.C0=cf(1,0.5,-0.5)*euler(1.3,1.57,0)
  481. RW.C1=cf(0,0.5,0)*euler(-0.3,0,0)
  482. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  483. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  484. attack=false
  485. end
  486.  
  487. function Sheath()
  488. attack=true
  489. for i=0,1,0.1 do
  490. swait()
  491. wld11.C0=euler(1.57+0.6*i,3.14,0)*cf(0,1,0)
  492. handlewld.C1=euler(0.6*i,0,0)
  493. Torso.Neck.C0=necko*euler(0.2*i,0,-0.5+0.5*i)
  494. RootJoint.C0=RootCF*euler(0,0,0.5-0.5*i)
  495. RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(1.3+0.27*i,1.57,0)
  496. RW.C1=cf(0,0.5,0)*euler(-0.3+0.9*i,0,0)
  497. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(1.57*i,-0.6-0.97*i,-0.2+0.2*i)
  498. LW.C1=cf(0,0.5,0)*euler(0.1+0.5*i,0,0)
  499. end
  500. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  501. wld11.Part1=prt1
  502. wld11.C0=euler(0,0,0)*cf(0,-2.55-2.5,-0.05)
  503. for i=0,1,0.05 do
  504. swait()
  505. Torso.Neck.C0=necko*euler(0.2+0.1*i,0,0)
  506. handlewld.C1=euler(0.6-1*i,0,0)
  507. wld11.C0=euler(0,0,0)*cf(0,-2.55-2.5+2.5*i,-0.05)
  508. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(1.57,1.57,0)
  509. RW.C1=cf(0,0.5,0)*euler(0.6-1*i,0,0)
  510. LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(1.57,-1.57,0)
  511. LW.C1=cf(0,0.5,0)*euler(0.6-1*i,0,0)
  512. end
  513. for i=0,1,0.05 do
  514. swait()
  515. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1*i)
  516. Torso.Neck.C1=necko2*euler(-0.2*i,0,0)
  517. RootJoint.C0=RootCF*euler(0,0,1*i)
  518. handlewld.C1=euler(-0.4+0.6*i,0,0)
  519. RW.C0=cf(1-0.5*i,0.5-0.3*i,-0.5)*euler(1.57-0.87*i,1.57-1.57*i,-0.6*i)
  520. RW.C1=cf(0,0.5,0)*euler(-0.4+0.4*i,-1.57*i,0)
  521. LW.C0=cf(-1-0.3*i,0.5,-0.5+0.2*i)*euler(1.57-1.57*i,-1.57+0.77*i,0)
  522. LW.C1=cf(0,0.5,0)*euler(-0.4+0.5*i,0,0)
  523. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1*i,0)
  524. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  525. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i,-1.57-1*i,0)
  526. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  527. end
  528. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  529. handlewld.C1=euler(0.2,0,0)
  530. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  531. Torso.Neck.C0=necko*euler(0,0,-1)
  532. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  533. RootJoint.C0=RootCF*euler(0,0,1)
  534. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  535. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  536. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  537. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  538. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  539. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  540. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  541. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  542. attack=false
  543. end
  544.  
  545. function attackone()
  546. attack=true
  547. for i=0,1,0.1 do
  548. swait()
  549. Torso.Neck.C0=necko*euler(0,0,-0.5-0.3*i)
  550. RootJoint.C0=RootCF*euler(0,0,0.5+0.3*i)
  551. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  552. RW.C0=cf(1-0.5*i,0.5,-0.5)*euler(1.3+0.2*i,1.57,0)
  553. RW.C1=cf(0,0.5,0)*euler(-0.3-0.3*i,0,0)
  554. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  555. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  556. end
  557. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.2,1,nil,1) end)
  558. hitbox.Parent=modelzorz
  559. hitbox.Size=vt(1,4,1)
  560. hitbox.Transparency=1
  561. hitbox.CFrame=prt16.CFrame
  562. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1.1)
  563. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  564. LastPoint=Point*cf(0,0,.1)
  565. for i=0,1,0.2 do
  566. swait()
  567. Torso.Neck.C0=necko*euler(0,0,-0.8+1.2*i)
  568. RootJoint.C0=RootCF*euler(0,0,0.8-1.2*i)
  569. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  570. RW.C0=cf(0.5+1*i,0.5,-0.5+0.5*i)*euler(1.5,1.57,0)
  571. RW.C1=cf(0,0.5,0)*euler(-0.6+1.6*i,0,0)
  572. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(0,-0.6,-0.2-0.2*i)
  573. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  574. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  575. effect("Bright red",0.4,LastPoint,Point)
  576. LastPoint=Point
  577. hitbox.CFrame=prt16.CFrame
  578. end
  579. con1:disconnect()
  580. hitbox.Parent=nil
  581. n=2
  582. for i=0,1,0.2 do
  583. swait()
  584. Torso.Neck.C0=necko*euler(0,0,0.4+0.2*i*n)
  585. RootJoint.C0=RootCF*euler(0,0,-0.4-0.2*i*n)
  586. wld11.C0=euler(0,3.14,0)*cf(0,1,0)
  587. RW.C0=cf(1.5,0.5,0)*euler(1.5,1.57,0)
  588. RW.C1=cf(0,0.5,0)*euler(1+0.2*i*n,0,0)
  589. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6,-0.4)
  590. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  591. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  592. effect("Bright red",0.4,LastPoint,Point)
  593. LastPoint=Point
  594. n=n-0.2
  595. end
  596. attack=false
  597. end
  598.  
  599. function attacktwo()
  600. attack=true
  601. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1.3)
  602. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  603. LastPoint=Point
  604. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  605. ef.Anchored=true
  606. ef.CFrame=RootPart.CFrame*cf(0,0,-3)
  607. MagniDamage(ef,5,10,15,math.random(10,20),"Normal")
  608. game:GetService("Debris"):AddItem(ef,2)
  609. for i=0,1,0.1 do
  610. wld11.C0=euler(3.14-1.57*i,3.14,3.14)*cf(0,1,0)
  611. Torso.Neck.C0=necko*euler(0,0,0.6-1.2*i)
  612. RootJoint.C0=RootCF*euler(0,0,-0.6+1.2*i)
  613. RW.C0=cf(1.5-1*i,0.5,-0.5*i)*euler(1.5+0.2*i,1.57,0)
  614. RW.C1=cf(0,0.5,0)*euler(1.2-2.1*i,0.5*i,0)
  615. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6,-0.4)
  616. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  617. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  618. effect("Bright red",0.4,LastPoint,Point)
  619. LastPoint=Point
  620. end
  621. n=2
  622. for i=0,1,0.05 do
  623. swait()
  624. wld11.C0=euler(1.57,3.14,3.14)*cf(0,1,0)
  625. Torso.Neck.C0=necko*euler(0,0,-0.6-0.1*i*n)
  626. RootJoint.C0=RootCF*euler(0,0,0.6+0.1*i*n)
  627. RW.C0=cf(.5,0.5,-0.5)*euler(1.7,1.57,0)
  628. RW.C1=cf(0,0.5,0)*euler(-0.9-0.2*i*n,0.5,0)
  629. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6+0.2*i*n,-0.4+0.2*i*n)
  630. LW.C1=cf(0,0.5,0)*euler(0.3+0.2*i*n,0,0)
  631. n=n-0.05
  632. end
  633. attack=false
  634. end
  635.  
  636. function attackthree()
  637. attack=true
  638. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  639. LastPoint=Point
  640. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.2,1,nil,1) end)
  641. hitbox.Parent=modelzorz
  642. hitbox.Size=vt(1,4,1)
  643. hitbox.Transparency=1
  644. hitbox.CFrame=prt16.CFrame
  645. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  646. for i=0,1,0.2 do
  647. swait()
  648. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  649. Torso.Neck.C0=necko*euler(0,0,-0.7+0.2*i)
  650. RootJoint.C0=RootCF*euler(0,0,0.7-0.2*i)
  651. RW.C0=cf(.5+1*i,0.5,-0.5+0.5*i)*euler(1.7,1.57,0)
  652. RW.C1=cf(0,0.5,0)*euler(-1.1+2.6*i,0.5,0)
  653. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  654. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  655. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  656. effect("Bright red",0.4,LastPoint,Point)
  657. LastPoint=Point
  658. hitbox.CFrame=prt16.CFrame
  659. end
  660. con1:disconnect()
  661. hitbox.Parent=nil
  662. n=2
  663. for i=0,1,0.2 do
  664. swait()
  665. Torso.Neck.C0=necko*euler(0,0,-0.5+0.2*i*n)
  666. RootJoint.C0=RootCF*euler(0,0,0.5-0.2*i*n)
  667. RW.C0=cf(1.5,0.5,0)*euler(1.7,1.57,0)
  668. RW.C1=cf(0,0.5,0)*euler(1.5+0.2*i*n,0.5,0)
  669. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  670. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  671. n=n-0.2
  672. end
  673. attack=false
  674. end
  675.  
  676. function Stance()
  677. attack=true
  678. SwordStance=true
  679. Humanoid.WalkSpeed=0.1
  680. for i=0,1,0.05 do
  681. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  682. handlewld.C1=euler(0.2+0.1*i,0,0)
  683. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  684. Torso.Neck.C0=necko*euler(0,0,-1-0.1*i)
  685. Torso.Neck.C1=necko2*euler(-0.2-0.1*i,0,0)
  686. RootJoint.C0=RootCF*euler(0,0,1+0.1*i)
  687. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6+0.1*i)
  688. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  689. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  690. LW.C1=cf(0,0.5,0)*euler(0.1+0.1*i,0,0)
  691. end
  692. coroutine.resume(coroutine.create(function()
  693. for i=1,100 do
  694. if SwordStance==true then
  695. swait()
  696. end
  697. end
  698. SwordStance=false
  699. Humanoid.WalkSpeed=16
  700. for i=0,1,0.1 do
  701. if attack==false then
  702. swait()
  703. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  704. handlewld.C1=euler(0.2,0,0)
  705. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  706. Torso.Neck.C0=necko*euler(0,0,-1)
  707. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  708. RootJoint.C0=RootCF*euler(0,0,1)
  709. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  710. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  711. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  712. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  713. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  714. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  715. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  716. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  717. end
  718. end
  719. end))
  720. attack=false
  721. end
  722.  
  723. function IaidoDash()
  724. attack=true
  725. explode=false
  726. Humanoid.WalkSpeed=0
  727. wld11.Part1=RightArm
  728. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  729. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  730. LastPoint=Point
  731. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.6)
  732. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  733. range=20
  734. if Charge>=3 then
  735. print("KABOOM")
  736. Charge=0
  737. explode=true
  738. end
  739. for i=0,1,0.1 do
  740. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  741. ef.Anchored=true
  742. ef.CFrame=Torso.CFrame*cf(0,0,-2)*euler(0,0,1-0.5*i)
  743. if i==0.6 and explode==true then
  744. print("die")
  745. MagniDamage(Torso,10,20,30,math.random(20,40),"Knockdown")
  746. so("http://www.roblox.com/Asset?ID=87784452",Torso,1,1.2)
  747. for i=1,3 do
  748. MagicBlock(BrickColor.new("Bright red"),Torso.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.06,2,Torso)
  749. MagicCircle(BrickColor.new("Bright red"),Torso.CFrame,1,1,1,3,3,3,0.03)
  750. end
  751. end
  752. if explode==false then
  753. MagniDamage(ef,5,10,20,math.random(10,20),"Charge")
  754. end
  755. game:GetService("Debris"):AddItem(ef,2)
  756. wld11.C0=euler(1.57-0.2-1.37*i,2.5+0.2*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  757. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  758. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  759. RootJoint.C0=RootCF*cf(0,-range*i,0)*euler(0,0,1-0.5*i)
  760. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+1.4*i,0,-0.6+1.4*i)
  761. RW.C1=cf(0,0.5,0)*euler(0,-1.57-0.43*i,0)
  762. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  763. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  764. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  765. effect("Bright red",0.4,LastPoint,Point)
  766. LastPoint=Point
  767. end
  768. RootJoint.C0=RootCF*cf(0,0,0)*euler(0,0,0.5)
  769. RootPart.CFrame=RootPart.CFrame*cf(0,0,-range)
  770. n=2
  771. for i=0,1,0.05 do
  772. swait()
  773. Humanoid.WalkSpeed=0
  774. Torso.Neck.C0=necko*euler(0,0,-0.5)
  775. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  776. RootJoint.C0=RootCF*euler(0,0,0.5)
  777. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  778. RW.C1=cf(0,0.5,0)*euler(0,-2.07-0.2*i*n,0)
  779. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  780. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  781. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  782. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  783. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  784. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  785. n=n-0.05
  786. end
  787. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  788. LastPoint=Point
  789. for i=0,1,0.05 do
  790. swait()
  791. if i==0.1 then
  792. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  793. elseif i==0.6 then
  794. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  795. end
  796. wld11.C0=euler(15.5*i,2.7,0)*cf(0,1,0)
  797. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  798. Torso.Neck.C1=necko2*euler(0,0,0)
  799. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  800. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1-0.2*i)
  801. RW.C1=cf(0,0.5,0)*euler(0,-2.27,0)
  802. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  803. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  804. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  805. effect("Bright red",0.4,LastPoint,Point)
  806. LastPoint=Point
  807. end
  808. swait(5)
  809. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  810. Humanoid.WalkSpeed=16
  811. wld11.Part1=prt1
  812. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  813. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  814. handlewld.C1=euler(0.2,0,0)
  815. Torso.Neck.C0=necko*euler(0,0,-1)
  816. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  817. RootJoint.C0=RootCF*euler(0,0,1)
  818. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  819. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  820. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  821. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  822. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  823. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  824. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  825. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  826. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  827. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  828. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*euler(1.57,0,0)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  829. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*euler(1.57,0,1.57)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  830. swait(10)
  831. attack=false
  832. end
  833.  
  834. function Wilt()
  835. attack=true
  836. Humanoid.WalkSpeed=0
  837. up=-1
  838. range=2
  839. for i=1,3 do
  840. wld11.Part1=RightArm
  841. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  842. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  843. LastPoint=Point
  844. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.6)
  845. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  846. for i=0,1,0.1 do
  847. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  848. ef.Anchored=true
  849. ef.CFrame=Torso.CFrame*cf(4*i,1,-4*i)*euler(0,0,1-0.5*i)
  850. MagniDamage(ef,6,5,10,math.random(10,20),"Normal")
  851. game:GetService("Debris"):AddItem(ef,2)
  852. wld11.C0=euler(1.57-0.2-1.37*i,2.5+0.2*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  853. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  854. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  855. RootJoint.C0=RootCF*cf(0,-range*i,up*i)*euler(0,0,1-0.5*i)
  856. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+1.4*i,0,-0.6+1.4*i)
  857. RW.C1=cf(0,0.5,0)*euler(-(up*i)/10,-1.57-0.43*i,0)
  858. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  859. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  860. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  861. effect("Bright red",0.4,LastPoint,Point)
  862. LastPoint=Point
  863. end
  864. RootJoint.C0=RootCF*cf(0,0,0)*euler(0,0,0.5)
  865. n=2
  866. for i=0,1,0.1 do
  867. swait()
  868. Humanoid.WalkSpeed=0
  869. Torso.Neck.C0=necko*euler(0,0,-0.5)
  870. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  871. RootJoint.C0=RootCF*euler(0,0,0.5)
  872. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  873. RW.C1=cf(0,0.5,0)*euler(-up/10,-2-0.2*i*n,0)
  874. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  875. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  876. n=n-0.1
  877. end
  878. wld11.Part1=prt1
  879. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  880. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  881. handlewld.C1=euler(0.2,0,0)
  882. Torso.Neck.C0=necko*euler(0,0,-1)
  883. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  884. RootJoint.C0=RootCF*euler(0,0,1)
  885. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  886. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  887. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  888. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  889. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  890. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  891. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  892. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  893. swait(10)
  894. up=up+2
  895. range=range+2
  896. end
  897. swait(10)
  898. Humanoid.WalkSpeed=16
  899. attack=false
  900. end
  901.  
  902. function Rose()
  903. attack=true
  904. CF=RootPart.CFrame
  905. local ef=part(3,workspace,0,0.2,BrickColor.new("Really red"),"Effect",vt(1,1,1))
  906. ef.Anchored=true
  907. ef.CFrame=CF
  908. efmsh=mesh("SpecialMesh",ef,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(3,3,3))
  909. coroutine.resume(coroutine.create(function(Part,Mesh,CeEf)
  910. for i=0,1,0.05 do
  911. swait()
  912. MagniDamage(Part,5,5,10,20,"Up")
  913. Mesh.Scale=vt(3,3+3*i,3)
  914. Part.CFrame=CeEf*cf(0,0,-35*i)*euler(0,15*i,0)
  915. MagicBlock(BrickColor.new("Bright red"),ef.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,1.2,1.2,1.2,0.1,2,ef)
  916. Part.Transparency=i
  917. end
  918. ef.Parent=nil
  919. end),ef,efmsh,CF)
  920. wld11.Part1=RightArm
  921. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  922. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  923. LastPoint=Point
  924. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  925. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  926. for i=0,1,0.2 do
  927. swait()
  928. wld11.C0=euler(1.57-0.2-1.37*i,2.5+0.2*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  929. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  930. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  931. RootJoint.C0=RootCF*euler(0,0,1-0.5*i)
  932. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+1.4*i,0,-0.6+1.4*i)
  933. RW.C1=cf(0,0.5,0)*euler(0,-1.57-0.43*i,0)
  934. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  935. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  936. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  937. effect("Bright red",0.4,LastPoint,Point)
  938. LastPoint=Point
  939. end
  940. n=2
  941. for i=0,1,0.1 do
  942. swait()
  943. Humanoid.WalkSpeed=0
  944. Torso.Neck.C0=necko*euler(0,0,-0.5)
  945. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  946. RootJoint.C0=RootCF*euler(0,0,0.5)
  947. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.4*i*n)
  948. RW.C1=cf(0,0.5,0)*euler(0,-2-0.2*i*n,0)
  949. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  950. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  951. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  952. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  953. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  954. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  955. n=n-0.1
  956. end
  957. for i=0,1,0.05 do
  958. swait()
  959. wld11.C0=euler(2.5*i,2.7,0)*cf(0,1,0)
  960. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  961. Torso.Neck.C1=necko2*euler(0,0,0)
  962. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  963. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1-0.2*i)
  964. RW.C1=cf(0,0.5,0)*euler(0,-2,0)
  965. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  966. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  967. end
  968. swait(5)
  969. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  970. Humanoid.WalkSpeed=16
  971. wld11.Part1=prt1
  972. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  973. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  974. handlewld.C1=euler(0.2,0,0)
  975. Torso.Neck.C0=necko*euler(0,0,-1)
  976. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  977. RootJoint.C0=RootCF*euler(0,0,1)
  978. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  979. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  980. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  981. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  982. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  983. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  984. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  985. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  986. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  987. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  988. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*euler(1.57,0,0)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  989. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*euler(1.57,0,1.57)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  990. attack=false
  991. end
  992.  
  993. function ElecStorm()
  994. attack=true
  995. Humanoid.WalkSpeed=0
  996. wld11.Part1=RightArm
  997. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  998. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  999. LastPoint=Point
  1000. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  1001. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  1002. for i=0,1,0.1 do
  1003. swait()
  1004. Humanoid.WalkSpeed=0
  1005. wld11.C0=euler(1.57-0.2+0.2*i,2.5-2.5*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  1006. handlewld.C1=euler(0.2-0.2*i,0,0)
  1007. Torso.Neck.C0=necko*euler(0,0,-1+1*i)
  1008. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  1009. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  1010. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+2*i,0,-0.6+0.4*i)
  1011. RW.C1=cf(0,0.5,0)*euler(0,-1.57+1.57*i,0)
  1012. LW.C0=cf(-1.3,0.5,-0.3)*euler(-0.5*i,-0.8+0.4*i,0)
  1013. LW.C1=cf(0,0.5,0)*euler(0.1-0.1*i,0,0.4*i)
  1014. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  1015. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1016. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  1017. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1018. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1019. effect("Bright red",0.4,LastPoint,Point)
  1020. LastPoint=Point
  1021. end
  1022. for i=0,1,0.2 do
  1023. swait()
  1024. Torso.Neck.C0=necko*euler(0.2*i,0,0)
  1025. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  1026. RootJoint.C0=RootCF*cf(0,0,-0.8*i)
  1027. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(2.7-1.2*i,0,-0.2-0.5*i)
  1028. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1029. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(-0.5-0.2*i,-0.4+0.2*i,0)
  1030. LW.C1=cf(0,0.5,0)*euler(0,0,0.4+0.2*i)
  1031. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1*i)
  1032. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1033. LH.C0=cf(-0.5,-1+0.2*i,-0.5*i)*euler(0,-1.57,0.2*i)
  1034. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1035. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1036. effect("Bright red",0.4,LastPoint,Point)
  1037. LastPoint=Point
  1038. end
  1039. coroutine.resume(coroutine.create(function(Part)
  1040. MagicCircle(BrickColor.new("Really red"),Part.CFrame,150,150,150,-2,-2,-2,0.03)
  1041. for i=1,20 do
  1042. wait()
  1043. for i=1,2 do
  1044. MagicBlock(BrickColor.new("Bright red"),Part.CFrame*cf(math.random(-20,20),math.random(-20,20),math.random(-20,20))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,1,1,1,0.1,2,Part)
  1045. end
  1046. end
  1047. end),RootPart)
  1048. so("http://www.roblox.com/asset/?id=2974000",prt11,1,0.8)
  1049. MagniDamage(RootPart,20,5,20,math.random(-40,-20),"Knockdown")
  1050. swait(10)
  1051. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1052. LastPoint=Point
  1053. for i=0,1,0.05 do
  1054. swait()
  1055. if i==0.1 then
  1056. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  1057. elseif i==0.6 then
  1058. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  1059. end
  1060. wld11.C0=euler(1.57-9.42*i,0,0)*cf(0,1,0)
  1061. Torso.Neck.C0=necko*euler(0.2-0.2*i,0,0)
  1062. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  1063. RootJoint.C0=RootCF*cf(0,0,-0.8+0.8*i)
  1064. RW.C0=cf(1,0.5,-0.5)*euler(1.5+1*i,0,-0.7)
  1065. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1066. LW.C0=cf(-1.5,0.5,0)*euler(-0.7,-0.2,0)
  1067. LW.C1=cf(0,0.5,0)*euler(0,0,0.6)
  1068. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1+1*i)
  1069. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1070. LH.C0=cf(-0.5,-0.8-0.2*i,-0.5+0.5*i)*euler(0,-1.57,0.2-0.2*i)
  1071. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1072. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1073. effect("Bright red",0.4,LastPoint,Point)
  1074. LastPoint=Point
  1075. end
  1076. for i=0,1,0.1 do
  1077. swait()
  1078. Torso.Neck.C0=necko*euler(0,0,-0.5*i)
  1079. RootJoint.C0=RootCF*euler(0,0,0.5*i)
  1080. RW.C0=cf(1,0.5,-0.5)*euler(2.5-1.2*i,1.57*i,-0.7+0.7*i)
  1081. RW.C1=cf(0,0.5,0)*euler(-0.3*i,0,0)
  1082. LW.C0=cf(-1.5+0.2*i,0.5,-0.3*i)*euler(-0.7+0.7*i,-0.2-0.4*i,-0.2*i)
  1083. LW.C1=cf(0,0.5,0)*euler(0.1*i,0,0.6-0.6*i)
  1084. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1085. effect("Bright red",0.4,LastPoint,Point)
  1086. LastPoint=Point
  1087. end
  1088. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1089. Humanoid.WalkSpeed=16
  1090. attack=false
  1091. end
  1092.  
  1093. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  1094. for _,c in pairs(workspace:children()) do
  1095. local hum=c:findFirstChild("Humanoid")
  1096. if hum~=nil then
  1097. local head=c:findFirstChild("Torso")
  1098. if head~=nil then
  1099. local targ=head.Position-Part.Position
  1100. local mag=targ.magnitude
  1101. if mag<=magni and c.Name~=Player.Name then
  1102. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,nil,1)
  1103. end
  1104. end
  1105. end
  1106. end
  1107. end
  1108.  
  1109. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1110. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1111. end
  1112.  
  1113. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1114. LastPoint=Point
  1115. function effect(Color,Ref,LP,P1,returnn)
  1116. local effectsmsh=Instance.new("CylinderMesh")
  1117. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1118. effectsmsh.Name="Mesh"
  1119. local effectsg=Instance.new("Part")
  1120. effectsg.formFactor=3
  1121. effectsg.CanCollide=false
  1122. effectsg.Name="Eff"
  1123. effectsg.Locked=true
  1124. effectsg.Anchored=true
  1125. effectsg.Size=Vector3.new(0.5,1,0.5)
  1126. effectsg.Parent=workspace
  1127. effectsmsh.Parent=effectsg
  1128. effectsg.BrickColor=BrickColor.new(Color)
  1129. effectsg.Reflectance=Ref
  1130. local point1=P1
  1131. local mg=(LP.p - point1.p).magnitude
  1132. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1133. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1134. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1135. game:GetService("Debris"):AddItem(effectsg,2)
  1136. if returnn then return effectsg end
  1137. coroutine.resume(coroutine.create(function(Part,Mesh)
  1138. if not returnn then
  1139. for i=0,1,0.05 do
  1140. wait()
  1141. Part.Transparency=1*i
  1142. Mesh.Scale=Vector3.new(0.5-0.5*i,1,0.5-0.5*i)
  1143. end
  1144. Part.Parent=nil
  1145. end
  1146. end),effectsg,effectsmsh)
  1147. end
  1148.  
  1149. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1150. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1151. if Type~=3 and Type~=4 then
  1152. prt.Anchored=true
  1153. end
  1154. prt.CFrame=cframe
  1155. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1156. game:GetService("Debris"):AddItem(prt,5)
  1157. coroutine.resume(coroutine.create(function(Part,Mesh,dur,ceef)
  1158. local wld=nil
  1159. if dur==3 or dur==4 then
  1160. wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0))
  1161. end
  1162. for i=0,1,delay do
  1163. wait()
  1164. if dur==1 then
  1165. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1166. elseif dur==2 then
  1167. Part.CFrame=Part.CFrame
  1168. elseif dur==3 then
  1169. wld.C0=wld.C0*euler(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1170. elseif dur==4 then
  1171. wld.C0=ceef
  1172. end
  1173. Part.Transparency=i
  1174. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1175. end
  1176. Part.Parent=nil
  1177. end),prt,msh,Type,cframe)
  1178. end
  1179.  
  1180. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1181. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1182. prt.Anchored=true
  1183. prt.CFrame=cframe
  1184. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1185. game:GetService("Debris"):AddItem(prt,2)
  1186. coroutine.resume(coroutine.create(function(Part,Mesh)
  1187. local wld=nil
  1188. for i=0,1,delay do
  1189. wait()
  1190. Part.CFrame=Part.CFrame
  1191. Part.Transparency=i
  1192. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1193. end
  1194. Part.Parent=nil
  1195. end),prt,msh)
  1196. end
  1197.  
  1198. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1199. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1200. if Type~=2 then
  1201. prt.Anchored=true
  1202. end
  1203. prt.CFrame=cframe
  1204. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  1205. game:GetService("Debris"):AddItem(prt,5)
  1206. coroutine.resume(coroutine.create(function(Part,Mesh,dur)
  1207. local wld=nil
  1208. if dur==2 then
  1209. wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0))
  1210. end
  1211. for i=0,1,delay do
  1212. wait()
  1213. if dur==1 then
  1214. Part.CFrame=Part.CFrame
  1215. elseif dur==2 then
  1216. wld.C0=cframe
  1217. end
  1218. Part.Transparency=i
  1219. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1220. end
  1221. Part.Parent=nil
  1222. end),prt,msh,Type)
  1223. end
  1224.  
  1225. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1226. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1227. prt.Anchored=true
  1228. prt.CFrame=cframe
  1229. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1230. game:GetService("Debris"):AddItem(prt,5)
  1231. coroutine.resume(coroutine.create(function(Part,Mesh)
  1232. for i=0,1,delay do
  1233. wait()
  1234. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1235. Part.Transparency=i
  1236. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1237. end
  1238. Part.Parent=nil
  1239. end),prt,msh)
  1240. end
  1241.  
  1242. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,mshtype)
  1243. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1244. prt.Anchored=true
  1245. prt.CFrame=cframe
  1246. local thetype=""
  1247. if mshtype==1 then
  1248. thetype="http://www.roblox.com/asset/?id=20329976"
  1249. elseif mshtype==2 then
  1250. thetype="http://www.roblox.com/asset/?id=1323306"
  1251. end
  1252. msh=mesh("SpecialMesh",prt,"FileMesh",thetype,vt(0,0,0),vt(x1,y1,z1))
  1253. game:GetService("Debris"):AddItem(prt,2)
  1254. coroutine.resume(coroutine.create(function(Part,Mesh)
  1255. for i=0,1,delay do
  1256. wait()
  1257. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  1258. Part.Transparency=i
  1259. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1260. end
  1261. Part.Parent=nil
  1262. end),prt,msh)
  1263. end
  1264.  
  1265. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock,Slash)
  1266. if hit.Parent==nil then
  1267. return
  1268. end
  1269. h=hit.Parent:FindFirstChild("Humanoid")
  1270. for _,v in pairs(hit.Parent:children()) do
  1271. if v:IsA("Humanoid") then
  1272. h=v
  1273. end
  1274. end
  1275. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1276. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1277. end
  1278. if hit.Parent.className=="Hat" then
  1279. hit=hit.Parent.Parent:findFirstChild("Head")
  1280. end
  1281. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1282. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1283. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1284. return
  1285. end]]
  1286. -- hs(hit,1.2)
  1287. if Slash==1 then
  1288. so("http://www.roblox.com/asset/?id=10209590",hit,1,1)
  1289. MagicCircle(BrickColor.new("Bright red"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.2,.2,6,.2,0.1)
  1290. end
  1291. c=Instance.new("ObjectValue")
  1292. c.Name="creator"
  1293. c.Value=game:service("Players").LocalPlayer
  1294. c.Parent=h
  1295. game:GetService("Debris"):AddItem(c,.5)
  1296. Damage=math.random(minim,maxim)
  1297. -- h:TakeDamage(Damage)
  1298. blocked=false
  1299. block=hit.Parent:findFirstChild("Block")
  1300. if block~=nil then
  1301. print(block.className)
  1302. if block.className=="NumberValue" then
  1303. if block.Value>0 then
  1304. blocked=true
  1305. if decreaseblock==nil then
  1306. block.Value=block.Value-1
  1307. end
  1308. end
  1309. end
  1310. if block.className=="IntValue" then
  1311. if block.Value>0 then
  1312. blocked=true
  1313. if decreaseblock~=nil then
  1314. block.Value=block.Value-1
  1315. end
  1316. end
  1317. end
  1318. end
  1319. if blocked==false then
  1320. -- h:TakeDamage(Damage)
  1321. h.Health=h.Health-Damage
  1322. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1323. else
  1324. h.Health=h.Health-(Damage/2)
  1325. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1326. end
  1327. if Type=="Knockdown" then
  1328. hum=hit.Parent.Humanoid
  1329. hum.PlatformStand=true
  1330. coroutine.resume(coroutine.create(function(HHumanoid)
  1331. swait(1)
  1332. HHumanoid.PlatformStand=false
  1333. end),hum)
  1334. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1335. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1336. local bodvol=Instance.new("BodyVelocity")
  1337. bodvol.velocity=angle*knockback
  1338. bodvol.P=5000
  1339. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1340. bodvol.Parent=hit
  1341. rl=Instance.new("BodyAngularVelocity")
  1342. rl.P=3000
  1343. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1344. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1345. rl.Parent=hit
  1346. game:GetService("Debris"):AddItem(bodvol,.5)
  1347. game:GetService("Debris"):AddItem(rl,.5)
  1348. elseif Type=="Normal" then
  1349. vp=Instance.new("BodyVelocity")
  1350. vp.P=500
  1351. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1352. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1353. if KnockbackType==1 then
  1354. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1355. elseif KnockbackType==2 then
  1356. vp.velocity=Property.CFrame.lookVector*knockback
  1357. end
  1358. if knockback>0 then
  1359. vp.Parent=hit.Parent.Torso
  1360. end
  1361. game:GetService("Debris"):AddItem(vp,.5)
  1362. elseif Type=="Up" then
  1363. local bodyVelocity=Instance.new("BodyVelocity")
  1364. bodyVelocity.velocity=vt(0,30,0)
  1365. bodyVelocity.P=5000
  1366. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1367. bodyVelocity.Parent=hit
  1368. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1369. rl=Instance.new("BodyAngularVelocity")
  1370. rl.P=3000
  1371. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1372. rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1373. rl.Parent=hit
  1374. game:GetService("Debris"):AddItem(rl,.5)
  1375. elseif Type=="Snare" then
  1376. bp=Instance.new("BodyPosition")
  1377. bp.P=2000
  1378. bp.D=100
  1379. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1380. bp.position=hit.Parent.Torso.Position
  1381. bp.Parent=hit.Parent.Torso
  1382. game:GetService("Debris"):AddItem(bp,1)
  1383. elseif Type=="Charge" then
  1384. Charge=Charge+1
  1385. coroutine.resume(coroutine.create(function(Part)
  1386. swait(30)
  1387. for i=1,5 do
  1388. swait(5)
  1389. so("rbxasset://sounds\\unsheath.wav",hit,1,2)
  1390. MagicCircle(BrickColor.new("Bright red"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.1,.2,8,.1,0.05)
  1391. newdam=math.random(1,5)
  1392. if blocked==false then
  1393. h:TakeDamage(newdam)
  1394. showDamage(hit.Parent,newdam,.5,BrickColor:Red())
  1395. else
  1396. h:TakeDamage(newdam/2)
  1397. showDamage(hit.Parent,newdam,.5,BrickColor.new("Bright blue"))
  1398. end
  1399. end
  1400. end),hit)
  1401. end
  1402. debounce=Instance.new("BoolValue")
  1403. debounce.Name="DebounceHit"
  1404. debounce.Parent=hit.Parent
  1405. debounce.Value=true
  1406. game:GetService("Debris"):AddItem(debounce,Delay)
  1407. c=Instance.new("ObjectValue")
  1408. c.Name="creator"
  1409. c.Value=Player
  1410. c.Parent=h
  1411. game:GetService("Debris"):AddItem(c,.5)
  1412. CRIT=false
  1413. hitDeb=true
  1414. AttackPos=6
  1415. end
  1416. end
  1417.  
  1418. showDamage=function(Char,Dealt,du,Color)
  1419. m=Instance.new("Model")
  1420. m.Name=tostring(Dealt)
  1421. h=Instance.new("Humanoid")
  1422. h.Health=0
  1423. h.MaxHealth=0
  1424. h.Parent=m
  1425. c=Instance.new("Part")
  1426. c.Transparency=0
  1427. c.BrickColor=Color
  1428. c.Name="Head"
  1429. c.TopSurface=0
  1430. c.BottomSurface=0
  1431. c.formFactor="Plate"
  1432. c.Size=Vector3.new(1,.4,1)
  1433. ms=Instance.new("CylinderMesh")
  1434. ms.Scale=Vector3.new(.8,.8,.8)
  1435. if CRIT==true then
  1436. ms.Scale=Vector3.new(1,1.25,1)
  1437. end
  1438. ms.Parent=c
  1439. c.Reflectance=0
  1440. Instance.new("BodyGyro").Parent=c
  1441. c.Parent=m
  1442. if Char:findFirstChild("Head")~=nil then
  1443. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1444. elseif Char.Parent:findFirstChild("Head")~=nil then
  1445. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1446. end
  1447. f=Instance.new("BodyPosition")
  1448. f.P=2000
  1449. f.D=100
  1450. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1451. f.position=c.Position+Vector3.new(0,3,0)
  1452. f.Parent=c
  1453. game:GetService("Debris"):AddItem(m,.5+du)
  1454. c.CanCollide=false
  1455. m.Parent=workspace
  1456. c.CanCollide=false
  1457. end
  1458.  
  1459. combo=0
  1460. function ob1d(mouse)
  1461. if attack==true then return end
  1462. --[[if SwordStance==true then
  1463. SwordStance=false
  1464. Sheathed=false
  1465. IaidoStrike()
  1466. return end]]
  1467. if SwordStance==true then return end
  1468. if Sheathed==true then return end
  1469. hold=true
  1470. if combo==0 then
  1471. combo=1
  1472. attackone()
  1473. elseif combo==1 then
  1474. combo=2
  1475. attacktwo()
  1476. elseif combo==2 then
  1477. combo=3
  1478. attackthree()
  1479. elseif combo==3 then
  1480. combo=0
  1481. end
  1482. coroutine.resume(coroutine.create(function()
  1483. for i=1,50 do
  1484. if attack==false then
  1485. swait()
  1486. end
  1487. end
  1488. if attack==false then
  1489. combo=0
  1490. Torso.Neck.C0=necko*euler(0,0,-0.5)
  1491. RootJoint.C0=RootCF*euler(0,0,0.5)
  1492. handlewld.C1=euler(0,0,0)
  1493. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1494. RW.C0=cf(1,0.5,-0.5)*euler(1.3,1.57,0)
  1495. RW.C1=cf(0,0.5,0)*euler(-0.3,0,0)
  1496. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  1497. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  1498. end
  1499. end))
  1500. end
  1501.  
  1502. function ob1u(mouse)
  1503. hold = false
  1504. end
  1505.  
  1506. buttonhold = false
  1507.  
  1508. eul=0
  1509. equipped=false
  1510. function key(key)
  1511. if attack==true then return end
  1512. if Sheathed==true then
  1513. if key=="z" then
  1514. IaidoDash()
  1515. end
  1516. if key=="x" then
  1517. Wilt()
  1518. end
  1519. if key=="c" then
  1520. Rose()
  1521. end
  1522. if key=="v" then
  1523. Sheathed=false
  1524. ElecStorm()
  1525. end
  1526. end
  1527. if key=="f" then
  1528. attack=true
  1529. if equipped==false then
  1530. equipped=true
  1531. RSH=ch.Torso["Right Shoulder"]
  1532. LSH=ch.Torso["Left Shoulder"]
  1533. --
  1534. RSH.Parent=nil
  1535. LSH.Parent=nil
  1536. --
  1537. RW.Name="Right Shoulder"
  1538. RW.Part0=ch.Torso
  1539. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1540. RW.C1=cf(0, 0.5, 0)
  1541. RW.Part1=ch["Right Arm"]
  1542. RW.Parent=ch.Torso
  1543. --
  1544. LW.Name="Left Shoulder"
  1545. LW.Part0=ch.Torso
  1546. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1547. LW.C1=cf(0, 0.5, 0)
  1548. LW.Part1=ch["Left Arm"]
  1549. LW.Parent=ch.Torso
  1550. --
  1551. equipanim()
  1552. else
  1553. if Sheathed==false then
  1554. Sheathed=true
  1555. Sheath()
  1556. end
  1557. equipped=false
  1558. hideanim()
  1559. swait(0)
  1560. RW.Parent=nil
  1561. LW.Parent=nil
  1562. RSH.Parent=player.Character.Torso
  1563. LSH.Parent=player.Character.Torso
  1564. end
  1565. attack=false
  1566. end
  1567. if equipped==false then return end
  1568. --[[if key=="g" then
  1569. if Sheathed==true then
  1570. Sheathed=false
  1571. IaidoStrike()
  1572. else
  1573. Sheathed=true
  1574. Sheath()
  1575. end
  1576. end]]
  1577. if key=="g" then
  1578. if Sheathed==false then
  1579. Sheathed=true
  1580. Sheath()
  1581. else
  1582. Sheathed=false
  1583. IaidoStrike()
  1584. end
  1585. end
  1586. end
  1587.  
  1588. function key2(key)
  1589.  
  1590. end
  1591.  
  1592. function s(mouse)
  1593. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1594. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1595. mouse.KeyDown:connect(key)
  1596. mouse.KeyUp:connect(key2)
  1597.  
  1598. player=Player
  1599. ch=Character
  1600. MMouse=mouse
  1601. end
  1602.  
  1603. function ds(mouse)
  1604. end
  1605.  
  1606. Bin.Selected:connect(s)
  1607. Bin.Deselected:connect(ds)
  1608. print("Cyber Samurai loaded.")
  1609.  
  1610. --[[
  1611. Copyrighted (C) Fenrier 2014
  1612. ]]
Advertisement
Add Comment
Please, Sign In to add comment