Hugo1234cool

Untitled

Feb 21st, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.46 KB | None | 0 0
  1. local p =owner
  2. local char = p.Character
  3. local mouse = p:GetMouse()
  4. local larm = char["Left Arm"]
  5. local rarm = char["Right Arm"]
  6. local lleg = char["Left Leg"]
  7. local rleg = char["Right Leg"]
  8. local hed = char.Head
  9. local torso = char.Torso
  10. local hum = char.Humanoid
  11. local cam = game.Workspace.CurrentCamera
  12. local root = char.HumanoidRootPart
  13. local deb = false
  14. local shot = 0
  15. NoAnims = false
  16. local debris=game:service"Debris"
  17. local l = game:GetService("Lighting")
  18. local rs = game:GetService("RunService").RenderStepped
  19. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  20. math.randomseed(os.time())
  21. for i,v in pairs (hed:GetChildren()) do
  22. if v:IsA("Sound") then
  23. v:Destroy()
  24. end
  25. end
  26. ----------------------------------------------------
  27. local Touche = {char.Name, }
  28. ----------------------------------------------------
  29.  
  30. hum.MaxHealth = 150
  31.  
  32. ----------------------------------------------------
  33. function lerp(a, b, t) -- Linear interpolation
  34. return a + (b - a)*t
  35. end
  36.  
  37. function slerp(a, b, t) --Spherical interpolation
  38. dot = a:Dot(b)
  39. if dot > 0.99999 or dot < -0.99999 then
  40. return t <= 0.5 and a or b
  41. else
  42. r = math.acos(dot)
  43. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  44. end
  45. end
  46.  
  47. function matrixInterpolate(a, b, t)
  48. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  49. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  50. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  51. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  52. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  53. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  54. local t = v1:Dot(v2)
  55. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  56. return CFrame.new()
  57. end
  58. return CFrame.new(
  59. v0.x, v0.y, v0.z,
  60. v1.x, v1.y, v1.z,
  61. v2.x, v2.y, v2.z,
  62. v3.x, v3.y, v3.z)
  63. end
  64. ----------------------------------------------------
  65. function genWeld(a,b)
  66. local w = Instance.new("Weld",a)
  67. w.Part0 = a
  68. w.Part1 = b
  69. return w
  70. end
  71. function weld(a, b)
  72. local weld = Instance.new("Weld")
  73. weld.Name = "W"
  74. weld.Part0 = a
  75. weld.Part1 = b
  76. weld.C0 = a.CFrame:inverse() * b.CFrame
  77. weld.Parent = a
  78. return weld;
  79. end
  80. ----------------------------------------------------
  81. function Lerp(c1,c2,al)
  82. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  83. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  84. for i,v in pairs(com1) do
  85. com1[i] = v+(com2[i]-v)*al
  86. end
  87. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  88. end
  89. ----------------------------------------------------
  90. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  91. local wld = Instance.new("Weld", wp1)
  92. wld.Part0 = wp0
  93. wld.Part1 = wp1
  94. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  95. end
  96. ----------------------------------------------------
  97. function weld5(part0, part1, c0, c1)
  98. weeld=Instance.new("Weld", part0)
  99. weeld.Part0=part0
  100. weeld.Part1=part1
  101. weeld.C0=c0
  102. weeld.C1=c1
  103. return weeld
  104. end
  105. ----------------------------------------------------
  106. function HasntTouched(plrname)
  107. local ret = true
  108. for _, v in pairs(Touche) do
  109. if v == plrname then
  110. ret = false
  111. end
  112. end
  113. return ret
  114. end
  115. ----------------------------------------------------
  116. gavehp = false
  117.  
  118. local ends = {"alive","rip"}
  119. result = ""
  120.  
  121. local g = Instance.new("Part",larm)
  122. g.Material = "Neon"
  123. g.CanCollide = false
  124. g.Size = Vector3.new(1,1,1)
  125. local gm = Instance.new("SpecialMesh",g)
  126. gm.MeshId = "rbxassetid://483388971"
  127. gm.TextureId = "rbxassetid://520016684"
  128. gm.Scale = Vector3.new(0.005,0.005,0.005)
  129.  
  130. local cor = Instance.new("Weld")
  131. cor.Part1 = g
  132. cor.Part0 = larm
  133. cor.Parent = char
  134. cor.C1 = CFrame.new(0.2,1.8,0)
  135. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  136. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  137. do
  138. print("FE Compatibility code by Mokiros")
  139. script.Parent = Player.Character
  140.  
  141. --RemoteEvent for communicating
  142. local Event = Instance.new("RemoteEvent")
  143. Event.Name = "UserInput_Event"
  144.  
  145. --Fake event to make stuff like Mouse.KeyDown work
  146. local function fakeEvent()
  147. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  148. t.connect = t.Connect
  149. return t
  150. end
  151.  
  152. --Creating fake input objects with fake variables
  153. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  154. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  155. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  156. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  157. end}
  158. --Merged 2 functions into one by checking amount of arguments
  159. CAS.UnbindAction = CAS.BindAction
  160.  
  161. --This function will trigger the events that have been :Connect()'ed
  162. local function te(self,ev,...)
  163. local t = m[ev]
  164. if t and t._fakeEvent and t.Function then
  165. t.Function(...)
  166. end
  167. end
  168. m.TrigEvent = te
  169. UIS.TrigEvent = te
  170.  
  171. Event.OnServerEvent:Connect(function(plr,io)
  172. if plr~=Player then return end
  173. if io.isMouse then
  174. m.Target = io.Target
  175. m.Hit = io.Hit
  176. else
  177. local b = io.UserInputState == Enum.UserInputState.Begin
  178. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  179. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  180. end
  181. for _,t in pairs(CAS.Actions) do
  182. for _,k in pairs(t.Keys) do
  183. if k==io.KeyCode then
  184. t.Function(t.Name,io.UserInputState,io)
  185. end
  186. end
  187. end
  188. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  189. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  190. end
  191. end)
  192. Event.Parent = NLS([==[
  193. local Player = game:GetService("Players").LocalPlayer
  194. local Event = script:WaitForChild("UserInput_Event")
  195.  
  196. local UIS = game:GetService("UserInputService")
  197. local input = function(io,a)
  198. if a then return end
  199. --Since InputObject is a client-side instance, we create and pass table instead
  200. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  201. end
  202. UIS.InputBegan:Connect(input)
  203. UIS.InputEnded:Connect(input)
  204.  
  205. local Mouse = Player:GetMouse()
  206. local h,t
  207. --Give the server mouse data 30 times every second, but only if the values changed
  208. --If player is not moving their mouse, client won't fire events
  209. while wait(1/30) do
  210. if h~=Mouse.Hit or t~=Mouse.Target then
  211. h,t=Mouse.Hit,Mouse.Target
  212. Event:FireServer({isMouse=true,Target=t,Hit=h})
  213. end
  214. end]==],Player.Character)
  215. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  216. end
  217. ----------------------------------------------------
  218. newWeld(torso, larm, -1.5, 0.5, 0)
  219. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  220. newWeld(torso, rarm, 1.5, 0.5, 0)
  221. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  222. newWeld(torso, hed, 0, 1.5, 0)
  223. newWeld(torso, lleg, -0.5, -1, 0)
  224. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  225. newWeld(torso, rleg, 0.5, -1, 0)
  226. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  227. newWeld(root, torso, 0, -1, 0)
  228. torso.Weld.C1 = CFrame.new(0, -1, 0)
  229. ----------------------------------------------------
  230. attack = false
  231. local m = 0
  232. ----------------------------------------------------
  233. char.Health:Destroy()
  234. mouse.KeyDown:connect(function(key)
  235. if key == "e" then
  236. if attack == false then
  237. attack = true
  238. NoAnims = true
  239. hum.Health = 150
  240.  
  241. result = ends[math.random(1,#ends)]
  242.  
  243. local s = Instance.new("Sound",torso)
  244. s.SoundId = "rbxassetid://140923474"
  245. s.Volume = 1
  246. s.Pitch = 1
  247. s.Looped = true
  248. s:Play()
  249.  
  250. coroutine.wrap(function()
  251. s:Remove()
  252. end)()
  253. local s = Instance.new("Sound",torso)
  254. s.SoundId = "rbxassetid://212887982"
  255. s.Volume = 1
  256. s.Pitch = 1
  257. s:Play()
  258.  
  259. cor.Part0 = hed
  260. pcall(function()
  261. for i = 1, 20 do
  262.  
  263. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  264.  
  265. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(30)), 0.2)
  266.  
  267. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  268.  
  269. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1)
  270.  
  271. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  272.  
  273. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  274.  
  275. cor.C0 = Lerp(cor.C0, CFrame.new(0.6,0,0)*CFrame.Angles(math.rad(50),0,0),0.2)
  276. rs:wait()
  277.  
  278. end
  279. end)
  280.  
  281. local pgui = p.PlayerGui
  282.  
  283. local sc = Instance.new("ScreenGui",pgui)
  284. local w1 = Instance.new("TextLabel",sc)
  285. w1.Size = UDim2.new(1,0,1,0)
  286. w1.Text = "wo kalm dwn m8 u r gon gt rkt"
  287. w1.TextScaled = true
  288. w1.BackgroundColor3 = Color3.new(1,1,1)
  289. w1.BorderSizePixel = 0
  290.  
  291. coroutine.wrap(function()
  292. for i = 1, 20 do
  293. w1.BackgroundTransparency = i/10
  294. w1.TextTransparency = i/10
  295. end
  296. end)()
  297.  
  298. pcall(function()
  299. for i = 1, 100 do
  300. rs:wait()
  301. m = m + 0.004
  302. hum.Health = hum.Health-1
  303. cor.C0 = Lerp(cor.C0, CFrame.new(0.6,0+m/2,0-m/2)*CFrame.Angles(math.rad(50) + m,0,0),0.2)
  304.  
  305. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5+m,0-m/3.5)*CFrame.Angles(math.rad(120) + m,math.rad(0),math.rad(30)), 0.2)
  306.  
  307. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5+m,0+m/3.5)*CFrame.Angles(math.rad(0) - m,math.rad(0),math.rad(0) + m), 0.2)
  308.  
  309. end
  310. end)
  311.  
  312. if result == "rip" then
  313.  
  314. coroutine.wrap(function()
  315. wait(0.15)
  316. for i = 1, 60 do
  317. cor.Part0 = torso
  318. cor.C0 = Lerp(cor.C0,CFrame.new(9,-0.15,0)*CFrame.Angles(0,0,200),0.1)
  319. rs:wait()
  320. end
  321. end)()
  322.  
  323. s:Remove()
  324. hum.WalkSpeed = 0
  325. pcall(function()
  326. hum.JumpPower = 0
  327. end)
  328.  
  329. pcall(function()
  330. for i = 1, 20 do
  331.  
  332. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(30),math.rad(30)), 0.2)
  333.  
  334. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(-10),math.rad(-10)), 0.2)
  335.  
  336. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)), 0.2)
  337.  
  338. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0)), 0.2)
  339.  
  340. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(-10),math.rad(-5)), 0.4)
  341.  
  342. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(20),math.rad(20)), 0.4)
  343.  
  344. rs:wait()
  345. end
  346. end)
  347.  
  348. wait(3)
  349.  
  350. coroutine.wrap(function()
  351. while true do
  352. wait(0.07)
  353. pcall(function()
  354.  
  355. rarm.Weld.C0 = CFrame.new(1.5,0.5,0)*CFrame.Angles(math.random(0,3),math.random(0,7),math.random(30,45))
  356.  
  357. larm.Weld.C0 = CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.random(0,5),math.random(10,20),math.random(10,20))
  358.  
  359. hed.Weld.C0 = CFrame.new(0,1.5,0)*CFrame.Angles(math.random(20,30),math.random(0,4),math.random(0,3))
  360.  
  361. lleg.Weld.C0 = CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.random(0,5),math.random(10,15),math.random(5,10))
  362.  
  363. rleg.Weld.C0 = CFrame.new(0.5, -1, 0)*CFrame.Angles(math.random(0,4),math.random(20,30),math.random(20,30))
  364.  
  365. end)
  366. end
  367. end)()
  368.  
  369.  
  370. cor:Destroy()
  371.  
  372. g.Anchored = true
  373.  
  374. for i,v in pairs(char:GetChildren()) do
  375. if v:IsA("Part") then
  376. v.Anchored = true
  377. elseif v:IsA("Accoutrement") then
  378. v.Handle.Anchored = true
  379. end
  380. end
  381.  
  382. cor.Part0 = larm
  383. m = 0
  384. hum.MaxHealth = 0
  385.  
  386. local k = Instance.new("Sound",torso)
  387. k.SoundId = "rbxassetid://154872806"
  388. k.Volume = 10
  389. k.Pitch = 1
  390. k:Play()
  391.  
  392. local cf = torso.CFrame -Vector3.new(0,0.55,0)
  393. cf = cf*CFrame.Angles(math.rad(88.5),0,0)
  394.  
  395. local b = Instance.new("Part",torso)
  396. b.BrickColor = BrickColor.new("Really red")
  397. b.Material = "Neon"
  398. b.Anchored = true
  399. b.CanCollide = false
  400. b.Size = Vector3.new(2,0.01,2)
  401. b.CFrame = cf
  402.  
  403. local bm = Instance.new("CylinderMesh",b)
  404.  
  405. local cf2 = b.CFrame -Vector3.new(3,0,0)
  406.  
  407. local b2 = Instance.new("Part",torso)
  408. b2.BrickColor = BrickColor.new("Really red")
  409. b2.Material = "Neon"
  410. b2.Anchored = true
  411. b2.CanCollide = false
  412. b2.Size = Vector3.new(2,0.01,2)
  413. b2.CFrame = cf2
  414.  
  415. local bm2 = Instance.new("CylinderMesh",b2)
  416.  
  417.  
  418. for i = 1, 40 do
  419. wait()
  420. b.Size = Vector3.new(i/5,0,i/5)
  421. b.CFrame = cf
  422.  
  423. b2.Size = Vector3.new(i/10,0,i/10)
  424. b2.CFrame = cf2
  425. end
  426.  
  427. local bg = Instance.new("BillboardGui", torso)
  428. bg.Name = "rip"
  429. bg.Adornee = torso
  430. bg.Size = UDim2.new(1, 0, 1, 0)
  431. bg.StudsOffset = Vector3.new(0, 2, 0)
  432.  
  433. local fr1 = Instance.new("TextLabel", bg)
  434. fr1.Size = UDim2.new(1, 0, 1, 0)
  435. fr1.BorderSizePixel = 0
  436. fr1.TextTransparency = 1
  437. fr1.BackgroundTransparency = 1
  438. fr1.Text = "r.i.p"
  439. fr1.TextScaled = true
  440.  
  441. coroutine.wrap(function()
  442. for i = 1, 20 do
  443. rs:wait()
  444. fr1.TextTransparency = fr1.TextTransparency - 1/20
  445. fr1.BackgroundTransparency = fr1.BackgroundTransparency - 1/20
  446. end
  447. end)()
  448.  
  449. coroutine.wrap(function()
  450. while true do
  451.  
  452. for i = 0.01, 0.2 do
  453. fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(255,0,0),i)
  454. rs:wait()
  455. end
  456.  
  457. for i = 0.01, 0.2 do
  458. fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(0,255,0),i)
  459. rs:wait()
  460. end
  461.  
  462. for i = 0.01, 0.2 do
  463. fr1.BackgroundColor3 = fr1.BackgroundColor3:lerp(Color3.new(0,0,255),i)
  464. rs:wait()
  465. end
  466.  
  467. wait()
  468. end
  469. end)()
  470.  
  471. local x = Instance.new("Sound",torso)
  472. x.SoundId = "rbxassetid://397069204"
  473. x.Looped = true
  474. x:Play()
  475. wait(9)
  476.  
  477. local txts = {"R.I.P "..p.Name.." Died drinking his favorite soda","R.I.P "..p.Name.." Died because of the anime called bleach - i mean the drink.","R.I.P "..p.Name.." Potato.","666"}
  478.  
  479. local t1 = Instance.new("Part",workspace.Base)
  480. t1.Name = "tombstone_dirt"
  481. t1.BrickColor = BrickColor.new("Reddish brown")
  482. t1.CanCollide = false
  483. t1.CFrame = root.CFrame - Vector3.new(0,3.25,0)
  484. t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  485. t1.Material = "Grass"
  486. t1.Size = Vector3.new(4,1,8)
  487.  
  488. local tw = Instance.new("Weld")
  489.  
  490. local t2 = Instance.new("Part",t1)
  491. t2.Name = "tombstone_stone"
  492. t2.CanCollide = false
  493. t2.BrickColor = BrickColor.new("")
  494. t2.Anchored = false
  495. t2.CFrame = t1.CFrame + Vector3.new(0,0,-4)
  496. t2.Size = Vector3.new(4.2,5,1.2)
  497.  
  498. local sg = Instance.new("SurfaceGui",t2)
  499. sg.Enabled = true
  500. sg.Face = "Back"
  501. sg.Adornee = t2
  502. local txts = txts[math.random(1,#txts)]
  503.  
  504. local txt = Instance.new("TextLabel",sg)
  505. txt.TextScaled = true
  506. txt.Text = txts
  507. txt.BackgroundTransparency = 1
  508. txt.BorderSizePixel = 0
  509. txt.Size = UDim2.new(1,0,1,0)
  510.  
  511. txt.TextColor3 = Color3.new(1,1,1)
  512. if txts == "666" then
  513. txt.TextColor3 = Color3.new(1,0,0)
  514. end
  515.  
  516.  
  517. tw.Part1 = t2
  518. tw.Part0 = t1
  519. tw.Parent = char
  520. tw.C0 = CFrame.new(0,2.5,-4)
  521.  
  522. coroutine.wrap(function()
  523. t1.CFrame = root.CFrame - Vector3.new(0,3.2,0)
  524. t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  525. wait(0.1)
  526. t1.CFrame = root.CFrame - Vector3.new(0,3.2,0)
  527. t1.CFrame = t1.CFrame*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  528. t1.Anchored = true
  529. t2.Anchored = true
  530. t1.CanCollide = true
  531. t2.CanCollide = true
  532. end)()
  533.  
  534. char:BreakJoints()
  535.  
  536. elseif result == "alive" then
  537. attack = false
  538. NoAnims = false
  539. cor.Part0 = larm
  540. m = 0
  541. end
  542. end
  543. end
  544. end)
  545.  
  546. pcall(function()
  547. ----------------------------------------------------
  548. mouse.KeyDown:connect(function(key)
  549. if string.byte(key) == 50 then
  550. char.Humanoid.WalkSpeed = 60
  551. end
  552. end)
  553. mouse.KeyUp:connect(function(key)
  554. if string.byte(key) == 50 then
  555. char.Humanoid.WalkSpeed = 16
  556. end
  557. end)
  558. -------------------------------
  559. local animpose = "Idle"
  560. local lastanimpose = "Idle"
  561. local sine = 0
  562. local change = 1
  563. local val = 0
  564. local ffing = false
  565. -------------------------------
  566. game:GetService("RunService").RenderStepped:connect(function()
  567. --[[if char.Humanoid.Jump == true then
  568. jump = true
  569. else
  570. jump = false
  571. end]]
  572. char.Humanoid.FreeFalling:connect(function(f)
  573. if f then
  574. ffing = true
  575. else
  576. ffing = false
  577. end
  578. end)
  579. sine = sine + change
  580. if jumpn == true then
  581. animpose = "Jumping"
  582. elseif ffing == true then
  583. animpose = "Freefalling"
  584. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  585. animpose = "Idle"
  586. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  587. animpose = "Walking"
  588. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
  589. animpose = "Running"
  590. end
  591. if animpose ~= lastanimpose then
  592. sine = 0
  593. if animpose == "Idle" then
  594. for i = 1, 2 do
  595. if NoAnims == false then
  596.  
  597. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5+math.sin(sine/14)/9,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(30)), 0.2)
  598.  
  599. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5 + math.sin(sine/14)/9,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(30)), 0.2)
  600.  
  601. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  602.  
  603. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1)
  604.  
  605. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  606.  
  607. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  608.  
  609. end
  610. end
  611.  
  612. elseif animpose == "Walking" then
  613. for i = 1, 2 do
  614. if NoAnims == false then
  615.  
  616. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.7,0.5,-0.35)*CFrame.Angles(math.rad(100),math.rad(0),math.rad(-90)), 0.1)
  617.  
  618. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-0.7,0.5,-0.35)*CFrame.Angles(math.rad(80),math.rad(0),math.rad(80)), 0.1)
  619.  
  620. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  621.  
  622. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1)
  623.  
  624. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  625.  
  626. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  627.  
  628. end
  629. end
  630. elseif animpose == "Running" then
  631. for i = 1, 2 do
  632. if NoAnims == false then
  633. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  634.  
  635. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  636.  
  637. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  638.  
  639. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.05)
  640.  
  641. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  642.  
  643. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  644.  
  645. wait()
  646. end
  647. end
  648. else
  649. end
  650. end
  651. lastanimpose = animpose
  652. if animpose == "Idle" then
  653. if NoAnims == false then
  654. change = 0.5
  655.  
  656. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.3,0.4+math.sin(sine/14)/9,0.2)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-30)), 0.2)
  657.  
  658. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.3,0.4 + math.sin(sine/14)/9,-0.2)*CFrame.Angles(math.rad(20),math.rad(0),math.rad(30)), 0.2)
  659.  
  660. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.2)
  661.  
  662. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1)
  663.  
  664. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  665.  
  666. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4)
  667.  
  668. cor.C0 = Lerp(cor.C0, CFrame.new(0,0.1,0.2)*CFrame.Angles(math.rad(10),math.pi,0),0.2)
  669.  
  670. end
  671.  
  672. elseif animpose == "Walking" then
  673. if NoAnims == false then
  674. change = 1
  675. cor.C0 = Lerp(cor.C0, CFrame.new(0,0.1,0.2)*CFrame.Angles(math.rad(10),-math.pi/2,0),0.2)
  676.  
  677. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1)
  678.  
  679. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0) +- math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1)
  680.  
  681. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-0.07)*CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)), 0.2)
  682.  
  683. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.1)
  684.  
  685. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1)
  686.  
  687. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(0) +- math.sin(sine/5)/1.2,math.rad(0),math.rad(0)), 0.1)
  688.  
  689. end
  690.  
  691. elseif animpose == "Running" then
  692. if NoAnims == false then
  693. change = 0.5
  694.  
  695. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.7 ,0.5,-0.5)*CFrame.Angles(math.rad(90)+ math.sin(sine/2.5)/2,0,.05), 0.2)
  696.  
  697. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-0.7,0.5,-0.5)*CFrame.Angles(math.rad(90)+ -math.sin(sine/2.5)/2,0,-.05), 0.2)
  698.  
  699. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0.5)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)),0.2)
  700.  
  701. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(-90), 0, math.rad(0)), 0.2)
  702.  
  703. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(85) + math.sin(sine/2.5)/2, 0, 0.05), .4)
  704.  
  705. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(85) + -math.sin(sine/2.5)/2, 0.05, 0), .4)
  706.  
  707. end
  708. end
  709. end)
  710. end)
Advertisement
Add Comment
Please, Sign In to add comment