Advertisement
carlosname

Untitled

Nov 22nd, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142.  
  143. plr = game.Players.LocalPlayer
  144. char = plr.Character
  145. hum = char.Humanoid
  146. local cam = game.Workspace.CurrentCamera
  147. t = char.Torso
  148. h = char.Head
  149. ra = char["Right Arm"]
  150. la = char["Left Arm"]
  151. rl = char["Right Leg"]
  152. ll = char["Left Leg"]
  153. tors = char.Torso
  154. lleg = char["Left Leg"]
  155. root = char.HumanoidRootPart
  156. hed = char.Head
  157. rleg = char["Right Leg"]
  158. rarm = char["Right Arm"]
  159. larm = char["Left Arm"]
  160. vt = Vector3.new
  161. bc = BrickColor.new
  162. br = BrickColor.random
  163. it = Instance.new
  164. cf = CFrame.new
  165.  
  166.  
  167. local Create = LoadLibrary("RbxUtility").Create
  168.  
  169. CFuncs = {
  170. ["Part"] = {
  171. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  172. local Part = Create("Part"){
  173. Parent = Parent,
  174. Reflectance = Reflectance,
  175. Transparency = Transparency,
  176. CanCollide = false,
  177. Locked = true,
  178. BrickColor = BrickColor.new(tostring(BColor)),
  179. Name = Name,
  180. Size = Size,
  181. Material = Material,
  182. }
  183. RemoveOutlines(Part)
  184. return Part
  185. end;
  186. };
  187.  
  188. ["Mesh"] = {
  189. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  190. local Msh = Create(Mesh){
  191. Parent = Part,
  192. Offset = OffSet,
  193. Scale = Scale,
  194. }
  195. if Mesh == "SpecialMesh" then
  196. Msh.MeshType = MeshType
  197. Msh.MeshId = MeshId
  198. end
  199. return Msh
  200. end;
  201. };
  202.  
  203. ["Mesh"] = {
  204. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  205. local Msh = Create(Mesh){
  206. Parent = Part,
  207. Offset = OffSet,
  208. Scale = Scale,
  209. }
  210. if Mesh == "SpecialMesh" then
  211. Msh.MeshType = MeshType
  212. Msh.MeshId = MeshId
  213. end
  214. return Msh
  215. end;
  216. };
  217.  
  218. ["Weld"] = {
  219. Create = function(Parent, Part0, Part1, C0, C1)
  220. local Weld = Create("Weld"){
  221. Parent = Parent,
  222. Part0 = Part0,
  223. Part1 = Part1,
  224. C0 = C0,
  225. C1 = C1,
  226. }
  227. return Weld
  228. end;
  229. };
  230.  
  231. ["Sound"] = {
  232. Create = function(id, par, vol, pit)
  233. coroutine.resume(coroutine.create(function()
  234. local S = Create("Sound"){
  235. Volume = vol,
  236. Pitch = pit or 1,
  237. SoundId = id,
  238. Parent = par or workspace,
  239. }
  240. wait()
  241. S:play()
  242. game:GetService("Debris"):AddItem(S, 10)
  243. end))
  244. end;
  245. };
  246.  
  247. ["ParticleEmitter"] = {
  248. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  249. local fp = Create("ParticleEmitter"){
  250. Parent = Parent,
  251. Color = ColorSequence.new(Color1, Color2),
  252. LightEmission = LightEmission,
  253. Size = Size,
  254. Texture = Texture,
  255. Transparency = Transparency,
  256. ZOffset = ZOffset,
  257. Acceleration = Accel,
  258. Drag = Drag,
  259. LockedToPart = LockedToPart,
  260. VelocityInheritance = VelocityInheritance,
  261. EmissionDirection = EmissionDirection,
  262. Enabled = Enabled,
  263. Lifetime = LifeTime,
  264. Rate = Rate,
  265. Rotation = Rotation,
  266. RotSpeed = RotSpeed,
  267. Speed = Speed,
  268. VelocitySpread = VelocitySpread,
  269. }
  270. return fp
  271. end;
  272. };
  273.  
  274. CreateTemplate = {
  275.  
  276. };
  277. }
  278.  
  279.  
  280.  
  281. New = function(Object, Parent, Name, Data)
  282. local Object = Instance.new(Object)
  283. for Index, Value in pairs(Data or {}) do
  284. Object[Index] = Value
  285. end
  286. Object.Parent = Parent
  287. Object.Name = Name
  288. return Object
  289. end
  290. local m = Instance.new("Model",char)
  291.  
  292. function CreatePart(parent,transparency,reflectance,material,brickcolor)
  293. local p = Instance.new("Part")
  294. p.Parent = parent
  295. p.Size = Vector3.new(1,1,1)
  296. p.Transparency = transparency
  297. p.Reflectance = reflectance
  298. p.CanCollide = false
  299. p.Locked = true
  300. p.BrickColor = brickcolor
  301. p.Material = material
  302. return p
  303. end
  304.  
  305. function CreateMesh(parent,meshtype,x1,y1,z1)
  306. local mesh = Instance.new("SpecialMesh",parent)
  307. mesh.MeshType = meshtype
  308. mesh.Scale = Vector3.new(x1,y1,z1)
  309. return mesh
  310. end
  311.  
  312. function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
  313. local mesh = Instance.new("SpecialMesh",parent)
  314. mesh.MeshType = "FileMesh"
  315. mesh.MeshId = meshid
  316. mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
  317. mesh.Scale = Vector3.new(x1,y1,z1)
  318. mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
  319. return mesh
  320. end
  321.  
  322. function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
  323. local weld = Instance.new("Weld")
  324. weld.Parent = parent
  325. weld.Part0 = part0
  326. weld.Part1 = part1
  327. weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
  328. weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
  329. return weld
  330. end
  331.  
  332.  
  333. local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
  334. CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  335. local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
  336. CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
  337.  
  338. Player=game:GetService("Players").LocalPlayer
  339. Character=Player.Character
  340. PlayerGui=Player.PlayerGui
  341. Backpack=Player.Backpack
  342. Torso=Character.Torso
  343. Head=Character.Head
  344. Humanoid=Character.Humanoid
  345. m=Instance.new('Model',Character)
  346. LeftArm=Character["Left Arm"]
  347. LeftLeg=Character["Left Leg"]
  348. RightArm=Character["Right Arm"]
  349. RightLeg=Character["Right Leg"]
  350. LS=Torso["Left Shoulder"]
  351. LH=Torso["Left Hip"]
  352. RS=Torso["Right Shoulder"]
  353. RH=Torso["Right Hip"]
  354. Face = Head.face
  355. Neck=Torso.Neck
  356. it=Instance.new
  357. attacktype=1
  358. vt=Vector3.new
  359. cf=CFrame.new
  360. euler=CFrame.fromEulerAnglesXYZ
  361. angles=CFrame.Angles
  362. cloaked=false
  363. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  364. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  365. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  366. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  367. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  368. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  369. RootPart=Character.HumanoidRootPart
  370. RootJoint=RootPart.RootJoint
  371. RootCF=euler(-1.57,0,3.14)
  372. attack = false
  373. attackdebounce = false
  374. deb=false
  375. equipped=true
  376. hand=false
  377. MMouse=nil
  378. combo=0
  379. mana=0
  380. trispeed=.2
  381. attackmode='none'
  382. local idle=0
  383. local Anim="Idle"
  384. local Effects={}
  385. local gun=false
  386. local shoot=false
  387. local sine = 0
  388. local change = 1
  389. player=nil
  390.  
  391. mouse=Player:GetMouse()
  392. --save shoulders
  393. RSH, LSH=nil, nil
  394. --welds
  395. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  396. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  397. LH=Torso["Left Hip"]
  398. RH=Torso["Right Hip"]
  399. TorsoColor=Torso.BrickColor
  400. function NoOutline(Part)
  401. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  402. end
  403. player=Player
  404. ch=Character
  405. RSH=ch.Torso["Right Shoulder"]
  406. LSH=ch.Torso["Left Shoulder"]
  407. --
  408. RSH.Parent=nil
  409. LSH.Parent=nil
  410. --
  411. RW.Name="Right Shoulder"
  412. RW.Part0=ch.Torso
  413. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  414. RW.C1=cf(0, 0.5, 0)
  415. RW.Part1=ch["Right Arm"]
  416. RW.Parent=ch.Torso
  417. --
  418. LW.Name="Left Shoulder"
  419. LW.Part0=ch.Torso
  420. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  421. LW.C1=cf(0, 0.5, 0)
  422. LW.Part1=ch["Left Arm"]
  423. LW.Parent=ch.Torso
  424.  
  425. local Stats=Instance.new("BoolValue")
  426. Stats.Name="Stats"
  427. Stats.Parent=Character
  428. local Atk=Instance.new("NumberValue")
  429. Atk.Name="Damage"
  430. Atk.Parent=Stats
  431. Atk.Value=1
  432. local Def=Instance.new("NumberValue")
  433. Def.Name="Defense"
  434. Def.Parent=Stats
  435. Def.Value=1
  436. local Speed=Instance.new("NumberValue")
  437. Speed.Name="Speed"
  438. Speed.Parent=Stats
  439. Speed.Value=1
  440. local Mvmt=Instance.new("NumberValue")
  441. Mvmt.Name="Movement"
  442. Mvmt.Parent=Stats
  443. Mvmt.Value=1
  444.  
  445. local donum=0
  446.  
  447.  
  448. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  449. local fp=it("Part")
  450. fp.formFactor=formfactor
  451. fp.Parent=parent
  452. fp.Reflectance=reflectance
  453. fp.Transparency=transparency
  454. fp.CanCollide=false
  455. fp.Locked=true
  456. fp.BrickColor=brickcolor
  457. fp.Name=name
  458. fp.Size=size
  459. fp.Position=Torso.Position
  460. NoOutline(fp)
  461. fp.Material="SmoothPlastic"
  462. fp:BreakJoints()
  463. return fp
  464. end
  465.  
  466. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  467. local mesh=it(Mesh)
  468. mesh.Parent=part
  469. if Mesh=="SpecialMesh" then
  470. mesh.MeshType=meshtype
  471. if meshid~="nil" then
  472. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  473. end
  474. end
  475. mesh.Offset=offset
  476. mesh.Scale=scale
  477. return mesh
  478. end
  479.  
  480. function weld(parent,part0,part1,c0)
  481. local weld=it("Weld")
  482. weld.Parent=parent
  483. weld.Part0=part0
  484. weld.Part1=part1
  485. weld.C0=c0
  486. return weld
  487. end
  488.  
  489. local Color1=Torso.BrickColor
  490.  
  491. local bodvel=Instance.new("BodyVelocity")
  492. local bg=Instance.new("BodyGyro")
  493.  
  494. function swait(num)
  495. if num==0 or num==nil then
  496. game:service'RunService'.Stepped:wait(0)
  497. else
  498. for i=0,num do
  499. game:service'RunService'.Stepped:wait(0)
  500. end
  501. end
  502. end
  503.  
  504.  
  505. so = function(id,par,vol,pit)
  506. coroutine.resume(coroutine.create(function()
  507. local sou = Instance.new("Sound",par or workspace)
  508. sou.Volume=vol
  509. sou.Pitch=pit or 1
  510. sou.SoundId=id
  511. swait()
  512. sou:play()
  513. game:GetService("Debris"):AddItem(sou,6)
  514. end))
  515. end
  516.  
  517. function clerp(a,b,t)
  518. local qa = {QuaternionFromCFrame(a)}
  519. local qb = {QuaternionFromCFrame(b)}
  520. local ax, ay, az = a.x, a.y, a.z
  521. local bx, by, bz = b.x, b.y, b.z
  522. local _t = 1-t
  523. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  524. end
  525.  
  526. function QuaternionFromCFrame(cf)
  527. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  528. local trace = m00 + m11 + m22
  529. if trace > 0 then
  530. local s = math.sqrt(1 + trace)
  531. local recip = 0.5/s
  532. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  533. else
  534. local i = 0
  535. if m11 > m00 then
  536. i = 1
  537. end
  538. if m22 > (i == 0 and m00 or m11) then
  539. i = 2
  540. end
  541. if i == 0 then
  542. local s = math.sqrt(m00-m11-m22+1)
  543. local recip = 0.5/s
  544. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  545. elseif i == 1 then
  546. local s = math.sqrt(m11-m22-m00+1)
  547. local recip = 0.5/s
  548. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  549. elseif i == 2 then
  550. local s = math.sqrt(m22-m00-m11+1)
  551. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  552. end
  553. end
  554. end
  555.  
  556. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  557. local xs, ys, zs = x + x, y + y, z + z
  558. local wx, wy, wz = w*xs, w*ys, w*zs
  559. local xx = x*xs
  560. local xy = x*ys
  561. local xz = x*zs
  562. local yy = y*ys
  563. local yz = y*zs
  564. local zz = z*zs
  565. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  566. end
  567.  
  568. function QuaternionSlerp(a, b, t)
  569. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  570. local startInterp, finishInterp;
  571. if cosTheta >= 0.0001 then
  572. if (1 - cosTheta) > 0.0001 then
  573. local theta = math.acos(cosTheta)
  574. local invSinTheta = 1/math.sin(theta)
  575. startInterp = math.sin((1-t)*theta)*invSinTheta
  576. finishInterp = math.sin(t*theta)*invSinTheta
  577. else
  578. startInterp = 1-t
  579. finishInterp = t
  580. end
  581. else
  582. if (1+cosTheta) > 0.0001 then
  583. local theta = math.acos(-cosTheta)
  584. local invSinTheta = 1/math.sin(theta)
  585. startInterp = math.sin((t-1)*theta)*invSinTheta
  586. finishInterp = math.sin(t*theta)*invSinTheta
  587. else
  588. startInterp = t-1
  589. finishInterp = t
  590. end
  591. end
  592. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  593. end
  594.  
  595. local function CFrameFromTopBack(at, top, back)
  596. local right = top:Cross(back)
  597. return CFrame.new(at.x, at.y, at.z,
  598. right.x, top.x, back.x,
  599. right.y, top.y, back.y,
  600. right.z, top.z, back.z)
  601. end
  602.  
  603. function Triangle(a, b, c)
  604. local edg1 = (c-a):Dot((b-a).unit)
  605. local edg2 = (a-b):Dot((c-b).unit)
  606. local edg3 = (b-c):Dot((a-c).unit)
  607. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  608. a, b, c = a, b, c
  609. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  610. a, b, c = b, c, a
  611. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  612. a, b, c = c, a, b
  613. else
  614. assert(false, "unreachable")
  615. end
  616.  
  617. local len1 = (c-a):Dot((b-a).unit)
  618. local len2 = (b-a).magnitude - len1
  619. local width = (a + (b-a).unit*len1 - c).magnitude
  620.  
  621. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  622.  
  623. local list = {}
  624.  
  625. if len1 > 0.01 then
  626. local w1 = Instance.new('WedgePart', m)
  627. game:GetService("Debris"):AddItem(w1,5)
  628. w1.Material = "SmoothPlastic"
  629. w1.FormFactor = 'Custom'
  630. w1.BrickColor = BrickColor.new("Really red")
  631. w1.Transparency = 0
  632. w1.Reflectance = 0
  633. w1.Material = "SmoothPlastic"
  634. w1.CanCollide = false
  635. local l1 = Instance.new("PointLight",w1)
  636. l1.Color = Color3.new(170,0,0)
  637. NoOutline(w1)
  638. local sz = Vector3.new(0.2, width, len1)
  639. w1.Size = sz
  640. local sp = Instance.new("SpecialMesh",w1)
  641. sp.MeshType = "Wedge"
  642. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  643. w1:BreakJoints()
  644. w1.Anchored = true
  645. w1.Parent = workspace
  646. w1.Transparency = 0.7
  647. table.insert(Effects,{w1,"Disappear",.01})
  648. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  649. table.insert(list,w1)
  650. end
  651.  
  652. if len2 > 0.01 then
  653. local w2 = Instance.new('WedgePart', m)
  654. game:GetService("Debris"):AddItem(w2,5)
  655. w2.Material = "SmoothPlastic"
  656. w2.FormFactor = 'Custom'
  657. w2.BrickColor = BrickColor.new("Really red")
  658. w2.Transparency = 0
  659. w2.Reflectance = 0
  660. w2.Material = "SmoothPlastic"
  661. w2.CanCollide = false
  662. local l2 = Instance.new("PointLight",w2)
  663. l2.Color = Color3.new(170,0,0)
  664. NoOutline(w2)
  665. local sz = Vector3.new(0.2, width, len2)
  666. w2.Size = sz
  667. local sp = Instance.new("SpecialMesh",w2)
  668. sp.MeshType = "Wedge"
  669. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  670. w2:BreakJoints()
  671. w2.Anchored = true
  672. w2.Parent = workspace
  673. w2.Transparency = 0.7
  674. table.insert(Effects,{w2,"Disappear",.01})
  675. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  676. table.insert(list,w2)
  677. end
  678. return unpack(list)
  679. end
  680.  
  681.  
  682. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  683. if hit.Parent==nil then
  684. return
  685. end
  686. h=hit.Parent:FindFirstChild("Humanoid")
  687. for _,v in pairs(hit.Parent:children()) do
  688. if v:IsA("Humanoid") then
  689. h=v
  690. end
  691. end
  692. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  693. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  694. end
  695. if hit.Parent.className=="Hat" then
  696. hit=hit.Parent.Parent:findFirstChild("Head")
  697. end
  698. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  699. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  700. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  701. return
  702. end]]
  703. -- hs(hit,1.2)
  704. c=Instance.new("ObjectValue")
  705. c.Name="creator"
  706. c.Value=game:service("Players").LocalPlayer
  707. c.Parent=h
  708. game:GetService("Debris"):AddItem(c,.5)
  709. Damage=math.random(minim,maxim)
  710. -- h:TakeDamage(Damage)
  711. blocked=false
  712. block=hit.Parent:findFirstChild("Block")
  713. if block~=nil then
  714. print(block.className)
  715. if block.className=="NumberValue" then
  716. if block.Value>0 then
  717. blocked=true
  718. if decreaseblock==nil then
  719. block.Value=block.Value-1
  720. end
  721. end
  722. end
  723. if block.className=="IntValue" then
  724. if block.Value>0 then
  725. blocked=true
  726. if decreaseblock~=nil then
  727. block.Value=block.Value-1
  728. end
  729. end
  730. end
  731. end
  732. if blocked==false then
  733. -- h:TakeDamage(Damage)
  734. h.Health=h.Health-Damage
  735. showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red"))
  736. else
  737. h.Health=h.Health-(Damage/2)
  738. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  739. end
  740. if Type=="Knockdown" then
  741. hum=hit.Parent.Humanoid
  742. hum.PlatformStand=true
  743. coroutine.resume(coroutine.create(function(HHumanoid)
  744. swait(1)
  745. HHumanoid.PlatformStand=false
  746. end),hum)
  747. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  748. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  749. local bodvol=Instance.new("BodyVelocity")
  750. bodvol.velocity=angle*knockback
  751. bodvol.P=5000
  752. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  753. bodvol.Parent=hit
  754. rl=Instance.new("BodyAngularVelocity")
  755. rl.P=3000
  756. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  757. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  758. rl.Parent=hit
  759. game:GetService("Debris"):AddItem(bodvol,.5)
  760. game:GetService("Debris"):AddItem(rl,.5)
  761. elseif Type=="Normal" then
  762. vp=Instance.new("BodyVelocity")
  763. vp.P=500
  764. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  765. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  766. if KnockbackType==1 then
  767. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  768. elseif KnockbackType==2 then
  769. vp.velocity=Property.CFrame.lookVector*knockback
  770. end
  771. if knockback>0 then
  772. vp.Parent=hit.Parent.Torso
  773. end
  774. game:GetService("Debris"):AddItem(vp,.5)
  775. elseif Type=="Up" then
  776. local bodyVelocity=Instance.new("BodyVelocity")
  777. bodyVelocity.velocity=vt(0,60,0)
  778. bodyVelocity.P=5000
  779. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  780. bodyVelocity.Parent=hit
  781. game:GetService("Debris"):AddItem(bodyVelocity,1)
  782. rl=Instance.new("BodyAngularVelocity")
  783. rl.P=3000
  784. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  785. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  786. rl.Parent=hit
  787. game:GetService("Debris"):AddItem(rl,.5)
  788. elseif Type=="Snare" then
  789. bp=Instance.new("BodyPosition")
  790. bp.P=2000
  791. bp.D=100
  792. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  793. bp.position=hit.Parent.Torso.Position
  794. bp.Parent=hit.Parent.Torso
  795. game:GetService("Debris"):AddItem(bp,1)
  796. elseif Type=="Target" then
  797. if Targetting==false then
  798. ZTarget=hit.Parent.Torso
  799. coroutine.resume(coroutine.create(function(Part)
  800. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  801. swait(5)
  802. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  803. end),ZTarget)
  804. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  805. targetgui=Instance.new("BillboardGui")
  806. targetgui.Parent=ZTarget
  807. targetgui.Size=UDim2.new(10,100,10,100)
  808. targ=Instance.new("ImageLabel")
  809. targ.Parent=targetgui
  810. targ.BackgroundTransparency=1
  811. targ.Image="rbxassetid://4834067"
  812. targ.Size=UDim2.new(1,0,1,0)
  813. cam.CameraType="Scriptable"
  814. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  815. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  816. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  817. Targetting=true
  818. RocketTarget=ZTarget
  819. for i=1,Property do
  820. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  821. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  822. swait()
  823. end
  824. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  825. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  826. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  827. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  828. end
  829. Targetting=false
  830. RocketTarget=nil
  831. targetgui.Parent=nil
  832. cam.CameraType="Custom"
  833. end
  834. end
  835. debounce=Instance.new("BoolValue")
  836. debounce.Name="DebounceHit"
  837. debounce.Parent=hit.Parent
  838. debounce.Value=true
  839. game:GetService("Debris"):AddItem(debounce,Delay)
  840. c=Instance.new("ObjectValue")
  841. c.Name="creator"
  842. c.Value=Player
  843. c.Parent=h
  844. game:GetService("Debris"):AddItem(c,.5)
  845. CRIT=false
  846. hitDeb=true
  847. AttackPos=6
  848. end
  849. end
  850.  
  851. showDamage=function(Char,Dealt,du,Color)
  852. m=Instance.new("Model")
  853. m.Name=tostring(Dealt)
  854. h=Instance.new("Humanoid")
  855. h.Health=0
  856. h.MaxHealth=0
  857. h.Parent=m
  858. c=Instance.new("Part")
  859. c.Transparency=0
  860. c.BrickColor=Color
  861. c.Transparency = 1
  862. c.Name="Head"
  863. c.TopSurface=0
  864. c.BottomSurface=0
  865. c.formFactor="Plate"
  866. c.Size=Vector3.new(1,.4,1)
  867.  
  868. local txt = Instance.new("BillboardGui", c)
  869. txt.Adornee = c
  870. txt.Name = "_status"
  871. txt.Size = UDim2.new(2, 0, 1.2, 0)
  872. txt.StudsOffset = Vector3.new(-9, 8, 0)
  873. local text = Instance.new("TextLabel", txt)
  874. text.Size = UDim2.new(10, 0, 7, 0)
  875. text.FontSize = "Size12"
  876. text.TextScaled = true
  877. text.TextTransparency = 0.5
  878. text.BackgroundTransparency = 1
  879. text.TextTransparency = 0.5
  880. text.TextStrokeTransparency = 0.5
  881. text.Font = "SciFi"
  882. text.TextStrokeColor3 = Color3.new(0,0,0)
  883. v=Instance.new("Part")
  884. v.Name = "ColorBrick"
  885. v.Parent=c
  886. v.FormFactor="Symmetric"
  887. v.Anchored=true
  888. v.CanCollide=false
  889. v.BottomSurface="Smooth"
  890. v.TopSurface="Smooth"
  891. v.Size=Vector3.new(10,5,3)
  892. v.Transparency=1
  893. v.CFrame=c.CFrame
  894. v.BrickColor=BrickColor.random()
  895. v.Transparency=1
  896. text.TextColor3 = t.BrickColor.Color
  897. v.Shape="Block"
  898. text.Text = tostring(Dealt)
  899. ms=Instance.new("CylinderMesh")
  900. ms.Scale=Vector3.new(.8,.8,.8)
  901. --[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  902. local rndm=math.random(1,#hitsounds)
  903. local r=rndm
  904. CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]--
  905. if CRIT==true then
  906. ms.Scale=Vector3.new(1,1.25,1)
  907. end
  908. ms.Parent=c
  909. c.Reflectance=0
  910. Instance.new("BodyGyro").Parent=c
  911. c.Parent=m
  912. if Char:findFirstChild("Head")~=nil then
  913. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  914. elseif Char.Parent:findFirstChild("Head")~=nil then
  915. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  916. end
  917. f=Instance.new("BodyPosition")
  918. f.P=2000
  919. f.D=100
  920. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  921. f.position=c.Position+Vector3.new(0,3,0)
  922. f.Parent=c
  923. game:GetService("Debris"):AddItem(m,.5+du)
  924. c.CanCollide=false
  925. m.Parent=workspace
  926. c.CanCollide=false
  927. end
  928.  
  929. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  930. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  931. end
  932.  
  933. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  934. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  935. prt.Anchored=true
  936. prt.CFrame=cframe
  937. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  938. --http://www.roblox.com/asset/?id=4770560
  939. game:GetService("Debris"):AddItem(prt,2)
  940. CF=prt.CFrame
  941. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  942. for i=0,1,0.2 do
  943. wait()
  944. Part.CFrame=CF*cf(0,0,-0.4)
  945. end
  946. for i=0,1,delay do
  947. wait()
  948. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  949. Mesh.Scale=Mesh.Scale
  950. end
  951. for i=0,1,0.1 do
  952. wait()
  953. Part.Transparency=i
  954. end
  955. Part.Parent=nil
  956. end),prt,msh,CF)
  957. end
  958.  
  959. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  960. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  961. prt.Anchored=true
  962. prt.Material = "Neon"
  963. prt.CFrame=cframe
  964. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  965. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  966. game:GetService("Debris"):AddItem(prt,5)
  967. coroutine.resume(coroutine.create(function(Part,Mesh)
  968. for i=0,1,delay do
  969. swait()
  970. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  971. Part.Transparency=i
  972. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  973. end
  974. Part.Parent=nil
  975. end),prt,msh)
  976. end
  977.  
  978. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  979. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  980. prt.Anchored=true
  981. prt.Material = "Neon"
  982. prt.CFrame=cframe
  983. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  984. game:GetService("Debris"):AddItem(prt,5)
  985. coroutine.resume(coroutine.create(function(Part,Mesh)
  986. local rtype = rottype
  987. for i=0,1,delay do
  988. swait()
  989. if rtype == 1 then
  990. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  991. elseif rtype == 2 then
  992. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  993. end
  994. Part.Transparency=i
  995. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  996. end
  997. Part.Parent=nil
  998. end),prt,msh)
  999. end
  1000.  
  1001. function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1002. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1003. prt.Anchored=true
  1004. prt.CFrame=cframe
  1005. prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1006. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1007. game:GetService("Debris"):AddItem(prt,5)
  1008. coroutine.resume(coroutine.create(function(Part,Mesh)
  1009. for i=0,1,delay do
  1010. wait()
  1011. Part.Transparency=i
  1012. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1013. end
  1014. Part.Parent=nil
  1015. end),prt,msh)
  1016. end
  1017.  
  1018. function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
  1019. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1020. prt.Anchored=true
  1021. prt.Material = "Neon"
  1022. prt.CFrame=cframe
  1023. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1024. game:GetService("Debris"):AddItem(prt,5)
  1025. coroutine.resume(coroutine.create(function(Part,Mesh)
  1026. local rtype = rottype
  1027. for i=0,1,delay do
  1028. swait()
  1029. if rtype == 1 then
  1030. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1031. elseif rtype == 2 then
  1032. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1033. end
  1034. Part.Transparency=i
  1035. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1036. end
  1037. Part.Parent=nil
  1038. end),prt,msh)
  1039. end
  1040.  
  1041. function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1042. local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1043. prt.Anchored=true
  1044. prt.Material = "Neon"
  1045. prt.CFrame=cframe
  1046. local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1047. local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
  1048. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1049. game:GetService("Debris"):AddItem(prt,5)
  1050. coroutine.resume(coroutine.create(function(Part,Mesh)
  1051. local rtype = rottype
  1052. for i=0,1,delay do
  1053. swait()
  1054. if rtype == 1 then
  1055. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1056. elseif rtype == 2 then
  1057. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1058. end
  1059. dec.Transparency=i
  1060. dec2.Transparency=i
  1061. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1062. end
  1063. Part.Parent=nil
  1064. end),prt,msh)
  1065. end
  1066.  
  1067. function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
  1068. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1069. prt.Anchored=true
  1070. prt.Material = "Neon"
  1071. prt.CFrame=cframe
  1072. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
  1073. game:GetService("Debris"):AddItem(prt,5)
  1074. coroutine.resume(coroutine.create(function(Part,Mesh)
  1075. local rtype = rottype
  1076. for i=0,1,delay do
  1077. swait()
  1078. if rtype == 1 then
  1079. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1080. elseif rtype == 2 then
  1081. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1082. end
  1083. prt.Transparency=i
  1084. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1085. end
  1086. Part.Parent=nil
  1087. end),prt,msh)
  1088. end
  1089.  
  1090. function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
  1091. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1092. prt.Anchored=true
  1093. prt.Material = "Neon"
  1094. prt.CFrame=cframe
  1095. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
  1096. game:GetService("Debris"):AddItem(prt,5)
  1097. coroutine.resume(coroutine.create(function(Part,Mesh)
  1098. local rtype = rottype
  1099. for i=0,1,delay do
  1100. swait()
  1101. if rtype == 1 then
  1102. prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
  1103. elseif rtype == 2 then
  1104. prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
  1105. end
  1106. prt.Transparency=i
  1107. Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
  1108. end
  1109. Part.Parent=nil
  1110. end),prt,msh)
  1111. end
  1112.  
  1113. function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
  1114. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1115. prt.Anchored=true
  1116. prt.Material = "Neon"
  1117. prt.CFrame=cframe
  1118. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1119. game:GetService("Debris"):AddItem(prt,5)
  1120. coroutine.resume(coroutine.create(function(Part,Mesh)
  1121. local rtype = rottype
  1122. for i=0,1,delay do
  1123. swait()
  1124. if rtype == 1 then
  1125. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
  1126. elseif rtype == 2 then
  1127. prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
  1128. end
  1129. prt.Transparency=i
  1130. Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
  1131. end
  1132. Part.Parent=nil
  1133. end),prt,msh)
  1134. end
  1135.  
  1136. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1137. local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1138. prt.Anchored=false
  1139. prt.CFrame=cframe
  1140. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1141. local wld=weld(prt,prt,Parent,cframe)
  1142. game:GetService("Debris"):AddItem(prt,5)
  1143. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1144. for i=0,1,delay do
  1145. wait()
  1146. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  1147. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1148. Part.Transparency=i
  1149. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1150. end
  1151. Part.Parent=nil
  1152. end),prt,msh,wld)
  1153. end
  1154.  
  1155. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  1156. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1157. prt.Anchored=false
  1158. prt.CFrame=cframe
  1159. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1160. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  1161. game:GetService("Debris"):AddItem(prt,5)
  1162. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1163. for i=0,1,delay do
  1164. wait()
  1165. Weld.C0=euler(i*20,0,0)
  1166. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1167. Part.Transparency=i
  1168. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1169. end
  1170. Part.Parent=nil
  1171. end),prt,msh,wld)
  1172. end
  1173.  
  1174. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1175. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1176. prt.Anchored=true
  1177. prt.CFrame=cframe
  1178. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1179. game:GetService("Debris"):AddItem(prt,2)
  1180. coroutine.resume(coroutine.create(function(Part,Mesh)
  1181. for i=0,1,delay do
  1182. wait()
  1183. Part.CFrame=Part.CFrame
  1184. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1185. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1186. prt2.Anchored=true
  1187. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1188. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  1189. game:GetService("Debris"):AddItem(prt2,2)
  1190. coroutine.resume(coroutine.create(function(Part,Mesh)
  1191. for i=0,1,0.1 do
  1192. wait()
  1193. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  1194. end
  1195. Part.Parent=nil
  1196. end),prt2,msh2)
  1197. end
  1198. for i=0,1,delay*2 do
  1199. wait()
  1200. Part.CFrame=Part.CFrame
  1201. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  1202. end
  1203. Part.Parent=nil
  1204. end),prt,msh)
  1205. end
  1206.  
  1207. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1208. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1209. prt.Anchored=true
  1210. prt.CFrame=cframe
  1211. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1212. game:GetService("Debris"):AddItem(prt,2)
  1213. coroutine.resume(coroutine.create(function(Part,Mesh)
  1214. for i=0,1,delay do
  1215. wait()
  1216. Part.CFrame=Part.CFrame
  1217. Part.Transparency=i
  1218. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1219. end
  1220. Part.Parent=nil
  1221. end),prt,msh)
  1222. end
  1223.  
  1224. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  1225. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1226. prt.Anchored=true
  1227. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1228. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1229. game:GetService("Debris"):AddItem(prt,2)
  1230. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  1231. CF=Part.CFrame
  1232. Numbb=0
  1233. randnumb=math.random()/10
  1234. rand1=math.random()/10
  1235. for i=0,1,rand1 do
  1236. wait()
  1237. CF=CF*cf(0,math.random()/2,0)
  1238. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  1239. Part.CFrame=CF*euler(Numbb,0,0)
  1240. Part.Transparency=i
  1241. Numbb=Numbb+randnumb
  1242. end
  1243. Part.Parent=nil
  1244. end),prt,CF,Numbb,randnumb)
  1245. end
  1246.  
  1247. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1248. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1249. prt.Anchored=true
  1250. prt.CFrame=cframe
  1251. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1252. game:GetService("Debris"):AddItem(prt,5)
  1253. coroutine.resume(coroutine.create(function(Part,Mesh)
  1254. for i=0,1,delay do
  1255. wait()
  1256. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1257. Part.Transparency=i
  1258. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1259. end
  1260. Part.Parent=nil
  1261. end),prt,msh)
  1262. end
  1263.  
  1264. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1265. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1266. prt.Anchored=true
  1267. prt.CFrame=cframe
  1268. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1269. game:GetService("Debris"):AddItem(prt,2)
  1270. coroutine.resume(coroutine.create(function(Part,Mesh)
  1271. for i=0,1,delay do
  1272. wait()
  1273. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  1274. Part.Transparency=i
  1275. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1276. end
  1277. Part.Parent=nil
  1278. end),prt,msh)
  1279. end
  1280.  
  1281. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  1282. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1283. prt.Anchored=true
  1284. prt.CFrame=cframe*cf(x,y,z)
  1285. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  1286. game:GetService("Debris"):AddItem(prt,5)
  1287. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  1288. local num=math.random()
  1289. local num2=math.random(-3,2)+math.random()
  1290. local numm=0
  1291. for i=0,1,delay*2 do
  1292. swait()
  1293. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  1294. Part.Transparency=i
  1295. numm=numm+0.01
  1296. end
  1297. Part.Parent=nil
  1298. Mesh.Parent=nil
  1299. end),prt,msh,x,y,z)
  1300. end
  1301.  
  1302. function dmgstart(dmg,what)
  1303. hitcon = what.Touched:connect(function(hit)
  1304. local hum = hit.Parent:FindFirstChild("Humanoid")
  1305. if hum and not hum:IsDescendantOf(Character) then
  1306. hum:TakeDamage(dmg)
  1307. end
  1308. end)
  1309. end
  1310.  
  1311. function dmgstop()
  1312. hitcon:disconnect()
  1313. end
  1314.  
  1315. function Cloak()
  1316. Face.Parent=nil
  1317. cloaked=true
  1318. for _,v in pairs(Torso.Parent:children()) do
  1319. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  1320. coroutine.resume(coroutine.create(function()
  1321. for i=0,1,0.2 do
  1322. wait()
  1323. v.Transparency=i
  1324. end
  1325. v.Transparency=1
  1326. end))
  1327. end
  1328. if v.className=="Hat" then
  1329. hatp=v.Handle
  1330. coroutine.resume(coroutine.create(function(derp)
  1331. for i=0,1,0.2 do
  1332. wait()
  1333. derp.Transparency=i
  1334. end
  1335. derp.Transparency=1
  1336. end),hatp)
  1337. end
  1338. end
  1339. for _,v in pairs(m:children()) do
  1340. if v.className=="Part" then
  1341. coroutine.resume(coroutine.create(function()
  1342. for i=0,1,0.2 do
  1343. wait()
  1344. v.Transparency=i
  1345. end
  1346. v.Transparency=1
  1347. end))
  1348. end
  1349. end
  1350. end
  1351.  
  1352. function UnCloak()
  1353. so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
  1354. Face.Parent=Head
  1355. cloaked=false
  1356. for _,v in pairs(Torso.Parent:children()) do
  1357. if v.className=="Part" and v.Name~="HumanoidRootPart" then
  1358. coroutine.resume(coroutine.create(function()
  1359. for i=0,1,0.1 do
  1360. wait()
  1361. v.Transparency=v.Transparency-0.1
  1362. end
  1363. v.Transparency=0
  1364. end))
  1365. end
  1366. if v.className=="Hat" then
  1367. hatp=v.Handle
  1368. coroutine.resume(coroutine.create(function(derp)
  1369. for i=0,1,0.1 do
  1370. wait()
  1371. derp.Transparency=derp.Transparency-0.1
  1372. end
  1373. derp.Transparency=0
  1374. end),hatp)
  1375. end
  1376. end
  1377. for _,v in pairs(m:children()) do
  1378. if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
  1379. coroutine.resume(coroutine.create(function()
  1380. for i=0,1,0.1 do
  1381. wait()
  1382. v.Transparency=v.Transparency-0.1
  1383. end
  1384. v.Transparency=0
  1385. end))
  1386. v.Transparency=0
  1387. end
  1388. end
  1389. end
  1390.  
  1391. local jumped = false
  1392. function jump()
  1393. attack = true
  1394. jumped = true
  1395. hum.WalkSpeed = 0
  1396. MagicBlock(bc("White"),root.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
  1397. CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
  1398. CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
  1399. for i = 0,15,0.1 do
  1400. swait()
  1401. MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1402. MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1403. RH.C0=clerp(RH.C0,cf(1,0.45,-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(50)),.05)
  1404. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(15)),.05)
  1405. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)* angles(math.rad(50),math.rad(0),math.rad(0)),0.05)
  1406. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.05)
  1407. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
  1408. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05)
  1409. end
  1410. local bv = Instance.new("BodyVelocity")
  1411. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1412. bv.velocity = Vector3.new(0,500,0)
  1413. bv.Parent = root
  1414. game:GetService("Debris"):AddItem(bv, 0.5)
  1415. local rng = Instance.new("Part", char)
  1416. rng.Anchored = true
  1417. rng.BrickColor = BrickColor.new("White")
  1418. rng.CanCollide = false
  1419. rng.FormFactor = 3
  1420. rng.Name = "Ring"
  1421. rng.Size = Vector3.new(1, 1, 1)
  1422. rng.Transparency = 0
  1423. rng.TopSurface = 0
  1424. rng.BottomSurface = 0
  1425. rng.Position = root.Position
  1426. rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  1427. local rngm = Instance.new("SpecialMesh", rng)
  1428. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1429. local rng2 = rng:Clone()
  1430. rng2.Parent = char
  1431. local rng2m = rng2.Mesh
  1432. local rng3 = rng:Clone()
  1433. rng3.Parent = char
  1434. local rng3m = rng3.Mesh
  1435. local rng4 = rng:Clone()
  1436. rng4.Parent = char
  1437. local rng4m = rng4.Mesh
  1438. local rng5 = rng:Clone()
  1439. rng5.Parent = char
  1440. local rng5m = rng5.Mesh
  1441. CFuncs["Sound"].Create("rbxassetid://324867021", rng, 10, 1)
  1442. wait()
  1443. local scaler = 10
  1444. local scaler2 = 10
  1445. game:GetService("Debris"):AddItem(bv, 2.4)
  1446. hum.WalkSpeed = 50
  1447. MagicBlock(bc("White"),root.CFrame,15,15,15,10,10,10,0.015)
  1448. for i = 0,10,0.1 do
  1449. swait()
  1450. rng.Transparency = rng.Transparency + 0.01
  1451. rng2.Transparency = rng2.Transparency + 0.01
  1452. rng3.Transparency = rng3.Transparency + 0.01
  1453. rng4.Transparency = rng4.Transparency + 0.01
  1454. rng5.Transparency = rng5.Transparency + 0.01
  1455. scaler = scaler - 0.125
  1456. scaler2 = scaler2 - 0.1
  1457. rng2m.Scale = rng2m.Scale + Vector3.new(scaler/1.25, scaler/1.25, 20)
  1458. rng3m.Scale = rng3m.Scale + Vector3.new(scaler/1.5, scaler/1.5, 30)
  1459. rng4m.Scale = rng4m.Scale + Vector3.new(scaler/1.75, scaler/1.75, 40)
  1460. rng5m.Scale = rng5m.Scale + Vector3.new(scaler/2, scaler/2, 50)
  1461. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  1462. RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5)
  1463. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5)
  1464. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),0.5)
  1465. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.5)
  1466. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5)
  1467. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), 0.5)
  1468. end
  1469. game:GetService("Debris"):AddItem(rng, 0.1)
  1470. game:GetService("Debris"):AddItem(rng2, 0.1)
  1471. game:GetService("Debris"):AddItem(rng3, 0.1)
  1472. game:GetService("Debris"):AddItem(rng4, 0.1)
  1473. game:GetService("Debris"):AddItem(rng5, 0.1)
  1474. hum.WalkSpeed = 16
  1475. attack = false
  1476. jumped = false
  1477. end
  1478.  
  1479. function dash()
  1480. attack = true
  1481. jumped = true
  1482. hum.WalkSpeed = 0
  1483. local bv = Instance.new("BodyVelocity")
  1484. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1485. bv.velocity = root.CFrame.lookVector*150
  1486. bv.Parent = root
  1487. game:GetService("Debris"):AddItem(bv, 1)
  1488. local rng = Instance.new("Part", char)
  1489. rng.Anchored = true
  1490. rng.BrickColor = BrickColor.new("White")
  1491. rng.CanCollide = false
  1492. rng.FormFactor = 3
  1493. rng.Name = "Ring"
  1494. rng.Size = Vector3.new(1, 1, 1)
  1495. rng.Transparency = 0
  1496. rng.TopSurface = 0
  1497. rng.BottomSurface = 0
  1498. rng.CFrame = root.CFrame
  1499. local rngm = Instance.new("SpecialMesh", rng)
  1500. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1501. local rng2 = rng:Clone()
  1502. rng2.Parent = char
  1503. rng2.CFrame = root.CFrame + root.CFrame.lookVector*10
  1504. local rng2m = rng2.Mesh
  1505. local rng3 = rng:Clone()
  1506. rng3.Parent = char
  1507. rng3.CFrame = root.CFrame + root.CFrame.lookVector*20
  1508. local rng3m = rng3.Mesh
  1509. local rng4 = rng:Clone()
  1510. rng4.Parent = char
  1511. rng4.CFrame = root.CFrame + root.CFrame.lookVector*30
  1512. local rng4m = rng4.Mesh
  1513. local rng5 = rng:Clone()
  1514. rng5.Parent = char
  1515. rng5.CFrame = root.CFrame + root.CFrame.lookVector*40
  1516. local rng5m = rng5.Mesh
  1517. CFuncs["Sound"].Create("rbxassetid://324867021", root, 1, 1)
  1518. wait()
  1519. local scaler = 10/5
  1520. local scaler2 = 10/5
  1521. local hit = larm.Touched:connect(function(hit)
  1522. Damagefunc(hit,25,34,math.random(10,20),"Normal",root,.2,1)
  1523. end)
  1524. for i = 0,10,0.1 do
  1525. swait()
  1526. MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1527. rng.Transparency = rng.Transparency + 0.01
  1528. rng2.Transparency = rng2.Transparency + 0.01
  1529. rng3.Transparency = rng3.Transparency + 0.01
  1530. rng4.Transparency = rng4.Transparency + 0.01
  1531. rng5.Transparency = rng5.Transparency + 0.01
  1532. scaler = scaler - 0.125/5
  1533. scaler2 = scaler2 - 0.1/5
  1534. rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 0)
  1535. rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
  1536. rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 0)
  1537. rng5m.Scale = rng5m.Scale + Vector3.new(scaler2/2, scaler2/2, 0)
  1538. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  1539. RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-25)),.5)
  1540. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5)
  1541. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(-80)),0.5)
  1542. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.5)
  1543. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5)
  1544. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-110)), 0.5)
  1545. end
  1546. game:GetService("Debris"):AddItem(rng, 0.1)
  1547. game:GetService("Debris"):AddItem(rng2, 0.1)
  1548. game:GetService("Debris"):AddItem(rng3, 0.1)
  1549. game:GetService("Debris"):AddItem(rng4, 0.1)
  1550. game:GetService("Debris"):AddItem(rng5, 0.1)
  1551. hum.WalkSpeed = 16
  1552. hit:disconnect()
  1553. attack = false
  1554. jumped = false
  1555. end
  1556.  
  1557. function boom()
  1558. attack = true
  1559. jumped = true
  1560. hum.WalkSpeed = 0
  1561. MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
  1562. CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
  1563. CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
  1564. for i = 0,15,0.1 do
  1565. swait()
  1566. MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1567. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05)
  1568. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05)
  1569. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
  1570. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
  1571. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
  1572. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
  1573. end
  1574. local rng = Instance.new("Part", char)
  1575. rng.Anchored = true
  1576. rng.BrickColor = BrickColor.new("White")
  1577. rng.CanCollide = false
  1578. rng.FormFactor = 3
  1579. rng.Name = "Ring"
  1580. rng.Size = Vector3.new(1, 1, 1)
  1581. rng.Transparency = 0
  1582. rng.TopSurface = 0
  1583. rng.BottomSurface = 0
  1584. rng.Position = root.Position
  1585. rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  1586. local rngm = Instance.new("SpecialMesh", rng)
  1587. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1588. local rng2 = rng:Clone()
  1589. rng2.Parent = char
  1590. local rng2m = rng2.Mesh
  1591. local rng3 = rng:Clone()
  1592. rng3.Parent = char
  1593. local rng3m = rng3.Mesh
  1594. local rng4 = rng:Clone()
  1595. rng4.Parent = char
  1596. local rng4m = rng4.Mesh
  1597. local rng5 = rng:Clone()
  1598. rng5.Parent = char
  1599. local rng5m = rng5.Mesh
  1600. local hit = rng5.Touched:connect(function(hit)
  1601. Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
  1602. end)
  1603. MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
  1604. CFuncs["Sound"].Create("rbxassetid://187137517", rng, 10, 1)
  1605. CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.85)
  1606. CFuncs["Sound"].Create("rbxassetid://144699494", rng, 10, 1)
  1607. wait()
  1608. local scaler = 10
  1609. local scaler2 = 10
  1610. for i = 0,10,0.1 do
  1611. swait()
  1612. rng.Transparency = rng.Transparency + 0.01
  1613. rng2.Transparency = rng2.Transparency + 0.01
  1614. rng3.Transparency = rng3.Transparency + 0.01
  1615. rng4.Transparency = rng4.Transparency + 0.01
  1616. rng5.Transparency = rng5.Transparency + 0.01
  1617. scaler = scaler - 0.125
  1618. scaler2 = scaler2 - 0.1
  1619. rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 4)
  1620. rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 3)
  1621. rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 2)
  1622. rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 1)
  1623. rng5.Size = rng5m.Scale
  1624. rng5.CFrame = rng.CFrame
  1625. rngm.Scale = rngm.Scale + Vector3.new(scaler2/2, scaler2/2, 5)
  1626. RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(0)),.5)
  1627. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.5)
  1628. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(30),math.rad(0),math.rad(80)),0.5)
  1629. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
  1630. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(40)), 0.5)
  1631. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-50)), 0.5)
  1632. end
  1633. hit:disconnect()
  1634. game:GetService("Debris"):AddItem(rng, 1)
  1635. game:GetService("Debris"):AddItem(rng2, 1)
  1636. game:GetService("Debris"):AddItem(rng3, 1)
  1637. game:GetService("Debris"):AddItem(rng4, 1)
  1638. game:GetService("Debris"):AddItem(rng5, 1)
  1639. hum.WalkSpeed = 16
  1640. attack = false
  1641. jumped = false
  1642. end
  1643.  
  1644. function shooty()
  1645. attack = true
  1646. MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
  1647. CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
  1648. CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
  1649. for i = 0,15,0.1 do
  1650. swait()
  1651. MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1652. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
  1653. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
  1654. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
  1655. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
  1656. end
  1657. CFuncs["Sound"].Create("rbxassetid://187137517", root, 1, 1)
  1658. local a = Instance.new("Part",Character)
  1659. a.Name = "Direction"
  1660. a.Anchored = true
  1661. a.BrickColor = bc("Bright red")
  1662. a.Material = "Neon"
  1663. a.Transparency = 1
  1664. a.CanCollide = false
  1665. local ray = Ray.new(
  1666. root.CFrame.p, -- origin
  1667. (mouse.Hit.p - root.CFrame.p).unit * 500 -- direction
  1668. )
  1669. local ignore = Character
  1670. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  1671. a.BottomSurface = 10
  1672. a.TopSurface = 10
  1673. local distance = (root.CFrame.p - position).magnitude
  1674. a.Size = Vector3.new(0.1, 0.1, 0.1)
  1675. a.CFrame = CFrame.new(root.CFrame.p, position) * CFrame.new(0, 0, 0)
  1676. local lb = Instance.new("Part")
  1677. lb.Parent = char
  1678. lb.BrickColor = bc("White")
  1679. lb.CanCollide = false
  1680. lb.Material = "Neon"
  1681. lb.Anchored = true
  1682. lb.TopSurface = 0
  1683. lb.BottomSurface = 0
  1684. lb.Transparency = 0
  1685. lb.Size = vt(0.5,0.5,0.5)
  1686. lb.CFrame = sorb.CFrame
  1687. lb.Anchored = false
  1688. local thingery = Instance.new("SpecialMesh",lb)
  1689. thingery.MeshType = "Sphere"
  1690. thingery.Scale = vt(25,25,25)
  1691. game:GetService("Debris"):AddItem(lb, 10)
  1692. local bv = Instance.new("BodyVelocity")
  1693. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  1694. bv.velocity = a.CFrame.lookVector*150
  1695. bv.Parent = lb
  1696. game:GetService("Debris"):AddItem(a, 0.1)
  1697. wait(0.05)
  1698. local hitted = false
  1699. lb.Touched:connect(function(hit)
  1700. if hitted == false then
  1701. hitted = true
  1702. lb.Anchored = true
  1703. lb.Transparency = 1
  1704. local rng = Instance.new("Part", char)
  1705. rng.Anchored = true
  1706. rng.BrickColor = BrickColor.new("White")
  1707. rng.CanCollide = false
  1708. rng.FormFactor = 3
  1709. rng.Name = "Ring"
  1710. rng.Size = Vector3.new(1, 1, 1)
  1711. rng.Transparency = 0
  1712. rng.TopSurface = 0
  1713. rng.BottomSurface = 0
  1714. rng.CFrame = lb.CFrame
  1715. rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
  1716. local rngm = Instance.new("SpecialMesh", rng)
  1717. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1718. local rng2 = rng:Clone()
  1719. rng2.Parent = char
  1720. local rng2m = rng2.Mesh
  1721. local rng3 = rng:Clone()
  1722. rng3.Parent = char
  1723. local rng3m = rng3.Mesh
  1724. local rng4 = rng:Clone()
  1725. rng4.Parent = char
  1726. local rng4m = rng4.Mesh
  1727. local rng5 = rng:Clone()
  1728. rng5.Parent = char
  1729. rng5.CFrame = rng5.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
  1730. local rng5m = rng5.Mesh
  1731. rng2.CFrame = rng2.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
  1732. rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
  1733. rng4.CFrame = rng4.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
  1734. MagicBlock(bc("White"),lb.CFrame,15,15,15,5,5,5,0.015)
  1735. local rng6 = rng:Clone()
  1736. rng6.Material = "Neon"
  1737. rng6.Parent = char
  1738. local rng6m = rng6.Mesh
  1739. rng6m.Scale = vt(1,1,1)
  1740. rng6m.MeshType = "Sphere"
  1741. local hita = rng6.Touched:connect(function(hit)
  1742. Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
  1743. end)
  1744. CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 1)
  1745. CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.75)
  1746. CFuncs["Sound"].Create("rbxassetid://144699494", rng, 5, 1)
  1747. local scaler = 5
  1748. local scaler2 = 5
  1749. for i = 0,20,0.1 do
  1750. swait()
  1751. rng.Transparency = rng.Transparency + 0.005
  1752. rng2.Transparency = rng2.Transparency + 0.005
  1753. rng3.Transparency = rng3.Transparency + 0.005
  1754. rng4.Transparency = rng4.Transparency + 0.005
  1755. rng5.Transparency = rng5.Transparency + 0.005
  1756. rng6.Transparency = rng6.Transparency + 0.005
  1757. scaler = scaler - 0.005/2
  1758. scaler2 = scaler2 - 0.05/2
  1759. rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3)
  1760. rng6.CFrame = rng.CFrame
  1761. rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
  1762. rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
  1763. rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/2, scaler2/2, 0)
  1764. rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0)
  1765. rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
  1766. end
  1767. hita:disconnect()
  1768. game:GetService("Debris"):AddItem(rng, 1)
  1769. game:GetService("Debris"):AddItem(rng2, 1)
  1770. game:GetService("Debris"):AddItem(rng3, 1)
  1771. game:GetService("Debris"):AddItem(rng4, 1)
  1772. game:GetService("Debris"):AddItem(rng5, 1)
  1773. game:GetService("Debris"):AddItem(rng6, 1)
  1774. end
  1775. end)
  1776. for i = 0,2,0.1 do
  1777. swait()
  1778. MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1779. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
  1780. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
  1781. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
  1782. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
  1783. end
  1784. attack = false
  1785. end
  1786.  
  1787. function superpunch()
  1788. attack = true
  1789. jumped = true
  1790. hum.WalkSpeed = 0
  1791. MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
  1792. CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
  1793. CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
  1794. for i = 0,15,0.1 do
  1795. swait()
  1796. MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
  1797. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05)
  1798. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05)
  1799. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
  1800. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
  1801. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05)
  1802. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
  1803. end
  1804. local rng = Instance.new("Part", char)
  1805. rng.Anchored = true
  1806. rng.BrickColor = BrickColor.new("White")
  1807. rng.CanCollide = false
  1808. rng.FormFactor = 3
  1809. rng.Name = "Ring"
  1810. rng.Size = Vector3.new(1, 1, 1)
  1811. rng.Transparency = 0
  1812. rng.TopSurface = 0
  1813. rng.BottomSurface = 0
  1814. rng.CFrame = root.CFrame
  1815. local rngm = Instance.new("SpecialMesh", rng)
  1816. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1817. local rng2 = rng:Clone()
  1818. rng2.Parent = char
  1819. local rng2m = rng2.Mesh
  1820. local rng3 = rng:Clone()
  1821. rng3.Parent = char
  1822. local rng3m = rng3.Mesh
  1823. local rng4 = rng:Clone()
  1824. rng4.Parent = char
  1825. local rng4m = rng4.Mesh
  1826. local rng5 = rng:Clone()
  1827. rng5.Parent = char
  1828. local rng5m = rng5.Mesh
  1829. local rng6 = rng:Clone()
  1830. rng6.Material = "Neon"
  1831. rng6.Parent = char
  1832. local rng6m = rng6.Mesh
  1833. rng6m.Scale = vt(1,1,1)
  1834. rng6m.MeshType = "Sphere"
  1835. local hita = rng6.Touched:connect(function(hit)
  1836. Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
  1837. end)
  1838. rng2.CFrame = root.CFrame
  1839. rng3.CFrame = root.CFrame
  1840. rng4.CFrame = root.CFrame
  1841. rng5.CFrame = root.CFrame
  1842. rng6.CFrame = root.CFrame
  1843. CFuncs["Sound"].Create("rbxassetid://260430117", rng, 5, 1)
  1844. CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 0.85)
  1845. CFuncs["Sound"].Create("rbxassetid://169628396", rng, 5, 1)
  1846. CFuncs["Sound"].Create("rbxassetid://137994058", rng, 5, 1)
  1847. CFuncs["Sound"].Create("rbxassetid://138186576", rng, 5, 1)
  1848. wait()
  1849. local scaler = 10/5
  1850. local scaler2 = 10/5
  1851. MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
  1852. for i = 0,10,0.1 do
  1853. swait()
  1854. MagicBlock(bc("White"),rng6.CFrame,5,5,5,5,5,5,0.1)
  1855. rng.CFrame = rng.CFrame + rng.CFrame.lookVector*scaler2
  1856. rng2.CFrame = rng2.CFrame + rng2.CFrame.lookVector*scaler2/1.25
  1857. rng3.CFrame = rng3.CFrame + rng3.CFrame.lookVector*scaler2/1.5
  1858. rng4.CFrame = rng4.CFrame + rng4.CFrame.lookVector*scaler2/1.75
  1859. rng5.CFrame = rng5.CFrame + rng5.CFrame.lookVector*scaler2/2
  1860. rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3)
  1861. rng6.CFrame = rng.CFrame
  1862. rng.Transparency = rng.Transparency + 0.01
  1863. rng2.Transparency = rng2.Transparency + 0.01
  1864. rng3.Transparency = rng3.Transparency + 0.01
  1865. rng4.Transparency = rng4.Transparency + 0.01
  1866. rng5.Transparency = rng5.Transparency + 0.01
  1867. rng6.Transparency = rng6.Transparency + 0.01
  1868. scaler = scaler - 0.125/5
  1869. scaler2 = scaler2 - 0.1/5
  1870. rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 1.5)
  1871. rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/2, scaler2/2, 1)
  1872. rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0.5)
  1873. rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0)
  1874. rngm.Scale = rngm.Scale + Vector3.new(scaler2/3, scaler2/3, 2)
  1875. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
  1876. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
  1877. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
  1878. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
  1879. end
  1880. hita:disconnect()
  1881. game:GetService("Debris"):AddItem(rng, 1)
  1882. game:GetService("Debris"):AddItem(rng2, 1)
  1883. game:GetService("Debris"):AddItem(rng3, 1)
  1884. game:GetService("Debris"):AddItem(rng4, 1)
  1885. game:GetService("Debris"):AddItem(rng5, 1)
  1886. hum.WalkSpeed = 16
  1887. attack = false
  1888. jumped = false
  1889. end
  1890.  
  1891.  
  1892. mouse.KeyDown:connect(function(k)
  1893. if k == "z" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then
  1894. jump()
  1895. end
  1896. if k == "x" and attack == false then
  1897. dash()
  1898. end
  1899. if k == "c" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then
  1900. boom()
  1901. end
  1902. if k == "v" and attack == false then
  1903. shooty()
  1904. end
  1905. if k == "b" and attack == false then
  1906. superpunch()
  1907. end
  1908. end)
  1909. Humanoid.Animator.Parent = nil
  1910. idleanim=.4
  1911. while true do
  1912. swait()
  1913. sine = sine + change
  1914. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1915. local velderp=RootPart.Velocity.y
  1916. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1917. if equipped==true or equipped==false then
  1918. if attack==false then
  1919. idle=idle+1
  1920. else
  1921. idle=0
  1922. end
  1923. if idle>=500 then
  1924. if attack==false then
  1925. --Sheath()
  1926. end
  1927. end
  1928. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1929. Anim="Jump"
  1930. if attack==false then
  1931. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  1932. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1933. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1934. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  1935. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1936. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  1937. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1938. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1939. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1940. end
  1941. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1942. Anim="Fall"
  1943. if attack==false then
  1944. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  1945. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1946. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  1947. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  1948. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1949. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  1950. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1951. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1952. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1953. end
  1954. elseif torvel<1 and hitfloor~=nil then
  1955. Anim="Idle"
  1956. if jumped == false then
  1957. RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
  1958. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
  1959. end
  1960. if attack==false then
  1961. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1962. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3)
  1963. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3)
  1964. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3)
  1965. end
  1966. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1967. Anim="Walk"
  1968. if jumped == false then
  1969. RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
  1970. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
  1971. end
  1972. if attack==false then
  1973. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3)
  1974. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1975. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3)
  1976. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3)
  1977. end
  1978. elseif torvel>=22 and hitfloor~=nil then
  1979. Anim="Run"
  1980. if jumped == false then
  1981. RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
  1982. LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
  1983. end
  1984. if attack==false then
  1985. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3)
  1986. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1987. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3)
  1988. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3)
  1989. end
  1990. end
  1991. end
  1992. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement