Advertisement
HenloMyDude

jevil v5 (r15) i guess

Oct 24th, 2019
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.35 KB | None | 0 0
  1. --Jevil V5 by HenloMyDude--
  2.  
  3. Player = owner
  4. Mouse = Player:GetMouse()
  5. IT = Instance.new
  6. CF = CFrame.new
  7. VT = Vector3.new
  8. RAD = math.rad
  9. C3 = Color3.new
  10. UD2 = UDim2.new
  11. BRICKC = BrickColor.new
  12. ANGLES = CFrame.Angles
  13. EULER = CFrame.fromEulerAnglesXYZ
  14. COS = math.cos
  15. ACOS = math.acos
  16. SIN = math.sin
  17. ASIN = math.asin
  18. ABS = math.abs
  19. MRANDOM = math.random
  20. FLOOR = math.floor
  21.  
  22. --Character Set up.--
  23.  
  24. Player.Character.Archivable = true
  25. Character = Player.Character:Clone()
  26. Character.Parent = script
  27. Player.Character = Character
  28. RootPart = Character.HumanoidRootPart
  29.  
  30. ---------------------
  31.  
  32. --Camera Set Up.--
  33.  
  34. CamSetUp = true
  35. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  36.  
  37. Stuff = Instance.new("Model",script)
  38. Stuff.Name = "Stuffs"
  39.  
  40. if CamSetUp then
  41. Camera = NLS([[
  42.  
  43. Script = script
  44. Script.Name = "CameraFix"
  45. Player = owner
  46. Character = Player.Character
  47. Camera = Workspace.CurrentCamera
  48. while true do
  49. wait()
  50. if Character then
  51. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  52. if Humanoid then
  53. Camera.CameraSubject = Humanoid
  54. end
  55. end
  56. end
  57.  
  58. ]],Character)
  59. end
  60.  
  61. ------------------
  62.  
  63. --Sounds.--
  64.  
  65. NewSound = function(p, id, pit, vol, loop)
  66. local Sound = Instance.new("Sound",p)
  67. Sound.Pitch = pit
  68. Sound.Volume = vol
  69. Sound.SoundId = "rbxassetid://" ..id
  70. Sound.Looped = loop
  71. Sound:Play()
  72. return Sound
  73. end
  74.  
  75. -----------
  76.  
  77. --Heartbeat.--
  78.  
  79. ArtificialHB = Instance.new("BindableEvent", script)
  80. ArtificialHB.Name = "ArtificialHB"
  81.  
  82. script:WaitForChild("ArtificialHB")
  83.  
  84. frame = 1 / 60
  85. tf = 0
  86. allowframeloss = false
  87. tossremainder = false
  88. lastframe = tick()
  89. script.ArtificialHB:Fire()
  90.  
  91. game:GetService("RunService").Heartbeat:connect(function(s, p)
  92. tf = tf + s
  93. if tf >= frame then
  94. if allowframeloss then
  95. script.ArtificialHB:Fire()
  96. lastframe = tick()
  97. else
  98. for i = 1, math.floor(tf / frame) do
  99. script.ArtificialHB:Fire()
  100. end
  101. lastframe = tick()
  102. end
  103. if tossremainder then
  104. tf = 0
  105. else
  106. tf = tf - frame * math.floor(tf / frame)
  107. end
  108. end
  109. end)
  110.  
  111. --------------
  112.  
  113. --Functions.--
  114.  
  115. function Swait(NUMBER)
  116. if NUMBER == 0 or NUMBER == nil then
  117. ArtificialHB.Event:wait()
  118. else
  119. for i = 1, NUMBER do
  120. ArtificialHB.Event:wait()
  121. end
  122. end
  123. end
  124.  
  125. function QuaternionFromCFrame(cf)
  126. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  127. local trace = m00 + m11 + m22
  128. if trace > 0 then
  129. local s = math.sqrt(1 + trace)
  130. local recip = 0.5 / s
  131. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  132. else
  133. local i = 0
  134. if m11 > m00 then
  135. i = 1
  136. end
  137. if m22 > (i == 0 and m00 or m11) then
  138. i = 2
  139. end
  140. if i == 0 then
  141. local s = math.sqrt(m00 - m11 - m22 + 1)
  142. local recip = 0.5 / s
  143. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  144. elseif i == 1 then
  145. local s = math.sqrt(m11 - m22 - m00 + 1)
  146. local recip = 0.5 / s
  147. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  148. elseif i == 2 then
  149. local s = math.sqrt(m22 - m00 - m11 + 1)
  150. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  151. end
  152. end
  153. end
  154.  
  155. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  156. local xs, ys, zs = x + x, y + y, z + z
  157. local wx, wy, wz = w * xs, w * ys, w * zs
  158. local xx = x * xs
  159. local xy = x * ys
  160. local xz = x * zs
  161. local yy = y * ys
  162. local yz = y * zs
  163. local zz = z * zs
  164. 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))
  165. end
  166.  
  167. function QuaternionSlerp(a, b, t)
  168. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  169. local startInterp, finishInterp;
  170. if cosTheta >= 0.0001 then
  171. if (1 - cosTheta) > 0.0001 then
  172. local theta = ACOS(cosTheta)
  173. local invSinTheta = 1 / SIN(theta)
  174. startInterp = SIN((1 - t) * theta) * invSinTheta
  175. finishInterp = SIN(t * theta) * invSinTheta
  176. else
  177. startInterp = 1 - t
  178. finishInterp = t
  179. end
  180. else
  181. if (1 + cosTheta) > 0.0001 then
  182. local theta = ACOS(-cosTheta)
  183. local invSinTheta = 1 / SIN(theta)
  184. startInterp = SIN((t - 1) * theta) * invSinTheta
  185. finishInterp = SIN(t * theta) * invSinTheta
  186. else
  187. startInterp = t - 1
  188. finishInterp = t
  189. end
  190. end
  191. 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
  192. end
  193.  
  194. function Clerp(a, b, t)
  195. local qa = {QuaternionFromCFrame(a)}
  196. local qb = {QuaternionFromCFrame(b)}
  197. local ax, ay, az = a.x, a.y, a.z
  198. local bx, by, bz = b.x, b.y, b.z
  199. local _t = 1 - t
  200. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  201. end
  202.  
  203. --------------
  204.  
  205. --Motors.--
  206.  
  207. ---------------------------------------------------
  208. local LeftUpperArm = Character.LeftUpperArm
  209. local LeftShoulder = Character.LeftUpperArm.LeftShoulder
  210. local LSnor = LeftShoulder.C0
  211. local LeftLowerArm = Character.LeftLowerArm
  212. local LeftElbow = Character.LeftLowerArm.LeftElbow
  213. local LEnor = LeftElbow.C0
  214. --------------------------------------------------------
  215. local LeftUpperLeg = Character.LeftUpperLeg
  216. local LeftHip = Character.LeftUpperLeg.LeftHip
  217. local LHnor = LeftHip.C0
  218. local LeftLowerLeg = Character.LeftLowerLeg
  219. local LeftKnee = Character.LeftLowerLeg.LeftKnee
  220. local LKnor = LeftKnee.C0
  221. local LeftAnkle = Character.LeftFoot.LeftAnkle
  222. local LAnor = LeftAnkle.C0
  223. ----------------------------------------------------------
  224. local RightUpperArm = Character.RightUpperArm
  225. local RightShoulder = Character.RightUpperArm.RightShoulder
  226. local RSnor = RightShoulder.C0
  227. local RightLowerArm = Character.RightLowerArm
  228. local RightElbow = Character.RightLowerArm.RightElbow
  229. local REnor = RightElbow.C0
  230. ----------------------------------------------------------
  231. local RightUpperLeg = Character.RightUpperLeg
  232. local RightHip = Character.RightUpperLeg.RightHip
  233. local RHnor = RightHip.C0
  234. local RightLowerLeg = Character.RightLowerLeg
  235. local RightKnee = Character.RightLowerLeg.RightKnee
  236. local RKnor = RightKnee.C0
  237. local RightAnkle = Character.RightFoot.RightAnkle
  238. local RAnor = RightAnkle.C0
  239. ----------------------------------------------------------
  240. local UpperTorso = Character.UpperTorso
  241. local Waist = UpperTorso.Waist
  242. local Waistnor = Waist.C0
  243. local LowerTorso = Character.LowerTorso
  244. --local LTnor = LowerTorso.C0
  245. local Root = Character.LowerTorso.Root
  246. local Rootnor = Root.C0
  247. local RootPart = Character.HumanoidRootPart
  248. local LeftHand = Character.LeftHand
  249. --local LHnor = LeftHand.C0
  250. local RightHand = Character.RightHand
  251. --local RHnor = RightHand.C0
  252. local LeftFoot = Character.LeftFoot
  253. --local LFnor = LeftFoot.C0
  254. local RightFoot = Character.RightFoot
  255. --local RFnor = RightFoot.C0
  256. local RightWrist= RightHand.RightWrist
  257. local RWnor = RightWrist.C0
  258. local LeftWrist= LeftHand.LeftWrist
  259. local LWnor = LeftWrist.C0
  260. --------------------------------------------
  261. local Head = Character.Head
  262. local Neck = Head.Neck
  263. local Necknor = Neck.C0
  264.  
  265. -----------
  266.  
  267. --Useful Values.--
  268.  
  269. Frame_Speed = 1 / 60
  270. Animation_Speed = 3
  271. Speed = 16
  272. Pose = "Idle"
  273. Cos = math.cos
  274. sine = 0
  275. State = Humanoid:GetState()
  276. Debris = game:GetService("Debris")
  277. Attack = false
  278. Rad = math.rad
  279. Fallen = false
  280. AntiNil = true
  281. Hold = false
  282. Animator = Humanoid.Animator
  283. Mode = "None"
  284. OnlyHead = false
  285.  
  286. ------------------
  287.  
  288. --Mouse.--
  289.  
  290. local mouse = {Hit = CFrame.new(0, 0, 0)}
  291. local remote = Instance.new("RemoteEvent")
  292. remote.Name = "UserInputStuff"
  293. remote.Parent = NLS([==[
  294. local plr = game:GetService("Players").LocalPlayer
  295. local mouse = plr:GetMouse()
  296. local char = plr.Character
  297. local hum = char:FindFirstChildOfClass("Humanoid")
  298.  
  299. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  300. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  301. script:WaitForChild("UserInputStuff"):FireServer("UserInputService", input.KeyCode)
  302. end
  303. end)
  304.  
  305. while game:GetService("RunService").RenderStepped:Wait() do
  306. for i,v in pairs(hum:GetPlayingAnimationTracks()) do
  307. v:Stop()
  308. end
  309. if script:FindFirstChild("UserInputStuff") then
  310. script.UserInputStuff:FireServer("MouseInfo", mouse.Hit)
  311. end
  312. end
  313. ]==], Character)
  314.  
  315. ----------
  316.  
  317. --Attacks.--
  318.  
  319. function fiteme()
  320. if Mode == "None" then
  321. Mode = "Fight"
  322. else
  323. Mode = "None"
  324. end
  325. end
  326.  
  327. function sprinty()
  328. if Speed == 30 then
  329. Speed = 16
  330. else
  331. Speed = 30
  332. end
  333. end
  334.  
  335. char = Character
  336. rootpart = RootPart
  337. head = Head
  338.  
  339. function spade1()
  340. for i = 1, 10 do
  341. for i = 1, 15 do
  342. game:GetService("RunService").Stepped:Wait()
  343. for i,v in pairs(char:GetDescendants()) do
  344. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" or v:IsA("MeshPart") then
  345. v.Transparency = 0
  346. end
  347. if v:IsA("Decal") then
  348. v.Transparency = 0
  349. end
  350. end
  351. end
  352. local oldpos = rootpart.Position
  353. local dist = (rootpart.Position - mouse.Hit.Position).Magnitude
  354. if dist > 30 then
  355. dist = 30
  356. end
  357. rootpart.CFrame = CFrame.new(oldpos + CFrame.new(oldpos, mouse.Hit.Position).LookVector * dist + Vector3.new(0, 6, 0), Vector3.new(oldpos.X, rootpart.Position.Y, oldpos.Z)) * CFrame.Angles(0, math.pi, 0)
  358. for i,v in pairs(char:GetDescendants()) do
  359. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" or v:IsA("MeshPart") then
  360. v.Transparency = 0
  361. end
  362. if v:IsA("Decal") then
  363. v.Transparency = 0
  364. end
  365. end
  366. for i,v in pairs(char:GetDescendants()) do
  367. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" or v:IsA("MeshPart") then
  368. v.Transparency = 0
  369. end
  370. if v:IsA("Decal") then
  371. v.Transparency = 0
  372. end
  373. end
  374. local sound = Instance.new("Sound")
  375. sound.SoundId = "rbxassetid://2545012765"
  376. sound.Volume = 10
  377. sound.Parent = head
  378. sound:Play()
  379. for amount = 1, 5 do
  380. local spade = Instance.new("Part")
  381. spade.Name = "Spade"
  382. spade.Anchored = true
  383. spade.CanCollide = false
  384. spade.Size = Vector3.new(1, 0.05, 1)
  385. if amount == 1 then
  386. spade.CFrame = CFrame.new(head.Position, mouse.Hit.Position) * CFrame.Angles(0, math.pi / 2, 0)
  387. elseif amount == 2 then
  388. spade.CFrame = CFrame.new(head.Position, mouse.Hit.Position) * CFrame.Angles(0, math.rad(100), 0)
  389. elseif amount == 3 then
  390. spade.CFrame = CFrame.new(head.Position, mouse.Hit.Position) * CFrame.Angles(0, math.rad(80), 0)
  391. elseif amount == 4 then
  392. spade.CFrame = CFrame.new(head.Position, mouse.Hit.Position) * CFrame.Angles(0, math.rad(110), 0)
  393. elseif amount == 5 then
  394. spade.CFrame = CFrame.new(head.Position, mouse.Hit.Position) * CFrame.Angles(0, math.rad(70), 0)
  395. end
  396. spade.Parent = char
  397. local decal1 = Instance.new("Decal")
  398. decal1.Texture = "rbxassetid://2700856195"
  399. decal1.Face = Enum.NormalId.Top
  400. decal1.Parent = spade
  401. local decal2 = Instance.new("Decal")
  402. decal2.Texture = "rbxassetid://2700856195"
  403. decal2.Face = Enum.NormalId.Bottom
  404. decal2.Parent = spade
  405. local debounce = false
  406. spade.Touched:Connect(function(hit)
  407. end)
  408. spawn(function()
  409. for i = 1, 180 do
  410. game:GetService("RunService").Stepped:Wait()
  411. for i,v in pairs(spade:GetTouchingParts()) do
  412. if not v:IsDescendantOf(char) and debounce == false then
  413. if v.Parent and v.Parent:FindFirstChildOfClass("Humanoid") then
  414. debounce = true
  415. v.Parent:FindFirstChildOfClass("Humanoid").Health = v.Parent:FindFirstChildOfClass("Humanoid").Health - 20
  416. coroutine.resume(coroutine.create(function()
  417. wait(0.4)
  418. debounce = false
  419. end))
  420. end
  421. end
  422. end
  423. spade.Transparency = 1
  424. spade.CFrame = spade.CFrame * CFrame.new(0.5, 0, 0)
  425. end
  426. for i = 1, 10 do
  427. game:GetService("RunService").Stepped:Wait()
  428. spade.CFrame = spade.CFrame * CFrame.new(0.5, 0, 0)
  429. decal1.Transparency = decal1.Transparency + 0.1
  430. decal2.Transparency = decal2.Transparency + 0.1
  431. end
  432. spade:Destroy()
  433. end)
  434. end
  435. end
  436. end
  437.  
  438. ------------
  439.  
  440. --Assign keys.--
  441.  
  442. local Remote = Instance.new("RemoteEvent",Character)
  443. Remote.Name = "remotey"
  444.  
  445. function KeyDo(name)
  446. if name == "fiteme" and Attack == false then
  447. fiteme()
  448. end
  449. if name == "spade1" and Attack == false then
  450. spade1()
  451. end
  452. if name == "sprinty" and Attack == false then
  453. sprinty()
  454. end
  455. end
  456.  
  457. RemoteClient = NLS([[
  458.  
  459. local Player = owner
  460. local Character = Player.Character
  461. local Mouse = Player:GetMouse()
  462. local Remote = Character.remotey
  463. local Attack = false
  464.  
  465. Mouse.KeyDown:connect(function(key)
  466. if key == "p" then
  467. Remote:FireServer("fiteme")
  468. end
  469. if key == "z" then
  470. Remote:FireServer("spade1")
  471. end
  472. if key == "m" then
  473. Remote:FireServer("sprinty")
  474. end
  475. end)
  476.  
  477. ]],Character)
  478.  
  479. Remote.OnServerEvent:Connect(function(PlayerSendit,Button) KeyDo(Button) end)
  480.  
  481. ----------------
  482.  
  483. --Damage.--
  484.  
  485. function HurtAnim()
  486. OnlyHead = true
  487. for i = 1,35 do
  488. Swait()
  489. Neck.C0 = Neck.C0:Lerp(Necknor * CFrame.new(0 - 1 * Cos(sine / 6), 2, 0) * ANGLES(0, 0, 0 + 1 * Cos(sine / 6)), 0.15)
  490. end
  491. OnlyHead = false
  492. end
  493.  
  494. local h = Character.Humanoid
  495. local hp = h.Health
  496.  
  497. function HealthChanged()
  498. if h.Health < hp then
  499. if h.Health > 0 then
  500. HurtAnim()
  501. end
  502. end
  503. hp = h.Health
  504. end
  505.  
  506. h.HealthChanged:Connect(HealthChanged)
  507.  
  508. -----------
  509.  
  510. --Animations.--
  511.  
  512. function E1()
  513. for i = 1,17 do
  514. Swait()
  515. Neck.C0 = Clerp(Neck.C0, Necknor * CFrame.Angles(0, Rad(-45), 0), 1 / Animation_Speed)
  516. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  517. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0,0, 0) * CFrame.Angles(0, Rad(45), 0), 3 / Animation_Speed)
  518. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.Angles(Rad(90) + Rad(45), 0, Rad(45)), 3 / Animation_Speed)
  519. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(Rad(-45), 0, Rad(45)), 1 / Animation_Speed)
  520. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  521. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  522. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  523. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  524. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.new(0, 0.5, -0.5) * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  525. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  526. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  527. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  528. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  529. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  530. end
  531. end
  532.  
  533. function E2()
  534. for i = 1,17 do
  535. Swait()
  536. Neck.C0 = Clerp(Neck.C0, Necknor * CFrame.Angles(0, Rad(45), 0), 1 / Animation_Speed)
  537. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  538. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0,0, 0) * CFrame.Angles(0, Rad(-45), 0), 3 / Animation_Speed)
  539. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.Angles(Rad(45), 0, Rad(45)), 3 / Animation_Speed)
  540. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(Rad(90) + Rad(45), 0, Rad(-45)), 1 / Animation_Speed)
  541. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0,0), 1 / Animation_Speed)
  542. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  543. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  544. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  545. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  546. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.new(0, 0.5, -0.5) * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  547. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  548. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  549. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  550. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  551. end
  552. end
  553.  
  554. Humanoid.Health = 2500
  555. while true do
  556. Swait()
  557. Animator.Parent = nil
  558. Character.Parent = script
  559. State = Humanoid:GetState()
  560. sine = sine + 1
  561. Humanoid.WalkSpeed = Speed
  562. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  563. local Y = RootPart.Velocity.Y
  564. local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity/1.6))
  565. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  566. if Fallen == false then
  567. Humanoid.PlatformStand = false
  568. else
  569. Humanoid.PlatformStand = true
  570. end
  571. if TORSOVELOCITY < 1 and State ~= Enum.HumanoidStateType.Climbing then
  572. Pose = "Idle"
  573. if Mode == "None" and Attack == false and OnlyHead == false then
  574. Neck.C0 = Clerp(Neck.C0, Necknor, 1 / Animation_Speed)
  575. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  576. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0, 1.5 + 0.3 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  577. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.new(0, -0.5, 0) * CFrame.Angles(0, 0, 1), 1 / Animation_Speed)
  578. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(Rad(-45), 0, Rad(45)), 1 / Animation_Speed)
  579. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0, 0.5), 1 / Animation_Speed)
  580. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0.1), 1 / Animation_Speed)
  581. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 1.5), 1 / Animation_Speed)
  582. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  583. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0, -0.5, 0), 1 / Animation_Speed)
  584. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0, 0.5, 0), 1 / Animation_Speed)
  585. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  586. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  587. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  588. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  589. elseif Mode == "Fight" and Attack == false then
  590. E1()
  591. for i = 1,20 do
  592. Neck.C0 = Clerp(Neck.C0, Necknor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  593. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  594. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0,0, 0) * CFrame.Angles(0, 0, Rad(0)), 3 / Animation_Speed)
  595. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.Angles(0, 0, Rad(0) + Rad(0)), 3 / Animation_Speed)
  596. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  597. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0,0), 1 / Animation_Speed)
  598. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  599. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  600. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  601. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  602. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  603. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  604. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  605. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  606. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  607. end
  608. E2()
  609. for i = 1,20 do
  610. Neck.C0 = Clerp(Neck.C0, Necknor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  611. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  612. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0,0, 0) * CFrame.Angles(0, 0, Rad(0)), 3 / Animation_Speed)
  613. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.Angles(0, 0, Rad(0) + Rad(0)), 3 / Animation_Speed)
  614. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  615. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0,0), 1 / Animation_Speed)
  616. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  617. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  618. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  619. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  620. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0, 0, 0), 3 / Animation_Speed)
  621. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  622. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  623. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  624. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  625. end
  626. elseif Mode == "None" and Attack == true and OnlyHead == true then
  627. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  628. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0, 1.5 + 0.3 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  629. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.new(0, -0.5, 0) * CFrame.Angles(0, 0, 1), 1 / Animation_Speed)
  630. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(Rad(-45), 0, Rad(45)), 1 / Animation_Speed)
  631. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0, 0.5), 1 / Animation_Speed)
  632. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0.1), 1 / Animation_Speed)
  633. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 1.5), 1 / Animation_Speed)
  634. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  635. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0, -0.5, 0), 1 / Animation_Speed)
  636. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0, 0.5, 0), 1 / Animation_Speed)
  637. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  638. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  639. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  640. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  641. elseif Mode == "Fight" and Attack == true and OnlyHead == true then
  642.  
  643. end
  644. elseif TORSOVELOCITY > 1 and State ~= Enum.HumanoidStateType.Climbing and Attack == false then
  645. Pose = "Walk"
  646. if Mode == "None" and Attack == false then
  647. Neck.C0 = Clerp(Neck.C0, Necknor * CFrame.Angles(0 -Rad(TiltVelocity.z) * 3, 0, 0), 1 / Animation_Speed)
  648. Waist.C0 = Clerp(Waist.C0, Waistnor * CFrame.new(0, 0 + 0.1 * Cos(sine / 12), 0), 0.5 / Animation_Speed)
  649. Root.C0 = Clerp(Root.C0, Rootnor * CFrame.new(0, 1.5 + 0.3 * Cos(sine / 12), 0) * CFrame.Angles(0 +Rad(TiltVelocity.z) * 3, 0, 0), 0.5 / Animation_Speed)
  650. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.Angles(0 +Rad(TiltVelocity.z)*6, 0, 0), 1 / Animation_Speed)
  651. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.Angles(0 +Rad(TiltVelocity.z)*6, 0, 0), 1 / Animation_Speed)
  652. RightElbow.C0 = Clerp(RightElbow.C0, REnor * CFrame.Angles(0, 0, -0.1 - 0.1 * Cos(sine / 4)), 1 / Animation_Speed)
  653. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor * CFrame.Angles(0, 0, 0.1 + 0.1 * Cos(sine / 4)), 1 / Animation_Speed)
  654. RightWrist.C0 = Clerp(RightWrist.C0, RWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  655. LeftWrist.C0 = Clerp(LeftWrist.C0, LWnor * CFrame.Angles(0, 0, 0), 1 / Animation_Speed)
  656. RightHip.C0 = Clerp(RightHip.C0, RHnor * CFrame.Angles(0 +Rad(TiltVelocity.z) * 3, -0.5, 0), 1 / Animation_Speed)
  657. LeftHip.C0 = Clerp(LeftHip.C0, LHnor * CFrame.Angles(0 +Rad(TiltVelocity.z) * 3, 0.5, 0), 1 / Animation_Speed)
  658. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  659. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  660. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  661. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  662. elseif Mode == "Fight" and Attack == false then
  663.  
  664. end
  665. elseif State == Enum.HumanoidStateType.Climbing and Attack == false then
  666. Pose = "Climbing"
  667. Neck.C0 = Clerp(Neck.C0, Necknor, 1 / Animation_Speed)
  668. Waist.C0 = Clerp(Waist.C0, Waistnor, 1 / Animation_Speed)
  669. RightShoulder.C0 = Clerp(RightShoulder.C0, RSnor * CFrame.new(1, 0, 0) * CFrame.Angles(0, 0, 77 + 77), 1 / Animation_Speed)
  670. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LSnor * CFrame.new(-1, 0, 0) * CFrame.Angles(0, 0, -77 - 77), 1 / Animation_Speed)
  671. RightElbow.C0 = Clerp(RightElbow.C0, REnor, 1 / Animation_Speed)
  672. LeftElbow.C0 = Clerp(LeftElbow.C0, LEnor, 1 / Animation_Speed)
  673. RightHip.C0 = Clerp(RightHip.C0, RHnor, 1 / Animation_Speed)
  674. LeftHip.C0 = Clerp(LeftHip.C0, LHnor, 1 / Animation_Speed)
  675. RightKnee.C0 = Clerp(RightKnee.C0, RKnor, 1 / Animation_Speed)
  676. LeftKnee.C0 = Clerp(LeftKnee.C0, LKnor, 1 / Animation_Speed)
  677. RightAnkle.C0 = Clerp(RightAnkle.C0, RAnor, 1 / Animation_Speed)
  678. LeftAnkle.C0 = Clerp(LeftAnkle.C0, LAnor, 1 / Animation_Speed)
  679. end
  680. end
  681.  
  682. ---------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement