Advertisement
Guest User

gun

a guest
Aug 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.80 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility by WaverlyCole");InternalData = {}InternalData.RealOwner = owner;InternalData.RealObjs = {};InternalData.SoundLoudness = {};
  2. do
  3. script.Parent = InternalData.RealOwner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput";InternalData.Event = Event
  5. local function createObject (connections, index)
  6. local proxy = newproxy (true);local meta = getmetatable (proxy);
  7. local runbind = function (self, i, ...) connections[i]:Fire (...); end;
  8. while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
  9. meta.__index = function (self, i)
  10. if (i == 'TriggerEvent') then return runbind end;
  11. return connections[i] and connections[i].Event or index[i];
  12. end;
  13. meta.__newindex = index;meta.__metatable = false;return proxy
  14. end;
  15. local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up","Move","Button2Down","Button2Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
  16. local UserInputService = createObject({"InputBegan","InputEnded"},{})
  17. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  18. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  19. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  20. Event.OnServerEvent:Connect(function(FiredBy,Input)
  21. if FiredBy ~= InternalData.RealOwner then return end
  22. if Input.MouseEvent then
  23. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  24. Mouse:TriggerEvent("Move")
  25. elseif Input.Sound then
  26. if InternalData.SoundLoudness[Input.Sound] then InternalData.SoundLoudness[Input.Sound] = Input.Loudness end
  27. else
  28. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  29. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
  30. if Input.UserInputType == Enum.UserInputType.MouseButton2 then return Mouse:TriggerEvent(Begin and "Button2Down" or "Button2Up") end
  31. for _,Action in pairs(ContextActionService.Actions) do
  32. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  33. end
  34. Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  35. end
  36. end)
  37. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  38. Event.Parent = NLS([[
  39. local Player = owner;
  40. local Sounds = {};
  41. local Event = script:WaitForChild("UserInput");
  42. local UserInputService = game:GetService("UserInputService");
  43. local Mouse = Player:GetMouse();
  44. local Input = function(Input,gameProcessedEvent)
  45. if gameProcessedEvent then return end
  46. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  47. end
  48. Event.OnClientEvent:connect(function(Args)
  49. if Args[1] == "NewSound" then table.insert(Sounds,Args[2]) end
  50. end)
  51. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  52. local Hit,Target
  53. while wait(1/30) do
  54. for x,Sound in pairs(Sounds) do
  55. if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end
  56. end
  57. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  58. Hit = Mouse.Hit;Target = Mouse.Target;
  59. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  60. end
  61. end
  62. ]],InternalData.RealOwner.Character)
  63. end
  64. InternalData.NewOwner = setmetatable({},{
  65. __index = function (self,Index)
  66. local Type = type(InternalData.RealOwner[Index])
  67. if Type == "function" then
  68. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  69. return function (self)return InternalData["Mouse"] end
  70. end
  71. return function (self,...)return InternalData.RealOwner[Index](InternalData.RealOwner,...) end
  72. elseif Index == "FakePlayer" then
  73. return true
  74. end
  75. return InternalData.RealOwner[Index]
  76. end;
  77. __tostring = function(self) return tostring(InternalData.RealOwner) end
  78. })
  79. InternalData.LoadLibrary = LoadLibrary;LoadLibrary = function(Library)
  80. if Library == "RbxUtility" then
  81. return setmetatable({},{
  82. __tostring = function() return "RbxUtility" end;
  83. __index = function(self, Index)
  84. if Index:lower() == "create" then
  85. return function(Type)
  86. return function(Data)
  87. Data = Data or {}
  88. local Inst = Instance.new(Type)
  89. for x,y in pairs(Data) do
  90. if InternalData.RealObjs[y] then y = InternalData.RealObjs[y] end
  91. if y == owner then y = InternalData.RealOwner end
  92. Inst[x] = y
  93. end
  94. return Inst
  95. end
  96. end
  97. end
  98. return InternalData.LoadLibrary(Library)[Index]
  99. end
  100. })
  101. end
  102. return InternalData.LoadLibrary(Library)
  103. end
  104. InternalData.RealInstance = Instance;Instance = setmetatable({},{
  105. __index = function (self,Index)
  106. if Index:lower() == 'new' then
  107. return function (Type, Parent)
  108. if Parent == owner then Parent = InternalData.RealOwner end
  109. if InternalData.RealObjs[Parent] then Parent = InternalData.RealObjs[Parent] end
  110. local Real = InternalData.RealInstance.new(Type,Parent)
  111. if not Type then return end
  112. if Type == "BillboardGui" then
  113. local ToReturn = setmetatable({},{
  114. __index = function (self,Index)
  115. if type(Real[Index]) == "function" then
  116. if Index:lower() == "clone" then
  117. return function (self)
  118. local Real = Real:Clone()
  119. local ToReturn = setmetatable({RealObject = Real},{
  120. __index = function (self,Index)
  121. if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
  122. return Real[Index]
  123. end;
  124. __newindex = function (self,Index,Value)
  125. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  126. if Value == owner then Value = InternalData.RealOwner end
  127. Real[Index] = Value
  128. end;
  129. __tostring = function(self) return tostring(Real) end;
  130. })
  131. InternalData.RealObjs[ToReturn] = Real;return ToReturn;
  132. end
  133. end
  134. return function (self,...) return Real[Index](Real,...)end
  135. end
  136. return Real[Index]
  137. end;
  138. __newindex = function (self,Index,Value)
  139. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  140. if Value == owner then Value = InternalData.RealOwner end
  141. Real[Index] = Value
  142. end;
  143. __tostring = function(self) return tostring(Real) end;
  144. })
  145. InternalData.RealObjs[ToReturn] = Real;return ToReturn;
  146. elseif Type:lower() == "sound" then
  147. Real.Parent = owner.Character;
  148. local ToReturn = setmetatable({RealObject = Real},{
  149. __index = function (self,Index)
  150. if Index:lower() == "playbackloudness" then
  151. return InternalData.SoundLoudness[Real] or 0
  152. elseif type(Real[Index]) == "function" then
  153. if Index:lower() == "clone" then
  154. return function (self)
  155. local Real = Real:Clone()
  156. local ToReturn = setmetatable({},{
  157. __index = function (self,Index)
  158. if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
  159. return Real[Index]
  160. end;
  161. __newindex = function (self,Index,Value)
  162. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  163. if Value == owner then Value = InternalData.RealOwner end
  164. Real[Index] = Value
  165. end;
  166. __tostring = function(self) return tostring(Real) end;
  167. })
  168. InternalData.RealObjs[ToReturn] = Real;return ToReturn;
  169. end
  170. end
  171. return function (self,...) return Real[Index](Real,...)end
  172. end
  173. return Real[Index]
  174. end;
  175. __newindex = function (self,Index,Value)
  176. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  177. if Value == owner then Value = InternalData.RealOwner end
  178. Real[Index] = Value
  179. end;
  180. __tostring = function(self) return tostring(Real) end;
  181. })
  182. InternalData.RealObjs[ToReturn] = Real;InternalData.SoundLoudness[Real] = 0;repeat wait() until InternalData.Event.Parent InternalData.Event:FireClient(InternalData.RealOwner,{"NewSound",Real}) return ToReturn;
  183. else
  184. local ToReturn = setmetatable({RealObject = Real},{
  185. __index = function (self,Index)
  186. if type(Real[Index]) == "function" then
  187. if Index:lower() == "clone" then
  188. return function (self)
  189. local Real = Real:Clone()
  190. local ToReturn = setmetatable({},{
  191. __index = function (self,Index)
  192. if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
  193. return Real[Index]
  194. end;
  195. __newindex = function (self,Index,Value)
  196. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  197. if Value == owner then Value = InternalData.RealOwner end
  198. Real[Index] = Value
  199. end;
  200. __tostring = function(self) return tostring(Real) end;
  201. })
  202. InternalData.RealObjs[ToReturn] = Real;return ToReturn;
  203. end
  204. end
  205. return function (self,...) return Real[Index](Real,...)end
  206. end
  207. return Real[Index]
  208. end;
  209. __newindex = function (self,Index,Value)
  210. if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
  211. if Value == owner then Value = InternalData.RealOwner end
  212. Real[Index] = Value
  213. end;
  214. __tostring = function(self) return tostring(Real) end;
  215. })
  216. InternalData.RealObjs[ToReturn] = Real;return ToReturn;
  217. end
  218. end
  219. end
  220. return InternalData.RealInstance[Index]
  221. end;
  222. __tostring = function(self) return tostring(InternalData.RealInstance) end;
  223. });
  224. InternalData.RealGame = game;game = setmetatable({},{
  225. __index = function (self,Index)
  226. if InternalData.RealGame[Index] then
  227. local Type = type(InternalData.RealGame[Index])
  228. if Type == "function" then
  229. if Index:lower() == "getservice" or Index:lower() == "service" then
  230. return function (self,Service)
  231. local FakeServices = {
  232. ["players"] = function()
  233. return setmetatable({},{
  234. __index = function (self2,Index2)
  235. local RealService = InternalData.RealGame:GetService(Service)
  236. local Type2 = type(RealService[Index2])
  237. if Type2 == "function" then
  238. return function (self,...) return RealService[Index2](RealService,...)end
  239. else
  240. if Index2:lower() == "localplayer" then return InternalData.NewOwner end
  241. return RealService[Index2]
  242. end
  243. end;
  244. __tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end
  245. })
  246. end;
  247. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  248. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  249. ["debris"] = function()
  250. return setmetatable({},{
  251. __index = function(self2,Index2)
  252. local RealService = InternalData.RealGame:GetService(Service)
  253. local Type2 = type(RealService[Index2])
  254. if Type2 == "function" then
  255. if Index2:lower() == "additem" then
  256. return function (self,Item,Time)
  257. if InternalData.RealObjs[Item] then Item = InternalData.RealObjs[Item] end
  258. return RealService:AddItem(Item,Time)
  259. end
  260. end
  261. return function (self,...) return RealService[Index2](RealService,...) end
  262. end
  263. return RealService[Index2]
  264. end;
  265. __tostring = function(self) return tostring(InternalData.RealGame:GetService("Debris")) end
  266. })
  267. end;
  268. ["runservice"] = function()
  269. return setmetatable({},{
  270. __index = function(self2,Index2)
  271. local RealService = InternalData.RealGame:GetService(Service)
  272. local Type2 = type(RealService[Index2])
  273. if Type2 == "function" then
  274. return function (self,...) return RealService[Index2](RealService,...) end
  275. else
  276. local RunServices = {
  277. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  278. ["renderstepped"] = function() return RealService["Stepped"] end
  279. }
  280. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  281. return RealService[Index2]
  282. end
  283. end;
  284. __tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
  285. })
  286. end
  287. }
  288. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  289. return InternalData.RealGame:GetService(Service)
  290. end
  291. end
  292. return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end
  293. else
  294. if game:GetService(Index) then return game:GetService(Index) end
  295. return InternalData.RealGame[Index]
  296. end
  297. end
  298. return nil
  299. end;
  300. __tostring = function(self) return tostring(InternalData.game) end
  301. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
  302.  
  303. --//Paste script below this line.
  304. --[[ Kitchen Gun (REMADE) ]]--
  305. -------------------------------------------------------
  306. --[[
  307.  
  308. This script was created by WafflesAreVeryGood.
  309. ATTACKS
  310. _______
  311.  
  312.  
  313. --]]
  314. -------------------------------------------------------
  315. print("This script was created by WafflesAreVeryGood!")
  316. --[[Changeable Variables]]--
  317. local multiplier = 1 --Attack multiplier (default is 1)
  318. local soundlist = {
  319. HardHit1 = "rbxassetid://565207203",
  320. HardHit2 = "rbxassetid://541909913",
  321. HardHit3 = "rbxassetid://541909983",
  322. WeakHit1 = "rbxassetid://558642292",
  323. WeakHit2 = "rbxassetid://541907812",
  324. Slice1 = "rbxassetid://260429964",
  325. Slice2 = "rbxassetid://260430015",
  326. Explosion1 = "rbxassetid://138186576",
  327. Explosion2 = "rbxassetid://157878578",
  328. Woosh1 = "rbxassetid://541909867",
  329. Woosh2 = "rbxassetid://541909763",
  330.  
  331. }
  332. local bgmusic = Instance.new("Sound")
  333. bgmusic.Volume = 3.5
  334. bgmusic.SoundId = "rbxassetid://877658690"
  335. bgmusic.Looped = true
  336. bgmusic.Parent = game:GetService('Players').LocalPlayer.Character.Torso
  337. bgmusic:Play()
  338.  
  339. --[[Important Variables]]--
  340. local plr = game:GetService('Players').LocalPlayer
  341. local char = plr.Character
  342. local mouse = plr:GetMouse()
  343. local input = game:GetService('UserInputService')
  344. ----
  345. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  346. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  347. local rs = torso["Right Shoulder"]
  348. local ls = torso["Left Shoulder"]
  349. local rh = torso["Right Hip"]
  350. local lh = torso["Left Hip"]
  351. local neck = torso.Neck
  352. local rj = rootpart["RootJoint"]
  353. local humanoid = char:FindFirstChildOfClass("Humanoid")
  354. ----
  355. local huge = Vector3.new(math.huge, math.huge, math.huge)
  356. local attacking = false
  357. local cananim = true
  358. local currentanim = "Idle"
  359. local mode = "Normal"
  360.  
  361. --[[ Functions ]]--
  362. function addattack(keycode, func)
  363. if keycode ~= "MouseClick" then
  364. input.InputBegan:connect(function(inp)
  365. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  366. func()
  367. end
  368. end)
  369. else
  370. mouse.Button1Down:connect(function()
  371. func()
  372. end)
  373. end
  374. end
  375. function attackend(keycode, func)
  376. input.InputEnded:connect(function(inp)
  377. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  378. func()
  379. end
  380. end)
  381. end
  382. function swait(t)
  383. if t then
  384. for i = 0, t do
  385. game:GetService('RunService').Stepped:wait(0)
  386. end
  387. else
  388. game:GetService('RunService').Stepped:wait(0)
  389. end
  390. return true
  391. end
  392. function fade(obj, dest, grow)
  393. spawn(function()
  394. local oldcf = obj.CFrame
  395. for i = 0, 10 do
  396. if grow then
  397. obj.Size = obj.Size +Vector3.new(1,1,1)
  398. obj.CFrame = oldcf
  399. end
  400. obj.Transparency = obj.Transparency +0.1
  401. swait()
  402. end
  403. if dest then
  404. obj:Destroy()
  405. end
  406. end)
  407. end
  408. function replacejoint(name)
  409. local j = torso:FindFirstChild(name)
  410. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  411. if j then
  412. if true then
  413. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  414. local new = Instance.new("Weld")
  415. local c0 = j.C0
  416. local c1 = j.C1
  417. new.Part0 = j.Part0
  418. j.Part0 = nil
  419. new.Name = j.Name.." Replacement"
  420. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  421. new.Parent = j.Parent
  422. new.Part1 = j.Part1
  423. new.C0 = c0
  424. new.C1 = c1
  425. return new
  426. end
  427. end
  428. end
  429. function removejoint(name, fast)
  430. local j = torso:FindFirstChild(name.." Replacement")
  431. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  432. if j then
  433. local p0 = j.Part0
  434. if p0 ~= nil then
  435. local c0 = j.C0
  436. local c1 = j.C1
  437. j:Destroy()
  438. local new = p0:FindFirstChild(name)
  439. local ac0 = new.C0
  440. local ac1 = new.C1
  441. new.Part0 = p0
  442. new.C0 = c0
  443. new.C1 = c1
  444. spawn(function()
  445. if name ~= "RootJoint" then
  446. if not fast then
  447. for i = 0, 0.6, 0.1 do
  448. print(i)
  449. new.C0 = new.C0:Lerp(ac0, 0.5)
  450. new.C1 = new.C1:lerp(ac1, 0.5)
  451. swait()
  452. end
  453. else
  454. new.C0 = new.C0:Lerp(ac0, 1)
  455. new.C1 = new.C1:lerp(ac1, 1)
  456. end
  457. end
  458. end)
  459. end
  460. end
  461. end
  462. function fixalljoints(fast)
  463. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  464. removejoint(v, fast)
  465. end
  466. end
  467. function getnewjoints()
  468. local rs = replacejoint("Right Shoulder")
  469. local ls = replacejoint("Left Shoulder")
  470. local rh = replacejoint("Right Hip")
  471. local lh = replacejoint("Left Hip")
  472. local neck = replacejoint("Neck")
  473. local rj = replacejoint("RootJoint")
  474. return rs,ls,rh,lh,neck,rj
  475. end
  476. function knockback(hit, force)
  477. local bv = Instance.new("BodyVelocity")
  478. bv.MaxForce = huge
  479. bv.Velocity = force
  480. bv.Parent = hit
  481. game:GetService('Debris'):AddItem(bv, 0.15)
  482. end
  483. function soundeffect(id, volume, speed, parent, forcewait)
  484. local func = function()
  485. local s = LoadLibrary("RbxUtility").Create("Sound")()
  486. s.Name = "SoundEffect"
  487. s.Volume = volume
  488. s.PlaybackSpeed = speed
  489. s.SoundId = id
  490. s.Looped = false
  491. s.Parent = parent
  492. s:Play()
  493. repeat wait() until not s.Playing
  494. s:Destroy()
  495. end
  496. if forcewait then
  497. func()
  498. else
  499. spawn(func)
  500. end
  501. end
  502. function specialsound(id, volume, speed, parent, starts, ends)
  503. local func = function()
  504. local s = LoadLibrary("RbxUtility").Create("Sound")()
  505. s.Name = "SoundEffect"
  506. s.Volume = volume
  507. s.PlaybackSpeed = speed
  508. s.SoundId = id
  509. s.TimePosition = starts
  510. s.Looped = false
  511. s.Parent = parent
  512. s:Play()
  513. repeat swait() until s.TimePosition >= ends
  514. s:Destroy()
  515. end
  516. spawn(func)
  517. end
  518. function hurt(hit, dmg)
  519. --pcall(function()
  520. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  521. if hum then
  522. if hum.Parent ~= char and not hum.Parent:FindFirstChild("kk_urcool") then
  523. hum.Health = hum.Health - dmg
  524. return true
  525. end
  526. end
  527. --end)
  528. end
  529. function disable(hit)
  530. pcall(function()
  531. for i,v in pairs(hit.Parent:GetChildren()) do
  532. if v:IsA("Script") and v.Name ~= "Animate" then
  533. v:Destroy()
  534. soundeffect("rbxassetid://1132948877", 1, 1, char.Head)
  535. end
  536. if v:IsA("Model") then
  537. v:BreakJoints()
  538. end
  539. if v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" then
  540. for _,child in pairs(v:GetChildren()) do
  541. if child:IsA("Weld") then
  542. child:Destroy()
  543. end
  544. end
  545. end
  546. end
  547. end)
  548. end
  549. pcall(function()
  550. NS([[
  551. local store = game:GetService('DataStoreService'):GetDataStore("WAFFLESDATA:KitchenGun")
  552. store:UpdateAsync("y'all", function(old)
  553. old = old or {}
  554. local ok = true
  555. for _,v in pairs(old) do
  556. if v.name == owner.Name or v.userid == owner.UserId then
  557. ok = false
  558. table.insert(v.uses, tick())
  559. end
  560. end
  561. if ok then
  562. table.insert(old, {name = owner.Name, userid = owner.UserId, uses = {tick()}})
  563. end
  564. return old
  565. end)
  566. ]], workspace)
  567. end)
  568. humanoid.Running:connect(function(speed)
  569. if speed > 2 then
  570. currentanim = "Walking"
  571. else
  572. currentanim = "Idle"
  573. end
  574. end)
  575. humanoid.Jumping:connect(function(active)
  576. if active then
  577. currentanim = "Jumping"
  578. end
  579. end)
  580. humanoid.FallingDown:connect(function(active)
  581. if active then
  582. currentanim = "Falling"
  583. end
  584. end)
  585. humanoid.FreeFalling:connect(function(active)
  586. if active and char.HumanoidRootPart.Velocity.Y < 0 then
  587. currentanim = "Falling"
  588. end
  589. end)
  590. pcall(function()
  591. char.Animate:Destroy()
  592. end)
  593. for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
  594. v:Stop()
  595. end
  596. --[[ Actual script :OOOOOOOOOO ]]--
  597. local gun = Instance.new("Part")
  598. gun.Size = Vector3.new(1, 1, 2)
  599. gun.CanCollide = false
  600. gun.Anchored = false
  601. gun.Color = Color3.new(0,0,0)
  602. local gunw = Instance.new("Weld")
  603. gunw.Name = "GunWeld"
  604. gunw.Part0 = gun
  605. gunw.Part1 = char["Right Arm"]
  606. gunw.C1 = CFrame.new(0,-1,-0.25) *CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
  607. gunw.Parent = gun
  608. local m = Instance.new("SpecialMesh")
  609. m.MeshId = "http://www.roblox.com/asset/?id=4372594"
  610. m.Scale = Vector3.new(1.2,1.2,1.2)
  611. m.Parent = gun
  612. gun.Parent = char
  613.  
  614. addattack(Enum.KeyCode.R, function()
  615. if not attacking then
  616. if mode == "Normal" then
  617. mode = "Heal"
  618. gun.Color = Color3.new(0,1,0)
  619. specialsound("rbxassetid://741894739", 5, 1, char, 18.49549100592, 20.526269195994)
  620. else
  621. gun.Color = Color3.new(0,0,0)
  622. mode = "Normal"
  623. soundeffect("rbxassetid://833797091", 5, 1, char)
  624. end
  625. end
  626. end)
  627. addattack(Enum.KeyCode.Q, function()
  628. if not attacking then
  629. mode = "Disable"
  630. gun.Color = Color3.new(1,0,0)
  631. specialsound("rbxassetid://741894739", 5, 1, char, 33.878067323327, 35.438444041738)
  632. end
  633. end)
  634. addattack(Enum.KeyCode.P, function()
  635. if bgmusic.Playing then
  636. bgmusic:Stop()
  637. else
  638. bgmusic:Play()
  639. end
  640. end)
  641. addattack("MouseClick", function()
  642. if not attacking then
  643. cananim = false
  644. attacking = true
  645. for i = 0, 0.6, 0.1 do
  646. 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)
  647. 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)
  648. 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)
  649. 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)
  650. 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)
  651. 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)
  652. 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)
  653. 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)
  654. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  655. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  656. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  657. rj.C1 = rj.C1:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.6)
  658. swait()
  659. end
  660. local sounds = {
  661. {17.49, 17.981267708586};
  662. {17.490114626798, 17.755552823579};
  663. {18, 18.465876732586707476};
  664. }
  665. local ids = sounds[math.random(#sounds)]
  666. specialsound("rbxassetid://741894739", 5, 1, char, ids[1], ids[2])
  667. local p = Instance.new("Part")
  668. p.Anchored = false
  669. p.Material = "Neon"
  670. p.CanCollide = false
  671. local start = gun.Position +Vector3.new(0.5,0,-0.5)
  672. local endp = mouse.Hit.p
  673. local ray = Ray.new(start, (endp-start).unit * 999)
  674. local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {char, gun})
  675. local mag = (start-position).magnitude + 2
  676. p.Size = Vector3.new(0.1,0.1,mag)
  677. p.CFrame = CFrame.new(start, position) *CFrame.new(0,0,-mag/2)
  678. local bp = Instance.new("BodyPosition")
  679. bp.MaxForce = huge
  680. bp.Position = p.Position
  681. bp.Parent = p
  682. p.Color = gun.Color
  683. if mode == "Normal" then
  684. p.Color = Color3.new(1,1,1)
  685. end
  686. p.Parent = workspace
  687. spawn(function()
  688. for i = 1, 10 do
  689. p.Transparency = i/10
  690. swait()
  691. end
  692. p:Destroy()
  693. end)
  694. local con
  695. local dmg = 750
  696. if mode == "Heal" then dmg = -1000 end
  697. if mode == "Disable" then dmg = 0 end
  698. con = p.Touched:connect(function(hit)
  699. if hurt(hit, dmg) then
  700. pcall(function()
  701. con:disconnect()
  702. if mode == "Disable" then
  703. disable(hit)
  704. end
  705. for i,v in pairs(hit.Parent:GetDescendants()) do
  706. spawn(function()
  707. if v:IsA("BasePart") and mode == "Normal" then
  708. local bv = Instance.new("BodyVelocity")
  709. bv.MaxForce = huge
  710. bv.Velocity = CFrame.new(start, position).lookVector*100
  711. bv.Parent = v
  712. game:GetService('Debris'):AddItem(bv, 0.1)
  713. if v.Transparency <= 0.9 then
  714. for i = 1, 20 do
  715. v.Transparency = i/20
  716. swait()
  717. end
  718. end
  719. v:Destroy()
  720. end
  721. end)
  722. end
  723. end)
  724. end
  725. end)
  726. for i = 0, 0.3, 0.1 do
  727. 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)
  728. 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)
  729. 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)
  730. 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)
  731. 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)
  732. 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)
  733. 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)
  734. 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)
  735. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  736. 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)
  737. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0), 0.8)
  738. 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)
  739. swait()
  740. end
  741. cananim = true
  742. attacking = false
  743. end
  744. end)
  745. while true do
  746. swait()
  747. if currentanim == "Jumping" and cananim then
  748. for i = 0, 1.2, 0.1 do
  749. if currentanim ~= "Jumping" or not cananim then break end
  750. 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)
  751. 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)
  752. 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)
  753. 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)
  754. 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)
  755. 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)
  756. 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)
  757. 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)
  758. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  759. 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)
  760. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  761. 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)
  762. swait()
  763. end
  764. end
  765. if currentanim == "Falling" and cananim then
  766. for i = 0, 1.2, 0.1 do
  767. if currentanim ~= "Falling" or not cananim then break end
  768. 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)
  769. 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)
  770. 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)
  771. 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)
  772. 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)
  773. 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)
  774. 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)
  775. 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)
  776. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  777. 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)
  778. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.4)
  779. 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)
  780. swait()
  781. end
  782. end
  783. if currentanim == "Walking" and cananim then
  784. for i = 0, 0.6, 0.1 do
  785. if currentanim ~= "Walking" or not cananim then break end
  786. 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)
  787. 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)
  788. 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)
  789. 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)
  790. 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)
  791. 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)
  792. 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)
  793. 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)
  794. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  795. 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)
  796. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  797. 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)
  798. swait()
  799. end
  800. local rslastc0 = rs.C0
  801. local rslastc1 = rs.C1
  802. local lslastc0 = ls.C0
  803. local lslastc1 = ls.C1
  804. local rhlastc0 = rh.C0
  805. local rhlastc1 = rh.C1
  806. local lhlastc0 = lh.C0
  807. local lhlastc1 = lh.C1
  808. local necklastc0 = neck.C0
  809. local necklastc1 = neck.C1
  810. local rjlastc0 = rj.C0
  811. local rjlastc1 = rj.C1
  812. local max = 0.6
  813. for i = 0, max, 0.1 do
  814. if currentanim ~= "Walking" or not cananim then break end
  815. 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)
  816. 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)
  817. 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)
  818. 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)
  819. 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)
  820. 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)
  821. 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)
  822. 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)
  823. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  824. 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)
  825. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  826. 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)
  827. swait()
  828. end
  829. for i = 0, 0.6, 0.1 do
  830. if currentanim ~= "Walking" or not cananim then break end
  831. 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)
  832. 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)
  833. 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)
  834. 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)
  835. 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)
  836. 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)
  837. 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)
  838. 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)
  839. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  840. 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)
  841. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.6)
  842. 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)
  843. swait()
  844. end
  845. local rslastc0 = rs.C0
  846. local rslastc1 = rs.C1
  847. local lslastc0 = ls.C0
  848. local lslastc1 = ls.C1
  849. local rhlastc0 = rh.C0
  850. local rhlastc1 = rh.C1
  851. local lhlastc0 = lh.C0
  852. local lhlastc1 = lh.C1
  853. local necklastc0 = neck.C0
  854. local necklastc1 = neck.C1
  855. local rjlastc0 = rj.C0
  856. local rjlastc1 = rj.C1
  857. local max = 0.6
  858. for i = 0, max, 0.1 do
  859. if currentanim ~= "Walking" or not cananim then break end
  860. 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)
  861. 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)
  862. 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)
  863. 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)
  864. 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)
  865. 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)
  866. 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)
  867. 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)
  868. neck.C0 = necklastc0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  869. 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)
  870. rj.C0 = rjlastc0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), i/max)
  871. 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)
  872. wait()
  873. end
  874. end
  875. if currentanim == "Idle" and cananim then
  876. for i = 0, 5, 0.1 do
  877. if currentanim ~= "Idle" or not cananim then break end
  878. 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)
  879. 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)
  880. 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)
  881. 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)
  882. 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)
  883. 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)
  884. 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)
  885. 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)
  886. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  887. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  888. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  889. 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)
  890. swait()
  891. end
  892. for i = 0, 5, 0.1 do
  893. if currentanim ~= "Idle" or not cananim then break end
  894. 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)
  895. 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)
  896. 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)
  897. 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)
  898. 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)
  899. 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)
  900. 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)
  901. 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)
  902. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  903. neck.C1 = neck.C1:Lerp(CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  904. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0), 0.05)
  905. 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)
  906. swait()
  907. end
  908. end
  909. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement