Advertisement
Guest User

Untitled

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