Advertisement
5325325325

Untitled

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