Advertisement
Hugo1234cool

Untitled

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