Advertisement
Its_YeBoi

Untitled

Mar 1st, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.12 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2.  
  3. local plr = game.Players.LocalPlayer
  4. local chr = plr.Character
  5. local maus = plr:GetMouse()
  6. local PGui=plr.PlayerGui
  7. local lleg = chr["Left Leg"]
  8. local rleg = chr["Right Leg"]
  9. local larm = chr["Left Arm"]
  10. local rarm = chr["Right Arm"]
  11. local hed = chr.Head
  12. local rutprt = chr.HumanoidRootPart
  13. local torso = chr.Torso
  14. local otheranims=false
  15. local swimming=false
  16. local attacking = false
  17. local modeColor = "White"
  18. local IT = Instance.new
  19. local VT = Vector3.new
  20.  
  21. local aura_music = Instance.new("Sound",chr.Head)
  22. aura_music.Volume = 7
  23. aura_music.Looped = true
  24. aura_music.SoundId='rbxassetid://869918352'
  25. aura_music.Name = "Ok"
  26. aura_music:Play()
  27.  
  28. spawn(function()
  29. while wait() do
  30. if chr.Head:FindFirstChild("Ok") then return
  31. else
  32. local aura_music = Instance.new("Sound",chr.Head)
  33. aura_music.Volume = 7
  34. aura_music.Looped = true
  35. aura_music.SoundId='rbxassetid://869918352'
  36. aura_music.Name = "Ok"
  37. aura_music:Play()
  38. end
  39. end
  40. end)
  41.  
  42.  
  43. ---//*DEBOUNCES
  44. canChangeFromC = true
  45. canChangeFromA = true
  46. canChangeFromCF = true
  47. canChangeFromSF = true
  48. canChangeFromPT = true
  49. canChangeFromGT = true
  50. canChangeFromUT = true
  51. ----
  52. canChangeFromMT = true
  53. ----*\\
  54.  
  55. --//*Instances
  56. ---*\\
  57. -----*\\
  58.  
  59. function QuaternionFromCFrame(cf)
  60. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  61. local trace = m00 + m11 + m22
  62. if trace > 0 then
  63. local s = math.sqrt(1 + trace)
  64. local recip = 0.5 / s
  65. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  66. else
  67. local i = 0
  68. if m00 < m11 then
  69. i = 1
  70. end
  71. if m22 > (i == 0 and m00 or m11) then
  72. i = 2
  73. end
  74. if i == 0 then
  75. local s = math.sqrt(m00 - m11 - m22 + 1)
  76. local recip = 0.5 / s
  77. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  78. elseif i == 1 then
  79. local s = math.sqrt(m11 - m22 - m00 + 1)
  80. local recip = 0.5 / s
  81. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  82. elseif i == 2 then
  83. local s = math.sqrt(m22 - m00 - m11 + 1)
  84. local recip = 0.5 / s
  85. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  86. end
  87. end
  88. end
  89. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  90. local xs, ys, zs = x + x, y + y, z + z
  91. local wx, wy, wz = w * xs, w * ys, w * zs
  92. local xx = x * xs
  93. local xy = x * ys
  94. local xz = x * zs
  95. local yy = y * ys
  96. local yz = y * zs
  97. local zz = z * zs
  98. 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))
  99. end
  100. function QuaternionSlerp(a, b, t)
  101. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  102. local startInterp, finishInterp
  103. if cosTheta >= 1.0E-4 then
  104. if 1 - cosTheta > 1.0E-4 then
  105. local theta = math.acos(cosTheta)
  106. local invSinTheta = 1 / math.sin(theta)
  107. startInterp = math.sin((1 - t) * theta) * invSinTheta
  108. finishInterp = math.sin(t * theta) * invSinTheta
  109. else
  110. startInterp = 1 - t
  111. finishInterp = t
  112. end
  113. elseif 1 + cosTheta > 1.0E-4 then
  114. local theta = math.acos(-cosTheta)
  115. local invSinTheta = 1 / math.sin(theta)
  116. startInterp = math.sin((t - 1) * theta) * invSinTheta
  117. finishInterp = math.sin(t * theta) * invSinTheta
  118. else
  119. startInterp = t - 1
  120. finishInterp = t
  121. end
  122. 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
  123. end
  124. function rayCast(Position, Direction, Range, Ignore)
  125. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  126. end
  127.  
  128. canChangeFromC = true
  129. canChangeFromA = true
  130. canChangeFromCF = true
  131. canChangeFromSF = true
  132. canChangeFromPT = true
  133. canChangeFromGT = true
  134. canChangeFromUT = true
  135. IT = Instance.new
  136. CF = CFrame.new
  137. VT = Vector3.new
  138. RAD = math.rad
  139. C3 = Color3.new
  140. UD2 = UDim2.new
  141. BRICKC = BrickColor.new
  142. ANGLES = CFrame.Angles
  143. EULER = CFrame.fromEulerAnglesXYZ
  144. COS = math.cos
  145. ACOS = math.acos
  146. SIN = math.sin
  147. ASIN = math.asin
  148. ABS = math.abs
  149. MRANDOM = math.random
  150. FLOOR = math.floor
  151.  
  152. chr.Animate.Disabled=true
  153. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  154. local RunSpeed=30
  155.  
  156. local WlkSpeed=16
  157. local SwimSpeed=14
  158. local SwimDashSpeed=28
  159. local anim = "Idling"
  160. local lastanim = "Idling"
  161. local val = 0
  162. local syne = 0
  163. local num = 0
  164. local runtime = 0
  165. coroutine.wrap(function()
  166. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  167. function Lerp(a, b, i)
  168. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  169. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  170. local calx = com1[1] + (com2[1] - com1[1]) * i
  171. local caly = com1[2] + (com2[2] - com1[2]) * i
  172. local calz = com1[3] + (com2[3] - com1[3]) * i
  173. local cala = com1[4] + (com2[4] - com1[4]) * i
  174. local calb = com1[5] + (com2[5] - com1[5]) * i
  175. local calc = com1[6] + (com2[6] - com1[6]) * i
  176. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  177. end
  178. function TwnSingleNumber(s,f,m)
  179. local wot=s+(f-s)*m
  180. return wot
  181. end
  182. function TwnVector3(q,w,e)
  183. local begin={q.x,q.y,q.z}
  184. local ending={w.x,w.y,w.z}
  185. local bgx=begin[1]+(ending[1]-begin[1])*e
  186. local bgy=begin[2]+(ending[2]-begin[2])*e
  187. local bgz=begin[3]+(ending[3]-begin[3])*e
  188. return Vector3.new(bgx,bgy,bgz)
  189. end
  190. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  191. wld = Instance.new("Weld", wp1)
  192. wld.Part0 = wp0
  193. wld.Part1 = wp1
  194. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  195. end
  196. local angles = CFrame.Angles
  197. function clerp(a, b, t)
  198. return a:lerp(b, t)
  199. end
  200. newWeld(law, torso, larm, -1.5, 0.5, 0)
  201. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  202. newWeld(llw, torso, lleg, -.5, -2, 0)
  203. newWeld(rlw, torso, rleg, .5, -2, 0)
  204. newWeld(hw, torso, hed, 0, 1.5, 0)
  205. local rutwald=Instance.new('Weld',rutprt)
  206. rutwald.Part0=rutprt
  207. rutwald.Part1=torso
  208. rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  209. larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  210. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  211. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  212. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  213.  
  214.  
  215. ---//*MOVES
  216.  
  217.  
  218.  
  219. --*\\
  220.  
  221. maus.KeyDown:connect(function(kei)
  222. if string.byte(kei)==48 and not otheranims then
  223. runnin=true
  224. end
  225. if kei=='w' then fldb.w=true end
  226. if kei=='a' then fldb.a=true end
  227. if kei=='s' then fldb.s=true end
  228. if kei=='d' then fldb.d=true end
  229. end)
  230. maus.KeyUp:connect(function(kei)
  231. if string.byte(kei)==48 and not otheranims then
  232. runnin=false
  233. end
  234. if kei=='w' then fldb.w=false end
  235. if kei=='a' then fldb.a=false end
  236. if kei=='s' then fldb.s=false end
  237. if kei=='d' then fldb.d=false end
  238. end)
  239.  
  240.  
  241.  
  242. CFuncs = {
  243. Part = {
  244. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  245. local Part = Create("Part")({
  246. Parent = Parent,
  247. Reflectance = Reflectance,
  248. Transparency = Transparency,
  249. CanCollide = false,
  250. Locked = true,
  251. BrickColor = BrickColor.new(tostring(BColor)),
  252. Name = Name,
  253. Size = Size,
  254. Material = Material
  255. })
  256. RemoveOutlines(Part)
  257. return Part
  258. end
  259. },
  260. Mesh = {
  261. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  262. local Msh = Create(Mesh)({
  263. Parent = Part,
  264. Offset = OffSet,
  265. Scale = Scale
  266. })
  267. if Mesh == "SpecialMesh" then
  268. Msh.MeshType = MeshType
  269. Msh.MeshId = MeshId
  270. end
  271. return Msh
  272. end
  273. },
  274. Mesh = {
  275. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  276. local Msh = Create(Mesh)({
  277. Parent = Part,
  278. Offset = OffSet,
  279. Scale = Scale
  280. })
  281. if Mesh == "SpecialMesh" then
  282. Msh.MeshType = MeshType
  283. Msh.MeshId = MeshId
  284. end
  285. return Msh
  286. end
  287. },
  288. Weld = {
  289. Create = function(Parent, Part0, Part1, C0, C1)
  290. local Weld = Create("Weld")({
  291. Parent = Parent,
  292. Part0 = Part0,
  293. Part1 = Part1,
  294. C0 = C0,
  295. C1 = C1
  296. })
  297. return Weld
  298. end
  299. },
  300. Sound = {
  301. Create = function(id, par, vol, pit)
  302. coroutine.resume(coroutine.create(function()
  303. local S = Create("Sound")({
  304. Volume = vol,
  305. Pitch = pit or 1,
  306. SoundId = id,
  307. Parent = par or workspace
  308. })
  309. wait()
  310. S:play()
  311. game:GetService("Debris"):AddItem(S, 6)
  312. end))
  313. end
  314. },
  315. ParticleEmitter = {
  316. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  317. local fp = Create("ParticleEmitter")({
  318. Parent = Parent,
  319. Color = ColorSequence.new(Color1, Color2),
  320. LightEmission = LightEmission,
  321. Size = Size,
  322. Texture = Texture,
  323. Transparency = Transparency,
  324. ZOffset = ZOffset,
  325. Acceleration = Accel,
  326. Drag = Drag,
  327. LockedToPart = LockedToPart,
  328. VelocityInheritance = VelocityInheritance,
  329. EmissionDirection = EmissionDirection,
  330. Enabled = Enabled,
  331. Lifetime = LifeTime,
  332. Rate = Rate,
  333. Rotation = Rotation,
  334. RotSpeed = RotSpeed,
  335. Speed = Speed,
  336. VelocitySpread = VelocitySpread
  337. })
  338. return fp
  339. end
  340. }
  341. }
  342. function RemoveOutlines(part)
  343. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  344. end
  345. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  346. local Part = Create("Part")({
  347. formFactor = FormFactor,
  348. Parent = Parent,
  349. Reflectance = Reflectance,
  350. Transparency = Transparency,
  351. CanCollide = false,
  352. Locked = true,
  353. BrickColor = BrickColor.new(tostring(BColor)),
  354. Name = Name,
  355. Size = Size,
  356. Material = Material
  357. })
  358. RemoveOutlines(Part)
  359. return Part
  360. end
  361. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  362. local Msh = Create(Mesh)({
  363. Parent = Part,
  364. Offset = OffSet,
  365. Scale = Scale
  366. })
  367. if Mesh == "SpecialMesh" then
  368. Msh.MeshType = MeshType
  369. Msh.MeshId = MeshId
  370. end
  371. return Msh
  372. end
  373. function CreateWeld(Parent, Part0, Part1, C0, C1)
  374. local Weld = Create("Weld")({
  375. Parent = Parent,
  376. Part0 = Part0,
  377. Part1 = Part1,
  378. C0 = C0,
  379. C1 = C1
  380. })
  381. return Weld
  382. end
  383. EffectModel = Instance.new("Model", char)
  384. Effects = {
  385. Block = {
  386. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  387. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  388. prt.Anchored = true
  389. prt.CFrame = cframe
  390. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  391. game:GetService("Debris"):AddItem(prt, 10)
  392. if Type == 1 or Type == nil then
  393. table.insert(Effects, {
  394. prt,
  395. "Block1",
  396. delay,
  397. x3,
  398. y3,
  399. z3,
  400. msh
  401. })
  402. elseif Type == 2 then
  403. table.insert(Effects, {
  404. prt,
  405. "Block2",
  406. delay,
  407. x3,
  408. y3,
  409. z3,
  410. msh
  411. })
  412. else
  413. table.insert(Effects, {
  414. prt,
  415. "Block3",
  416. delay,
  417. x3,
  418. y3,
  419. z3,
  420. msh
  421. })
  422. end
  423. end
  424. },
  425. Sphere = {
  426. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  427. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  428. prt.Anchored = true
  429. prt.CFrame = cframe
  430. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  431. game:GetService("Debris"):AddItem(prt, 10)
  432. table.insert(Effects, {
  433. prt,
  434. "Cylinder",
  435. delay,
  436. x3,
  437. y3,
  438. z3,
  439. msh
  440. })
  441. end
  442. },
  443. Cylinder = {
  444. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  445. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  446. prt.Anchored = true
  447. prt.CFrame = cframe
  448. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  449. game:GetService("Debris"):AddItem(prt, 10)
  450. table.insert(Effects, {
  451. prt,
  452. "Cylinder",
  453. delay,
  454. x3,
  455. y3,
  456. z3,
  457. msh
  458. })
  459. end
  460. },
  461. Wave = {
  462. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  463. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  464. prt.Anchored = true
  465. prt.CFrame = cframe
  466. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  467. game:GetService("Debris"):AddItem(prt, 10)
  468. table.insert(Effects, {
  469. prt,
  470. "Cylinder",
  471. delay,
  472. x3 / 60,
  473. y3 / 60,
  474. z3 / 60,
  475. msh
  476. })
  477. end
  478. },
  479. Ring = {
  480. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  481. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  482. prt.Anchored = true
  483. prt.CFrame = cframe
  484. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  485. game:GetService("Debris"):AddItem(prt, 10)
  486. table.insert(Effects, {
  487. prt,
  488. "Cylinder",
  489. delay,
  490. x3,
  491. y3,
  492. z3,
  493. msh
  494. })
  495. end
  496. },
  497. Break = {
  498. Create = function(brickcolor, cframe, x1, y1, z1)
  499. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  500. prt.Anchored = true
  501. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  502. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  503. local num = math.random(10, 50) / 1000
  504. game:GetService("Debris"):AddItem(prt, 10)
  505. table.insert(Effects, {
  506. prt,
  507. "Shatter",
  508. num,
  509. prt.CFrame,
  510. math.random() - math.random(),
  511. 0,
  512. math.random(50, 100) / 100
  513. })
  514. end
  515. },
  516. Spiral = {
  517. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  518. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  519. prt.Anchored = true
  520. prt.CFrame = cframe
  521. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  522. game:GetService("Debris"):AddItem(prt, 10)
  523. table.insert(Effects, {
  524. prt,
  525. "Cylinder",
  526. delay,
  527. x3,
  528. y3,
  529. z3,
  530. msh
  531. })
  532. end
  533. },
  534. Push = {
  535. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  536. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  537. prt.Anchored = true
  538. prt.CFrame = cframe
  539. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  540. game:GetService("Debris"):AddItem(prt, 10)
  541. table.insert(Effects, {
  542. prt,
  543. "Cylinder",
  544. delay,
  545. x3,
  546. y3,
  547. z3,
  548. msh
  549. })
  550. end
  551. }
  552. }
  553. local Torso = chr.Torso
  554. function CreateSound(ID, PARENT, VOLUME, PITCH)
  555. local NEWSOUND = nil
  556. coroutine.resume(coroutine.create(function()
  557. NEWSOUND = Instance.new("Sound", PARENT)
  558. NEWSOUND.Volume = VOLUME
  559. NEWSOUND.Pitch = PITCH
  560. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  561. swait()
  562. NEWSOUND:play()
  563. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  564. end))
  565. return NEWSOUND
  566. end
  567.  
  568. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  569. local NEWMESH = IT(MESH)
  570. if MESH == "SpecialMesh" then
  571. NEWMESH.MeshType = MESHTYPE
  572. if MESHID ~= "nil" and MESHID ~= "" then
  573. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  574. end
  575. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  576. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  577. end
  578. end
  579. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  580. NEWMESH.Scale = SCALE
  581. NEWMESH.Parent = PARENT
  582. return NEWMESH
  583. end
  584.  
  585. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  586. local NEWPART = IT("Part")
  587. NEWPART.formFactor = FORMFACTOR
  588. NEWPART.Reflectance = REFLECTANCE
  589. NEWPART.Transparency = TRANSPARENCY
  590. NEWPART.CanCollide = false
  591. NEWPART.Anchored = true
  592. NEWPART.Locked = true
  593. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  594. NEWPART.Name = NAME
  595. NEWPART.Size = SIZE
  596. NEWPART.Position = Torso.Position
  597. NEWPART.Material = MATERIAL
  598. NEWPART:BreakJoints()
  599. NEWPART.Parent = PARENT
  600. return NEWPART
  601. end
  602.  
  603.  
  604. ----
  605. canChangeFromMT = true
  606. ----*\\
  607. function Swait(NUMBER)
  608. if NUMBER == 0 or NUMBER == nil then
  609. ArtificialHB.Event:wait()
  610. else
  611. for i = 1, NUMBER do
  612. ArtificialHB.Event:wait()
  613. end
  614. end
  615. end
  616. ---//*Character
  617.  
  618. chr.Head.face:Destroy()
  619.  
  620. function debounce(func)
  621. local isRunning = false -- Create a local debounce variable
  622. return function(...) -- Return a new function
  623. if not isRunning then
  624. isRunning = true
  625.  
  626. func(...) -- Call it with the original arguments
  627.  
  628. isRunning = false
  629. end
  630. end
  631. end
  632.  
  633.  
  634. function CreateSound(ID, PARENT, VOLUME, PITCH)
  635. local NEWSOUND = nil
  636. coroutine.resume(coroutine.create(function()
  637. NEWSOUND = Instance.new("Sound", PARENT)
  638. NEWSOUND.Volume = VOLUME
  639. NEWSOUND.Pitch = PITCH
  640. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  641. swait()
  642. NEWSOUND:play()
  643. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  644. end))
  645. return NEWSOUND
  646. end
  647.  
  648. function clerp(a, b, t)
  649. local qa = {
  650. QuaternionFromCFrame(a)
  651. }
  652. local qb = {
  653. QuaternionFromCFrame(b)
  654. }
  655. local ax, ay, az = a.x, a.y, a.z
  656. local bx, by, bz = b.x, b.y, b.z
  657. local _t = 1 - t
  658. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  659. end
  660.  
  661. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  662. if hit.Parent == nil then
  663. return
  664. end
  665. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  666. for _, v in pairs(hit.Parent:children()) do
  667. if v:IsA("Humanoid") then
  668. h = v
  669. end
  670. end
  671. if h ~= nil and hit.Parent.Name ~= chr.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  672. warn'No R15 allowed'
  673. hit.Parent:FindFirstChild("Head"):BreakJoints()
  674. end
  675.  
  676. if h ~= nil and hit.Parent.Name ~= chr.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  677. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  678. if hit.Parent.DebounceHit.Value == true then
  679. return
  680. end
  681. end
  682. if insta == true then
  683. hit.Parent:FindFirstChild("Head"):BreakJoints()
  684. end
  685. local c = Create("ObjectValue"){
  686. Name = "creator",
  687. Value = game:service("Players").LocalPlayer,
  688. Parent = h,
  689. }
  690. game:GetService("Debris"):AddItem(c, .5)
  691. if HitSound ~= nil and HitPitch ~= nil then
  692. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  693. end
  694. local Damage = math.random(minim, maxim)
  695. local blocked = false
  696. local block = hit.Parent:findFirstChild("Block")
  697. if block ~= nil then
  698. if block.className == "IntValue" then
  699. if block.Value > 0 then
  700. blocked = true
  701. block.Value = block.Value - 1
  702. print(block.Value)
  703. end
  704. end
  705. end
  706. if blocked == false then
  707. h.Health = h.Health - Damage
  708. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  709. else
  710. h.Health = h.Health - (Damage / 2)
  711. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  712. end
  713. if Type == "Knockdown" then
  714. local hum = hit.Parent.Humanoid
  715. hum.PlatformStand = true
  716. coroutine.resume(coroutine.create(function(HHumanoid)
  717. swait(1)
  718. HHumanoid.PlatformStand = false
  719. end), hum)
  720. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  721. local bodvol = Create("BodyVelocity"){
  722. velocity = angle * knockback,
  723. P = 5000,
  724. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  725. Parent = hit,
  726. }
  727. local rl = Create("BodyAngularVelocity"){
  728. P = 3000,
  729. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  730. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  731. Parent = hit,
  732. }
  733. game:GetService("Debris"):AddItem(bodvol, .5)
  734. game:GetService("Debris"):AddItem(rl, .5)
  735. elseif Type == "Normal" then
  736. local vp = Create("BodyVelocity"){
  737. P = 500,
  738. maxForce = Vector3.new(math.huge, 0, math.huge),
  739. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  740. }
  741. if knockback > 0 then
  742. vp.Parent = hit.Parent.Torso
  743. end
  744. game:GetService("Debris"):AddItem(vp, .5)
  745. elseif Type == "Up" then
  746. local bodyVelocity = Create("BodyVelocity"){
  747. velocity = Vector3.new(0, 20, 0),
  748. P = 5000,
  749. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  750. Parent = hit,
  751. }
  752. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  753. elseif Type == "DarkUp" then
  754. coroutine.resume(coroutine.create(function()
  755. for i = 0, 1, 0.1 do
  756. swait()
  757. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  758. end
  759. end))
  760. local bodyVelocity = Create("BodyVelocity"){
  761. velocity = Vector3.new(0, 20, 0),
  762. P = 5000,
  763. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  764. Parent = hit,
  765. }
  766. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  767. elseif Type == "Snare" then
  768. local bp = Create("BodyPosition"){
  769. P = 2000,
  770. D = 100,
  771. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  772. position = hit.Parent.Torso.Position,
  773. Parent = hit.Parent.Torso,
  774. }
  775. game:GetService("Debris"):AddItem(bp, 1)
  776. elseif Type == "Freeze" then
  777. local BodPos = Create("BodyPosition"){
  778. P = 50000,
  779. D = 1000,
  780. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  781. position = hit.Parent.Torso.Position,
  782. Parent = hit.Parent.Torso,
  783. }
  784. local BodGy = Create("BodyGyro") {
  785. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  786. P = 20e+003,
  787. Parent = hit.Parent.Torso,
  788. cframe = hit.Parent.Torso.CFrame,
  789. }
  790. hit.Parent.Torso.Anchored = true
  791. coroutine.resume(coroutine.create(function(Part)
  792. swait(1.5)
  793. Part.Anchored = false
  794. end), hit.Parent.Torso)
  795. game:GetService("Debris"):AddItem(BodPos, 3)
  796. game:GetService("Debris"):AddItem(BodGy, 3)
  797. end
  798. local debounce = Create("BoolValue"){
  799. Name = "DebounceHit",
  800. Parent = hit.Parent,
  801. Value = true,
  802. }
  803. game:GetService("Debris"):AddItem(debounce, Delay)
  804. c = Create("ObjectValue"){
  805. Name = "creator",
  806. Value = Player,
  807. Parent = h,
  808. }
  809. game:GetService("Debris"):AddItem(c, .5)
  810. end
  811. end
  812.  
  813. function ShowDamage(Pos, Text, Time, Color)
  814. local Rate = (1 / 30)
  815. local Pos = (Pos or Vector3.new(0, 0, 0))
  816. local Text = (Text or "")
  817. local Time = (Time or 2)
  818. local Color = (Color or Color3.new(1, 0, 1))
  819. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  820. EffectPart.Anchored = true
  821. local BillboardGui = Create("BillboardGui"){
  822. Size = UDim2.new(3, 0, 3, 0),
  823. Adornee = EffectPart,
  824. Parent = EffectPart,
  825. }
  826. local TextLabel = Create("TextLabel"){
  827. BackgroundTransparency = 1,
  828. Size = UDim2.new(1, 0, 1, 0),
  829. Text = Text,
  830. Font = "Highway",
  831. TextColor3 = Color,
  832. TextScaled = true,
  833. Parent = BillboardGui,
  834. }
  835. game.Debris:AddItem(EffectPart, (Time))
  836. EffectPart.Parent = game:GetService("Workspace")
  837. delay(0, function()
  838. local Frames = (Time / Rate)
  839. for Frame = 1, Frames do
  840. wait(Rate)
  841. local Percent = (Frame / Frames)
  842. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  843. TextLabel.TextTransparency = Percent
  844. end
  845. if EffectPart and EffectPart.Parent then
  846. EffectPart:Destroy()
  847. end
  848. end)
  849. end
  850.  
  851. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  852. for _, c in pairs(workspace:children()) do
  853. local hum = c:findFirstChild("Humanoid")
  854. if hum ~= nil then
  855. local head = c:findFirstChild("Head")
  856. if head ~= nil then
  857. local targ = head.Position - Part.Position
  858. local mag = targ.magnitude
  859. if magni >= mag and c.Name ~= plr.Name then
  860. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=231917784", 1.2)
  861. end
  862. end
  863. end
  864. end
  865. end
  866.  
  867. function HitboxFunction(Pose, lifetime, siz1, siz2, siz3, Radie, Min, Max, kb, atype)
  868. Hitboxpart = Instance.new("Part", EffectModel)
  869. Hitboxpart.Size = Vector3.new(siz1, siz2, siz3)
  870. Hitboxpart.CanCollide = false
  871. Hitboxpart.Transparency = 1
  872. Hitboxpart.Anchored = true
  873. Hitboxpart.CFrame = Pose
  874. game:GetService("Debris"):AddItem(Hitboxpart, lifetime)
  875. MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype)
  876. end
  877.  
  878. ---*\\
  879.  
  880. local hum = chr.Humanoid
  881.  
  882. function CreateWave(inair,size,doesrotate,rotatedirection,waitt,part,offset,BrickColor)
  883. spawn(function()
  884. local wave = CreatePart(3, workspace, "Neon", 0, 0.5, BrickColor, "Effect", VT(0,0,0))
  885. local mesh = Instance.new("SpecialMesh",wave)
  886. mesh.MeshType = "FileMesh"
  887. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  888. mesh.Scale = Vector3.new(size,size,size)
  889. mesh.Offset = Vector3.new(0,0,-size/8)
  890. wave.CFrame = CFrame.new(part.Position) * CFrame.new(0,offset,0) * CFrame.Angles(RAD(inair),RAD(0),RAD(0))
  891. coroutine.resume(coroutine.create(function(PART)
  892. for i = 1, waitt do
  893. Swait()
  894. mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
  895. mesh.Offset = Vector3.new(0,0,-(mesh.Scale.X/8))
  896. if doesrotate == true then
  897. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
  898. end
  899. wave.Transparency = wave.Transparency + (0.5/waitt)
  900. if wave.Transparency > 0.99 then
  901. wave:remove()
  902. end
  903. end
  904. end))
  905. end)
  906. end
  907.  
  908. attack = false
  909. function PT(Part,Time)
  910. --aaa
  911. end
  912. --[[
  913. local plr = game.Players.LocalPlayer
  914. local char = plr.Character
  915. local torso = char.Torso
  916. local head = char.Head
  917. local att = 1
  918. local pewcom = 1
  919. maus.KeyDown:connect(function(kei)
  920. if kei == "r" then
  921. if attack == false then
  922. attack = true
  923. if pewcom == 1 then
  924. for i = 0, 1, 0.1 do
  925. wait()
  926. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(90)),.7)
  927. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  928. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  929. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  930. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  931. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),.7)
  932. end
  933. pew(rarm)
  934. pewcom = 2
  935. elseif pewcom == 2 then
  936. for i = 0, 1, 0.1 do
  937. wait()
  938. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  939. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(-90)),.7)
  940. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  941. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  942. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
  943. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0)),.7)
  944. end
  945. pew(larm)
  946. pewcom = 1
  947. end
  948. end
  949. attack = false
  950. end
  951. end)
  952.  
  953.  
  954. maus.KeyDown:connect(function(kei)
  955. if kei == "q" then
  956. if attack == false then
  957. attack = true
  958. for i = 0, 1, 0.1 do
  959. wait()
  960. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
  961. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  962. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  963. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  964. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  965. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
  966. end
  967. wait(.4)
  968. for i = 0, 1, 0.1 do
  969. wait()
  970. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(0),math.rad(150)),.7)
  971. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  972. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  973. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  974. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  975. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
  976. end
  977. function sphere()
  978. AExplodeP = Instance.new("Part",workspace)
  979. AExplodeP.Anchored = true
  980. AExplodeP.TopSurface = 0
  981. AExplodeP.Material = "Neon"
  982. AExplodeP.BottomSurface = 0
  983. AExplodeP.CanCollide = false
  984. AExplodeP.CFrame = chr["Right Arm"].CFrame*CFrame.new(0,-3,0)
  985. AExplodeP.BrickColor = BrickColor.new(modeColor)
  986. AExplodeP.Size = Vector3.new(1,1,1)
  987. AExplodeM = Instance.new("SpecialMesh",AExplodeP)
  988. AExplodeM.MeshType = "Sphere"
  989. for i = 1,10,2 do wait()
  990. AExplodeM.Scale = Vector3.new(i,i,i)
  991. AExplodeP.Transparency = i/50
  992. end
  993. AExplodeP:Remove()
  994. end
  995. for i = 1,10 do
  996. sphere()
  997. end
  998. spawn(function()
  999. lasering = true
  1000. for i = 0, 1, 0.1 do
  1001. wait()
  1002. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
  1003. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  1004. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  1005. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  1006. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  1007. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
  1008. end
  1009. wait(5)
  1010. lasering = false
  1011. attack = false
  1012. end)
  1013. end
  1014. end
  1015. end)
  1016.  
  1017.  
  1018. maus.Button1Down:connect(function(key)
  1019. if attack == false then
  1020. attack = true
  1021. if att == 1 then
  1022. for i = 0, 1, 0.1 do
  1023. wait()
  1024. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(120),math.rad(90)),.7)
  1025. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  1026. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  1027. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  1028. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
  1029. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(0)),.7)
  1030. end
  1031. wait(.1)
  1032. HitboxFunction(rarm.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
  1033. if shad == true then
  1034. CreateWave(0,3.5,true,0.2,25,rarm,-1,BrickColor.new("Really black"))
  1035. CreateWave(0,3,true,-0.2,25,rarm,-1,BrickColor.new("Really black"))
  1036. CreateWave(0,2.5,true,0.2,25,rarm,-1,BrickColor.new("Really black"))
  1037. CreateWave(0,2,true,-0.2,25,rarm,-1,BrickColor.new("Really black"))
  1038. else
  1039. CreateWave(0,3.5,true,0.2,25,rarm,-1,BrickColor.new("White"))
  1040. CreateWave(0,3,true,-0.2,25,rarm,-1,BrickColor.new("White"))
  1041. CreateWave(0,2.5,true,0.2,25,rarm,-1,BrickColor.new("White"))
  1042. CreateWave(0,2,true,-0.2,25,rarm,-1,BrickColor.new("White"))
  1043. end
  1044. for i = 0, 1, 0.1 do
  1045. wait()
  1046. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,math.rad(40),math.rad(90)),.7)
  1047. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  1048. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  1049. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  1050. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  1051. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
  1052. end
  1053. att = 2
  1054. attack = false
  1055. elseif att == 2 then
  1056. attack = true
  1057.  
  1058. for i = 0, 1, 0.1 do
  1059. wait()
  1060. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  1061. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(-120),math.rad(-90)),.7)
  1062. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  1063. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  1064. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(-70),0),.7)
  1065. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(0)),.7)
  1066. end
  1067. wait(.1)
  1068. HitboxFunction(larm.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
  1069. if shad == true then
  1070. CreateWave(0,3.5,true,0.2,25,larm,-1,BrickColor.new("Really black"))
  1071. CreateWave(0,3,true,-0.2,25,larm,-1,BrickColor.new("Really black"))
  1072. CreateWave(0,2.5,true,0.2,25,larm,-1,BrickColor.new("Really black"))
  1073. CreateWave(0,2,true,-0.2,25,larm,-1,BrickColor.new("Really black"))
  1074. else
  1075. CreateWave(0,3.5,true,0.2,25,larm,-1,BrickColor.new("White"))
  1076. CreateWave(0,3,true,-0.2,25,larm,-1,BrickColor.new("White"))
  1077. CreateWave(0,2.5,true,0.2,25,larm,-1,BrickColor.new("White"))
  1078. CreateWave(0,2,true,-0.2,25,larm,-1,BrickColor.new("White"))
  1079. end
  1080. for i = 0, 1, 0.1 do
  1081. wait()
  1082. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.7)
  1083. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,math.rad(-40),math.rad(-90)),.7)
  1084. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.7)
  1085. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(0,0,math.rad(2.5)),.7)
  1086. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(70),0),.7)
  1087. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(0)),.7)
  1088. end
  1089. att = 3
  1090. attack = false
  1091. elseif att == 3 then
  1092. attack = true
  1093.  
  1094. for i = 0, 1, 0.1 do
  1095. wait()
  1096. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(0,0,math.rad(3)),.5)
  1097. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(0,0,math.rad(-3)),.5)
  1098. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.5)
  1099. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1,-1)*CFrame.Angles(math.rad(-20),0,math.rad(2.5)),.5)
  1100. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),.5)
  1101. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(30),math.rad(0),math.rad(0)),.5)
  1102. end
  1103. wait(.1)
  1104. HitboxFunction(rleg.CFrame, 0.01, 1, 1, 1, 7, 24, 36, 3, "Normal")
  1105. if shad == true then
  1106. CreateWave(0,3.5,true,0.2,25,rleg,-1,BrickColor.new("Really black"))
  1107. CreateWave(0,3,true,-0.2,25,rleg,-1,BrickColor.new("Really black"))
  1108. CreateWave(0,2.5,true,0.2,25,rleg,-1,BrickColor.new("Really black"))
  1109. CreateWave(0,2,true,-0.2,25,rleg,-1,BrickColor.new("Really black"))
  1110. else
  1111. CreateWave(0,3.5,true,0.2,25,rleg,-1,BrickColor.new("White"))
  1112. CreateWave(0,3,true,-0.2,25,rleg,-1,BrickColor.new("White"))
  1113. CreateWave(0,2.5,true,0.2,25,rleg,-1,BrickColor.new("White"))
  1114. CreateWave(0,2,true,-0.2,25,rleg,-1,BrickColor.new("White"))
  1115. end
  1116. for i = 0, 1, 0.1 do
  1117. wait()
  1118. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-30),0,math.rad(3)),.5)
  1119. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-30),0,math.rad(-3)),.5)
  1120. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,0)*CFrame.Angles(0,0,math.rad(-2.5)),.5)
  1121. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,-1)*CFrame.Angles(0,0,math.rad(2.5)),.5)
  1122. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0),.5)
  1123. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,2,0)*CFrame.Angles(math.rad(-30),math.rad(0),math.rad(0)),.5)
  1124. end
  1125. wait(.3)
  1126. att = 1
  1127. attack = false
  1128. end
  1129. end
  1130. end)--]]
  1131.  
  1132.  
  1133. game:service'RunService'.RenderStepped:connect(function()
  1134. if anim~=lastanim then
  1135. runtime=0
  1136. end
  1137. lastanim=anim
  1138. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  1139. syne=syne+.95
  1140. if not otheranims and not swimming then
  1141. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1142. anim="Idling"
  1143. elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1144. anim="Walking"
  1145. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1146. anim="Sprinting"
  1147. elseif chr.Humanoid.Jump then
  1148. anim='Jumping'
  1149. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  1150. anim='Falling'
  1151. end
  1152. end
  1153.  
  1154.  
  1155. if anim=="Idling" and attack == false then
  1156. idlesineinc=35
  1157. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.1,.35+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(-40)),.1)
  1158. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.35+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(30)),.1)
  1159. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
  1160. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
  1161. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,math.rad(-60),0),.1)
  1162. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(60),math.rad(0)),.1)
  1163. end
  1164.  
  1165. if anim=="Walking" and attack == false then
  1166. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(.9,0.15+math.cos(syne/idlesineinc)/25,-.5)*CFrame.Angles(math.rad(40),0,math.rad(-60)),.1)
  1167. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.5+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(40),0,math.rad(10)),.1)
  1168. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
  1169. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
  1170. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
  1171. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-3.5),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
  1172. end
  1173.  
  1174. if anim=="Sprinting" and attack == false then
  1175. RunSpeed = 50
  1176. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(.9,0.15+math.cos(syne/idlesineinc)/25,-.5)*CFrame.Angles(math.rad(170),0,math.rad(-60)),.1)
  1177. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.1,.1+math.cos(syne/idlesineinc)/25,-.2)*CFrame.Angles(math.rad(170),0,math.rad(10)),.1)
  1178. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.2)
  1179. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.2)
  1180. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
  1181. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-10),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
  1182. end
  1183.  
  1184. if anim=="Jumping" and attack == false then
  1185. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1)
  1186. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1)
  1187. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-2.3,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1)
  1188. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-2,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1)
  1189. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1)
  1190. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
  1191. end
  1192.  
  1193. if anim=="Falling" and attack == false then
  1194. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035)
  1195. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035)
  1196. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035)
  1197. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035)
  1198. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035)
  1199. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035)
  1200. end
  1201.  
  1202. if runnin and not otheranims and not swimming then
  1203. chr.Humanoid.WalkSpeed=RunSpeed
  1204. elseif not runnin and not otheranims and not swimming then
  1205. chr.Humanoid.WalkSpeed=WlkSpeed
  1206. end
  1207. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement