Advertisement
Tinybang_Studio

Untitled

Mar 24th, 2020
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local multiplier = 1 --Attack multiplier (default is 1)
  3. local soundlist = {
  4. HardHit1 = "rbxassetid://565207203",
  5. HardHit2 = "rbxassetid://541909913",
  6. HardHit3 = "rbxassetid://541909983",
  7. WeakHit1 = "rbxassetid://558642292",
  8. WeakHit2 = "rbxassetid://541907812",
  9. Slice1 = "rbxassetid://260429964",
  10. Slice2 = "rbxassetid://260430015",
  11. Explosion1 = "rbxassetid://138186576",
  12. Explosion2 = "rbxassetid://157878578",
  13. Woosh1 = "rbxassetid://541909867",
  14. Woosh2 = "rbxassetid://541909763",
  15.  
  16. }
  17. local bgmusic = Instance.new("Sound")
  18. bgmusic.Volume = 3.5
  19. bgmusic.SoundId = "rbxassetid://276873987"
  20. bgmusic.Looped = true
  21. bgmusic.Parent = game:GetService('Players').LocalPlayer.Character.Torso
  22. bgmusic:Play()
  23.  
  24. local plr = game:GetService('Players').LocalPlayer
  25. local char = plr.Character
  26. local mouse = plr:GetMouse()
  27. local input = game:GetService('UserInputService')
  28.  
  29. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  30. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  31. local rs = torso["Right Shoulder"]
  32. local ls = torso["Left Shoulder"]
  33. local rh = torso["Right Hip"]
  34. local lh = torso["Left Hip"]
  35. local neck = torso.Neck
  36. local rj = rootpart["RootJoint"]
  37. local humanoid = char:FindFirstChildOfClass("Humanoid")
  38.  
  39. local huge = Vector3.new(math.huge, math.huge, math.huge)
  40. local attacking = false
  41. local cananim = true
  42. local currentanim = "Idle"
  43. local mode = "Normal"
  44.  
  45.  
  46. function addattack(keycode, func)
  47. if keycode ~= "MouseClick" then
  48. input.InputBegan:connect(function(inp)
  49. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  50. func()
  51. end
  52. end)
  53. else
  54. mouse.Button1Down:connect(function()
  55. func()
  56. end)
  57. end
  58. end
  59. function attackend(keycode, func)
  60. input.InputEnded:connect(function(inp)
  61. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  62. func()
  63. end
  64. end)
  65. end
  66. function swait(t)
  67. if t then
  68. for i = 0, t do
  69. game:GetService('RunService').Stepped:wait(0)
  70. end
  71. else
  72. game:GetService('RunService').Stepped:wait(0)
  73. end
  74. return true
  75. end
  76. function fade(obj, dest, grow)
  77. spawn(function()
  78. local oldcf = obj.CFrame
  79. for i = 0, 10 do
  80. if grow then
  81. obj.Size = obj.Size +Vector3.new(1,1,1)
  82. obj.CFrame = oldcf
  83. end
  84. obj.Transparency = obj.Transparency +0.1
  85. swait()
  86. end
  87. if dest then
  88. obj:Destroy()
  89. end
  90. end)
  91. end
  92. function replacejoint(name)
  93. local j = torso:FindFirstChild(name)
  94. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  95. if j then
  96. if true then
  97. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  98. local new = Instance.new("Weld")
  99. local c0 = j.C0
  100. local c1 = j.C1
  101. new.Part0 = j.Part0
  102. j.Part0 = nil
  103. new.Name = j.Name.." Replacement"
  104. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  105. new.Parent = j.Parent
  106. new.Part1 = j.Part1
  107. new.C0 = c0
  108. new.C1 = c1
  109. return new
  110. end
  111. end
  112. end
  113. function removejoint(name, fast)
  114. local j = torso:FindFirstChild(name.." Replacement")
  115. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  116. if j then
  117. local p0 = j.Part0
  118. if p0 ~= nil then
  119. local c0 = j.C0
  120. local c1 = j.C1
  121. j:Destroy()
  122. local new = p0:FindFirstChild(name)
  123. local ac0 = new.C0
  124. local ac1 = new.C1
  125. new.Part0 = p0
  126. new.C0 = c0
  127. new.C1 = c1
  128. spawn(function()
  129. if name ~= "RootJoint" then
  130. if not fast then
  131. for i = 0, 0.6, 0.1 do
  132. print(i)
  133. new.C0 = new.C0:Lerp(ac0, 0.5)
  134. new.C1 = new.C1:lerp(ac1, 0.5)
  135. swait()
  136. end
  137. else
  138. new.C0 = new.C0:Lerp(ac0, 1)
  139. new.C1 = new.C1:lerp(ac1, 1)
  140. end
  141. end
  142. end)
  143. end
  144. end
  145. end
  146. function fixalljoints(fast)
  147. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  148. removejoint(v, fast)
  149. end
  150. end
  151. function getnewjoints()
  152. local rs = replacejoint("Right Shoulder")
  153. local ls = replacejoint("Left Shoulder")
  154. local rh = replacejoint("Right Hip")
  155. local lh = replacejoint("Left Hip")
  156. local neck = replacejoint("Neck")
  157. local rj = replacejoint("RootJoint")
  158. return rs,ls,rh,lh,neck,rj
  159. end
  160. function knockback(hit, force)
  161. local bv = Instance.new("BodyVelocity")
  162. bv.MaxForce = huge
  163. bv.Velocity = force
  164. bv.Parent = hit
  165. game:GetService('Debris'):AddItem(bv, 0.15)
  166. end
  167. function soundeffect(id, volume, speed, parent, forcewait)
  168. local func = function()
  169. local s = LoadLibrary("RbxUtility").Create("Sound")()
  170. s.Name = "SoundEffect"
  171. s.Volume = volume
  172. s.PlaybackSpeed = speed
  173. s.SoundId = id
  174. s.Looped = false
  175. s.Parent = parent
  176. s:Play()
  177. repeat wait() until not s.Playing
  178. s:Destroy()
  179. end
  180. if forcewait then
  181. func()
  182. else
  183. spawn(func)
  184. end
  185. end
  186. function specialsound(id, volume, speed, parent, starts, ends)
  187. local func = function()
  188. local s = LoadLibrary("RbxUtility").Create("Sound")()
  189. s.Name = "SoundEffect"
  190. s.Volume = volume
  191. s.PlaybackSpeed = speed
  192. s.SoundId = id
  193. s.TimePosition = starts
  194. s.Looped = false
  195. s.Parent = parent
  196. s:Play()
  197. repeat swait() until s.TimePosition >= ends
  198. s:Destroy()
  199. end
  200. spawn(func)
  201. end
  202. function hurt(hit, dmg)
  203. --pcall(function()
  204. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  205. if hum then
  206. if hum.Parent ~= char and not hum.Parent:FindFirstChild("kk_urcool") then
  207. hum.Health = hum.Health - dmg
  208. return true
  209. end
  210. end
  211. --end)
  212. end
  213. function disable(hit)
  214. pcall(function()
  215. for i,v in pairs(hit.Parent:GetChildren()) do
  216. if v:IsA("Script") and v.Name ~= "Animate" then
  217. v:Destroy()
  218. soundeffect("rbxassetid://141679994", 2, 2, char.Head)
  219. end
  220. if v:IsA("Model") then
  221. v:BreakJoints()
  222. end
  223. if v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" then
  224. for _,child in pairs(v:GetChildren()) do
  225. if child:IsA("Weld") then
  226. child:Destroy()
  227. end
  228. end
  229. end
  230. end
  231. end)
  232. end
  233. pcall(function()
  234. NS([[
  235. local store = game:GetService('DataStoreService'):GetDataStore("WAFFLESDATA:KitchenGun")
  236. store:UpdateAsync("y'all", function(old)
  237. old = old or {}
  238. local ok = true
  239. for _,v in pairs(old) do
  240. if v.name == owner.Name or v.userid == owner.UserId then
  241. ok = false
  242. table.insert(v.uses, tick())
  243. end
  244. end
  245. if ok then
  246. table.insert(old, {name = owner.Name, userid = owner.UserId, uses = {tick()}})
  247. end
  248. return old
  249. end)
  250. ]], workspace)
  251. end)
  252. humanoid.Running:connect(function(speed)
  253. if speed > 2 then
  254. currentanim = "Walking"
  255. else
  256. currentanim = "Idle"
  257. end
  258. end)
  259. humanoid.Jumping:connect(function(active)
  260. if active then
  261. currentanim = "Jumping"
  262. end
  263. end)
  264. humanoid.FallingDown:connect(function(active)
  265. if active then
  266. currentanim = "Falling"
  267. end
  268. end)
  269. humanoid.FreeFalling:connect(function(active)
  270. if active and char.HumanoidRootPart.Velocity.Y < 0 then
  271. currentanim = "Falling"
  272. end
  273. end)
  274. pcall(function()
  275. char.Animate:Destroy()
  276. end)
  277. for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
  278. v:Stop()
  279. end
  280. --[[ Actual script :OOOOOOOOOO ]]--
  281. local gun = Instance.new("Part")
  282. gun.Size = Vector3.new(1, 1, 2)
  283. gun.CanCollide = false
  284. gun.Anchored = false
  285. gun.Color = Color3.new(255,255,0)
  286. local gunw = Instance.new("Weld")
  287. gunw.Name = "GunWeld"
  288. gunw.Part0 = gun
  289. gunw.Part1 = char["Right Arm"]
  290. gunw.C1 = CFrame.new(0,-1,-0.25) *CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
  291. gunw.Parent = gun
  292. local m = Instance.new("SpecialMesh")
  293. m.MeshId = "http://www.roblox.com/asset/?id=4372594"
  294. m.Scale = Vector3.new(1.2,1.2,1.2)
  295. m.Parent = gun
  296. gun.Parent = char
  297.  
  298. addattack(Enum.KeyCode.R, function()
  299. if not attacking then
  300. if mode == "Normal" then
  301. mode = "Heal"
  302. gun.Color = Color3.new(0,0,255)
  303. specialsound("rbxassetid://174658105", 5, 1, char, 18.49549100592, 20.526269195994)
  304. else
  305. gun.Color = Color3.new(255,255,0)
  306. mode = "Normal"
  307. soundeffect("rbxassetid://174658105", 5, 1, char)
  308. end
  309. end
  310. end)
  311. addattack(Enum.KeyCode.Q, function()
  312. if not attacking then
  313. mode = "Disable"
  314. gun.Color = Color3.new(0,1,0)
  315. specialsound("rbxassetid://174658105", 5, 1, char, 33.878067323327, 35.438444041738)
  316. end
  317. end)
  318. addattack(Enum.KeyCode.P, function()
  319. if bgmusic.Playing then
  320. bgmusic:Stop()
  321. else
  322. bgmusic:Play()
  323. end
  324. end)
  325. addattack("MouseClick", function()
  326. if not attacking then
  327. cananim = false
  328. attacking = true
  329. for i = 0, 0.6, 0.1 do
  330. 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)
  331. 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)
  332. 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)
  333. 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)
  334. 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)
  335. 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)
  336. 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)
  337. 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)
  338. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  339. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  340. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  341. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  342. swait()
  343. end
  344. local sounds = {
  345. {17.49, 17.981267708586};
  346. {17.490114626798, 17.755552823579};
  347. {18, 18.465876732586707476};
  348. }
  349. local ids = sounds[math.random(#sounds)]
  350. specialsound("rbxassetid://741894739", 5, 1, char, ids[1], ids[2])
  351. local p = Instance.new("Part")
  352. p.Anchored = false
  353. p.Material = "Neon"
  354. p.CanCollide = false
  355. local start = gun.Position +Vector3.new(0.5,0,-0.5)
  356. local endp = mouse.Hit.p
  357. local ray = Ray.new(start, (endp-start).unit * 999)
  358. local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {char, gun})
  359. local mag = (start-position).magnitude + 2
  360. p.Size = Vector3.new(0.1,0.1,mag)
  361. p.CFrame = CFrame.new(start, position) *CFrame.new(0,0,-mag/2)
  362. local bp = Instance.new("BodyPosition")
  363. bp.MaxForce = huge
  364. bp.Position = p.Position
  365. bp.Parent = p
  366. p.Color = gun.Color
  367. if mode == "Normal" then
  368. p.Color = Color3.new(255,255,0)
  369. end
  370. p.Parent = workspace
  371. spawn(function()
  372. for i = 1, 10 do
  373. p.Transparency = i/10
  374. swait()
  375. end
  376. p:Destroy()
  377. end)
  378. local con
  379. local dmg = 750
  380. if mode == "Heal" then dmg = -1000 end
  381. if mode == "Disable" then dmg = 0 end
  382. con = p.Touched:connect(function(hit)
  383. if hurt(hit, dmg) then
  384. pcall(function()
  385. con:disconnect()
  386. if mode == "Disable" then
  387. disable(hit)
  388. end
  389. for i,v in pairs(hit.Parent:GetDescendants()) do
  390. spawn(function()
  391. if v:IsA("BasePart") and mode == "Normal" then
  392. local bv = Instance.new("BodyVelocity")
  393. bv.MaxForce = huge
  394. bv.Velocity = CFrame.new(start, position).lookVector*100
  395. bv.Parent = v
  396. game:GetService('Debris'):AddItem(bv, 0.1)
  397. if v.Transparency <= 0.9 then
  398. for i = 1, 20 do
  399. v.Transparency = i/20
  400. swait()
  401. end
  402. end
  403. v:Destroy()
  404. end
  405. end)
  406. end
  407. end)
  408. end
  409. end)
  410. for i = 0, 0.3, 0.1 do
  411. 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)
  412. 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)
  413. 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)
  414. 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)
  415. 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)
  416. 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)
  417. 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)
  418. 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)
  419. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  420. 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)
  421. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  422. 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)
  423. swait()
  424. end
  425. cananim = true
  426. attacking = false
  427. end
  428. end)
  429. while true do
  430. swait()
  431. if currentanim == "Jumping" and cananim then
  432. for i = 0, 1.2, 0.1 do
  433. if currentanim ~= "Jumping" or not cananim then break end
  434. 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)
  435. 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)
  436. 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)
  437. 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)
  438. 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)
  439. 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)
  440. 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)
  441. 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)
  442. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  443. 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)
  444. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  445. 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)
  446. swait()
  447. end
  448. end
  449. if currentanim == "Falling" and cananim then
  450. for i = 0, 1.2, 0.1 do
  451. if currentanim ~= "Falling" or not cananim then break end
  452. 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)
  453. 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)
  454. 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)
  455. 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)
  456. 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)
  457. 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)
  458. 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)
  459. 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)
  460. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  461. 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)
  462. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  463. 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)
  464. swait()
  465. end
  466. end
  467. if currentanim == "Walking" and cananim then
  468. for i = 0, 0.6, 0.1 do
  469. if currentanim ~= "Walking" or not cananim then break end
  470. 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)
  471. 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)
  472. 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)
  473. 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)
  474. 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)
  475. 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)
  476. 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)
  477. 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)
  478. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  479. 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)
  480. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  481. 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)
  482. swait()
  483. end
  484. local rslastc0 = rs.C0
  485. local rslastc1 = rs.C1
  486. local lslastc0 = ls.C0
  487. local lslastc1 = ls.C1
  488. local rhlastc0 = rh.C0
  489. local rhlastc1 = rh.C1
  490. local lhlastc0 = lh.C0
  491. local lhlastc1 = lh.C1
  492. local necklastc0 = neck.C0
  493. local necklastc1 = neck.C1
  494. local rjlastc0 = rj.C0
  495. local rjlastc1 = rj.C1
  496. local max = 0.6
  497. for i = 0, max, 0.1 do
  498. if currentanim ~= "Walking" or not cananim then break end
  499. 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)
  500. 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)
  501. 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)
  502. 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)
  503. 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)
  504. 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)
  505. 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)
  506. 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)
  507. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  508. 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)
  509. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  510. 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)
  511. swait()
  512. end
  513. for i = 0, 0.6, 0.1 do
  514. if currentanim ~= "Walking" or not cananim then break end
  515. 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)
  516. 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)
  517. 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)
  518. 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)
  519. 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)
  520. 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)
  521. 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)
  522. 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)
  523. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  524. 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)
  525. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  526. 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)
  527. swait()
  528. end
  529. local rslastc0 = rs.C0
  530. local rslastc1 = rs.C1
  531. local lslastc0 = ls.C0
  532. local lslastc1 = ls.C1
  533. local rhlastc0 = rh.C0
  534. local rhlastc1 = rh.C1
  535. local lhlastc0 = lh.C0
  536. local lhlastc1 = lh.C1
  537. local necklastc0 = neck.C0
  538. local necklastc1 = neck.C1
  539. local rjlastc0 = rj.C0
  540. local rjlastc1 = rj.C1
  541. local max = 0.6
  542. for i = 0, max, 0.1 do
  543. if currentanim ~= "Walking" or not cananim then break end
  544. 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)
  545. 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)
  546. 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)
  547. 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)
  548. 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)
  549. 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)
  550. 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)
  551. 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)
  552. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  553. 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)
  554. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  555. 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)
  556. wait()
  557. end
  558. end
  559. if currentanim == "Idle" and cananim then
  560. for i = 0, 5, 0.1 do
  561. if currentanim ~= "Idle" or not cananim then break end
  562. 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)
  563. 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)
  564. 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)
  565. 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)
  566. 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)
  567. 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)
  568. 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)
  569. 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)
  570. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  571. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  572. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  573. 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)
  574. swait()
  575. end
  576. for i = 0, 5, 0.1 do
  577. if currentanim ~= "Idle" or not cananim then break end
  578. 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)
  579. 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)
  580. 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)
  581. 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)
  582. 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)
  583. 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)
  584. 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)
  585. 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)
  586. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  587. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  588. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  589. 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)
  590. swait()
  591. end
  592. end
  593. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement