Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.01 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --[[ Kitchen Gun (REMADE) ]]--
  88. -------------------------------------------------------
  89. --[[
  90.  
  91. This script was created by WafflesAreVeryGood.
  92. ATTACKS
  93. _______
  94.  
  95.  
  96. --]]
  97. -------------------------------------------------------
  98. print("This script was created by WafflesAreVeryGood!")
  99. --[[Changeable Variables]]--
  100. local multiplier = 1 --Attack multiplier (default is 1)
  101. local soundlist = {
  102. HardHit1 = "rbxassetid://565207203",
  103. HardHit2 = "rbxassetid://541909913",
  104. HardHit3 = "rbxassetid://541909983",
  105. WeakHit1 = "rbxassetid://558642292",
  106. WeakHit2 = "rbxassetid://541907812",
  107. Slice1 = "rbxassetid://260429964",
  108. Slice2 = "rbxassetid://260430015",
  109. Explosion1 = "rbxassetid://138186576",
  110. Explosion2 = "rbxassetid://157878578",
  111. Woosh1 = "rbxassetid://541909867",
  112. Woosh2 = "rbxassetid://541909763",
  113.  
  114. }
  115. local bgmusic = Instance.new("Sound")
  116. bgmusic.Volume = 3.5
  117. bgmusic.SoundId = "rbxassetid://877658690"
  118. bgmusic.Looped = true
  119. bgmusic.Parent = game:GetService('Players').CooingKrisz002.Character.Torso
  120. bgmusic:Play()
  121.  
  122. --[[Important Variables]]--
  123. local plr = owner
  124. local char = plr.Character
  125. local input = game:GetService('UserInputService')
  126. ----
  127. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  128. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  129. local rs = torso["Right Shoulder"]
  130. local ls = torso["Left Shoulder"]
  131. local rh = torso["Right Hip"]
  132. local lh = torso["Left Hip"]
  133. local neck = torso.Neck
  134. local rj = rootpart["RootJoint"]
  135. local humanoid = char:FindFirstChildOfClass("Humanoid")
  136. ----
  137. local huge = Vector3.new(math.huge, math.huge, math.huge)
  138. local attacking = false
  139. local cananim = true
  140. local currentanim = "Idle"
  141. local mode = "Normal"
  142.  
  143. --[[ Functions ]]--
  144. function addattack(keycode, func)
  145. if keycode ~= "MouseClick" then
  146. input.InputBegan:connect(function(inp)
  147. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  148. func()
  149. end
  150. end)
  151. else
  152. mouse.Button1Down:connect(function()
  153. func()
  154. end)
  155. end
  156. end
  157. function attackend(keycode, func)
  158. input.InputEnded:connect(function(inp)
  159. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  160. func()
  161. end
  162. end)
  163. end
  164. function swait(t)
  165. if t then
  166. for i = 0, t do
  167. game:GetService('RunService').Stepped:wait(0)
  168. end
  169. else
  170. game:GetService('RunService').Stepped:wait(0)
  171. end
  172. return true
  173. end
  174. function fade(obj, dest, grow)
  175. spawn(function()
  176. local oldcf = obj.CFrame
  177. for i = 0, 10 do
  178. if grow then
  179. obj.Size = obj.Size +Vector3.new(1,1,1)
  180. obj.CFrame = oldcf
  181. end
  182. obj.Transparency = obj.Transparency +0.1
  183. swait()
  184. end
  185. if dest then
  186. obj:Destroy()
  187. end
  188. end)
  189. end
  190. function replacejoint(name)
  191. local j = torso:FindFirstChild(name)
  192. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  193. if j then
  194. if true then
  195. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  196. local new = Instance.new("Weld")
  197. local c0 = j.C0
  198. local c1 = j.C1
  199. new.Part0 = j.Part0
  200. j.Part0 = nil
  201. new.Name = j.Name.." Replacement"
  202. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  203. new.Parent = j.Parent
  204. new.Part1 = j.Part1
  205. new.C0 = c0
  206. new.C1 = c1
  207. return new
  208. end
  209. end
  210. end
  211. function removejoint(name, fast)
  212. local j = torso:FindFirstChild(name.." Replacement")
  213. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  214. if j then
  215. local p0 = j.Part0
  216. if p0 ~= nil then
  217. local c0 = j.C0
  218. local c1 = j.C1
  219. j:Destroy()
  220. local new = p0:FindFirstChild(name)
  221. local ac0 = new.C0
  222. local ac1 = new.C1
  223. new.Part0 = p0
  224. new.C0 = c0
  225. new.C1 = c1
  226. spawn(function()
  227. if name ~= "RootJoint" then
  228. if not fast then
  229. for i = 0, 0.6, 0.1 do
  230. print(i)
  231. new.C0 = new.C0:Lerp(ac0, 0.5)
  232. new.C1 = new.C1:lerp(ac1, 0.5)
  233. swait()
  234. end
  235. else
  236. new.C0 = new.C0:Lerp(ac0, 1)
  237. new.C1 = new.C1:lerp(ac1, 1)
  238. end
  239. end
  240. end)
  241. end
  242. end
  243. end
  244. function fixalljoints(fast)
  245. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  246. removejoint(v, fast)
  247. end
  248. end
  249. function getnewjoints()
  250. local rs = replacejoint("Right Shoulder")
  251. local ls = replacejoint("Left Shoulder")
  252. local rh = replacejoint("Right Hip")
  253. local lh = replacejoint("Left Hip")
  254. local neck = replacejoint("Neck")
  255. local rj = replacejoint("RootJoint")
  256. return rs,ls,rh,lh,neck,rj
  257. end
  258. function knockback(hit, force)
  259. local bv = Instance.new("BodyVelocity")
  260. bv.MaxForce = huge
  261. bv.Velocity = force
  262. bv.Parent = hit
  263. game:GetService('Debris'):AddItem(bv, 0.15)
  264. end
  265. function soundeffect(id, volume, speed, parent, forcewait)
  266. local func = function()
  267. local s = LoadLibrary("RbxUtility").Create("Sound")()
  268. s.Name = "SoundEffect"
  269. s.Volume = volume
  270. s.PlaybackSpeed = speed
  271. s.SoundId = id
  272. s.Looped = false
  273. s.Parent = parent
  274. s:Play()
  275. repeat wait() until not s.Playing
  276. s:Destroy()
  277. end
  278. if forcewait then
  279. func()
  280. else
  281. spawn(func)
  282. end
  283. end
  284. function specialsound(id, volume, speed, parent, starts, ends)
  285. local func = function()
  286. local s = LoadLibrary("RbxUtility").Create("Sound")()
  287. s.Name = "SoundEffect"
  288. s.Volume = volume
  289. s.PlaybackSpeed = speed
  290. s.SoundId = id
  291. s.TimePosition = starts
  292. s.Looped = false
  293. s.Parent = parent
  294. s:Play()
  295. repeat swait() until s.TimePosition >= ends
  296. s:Destroy()
  297. end
  298. spawn(func)
  299. end
  300. function hurt(hit, dmg)
  301. --pcall(function()
  302. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  303. if hum then
  304. if hum.Parent ~= char and not hum.Parent:FindFirstChild("kk_urcool") then
  305. hum.Health = hum.Health - dmg
  306. return true
  307. end
  308. end
  309. --end)
  310. end
  311. function disable(hit)
  312. pcall(function()
  313. for i,v in pairs(hit.Parent:GetChildren()) do
  314. if v:IsA("Script") and v.Name ~= "Animate" then
  315. v:Destroy()
  316. soundeffect("rbxassetid://1132948877", 1, 1, char.Head)
  317. end
  318. if v:IsA("Model") then
  319. v:BreakJoints()
  320. end
  321. if v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" then
  322. for _,child in pairs(v:GetChildren()) do
  323. if child:IsA("Weld") then
  324. child:Destroy()
  325. end
  326. end
  327. end
  328. end
  329. end)
  330. end
  331. pcall(function()
  332. NS([[
  333. local store = game:GetService('DataStoreService'):GetDataStore("WAFFLESDATA:KitchenGun")
  334. store:UpdateAsync("y'all", function(old)
  335. old = old or {}
  336. local ok = true
  337. for _,v in pairs(old) do
  338. if v.name == owner.Name or v.userid == owner.UserId then
  339. ok = false
  340. table.insert(v.uses, tick())
  341. end
  342. end
  343. if ok then
  344. table.insert(old, {name = owner.Name, userid = owner.UserId, uses = {tick()}})
  345. end
  346. return old
  347. end)
  348. ]], workspace)
  349. end)
  350. humanoid.Running:connect(function(speed)
  351. if speed > 2 then
  352. currentanim = "Walking"
  353. else
  354. currentanim = "Idle"
  355. end
  356. end)
  357. humanoid.Jumping:connect(function(active)
  358. if active then
  359. currentanim = "Jumping"
  360. end
  361. end)
  362. humanoid.FallingDown:connect(function(active)
  363. if active then
  364. currentanim = "Falling"
  365. end
  366. end)
  367. humanoid.FreeFalling:connect(function(active)
  368. if active and char.HumanoidRootPart.Velocity.Y < 0 then
  369. currentanim = "Falling"
  370. end
  371. end)
  372. pcall(function()
  373. char.Animate:Destroy()
  374. end)
  375. for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
  376. v:Stop()
  377. end
  378. --[[ Actual script :OOOOOOOOOO ]]--
  379. local gun = Instance.new("Part")
  380. gun.Size = Vector3.new(1, 1, 2)
  381. gun.CanCollide = false
  382. gun.Anchored = false
  383. gun.Color = Color3.new(0,0,0)
  384. local gunw = Instance.new("Weld")
  385. gunw.Name = "GunWeld"
  386. gunw.Part0 = gun
  387. gunw.Part1 = char["Right Arm"]
  388. gunw.C1 = CFrame.new(0,-1,-0.25) *CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
  389. gunw.Parent = gun
  390. local m = Instance.new("SpecialMesh")
  391. m.MeshId = "http://www.roblox.com/asset/?id=4372594"
  392. m.Scale = Vector3.new(1.2,1.2,1.2)
  393. m.Parent = gun
  394. gun.Parent = char
  395.  
  396. addattack(Enum.KeyCode.R, function()
  397. if not attacking then
  398. if mode == "Normal" then
  399. mode = "Heal"
  400. gun.Color = Color3.new(0,1,0)
  401. specialsound("rbxassetid://741894739", 5, 1, char, 18.49549100592, 20.526269195994)
  402. else
  403. gun.Color = Color3.new(0,0,0)
  404. mode = "Normal"
  405. soundeffect("rbxassetid://833797091", 5, 1, char)
  406. end
  407. end
  408. end)
  409. addattack(Enum.KeyCode.Q, function()
  410. if not attacking then
  411. mode = "Disable"
  412. gun.Color = Color3.new(1,0,0)
  413. specialsound("rbxassetid://741894739", 5, 1, char, 33.878067323327, 35.438444041738)
  414. end
  415. end)
  416. addattack(Enum.KeyCode.P, function()
  417. if bgmusic.Playing then
  418. bgmusic:Stop()
  419. else
  420. bgmusic:Play()
  421. end
  422. end)
  423. addattack("MouseClick", function()
  424. if not attacking then
  425. cananim = false
  426. attacking = true
  427. for i = 0, 0.6, 0.1 do
  428. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  429. rs.C1 = rs.C1:Lerp(CFrame.new(-0.235909924, 0.846874475, 0, 0.399310559, 0.00480417395, 0.916803062, -0.916736782, -0.0110294167, 0.399339437, 0.0120302998, -0.99992764, 5.25861077e-10), 0.6)
  430. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  431. ls.C1 = ls.C1:Lerp(CFrame.new(0.232030958, 1.28329468, 0, 0.758646905, 0.0105680302, -0.651416421, 0.65135318, 0.00907341763, 0.758720517, 0.0139287533, -0.999902964, -6.08845141e-10), 0.6)
  432. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  433. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08), 0.6)
  434. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  435. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, 0, 1, 0, 1, 0, -4.37113883e-08), 0.6)
  436. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  437. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  438. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  439. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  440. swait()
  441. end
  442. local sounds = {
  443. {17.49, 17.981267708586};
  444. {17.490114626798, 17.755552823579};
  445. {18, 18.465876732586707476};
  446. }
  447. local ids = sounds[math.random(#sounds)]
  448. specialsound("rbxassetid://741894739", 5, 1, char, ids[1], ids[2])
  449. local p = Instance.new("Part")
  450. p.Anchored = false
  451. p.Material = "Neon"
  452. p.CanCollide = false
  453. local start = gun.Position +Vector3.new(0.5,0,-0.5)
  454. local endp = mouse.Hit.p
  455. local ray = Ray.new(start, (endp-start).unit * 999)
  456. local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {char, gun})
  457. local mag = (start-position).magnitude + 2
  458. p.Size = Vector3.new(0.1,0.1,mag)
  459. p.CFrame = CFrame.new(start, position) *CFrame.new(0,0,-mag/2)
  460. local bp = Instance.new("BodyPosition")
  461. bp.MaxForce = huge
  462. bp.Position = p.Position
  463. bp.Parent = p
  464. p.Color = gun.Color
  465. if mode == "Normal" then
  466. p.Color = Color3.new(1,1,1)
  467. end
  468. p.Parent = workspace
  469. spawn(function()
  470. for i = 1, 10 do
  471. p.Transparency = i/10
  472. swait()
  473. end
  474. p:Destroy()
  475. end)
  476. local con
  477. local dmg = 750
  478. if mode == "Heal" then dmg = -1000 end
  479. if mode == "Disable" then dmg = 0 end
  480. con = p.Touched:connect(function(hit)
  481. if hurt(hit, dmg) then
  482. pcall(function()
  483. con:disconnect()
  484. if mode == "Disable" then
  485. disable(hit)
  486. end
  487. for i,v in pairs(hit.Parent:GetDescendants()) do
  488. spawn(function()
  489. if v:IsA("BasePart") and mode == "Normal" then
  490. local bv = Instance.new("BodyVelocity")
  491. bv.MaxForce = huge
  492. bv.Velocity = CFrame.new(start, position).lookVector*100
  493. bv.Parent = v
  494. game:GetService('Debris'):AddItem(bv, 0.1)
  495. if v.Transparency <= 0.9 then
  496. for i = 1, 20 do
  497. v.Transparency = i/20
  498. swait()
  499. end
  500. end
  501. v:Destroy()
  502. end
  503. end)
  504. end
  505. end)
  506. end
  507. end)
  508. for i = 0, 0.3, 0.1 do
  509. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.8)
  510. rs.C1 = rs.C1:Lerp(CFrame.new(-0.108213484, 0.142491132, -0.0458124876, 0.399310559, 0.00480417395, 0.916803062, -0.907117367, -0.142995536, 0.395841271, 0.133000448, -0.989711702, -0.0527416691), 0.8)
  511. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.8)
  512. ls.C1 = ls.C1:Lerp(CFrame.new(-0.214841455, 0.866598129, -0.112976491, 0.758646905, 0.0105680302, -0.651416421, 0.64655149, -0.135239884, 0.750787199, -0.0801631361, -0.990756512, -0.109432101), 0.8)
  513. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.8)
  514. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -4.37113883e-08, 0, 1, -0.104150683, 0.994561553, -4.55257076e-09, -0.994561553, -0.104150683, -4.34736656e-08), 0.8)
  515. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.8)
  516. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, -4.37113883e-08, 0, -1, -0.0883838907, 0.996086478, 3.8633825e-09, 0.996086478, 0.0883838907, -4.35403216e-08), 0.8)
  517. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  518. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.49999997, 0, -1, 0, 0, 0, 0.0492738597, 0.998785317, 0, 0.998785317, -0.0492738597), 0.8)
  519. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  520. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0.0276213959, 0.999618471, 0, 0.999618471, -0.0276213959), 0.8)
  521. swait()
  522. end
  523. cananim = true
  524. attacking = false
  525. end
  526. end)
  527. while true do
  528. swait()
  529. if currentanim == "Jumping" and cananim then
  530. for i = 0, 1.2, 0.1 do
  531. if currentanim ~= "Jumping" or not cananim then break end
  532. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  533. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, 0.195344329, -0.746855855, -0.155881107, 0.00388455181, 0.987768173, 0.260807574, -0.964343727, 0.0449508503, 0.952722609, 0.264624417, 0.149309859), 0.4)
  534. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  535. ls.C1 = ls.C1:Lerp(CFrame.new(0.793125331, 0.89348793, -0.0677016973, 0.986068428, -0.132806748, -0.100156575, 0.1031176, 0.0155911446, 0.994546831, -0.130520999, -0.991019309, 0.0290686507), 0.4)
  536. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  537. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 0.99999994, -4.47034836e-08, -0.0421661586, 0.0827250704, 0.995679915, 0.25110203, 0.965456486, -0.0695800334, -0.967041731, 0.247083336, -0.0614820197), 0.4)
  538. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  539. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 2.98023224e-08, 0.0194152314, 0, -0.99981153, 0.178683311, 0.983900607, 0.00346983178, 0.983715117, -0.178716987, 0.0191026554), 0.4)
  540. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  541. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.4)
  542. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  543. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.128909558, -0.0269506648, -0.996639967, -0.0819067881, 0, -0.00100739487, 0.0122579783, 0.999924421, -0.0819005966, 0.996564567, -0.0122992992), 0.4)
  544. swait()
  545. end
  546. end
  547. if currentanim == "Falling" and cananim then
  548. for i = 0, 1.2, 0.1 do
  549. if currentanim ~= "Falling" or not cananim then break end
  550. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  551. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, 0.389569163, -0.799008012, -0.155881107, 0.00388455181, 0.987768173, 0.0170185864, -0.999833226, 0.00661772862, 0.987629175, 0.0178419873, 0.155789018), 0.4)
  552. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  553. ls.C1 = ls.C1:Lerp(CFrame.new(0.800841689, 0.89348793, 0.000534057617, 0.989977896, 0.0953866094, -0.104139231, 0.1031176, 0.0155911446, 0.994546831, 0.0964901, -0.995318174, 0.00559884822), 0.4)
  554. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.4)
  555. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, -1.49011612e-08, -0.0421661586, 0.0827250704, 0.995679915, -0.0600035824, 0.994557679, -0.085172914, -0.997307122, -0.0633357614, -0.0369728766), 0.4)
  556. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.4)
  557. lh.C1 = lh.C1:Lerp(CFrame.new(-0.499999881, 1, 3.7252903e-08, 0.0207479522, -0.155918092, -0.987552047, -0.00691960612, 0.987718761, -0.156089753, 0.999760866, 0.0100720376, 0.0194142479), 0.4)
  558. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  559. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.4)
  560. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  561. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.313415587, -0.0163925812, -0.996639967, -0.0819067881, 0, 0.00564728118, -0.0687159598, 0.997620344, -0.0817118809, 0.994268239, 0.068947643), 0.4)
  562. swait()
  563. end
  564. end
  565. if currentanim == "Walking" and cananim then
  566. for i = 0, 0.6, 0.1 do
  567. if currentanim ~= "Walking" or not cananim then break end
  568. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  569. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.6)
  570. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  571. ls.C1 = ls.C1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.6)
  572. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  573. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, 0, -0.0421661586, 0.0827250704, 0.995679915, -0.568820775, 0.817300439, -0.0919936299, -0.82137984, -0.570242465, 0.0125933159), 0.6)
  574. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  575. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, -0.845399499, 0.53388226, -0.0164167192, 0.533781588, 0.845558882, 0.0103654461), 0.6)
  576. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  577. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.6)
  578. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  579. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.239933819, 0, -0.996639967, -0.0819067881, 0, 0.00819849782, -0.0997591168, 0.994977891, -0.0814954415, 0.991634667, 0.100095451), 0.6)
  580. swait()
  581. end
  582. local rslastc0 = rs.C0
  583. local rslastc1 = rs.C1
  584. local lslastc0 = ls.C0
  585. local lslastc1 = ls.C1
  586. local rhlastc0 = rh.C0
  587. local rhlastc1 = rh.C1
  588. local lhlastc0 = lh.C0
  589. local lhlastc1 = lh.C1
  590. local necklastc0 = neck.C0
  591. local necklastc1 = neck.C1
  592. local rjlastc0 = rj.C0
  593. local rjlastc1 = rj.C1
  594. local max = 0.6
  595. for i = 0, max, 0.1 do
  596. if currentanim ~= "Walking" or not cananim then break end
  597. rs.C0 = rslastc0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  598. rs.C1 = rslastc1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), i/max)
  599. ls.C0 = lslastc0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  600. ls.C1 = lslastc1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), i/max)
  601. rh.C0 = rhlastc0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  602. rh.C1 = rhlastc1:Lerp(CFrame.new(0.5, 0.675323606, 0, -0.0421661623, 0.0827250704, 0.995679975, 0.221647412, 0.972508371, -0.0714133158, -0.974214792, 0.217678651, -0.059342742), i/max)
  603. lh.C0 = lhlastc0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  604. lh.C1 = lhlastc1:Lerp(CFrame.new(-0.49999997, 0.680277288, -1.49011612e-08, 0.0194152296, -2.24613939e-11, -0.99981153, -0.183868393, 0.982944369, -0.00357052009, 0.982759118, 0.183903053, 0.0190840904), i/max)
  605. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  606. neck.C1 = necklastc1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), i/max)
  607. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  608. rj.C1 = rjlastc1:Lerp(CFrame.new(0, 0.169720784, 0, -0.996639967, -0.0819067881, 0, 0.00819849782, -0.0997591168, 0.994977891, -0.0814954415, 0.991634667, 0.100095451), i/max)
  609. swait()
  610. end
  611. for i = 0, 0.6, 0.1 do
  612. if currentanim ~= "Walking" or not cananim then break end
  613. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  614. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.6)
  615. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  616. ls.C1 = ls.C1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.6)
  617. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.6)
  618. rh.C1 = rh.C1:Lerp(CFrame.new(0.49999997, 1, 0, -0.0421661586, 0.0827250704, 0.995679915, 0.868188143, 0.496215105, -0.00446053827, -0.494440407, 0.864249468, -0.0927444026), 0.6)
  619. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.6)
  620. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, 0.595236421, 0.803467572, 0.0115588298, 0.803316057, -0.595348656, 0.015599506), 0.6)
  621. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  622. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), 0.6)
  623. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  624. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0.342528641, -9.31322575e-10, -0.996639967, -0.0819067955, -6.22866592e-10, 0.00819849595, -0.0997591242, 0.994977832, -0.0814954415, 0.991634727, 0.100095443), 0.6)
  625. swait()
  626. end
  627. local rslastc0 = rs.C0
  628. local rslastc1 = rs.C1
  629. local lslastc0 = ls.C0
  630. local lslastc1 = ls.C1
  631. local rhlastc0 = rh.C0
  632. local rhlastc1 = rh.C1
  633. local lhlastc0 = lh.C0
  634. local lhlastc1 = lh.C1
  635. local necklastc0 = neck.C0
  636. local necklastc1 = neck.C1
  637. local rjlastc0 = rj.C0
  638. local rjlastc1 = rj.C1
  639. local max = 0.6
  640. for i = 0, max, 0.1 do
  641. if currentanim ~= "Walking" or not cananim then break end
  642. rs.C0 = rslastc0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  643. rs.C1 = rslastc1:Lerp(CFrame.new(0.0997244716, -0.134959042, -0.791477084, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), i/max)
  644. ls.C0 = lslastc0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  645. ls.C1 = lslastc1:Lerp(CFrame.new(0.728777826, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), i/max)
  646. rh.C0 = rhlastc0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), i/max)
  647. rh.C1 = rhlastc1:Lerp(CFrame.new(0.5, 0.675323606, 0, -0.0421661623, 0.0827250704, 0.995679975, 0.221647412, 0.972508371, -0.0714133158, -0.974214792, 0.217678651, -0.059342742), i/max)
  648. lh.C0 = lhlastc0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), i/max)
  649. lh.C1 = lhlastc1:Lerp(CFrame.new(-0.49999997, 0.680277288, -1.49011612e-08, 0.0194152296, -2.24613939e-11, -0.99981153, -0.183868393, 0.982944369, -0.00357052009, 0.982759118, 0.183903053, 0.0190840904), i/max)
  650. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  651. neck.C1 = necklastc1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0.0515226237, 0.99867183, 0, 0.99867183, -0.0515226237), i/max)
  652. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  653. rj.C1 = rjlastc1:Lerp(CFrame.new(5.82076609e-11, 0.2270886, 2.32830644e-10, -0.996639967, -0.0819067881, 4.13409307e-10, 0.00819849502, -0.0997591093, 0.994977832, -0.081495434, 0.991634727, 0.100095429), i/max)
  654. wait()
  655. end
  656. end
  657. if currentanim == "Idle" and cananim then
  658. for i = 0, 5, 0.1 do
  659. if currentanim ~= "Idle" or not cananim then break end
  660. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  661. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.105339587, -1.12973166, -0.155881107, 0.00388455181, 0.987768173, -0.0249122381, -0.999689579, -1.08894849e-09, 0.987461567, -0.0246075168, 0.155929506), 0.05)
  662. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  663. ls.C1 = ls.C1:Lerp(CFrame.new(0.998242438, 0.966719627, -0.251513988, 0.948773444, -0.0191214401, -0.315378129, 0.315314144, -0.00635479437, 0.948966026, -0.0201497618, -0.999796987, 8.80774065e-10), 0.05)
  664. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  665. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -0.246849835, 0, 0.969053745, 0, 1, 0, -0.969053745, 0, -0.246849835), 0.05)
  666. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  667. lh.C1 = lh.C1:Lerp(CFrame.new(-0.5, 1, 0, 0.0194152314, 0, -0.99981153, 0, 1, 0, 0.99981153, 0, 0.0194152314), 0.05)
  668. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  669. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  670. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  671. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -0.996639967, -0.0819067881, 0, 0, 0, 1, -0.0819067881, 0.996639967, 0), 0.05)
  672. swait()
  673. end
  674. for i = 0, 5, 0.1 do
  675. if currentanim ~= "Idle" or not cananim then break end
  676. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  677. rs.C1 = rs.C1:Lerp(CFrame.new(0.0997244716, -0.134959042, -1.07218063, -0.155881107, 0.00388455181, 0.987768173, 0.0728884861, -0.997220755, 0.0154243633, 0.985082865, 0.0744013041, 0.155164748), 0.05)
  678. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  679. ls.C1 = ls.C1:Lerp(CFrame.new(0.994734883, 0.934069037, -0.221951187, 0.958276987, -0.133620545, -0.252687156, 0.254302055, -0.00512516592, 0.96711117, -0.130520999, -0.991019309, 0.0290686507), 0.05)
  680. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -4.37113883e-08, 0, 1, -0, 0.99999994, 0, -1, 0, -4.37113883e-08), 0.05)
  681. rh.C1 = rh.C1:Lerp(CFrame.new(0.5, 1, 0, -0.246849835, 0, 0.969053745, 0, 1, 0, -0.969053745, 0, -0.246849835), 0.05)
  682. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08), 0.05)
  683. lh.C1 = lh.C1:Lerp(CFrame.new(-0.49999997, 1, 0, 0.0194152314, 0, -0.99981153, 0, 1, 0, 0.99981153, 0, 0.0194152314), 0.05)
  684. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  685. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  686. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  687. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -0.996639967, -0.0819067881, 0, -0.00139390712, 0.0169610307, 0.999855161, -0.0818949267, 0.996495605, -0.017018212), 0.05)
  688. swait()
  689. end
  690. end
  691. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement