Advertisement
ghostteen14

Untitled

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