Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. warn("Edited by GAMEKILLERTOY and Meti2000 <3")
  2. m = game:service'Players'.LocalPlayer:GetMouse()
  3. paly = game.Players.LocalPlayer
  4. char = paly.Character
  5. ypcall(function()
  6. shirt = Instance.new("Shirt", char)
  7. shirt.Name = "Shirt"
  8. pants = Instance.new("Pants", char)
  9. pants.Name = "Pants"
  10. char.Shirt.ShirtTemplate = "rbxassetid://654790833"
  11. char.Pants.PantsTemplate = "rbxassetid://576054998"
  12. end)
  13. game.Players.LocalPlayer.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  14. local txtfag = Instance.new("BillboardGui", game.Players.LocalPlayer.Character.Head)
  15. txtfag.Adornee = Hello
  16. txtfag.Name = "Hoi."
  17. txtfag.Size = UDim2.new(2, 0, 1.2, 0)
  18. txtfag.StudsOffset = Vector3.new(-5, 3, 0)
  19. local textfag = Instance.new("TextLabel", txtfag)
  20. textfag.Size = UDim2.new(6, 0, 1, 0)
  21. textfag.FontSize = "Size8"
  22. textfag.TextScaled = true
  23. textfag.TextTransparency = 0
  24. textfag.BackgroundTransparency = 1
  25. textfag.TextTransparency = 0
  26. textfag.TextStrokeTransparency = 0
  27. textfag.Font = "Cartoon"
  28. textfag.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  29. textfag.Text = "y0s"
  30. wait(2)
  31. textfag.Text = "Let's chill .o."
  32. wait(1.7)
  33. textfag.Text = "Mety"
  34.  
  35. do
  36. local filteredMessages = { ['____'] = '___' };
  37. local onPropertyChanged = function (obj)
  38. if (obj:isDescendantOf (workspace)) then
  39. local objText = obj.Text;
  40.  
  41. if (objText ~= '___' and objText:find '(%S)') then
  42. if (filteredMessages [objText] and filteredMessages [objText] ~= objText) then
  43. obj.Text = filteredMessages [objText];
  44. elseif (not filteredMessages [objText]) then
  45. obj.Text = '___';
  46.  
  47. local filtered = game:service 'Chat':FilterStringForBroadcast (objText, game:service 'Players'.localPlayer);
  48.  
  49. filteredMessages [objText] = filtered;
  50. filteredMessages [filtered] = filtered;
  51.  
  52. obj.Text = filtered;
  53. end;
  54. end;
  55. end;
  56. end;
  57.  
  58. local newInstance = Instance.new;
  59. Instance = {
  60. new = function (class, parent)
  61. local obj = newInstance (class, parent);
  62.  
  63. if (pcall (function()return obj.Text;end)) then
  64. obj:getPropertyChangedSignal ('Parent'):connect (function () onPropertyChanged (obj) end);
  65. obj:getPropertyChangedSignal ('Text'):connect (function() onPropertyChanged (obj) end);
  66. end;
  67.  
  68. return obj;
  69. end;
  70. };
  71. end;
  72. plr = game.Players.LocalPlayer
  73. mouse = plr:GetMouse()
  74. part = nil
  75. bp = nil
  76. particles = nil
  77. base = Instance.new("ScreenGui",plr.PlayerGui)
  78. bbg = Instance.new("BillboardGui",plr.Character.Head)
  79. bbg.Size = UDim2.new(0,200,0,50)
  80. bbg.StudsOffset = Vector3.new(0,5,0)
  81. bbgTl = Instance.new("TextLabel",bbg)
  82. bbgTl.BackgroundTransparency = 1
  83. bbgTl.Size = UDim2.new(10,0,1,0)
  84. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  85. bbgTl.Font = "SciFi"
  86. bbgTl.Text = " "
  87. bbgTl.TextSize = 25
  88. bbgTl.TextStrokeColor3 = Color3.new(0,0,0)
  89. bbgTl.TextStrokeTransparency = 0
  90. bbgTl.TextWrapped = true
  91. plr.Chatted:connect(function(msg)
  92. bbgTl.Text = msg
  93. wait(5)
  94. if bbgTl.Text == msg then
  95. bbgTl.Text = " "
  96. while true do
  97. textfag.TextColor3 = Color3.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  98. bbgTl.TextColor3 = Color3.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
  99. wait(.1)
  100. end
  101. end
  102. end)
  103. Player=game:GetService("Players").LocalPlayer
  104. Character=Player.Character
  105. PlayerGui=Player.PlayerGui
  106. Backpack=Player.Backpack
  107. Torso=Character.Torso
  108. Head=Character.Head
  109. Humanoid=Character.Humanoid
  110. m=Instance.new('Model',Character)
  111. LeftArm=Character["Left Arm"]
  112. LeftLeg=Character["Left Leg"]
  113. RightArm=Character["Right Arm"]
  114. RightLeg=Character["Right Leg"]
  115. LS=Torso["Left Shoulder"]
  116. LH=Torso["Left Hip"]
  117. RS=Torso["Right Shoulder"]
  118. RH=Torso["Right Hip"]
  119. Face = Head.face
  120. Neck=Torso.Neck
  121. --it=Instance.new
  122. local hair3 = Instance.new("Part",char)
  123. hair3.Material="Neon"
  124. hair3.CanCollide=false
  125. hair3.Size=Vector3.new(0.1,0.1,0.1)
  126. hair3.Transparency=0
  127.  
  128. local msh = Instance.new("SpecialMesh",hair3)
  129. local text = Instance.new("Texture",hair3)
  130. text.Texture="rbxassetid://151778895"
  131. msh.MeshId="rbxassetid://151778863"
  132. msh.Scale=Vector3.new(1, 1, 1)
  133.  
  134. local w = Instance.new("Weld",hair3)
  135. w.Part1=hair3
  136. w.Part0=Head
  137. w.C0=CFrame.new(0,0,0)
  138. attacktype=1
  139. vt=Vector3.new
  140. cf=CFrame.new
  141. euler=CFrame.fromEulerAnglesXYZ
  142. angles=CFrame.Angles
  143. cloaked=false
  144. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  145. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  146. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  147. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  148. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  149. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  150. RootPart=Character.HumanoidRootPart
  151. RootJoint=RootPart.RootJoint
  152. RootCF=euler(-1.57,0,3.14)
  153. attack = false
  154. attackdebounce = false
  155. deb=false
  156. equipped=true
  157. hand=false
  158. MMouse=nil
  159. combo=0
  160. mana=0
  161. trispeed=.2
  162. attackmode='none'
  163. local idle=0
  164. local Anim="Idle"
  165. local gun=false
  166. local shoot=false
  167. player=nil
  168. mana=0
  169.  
  170. local defensevalue = .3
  171. local speedvalue = 1
  172. local damagevalue = 1
  173. local cf = CFrame.new-- make things ez :3
  174. local mr = math.rad
  175. local angles = CFrame.Angles
  176. local ud = UDim2.new
  177. local c3 = Color3.new
  178.  
  179. local stats=Instance.new('Folder',Character)
  180. stats.Name='Stats'
  181. local block=Instance.new('BoolValue',stats)
  182. block.Name='Block'
  183. block.Value=false
  184. local stun=Instance.new('BoolValue',stats)
  185. stun.Name='Stun'
  186. stun.Value=false
  187. local defense=Instance.new('NumberValue',stats)
  188. defense.Name='Defence'
  189. defense.Value=defensevalue
  190. local speed=Instance.new('NumberValue',stats)
  191. speed.Name='Speed'
  192. speed.Value=speedvalue
  193. local damagea=Instance.new('NumberValue',stats)
  194. damagea.Name='Damage'
  195. damagea.Value=damagevalue
  196.  
  197. Humanoid = Character.Humanoid
  198. if Humanoid:FindFirstChild("Animator")then
  199. Humanoid:FindFirstChild("Animator"):Destroy()
  200. end
  201.  
  202. Humanoid.WalkSpeed = 3
  203.  
  204. music = Instance.new("Sound", Torso)
  205. music.SoundId = "http://www.roblox.com/asset/?id=1360233504"
  206. music.Volume = 2
  207. music.Looped = true
  208. wait(0.1)
  209. music:Play()
  210.  
  211. Colorpart1 = Torso.BrickColor.r
  212. Colorpart2 = Torso.BrickColor.g
  213. Colorpart3 = Torso.BrickColor.b
  214.  
  215. CloakEffectLight2 = Instance.new("PointLight", Torso)
  216. CloakEffectLight2.Color = Color3.new(Colorpart1, Colorpart2, Colorpart3)
  217. CloakEffectLight2.Range = 7.5
  218. CloakEffectLight2.Brightness = 7.5
  219. CloakEffectLight2.Enabled = true
  220.  
  221. mouse=Player:GetMouse()
  222. --save shoulders
  223. RSH, LSH=nil, nil
  224. --welds
  225. RW, LW=Instance.new("Motor"), Instance.new("Motor")
  226. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  227. LH=Torso["Left Hip"]
  228. RH=Torso["Right Hip"]
  229. TorsoColor=Torso.BrickColor
  230. function NoOutline(Part)
  231. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  232. end
  233. player=Player
  234. ch=Character
  235. RSH=ch.Torso["Right Shoulder"]
  236. LSH=ch.Torso["Left Shoulder"]
  237. --
  238. RSH.Parent=nil
  239. LSH.Parent=nil
  240. --
  241. RW.Name="Right Shoulder"
  242. RW.Part0=ch.Torso
  243. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  244. RW.C1=cf(0, 0.5, 0)
  245. RW.Part1=ch["Right Arm"]
  246. RW.Parent=ch.Torso
  247. --
  248. LW.Name="Left Shoulder"
  249. LW.Part0=ch.Torso
  250. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  251. LW.C1=cf(0, 0.5, 0)
  252. LW.Part1=ch["Left Arm"]
  253. LW.Parent=ch.Torso
  254.  
  255. local function weldBetween(a, b)
  256. local weldd = Instance.new("ManualWeld")
  257. weldd.Part0 = a
  258. weldd.Part1 = b
  259. weldd.C0 = CFrame.new()
  260. weldd.C1 = b.CFrame:inverse() * a.CFrame
  261. weldd.Parent = a
  262. return weldd
  263. end
  264.  
  265. fat = Instance.new("BindableEvent", script)
  266. fat.Name = "Heartbeat"
  267.  
  268. script:WaitForChild("Heartbeat")
  269.  
  270. frame = 1 / 30
  271. tf = 0
  272. allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
  273. tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
  274. lastframe = tick()
  275. script.Heartbeat:Fire() --ayy lmao
  276.  
  277. game:GetService("RunService").Heartbeat:connect(function(s, p) --herp derp
  278. tf = tf + s
  279. if tf >= frame then
  280. if allowframeloss then
  281. script.Heartbeat:Fire()
  282. lastframe = tick()
  283. else
  284. --print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
  285. for i = 1, math.floor(tf / frame) do
  286. script.Heartbeat:Fire()
  287. end
  288. lastframe = tick()
  289. end
  290. if tossremainder then
  291. tf = 0
  292. else
  293. tf = tf - frame * math.floor(tf / frame)
  294. end
  295. end
  296. end)
  297.  
  298. --To use: fat.Event:fat.Event:wait() or fat.Event:connect(function() asdcode end)
  299.  
  300. local function CFrameFromTopBack(at, top, back)
  301. local right = top:Cross(back)
  302. return CFrame.new(at.x, at.y, at.z,
  303. right.x, top.x, back.x,
  304. right.y, top.y, back.y,
  305. right.z, top.z, back.z)
  306. end
  307.  
  308. function Triangle(a, b, c)
  309. local edg1 = (c-a):Dot((b-a).unit)
  310. local edg2 = (a-b):Dot((c-b).unit)
  311. local edg3 = (b-c):Dot((a-c).unit)
  312. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  313. a, b, c = a, b, c
  314. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  315. a, b, c = b, c, a
  316. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  317. a, b, c = c, a, b
  318. else
  319. assert(false, "unreachable")
  320. end
  321.  
  322. local len1 = (c-a):Dot((b-a).unit)
  323. local len2 = (b-a).magnitude - len1
  324. local width = (a + (b-a).unit*len1 - c).magnitude
  325.  
  326. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  327.  
  328. local list = {}
  329.  
  330. local TrailColor = ("Dark grey")
  331.  
  332. if len1 > 0.01 then
  333. local w1 = Instance.new('WedgePart', m)
  334. game:GetService("Debris"):AddItem(w1,5)
  335. w1.Material = "SmoothPlastic"
  336. w1.FormFactor = 'Custom'
  337. w1.BrickColor = BrickColor.new(TrailColor)
  338. w1.Transparency = 0
  339. w1.Reflectance = 0
  340. w1.Material = "SmoothPlastic"
  341. w1.CanCollide = false
  342. NoOutline(w1)
  343. local sz = Vector3.new(0.2, width, len1)
  344. w1.Size = sz
  345. local sp = Instance.new("SpecialMesh",w1)
  346. sp.MeshType = "Wedge"
  347. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  348. w1:BreakJoints()
  349. w1.Anchored = true
  350. w1.Parent = workspace
  351. w1.Transparency = 0.7
  352. table.insert(Effects,{w1,"Disappear",.01})
  353. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  354. table.insert(list,w1)
  355. end
  356.  
  357. if len2 > 0.01 then
  358. local w2 = Instance.new('WedgePart', m)
  359. game:GetService("Debris"):AddItem(w2,5)
  360. w2.Material = "SmoothPlastic"
  361. w2.FormFactor = 'Custom'
  362. w2.BrickColor = BrickColor.new(TrailColor)
  363. w2.Transparency = 0
  364. w2.Reflectance = 0
  365. w2.Material = "SmoothPlastic"
  366. w2.CanCollide = false
  367. NoOutline(w2)
  368. local sz = Vector3.new(0.2, width, len2)
  369. w2.Size = sz
  370. local sp = Instance.new("SpecialMesh",w2)
  371. sp.MeshType = "Wedge"
  372. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  373. w2:BreakJoints()
  374. w2.Anchored = true
  375. w2.Parent = workspace
  376. w2.Transparency = 0.7
  377. table.insert(Effects,{w2,"Disappear",.01})
  378. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  379. table.insert(list,w2)
  380. end
  381. return unpack(list)
  382. end
  383.  
  384. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  385. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  386. end
  387.  
  388. function clerp(a,b,t)
  389. local qa = {QuaternionFromCFrame(a)}
  390. local qb = {QuaternionFromCFrame(b)}
  391. local ax, ay, az = a.x, a.y, a.z
  392. local bx, by, bz = b.x, b.y, b.z
  393. local _t = 1-t
  394. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  395. end
  396.  
  397. function QuaternionFromCFrame(cf)
  398. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  399. local trace = m00 + m11 + m22
  400. if trace > 0 then
  401. local s = math.sqrt(1 + trace)
  402. local recip = 0.5/s
  403. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  404. else
  405. local i = 0
  406. if m11 > m00 then
  407. i = 1
  408. end
  409. if m22 > (i == 0 and m00 or m11) then
  410. i = 2
  411. end
  412. if i == 0 then
  413. local s = math.sqrt(m00-m11-m22+1)
  414. local recip = 0.5/s
  415. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  416. elseif i == 1 then
  417. local s = math.sqrt(m11-m22-m00+1)
  418. local recip = 0.5/s
  419. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  420. elseif i == 2 then
  421. local s = math.sqrt(m22-m00-m11+1)
  422. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  423. end
  424. end
  425. end
  426.  
  427. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  428. local xs, ys, zs = x + x, y + y, z + z
  429. local wx, wy, wz = w*xs, w*ys, w*zs
  430. local xx = x*xs
  431. local xy = x*ys
  432. local xz = x*zs
  433. local yy = y*ys
  434. local yz = y*zs
  435. local zz = z*zs
  436. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  437. end
  438.  
  439. function QuaternionSlerp(a, b, t)
  440. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  441. local startInterp, finishInterp;
  442. if cosTheta >= 0.0001 then
  443. if (1 - cosTheta) > 0.0001 then
  444. local theta = math.acos(cosTheta)
  445. local invSinTheta = 1/math.sin(theta)
  446. startInterp = math.sin((1-t)*theta)*invSinTheta
  447. finishInterp = math.sin(t*theta)*invSinTheta
  448. else
  449. startInterp = 1-t
  450. finishInterp = t
  451. end
  452. else
  453. if (1+cosTheta) > 0.0001 then
  454. local theta = math.acos(-cosTheta)
  455. local invSinTheta = 1/math.sin(theta)
  456. startInterp = math.sin((t-1)*theta)*invSinTheta
  457. finishInterp = math.sin(t*theta)*invSinTheta
  458. else
  459. startInterp = t-1
  460. finishInterp = t
  461. end
  462. end
  463. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  464. end
  465.  
  466. sitting=false
  467. resting=false
  468. meditating=false
  469. sprint=false
  470.  
  471. mouse.Button1Down:connect(function()
  472. end)
  473. print'Only instinct left is survival.'
  474. mouse.KeyDown:connect(function(k)
  475. k=k:lower()
  476. if k=='z' and attack==false and resting==false and sprint==false and meditating==false then
  477. attack=true
  478. if sitting==false then
  479. sitting=true
  480. Humanoid.WalkSpeed = 0
  481. for i=0,1,0.04 do
  482. fat.Event:wait()
  483. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.25)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  484. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  485. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  486. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.3,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  487. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-60),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  488. LH.C0=clerp(LH.C0,cf(-0.75,0.25,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  489. end
  490. elseif sitting==true then
  491. sitting=false
  492. for i=0,1,0.04 do
  493. fat.Event:wait()
  494. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.25)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  495. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  496. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  497. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.3,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  498. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-60),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  499. LH.C0=clerp(LH.C0,cf(-0.75,0.25,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  500. end
  501. Humanoid.WalkSpeed = 3
  502. end
  503. attack=false
  504. end
  505. if k=='x' and attack==false and sitting==false and sprint==false and meditating==false then
  506. attack=true
  507. if resting==false then
  508. resting=true
  509. Humanoid.WalkSpeed = 0
  510. for i=0,1,0.04 do
  511. fat.Event:wait()
  512. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.05)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  513. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  514. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  515. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.1,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  516. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-40),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  517. LH.C0=clerp(LH.C0,cf(-0.75,0.05,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  518. end
  519. elseif resting==true then
  520. resting=false
  521. for i=0,1,0.04 do
  522. fat.Event:wait()
  523. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.05)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  524. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  525. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  526. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.1,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  527. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-40),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  528. LH.C0=clerp(LH.C0,cf(-0.75,0.05,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  529. end
  530. Humanoid.WalkSpeed = 3
  531. end
  532. attack=false
  533. end
  534. if k=='c' and attack==false and sitting==false and resting==false and sprint==false then
  535. attack=true
  536. if meditating==false then
  537. meditating=true
  538. Humanoid.WalkSpeed = 0
  539. for i=0,1,0.04 do
  540. fat.Event:wait()
  541. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.05)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  542. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  543. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  544. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.1,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  545. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-40),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  546. LH.C0=clerp(LH.C0,cf(-0.75,0.05,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  547. end
  548. elseif meditating==true then
  549. meditating=false
  550. for i=0,1,0.04 do
  551. fat.Event:wait()
  552. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.05)*angles(math.rad(0),math.rad(15),math.rad(0)),0.15)
  553. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(30)),0.15)
  554. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(20)),0.15)
  555. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.1,0)*angles(math.rad(15),math.rad(0),math.rad(-25)),0.15)
  556. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-40),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  557. LH.C0=clerp(LH.C0,cf(-0.75,0.05,-1)*angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(-15),math.rad(0),math.rad(0)),0.15)
  558. end
  559. Humanoid.WalkSpeed = 3
  560. end
  561. attack=false
  562. end
  563. if k=='e' and attack==false and resting==false and sitting==false and meditating==false and sprint==false then
  564. sprint=true
  565. Humanoid.WalkSpeed = 20
  566. end
  567. end)
  568.  
  569. mouse.KeyUp:connect(function(k)
  570. if k=='e' and attack==false and resting==false and sitting==false and meditating==false and sprint==true then
  571. sprint=false
  572. Humanoid.WalkSpeed = 3
  573. end
  574. end)
  575.  
  576. local sine = 0
  577. local change = 1
  578. local val = 0
  579.  
  580. fat.Event:connect(function()
  581. sine = sine + change
  582. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  583. local velderp=RootPart.Velocity.y
  584. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  585. if equipped==true or equipped==false then
  586. if attack==false then
  587. idle=idle+1
  588. else
  589. idle=0
  590. end
  591. if idle>=500 then
  592. if attack==false then
  593. --Sheath()
  594. end
  595. end
  596. if RootPart.Velocity.y > 1 and hitfloor==nil then
  597. Anim="Jump"
  598. if attack==false then
  599. change=1
  600. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(0)),0.15)
  601. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(0)),0.15)
  602. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(-20),math.rad(0),math.rad(20)),0.15)
  603. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-20),math.rad(0),math.rad(-20)),0.15)
  604. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-20),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),0.15)
  605. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-20),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),0.15)
  606. end
  607. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  608. Anim="Fall"
  609. if attack==false then
  610. change=1
  611. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(0)),0.15)
  612. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),0.15)
  613. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(10),math.rad(0),math.rad(10)),0.15)
  614. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(10),math.rad(0),math.rad(-10)),0.15)
  615. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(10),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),0.15)
  616. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-10),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),0.15)
  617. end
  618. elseif torvel<1 and hitfloor~=nil then
  619. Anim="Idle"
  620. if attack==false and sitting==false and resting==false and meditating==false then
  621. change=1
  622. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/30))*angles(math.rad(-2.5*math.cos(sine/30)),math.rad(0),math.rad(0)),0.15)
  623. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5*math.cos(sine/30))+ -math.sin(sine/30)/15,math.rad(0),math.rad(0)),0.15)
  624. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.55+0.05*math.cos(sine/30)+ -math.sin(sine/30)/40,0)*angles(math.rad(5-2.5*math.cos(sine/30)),math.rad(0),math.rad(10+5*math.cos(sine/30))+ math.sin(sine/30)/20),0.15)
  625. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.55+0.05*math.cos(sine/30)+ -math.sin(sine/30)/40,0)*angles(math.rad(5-2.5*math.cos(sine/30)),math.rad(0),math.rad(-10-5*math.cos(sine/30))+ -math.sin(sine/30)/20),0.15)
  626. RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/30),0.025*math.cos(sine/30))*angles(math.rad(-2.5*math.cos(sine/30)),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  627. LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/30),0.025*math.cos(sine/30))*angles(math.rad(-2.5*math.cos(sine/30)),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  628. else
  629. if attack==false and sitting==true and resting==false and meditating==false then
  630. change=1
  631. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.9)*angles(math.rad(-45-2.5*math.cos(sine/30)),math.rad(0),math.rad(0)),0.15)
  632. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(-5*math.cos(sine/30))+ -math.sin(sine/30)/15,math.rad(0),math.rad(0)),0.15)
  633. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.45,0)*angles(math.rad(-45-2.5*math.cos(sine/30)),math.rad(0),math.rad(10)),0.15)
  634. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.45,0)*angles(math.rad(-45-2.5*math.cos(sine/30)),math.rad(0),math.rad(-10)),0.15)
  635. RH.C0=clerp(RH.C0,cf(1,-1,0.025*math.cos(sine/30))*angles(math.rad(45-2.5*math.cos(sine/30)),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  636. LH.C0=clerp(LH.C0,cf(-1,-1,0.025*math.cos(sine/30))*angles(math.rad(45-2.5*math.cos(sine/30)),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  637. else
  638. if attack==false and sitting==false and resting==true and meditating==false then
  639. change=1
  640. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.3)*angles(math.rad(-80-1*math.cos(sine/30)),math.rad(0),math.rad(0)),0.15)
  641. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(5-1*math.cos(sine/30))+ -math.sin(sine/30)/15,math.rad(0),math.rad(0)),0.15)
  642. RW.C0=clerp(RW.C0,CFrame.new(1,0.75,0.1)*angles(math.rad(215-1*math.cos(sine/30)),math.rad(0),math.rad(-45)),0.15)
  643. LW.C0=clerp(LW.C0,CFrame.new(-1,0.75,0.1)*angles(math.rad(200-1*math.cos(sine/30)),math.rad(0),math.rad(45)),0.15)
  644. RH.C0=clerp(RH.C0,cf(1,-1,0.025*math.cos(sine/30))*angles(math.rad(25-1*math.cos(sine/30)),math.rad(90),math.rad(0))*angles(math.rad(20),math.rad(0),math.rad(0)),0.15)
  645. LH.C0=clerp(LH.C0,cf(-1,-1,0.025*math.cos(sine/30))*angles(math.rad(10-1*math.cos(sine/30)),math.rad(-90),math.rad(0))*angles(math.rad(20),math.rad(0),math.rad(0)),0.15)
  646. else
  647. if attack==false and sitting==false and resting==false and meditating==true then
  648. change=1
  649. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.9)*angles(math.rad(10-1*math.cos(sine/30)),math.rad(0),math.rad(0)),0.15)
  650. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0)*angles(math.rad(10-1*math.cos(sine/30))+ -math.sin(sine/30)/15,math.rad(0),math.rad(0)),0.15)
  651. RW.C0=clerp(RW.C0,CFrame.new(1.25,0.5,-0.5)*angles(math.rad(0),math.rad(165),math.rad(90)),0.15)
  652. LW.C0=clerp(LW.C0,CFrame.new(-1.25,0.5,-0.5)*angles(math.rad(0),math.rad(-165),math.rad(-90)),0.15)
  653. RH.C0=clerp(RH.C0,cf(1,-1,0.1)*angles(math.rad(-30),math.rad(75),math.rad(0))*angles(math.rad(80),math.rad(0),math.rad(0)),0.15)
  654. LH.C0=clerp(LH.C0,cf(-1,-1,0.1)*angles(math.rad(-30),math.rad(-75),math.rad(0))*angles(math.rad(80),math.rad(0),math.rad(0)),0.15)
  655. end
  656. end
  657. end
  658. end
  659. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  660. Anim="Walk"
  661. if attack==false and sprint==false then
  662. change=0.5
  663. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  664. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0+0.025*math.cos(sine/3.5))*angles(math.rad(0-2.5*math.cos(sine/3.5)),math.rad(1.5*math.cos(sine/7)),math.rad(-7.5*math.cos(sine/7))),0.15)
  665. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  666. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  667. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-15-15*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0+2.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  668. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-15+15*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0-2.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  669. elseif attack==false and sprint==true then
  670. change=1
  671. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  672. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*cf(0,0,0+0.025*math.cos(sine/3.5))*angles(math.rad(0-2.5*math.cos(sine/3.5)),math.rad(1.5*math.cos(sine/7)),math.rad(-7.5*math.cos(sine/7))),0.15)
  673. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(45*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  674. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-45*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  675. RH.C0=clerp(RH.C0,cf(1,-0.9-0.25*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-15-45*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0+2.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  676. LH.C0=clerp(LH.C0,cf(-1,-0.9+0.25*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-15+45*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0-2.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  677. end
  678. elseif torvel<22 and hitfloor~=nil then
  679. Anim="Run"
  680. if attack==false then
  681. end
  682. end
  683. end
  684. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement