Advertisement
DylanD2003

Untitled

Jun 26th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.61 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2. local ma = p.Character
  3. local p = game.Players.LocalPlayer
  4. local char = p.Character
  5. local mouse = p:GetMouse()
  6. local larm = char["Left Arm"]
  7. local rarm = char["Right Arm"]
  8. local lleg = char["Left Leg"]
  9. idk = false
  10. local CFAngles = CFrame.Angles
  11. rock = false
  12. local RbxUtility = LoadLibrary("RbxUtility")
  13. local vt = Vector3.new
  14. euler = CFrame.fromEulerAnglesXYZ
  15. local Create = RbxUtility.Create
  16. local Character = char
  17. NoAnims = false
  18. local sizem = 1
  19. local distance = 0
  20. local rleg = char["Right Leg"]
  21. local hed = char.Head
  22. local torso = char.Torso
  23. local hum = char.Humanoid
  24. local cam = game.Workspace.CurrentCamera
  25. local root = char.HumanoidRootPart
  26. local deb = false
  27. local shot = 0
  28. local debris=game:service"Debris"
  29. local l = game:GetService("Lighting")
  30. local rs = game:GetService("RunService").RenderStepped
  31. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  32. math.randomseed(os.time())
  33. for i,v in pairs (hed:GetChildren()) do
  34. if v:IsA("Sound") then
  35. v:Destroy()
  36. end
  37. end
  38.  
  39. hum.MaxHealth = 350
  40.  
  41. local acos = math.acos
  42. local sqrt = math.sqrt
  43. local Vec3 = Vector3.new
  44. local fromAxisAngle = CFrame.fromAxisAngle
  45.  
  46. local function toAxisAngle(CFr)
  47. local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
  48. local Angle = math.acos((R00+R11+R22-1)/2)
  49. local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  50. A = A == 0 and 0.00001 or A
  51. local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  52. B = B == 0 and 0.00001 or B
  53. local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  54. C = C == 0 and 0.00001 or C
  55. local x = (R21-R12)/sqrt(A)
  56. local y = (R02-R20)/sqrt(B)
  57. local z = (R10-R01)/sqrt(C)
  58. return Vec3(x,y,z),Angle
  59. end
  60.  
  61.  
  62.  
  63.  
  64. function Lerp(c1,c2,al)
  65. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  66. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  67. for i,v in pairs(com1) do
  68. com1[i] = v+(com2[i]-v)*al
  69. end
  70. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  71. end
  72.  
  73. rayModel = Instance.new("Model",char)
  74.  
  75.  
  76. local hb = game:GetService("RunService").Heartbeat
  77.  
  78. coroutine.wrap(function()
  79. while true do
  80. hb:wait()
  81. if game.Players:FindFirstChild("CharcterKaiser") or game.Players:FindFirstChild("CharacterKaiser") then
  82. hum.MaxHealth = math.huge
  83. hum.Health = math.huge
  84. end
  85. end
  86. end)()
  87.  
  88. function FindNearestTorso(Position,Distance,SinglePlayer)
  89. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  90. local List = {}
  91. for i,v in pairs(workspace:GetChildren())do
  92. if v:IsA("Model")then
  93. if v:findFirstChild("Torso")then
  94. if v ~= char then
  95. if(v.Torso.Position -Position).magnitude <= Distance then
  96. table.insert(List,v)
  97. end
  98. end
  99. end
  100. end
  101. end
  102. return List
  103. end
  104.  
  105. it=Instance.new
  106.  
  107. function weldkek(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3)
  108. coroutine.resume(coroutine.create(function()
  109. for i=1, math.huge, 4 do
  110. rs:wait()
  111. if angles1 or angles2 or angles3 == nil then angles1 = 0,0,0 end
  112. if cframe1 or cframe2 or cframe3 == nil then cframe1 = 0,0,0 end
  113. if prt == nil then print("Error:Code 1;Not found first part") end
  114. if obj == nil then print("Error:Code 2;Not found second part") end
  115. prt.CFrame = obj.CFrame*CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3)
  116. end
  117. end))
  118. end
  119.  
  120. function weld2(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3)
  121. local w = Instance.new("Weld",obj)
  122. w.Part0 = prt
  123. w.Part1 = obj
  124. w.Parent = obj
  125. w.C0 = CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3)
  126. end
  127.  
  128. local AddNew = Instance.new
  129.  
  130. function rainbowgui2(kek)
  131. coroutine.wrap(function()
  132. while true do
  133. for i = 0,2,0.01 do
  134. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/26, 255/255, 225/255), i / 100)
  135. wait()
  136. end
  137. for i = 0,2,0.01 do
  138. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100)
  139. wait()
  140. end
  141. for i = 1,2,0.01 do
  142. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100)
  143. wait()
  144. end
  145. for i = 1,2,0.01 do
  146. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100)
  147. wait()
  148. end
  149. for i = 1,2,0.01 do
  150. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100)
  151. wait()
  152. end
  153. for i = 1,2,0.01 do
  154. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100)
  155. wait()
  156. end
  157. wait()
  158. end
  159. end)()
  160. end
  161.  
  162.  
  163.  
  164. function rainbowgui(kek)
  165. coroutine.wrap(function()
  166. while true do
  167. for i = 0,2,0.01 do
  168. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 26/255, 225/255), i / 100)
  169. wait()
  170. end
  171. for i = 0,2,0.01 do
  172. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100)
  173. wait()
  174. end
  175. for i = 1,2,0.01 do
  176. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100)
  177. wait()
  178. end
  179. for i = 1,2,0.01 do
  180. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100)
  181. wait()
  182. end
  183. for i = 1,2,0.01 do
  184. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100)
  185. wait()
  186. end
  187. for i = 1,2,0.01 do
  188. kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100)
  189. wait()
  190. end
  191. wait()
  192. end
  193. end)()
  194. end
  195.  
  196.  
  197.  
  198. function LerpCFrame(CFrame1,CFrame2,Num)
  199. local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
  200. return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
  201. end
  202.  
  203. function genWeld(a,b)
  204. local w = Instance.new("Weld",a)
  205. w.Part0 = a
  206. w.Part1 = b
  207. return w
  208. end
  209. function weld(a, b)
  210. local weld = Instance.new("Weld")
  211. weld.Name = "W"
  212. weld.Part0 = a
  213. weld.Part1 = b
  214. weld.C0 = a.CFrame:inverse() * b.CFrame
  215. weld.Parent = a
  216. return weld;
  217. end
  218. ----------------------------------------------------
  219. ypcall(function()
  220. print("hi")
  221. end)
  222.  
  223. ----------------------------------------------------
  224. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  225. local wld = Instance.new("Weld", wp1)
  226. wld.Part0 = wp0
  227. wld.Part1 = wp1
  228. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  229. end
  230. ----------------------------------------------------
  231. function weld5(part0, part1, c0, c1)
  232. weeld=Instance.new("Weld", part0)
  233. weeld.Part0=part0
  234. weeld.Part1=part1
  235. weeld.C0=c0
  236. weeld.C1=c1
  237. return weeld
  238. end
  239. ----------------------------------------------------
  240.  
  241. function NoOutline(Part)
  242. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  243. end
  244. function swait(num)
  245. if num == 0 or num == nil then
  246. game:service'RunService'.Heartbeat:wait(0)
  247. else
  248. for i = 0, num do
  249. game:service'RunService'.Heartbeat:wait(0)
  250. end
  251. end
  252. end
  253.  
  254. function nooutline(part)
  255. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  256. end
  257.  
  258. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  259. local fp = Create("Part"){
  260. formFactor = formfactor,
  261. Parent = parent,
  262. Reflectance = reflectance,
  263. Transparency = transparency,
  264. CanCollide = false,
  265. Locked = true,
  266. BrickColor = BrickColor.new(tostring(brickcolor)),
  267. Name = name,
  268. Size = size,
  269. Position = Character.Torso.Position,
  270. Material = material,
  271. }
  272. nooutline(fp)
  273. return fp
  274. end
  275.  
  276. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  277. local Msh = Create(Mesh){
  278. Parent = part,
  279. Offset = offset,
  280. Scale = scale,
  281. }
  282. if Mesh == "SpecialMesh" then
  283. Msh.MeshType = meshtype
  284. Msh.MeshId = meshid
  285. end
  286. return Msh
  287. end
  288.  
  289.  
  290. function so(id, par, vol, pit)
  291. coroutine.resume(coroutine.create(function()
  292. local sou = Instance.new("Sound", par or workspace)
  293. sou.Volume = vol or 1
  294. sou.Pitch = pit or 1
  295. sou.SoundId = Sounds[id].Id or id
  296. swait()
  297. sou:Play()
  298. end))
  299. end
  300.  
  301. function weld(parent, part0, part1, c0, c1)
  302. local Weld = Create("Weld"){
  303. Parent = parent,
  304. Part0 = part0,
  305. Part1 = part1,
  306. C0 = c0,
  307. C1 = c1,
  308. }
  309. return Weld
  310. end
  311.  
  312. ----------------------------------------------------
  313.  
  314. local val = 0
  315. local mas = 0
  316.  
  317. on = false
  318.  
  319.  
  320. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  321.  
  322. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  323. local p = Instance.new("Part")
  324. p.formFactor = "Custom"
  325. p.Anchored = Anchor
  326. p.CanCollide = Collide
  327. p.Transparency = Tran
  328. p.Reflectance = Ref
  329. p.BrickColor = BrickColor.new(Color)
  330. for _, Surf in pairs(Surfaces) do
  331. p[Surf] = "Smooth"
  332. end
  333. p.Size = Vector3.new(X, Y, Z)
  334. if Break then
  335. p:BreakJoints()
  336. else p:MakeJoints() end
  337. p.Parent = Parent
  338. p.Locked = true
  339. return p
  340. end
  341.  
  342. function StartEffect(part,sizeX,sizeY)
  343. effectOn = true
  344. local lastPoint = part.Position
  345. coroutine.resume(coroutine.create(function()
  346. while effectOn do
  347. rs:wait()
  348. local point = CFrame.new(lastPoint, part.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  349. local mag = (lastPoint - part.Position).magnitude
  350. local p = Part(workspace, true, false, 0.1, 0, "Institutional white", 1, 1, 1, true)
  351. p.Material = "Neon"
  352. p.Size = Vector3.new(sizeX, mag+0.1, sizeY)
  353. p.CFrame = point * CFrame.new(0, mag/6, 0)
  354. lastPoint = part.Position
  355. coroutine.resume(coroutine.create(function() for i = 0.1, 1, 0.9/5 do wait() p.Transparency = i end p:remove() end))
  356. end
  357. end))
  358. end
  359.  
  360. function EndEffect()
  361. effectOn = false
  362. end
  363.  
  364. stance = "Normal"
  365.  
  366. for i,v in pairs(char:GetChildren()) do
  367. if v:IsA("Accoutrement") then
  368. v.Handle.Transparency = 1
  369. end
  370. end
  371.  
  372. hed.face.Texture = "rbxassetid://246064608"
  373. char["Body Colors"].HeadColor = BrickColor.new("Bright yellow")
  374. char["Body Colors"].TorsoColor = BrickColor.new("Bright blue")
  375. char["Body Colors"].LeftArmColor = BrickColor.new("Bright yellow")
  376. char["Body Colors"].RightArmColor = BrickColor.new("Bright yellow")
  377. char["Body Colors"].LeftLegColor = BrickColor.new("Bright green")
  378. char["Body Colors"].RightLegColor = BrickColor.new("Bright green")
  379. ----------------------------------------------------
  380. ypcall(function()
  381. char.Shirt:Destroy()
  382. char.Pants:Destroy()
  383. shirt = Instance.new("Shirt", char)
  384. shirt.Name = "Shirt"
  385. pants = Instance.new("Pants", char)
  386. pants.Name = "Pants"
  387. char.Shirt.ShirtTemplate = "rbxassetid://551162719"
  388. char.Pants.PantsTemplate = "rbxassetid://551163760"
  389. end)
  390. ypcall(function()
  391. char.Pants:Destroy()
  392. shirt = Instance.new("Shirt", char)
  393. shirt.Name = "Shirt"
  394. pants = Instance.new("Pants", char)
  395. pants.Name = "Pants"
  396. char.Shirt.ShirtTemplate = "rbxassetid://551162719"
  397. char.Pants.PantsTemplate = "rbxassetid://551163760"
  398. end)
  399. ypcall(function()
  400. char.Shirt:Destroy()
  401. shirt = Instance.new("Shirt", char)
  402. shirt.Name = "Shirt"
  403. pants = Instance.new("Pants", char)
  404. pants.Name = "Pants"
  405. char.Shirt.ShirtTemplate = "rbxassetid://551162719"
  406. char.Pants.PantsTemplate = "rbxassetid://551163760"
  407. end)
  408. ypcall(function()
  409. shirt = Instance.new("Shirt", char)
  410. shirt.Name = "Shirt"
  411. pants = Instance.new("Pants", char)
  412. pants.Name = "Pants"
  413. char.Shirt.ShirtTemplate = "rbxassetid://551162719"
  414. char.Pants.PantsTemplate = "rbxassetid://551163760"
  415. end)
  416.  
  417. ----------------------------------------------------
  418.  
  419.  
  420. local sw2 = Instance.new("Part",hed)
  421. sw2.CanCollide = false
  422. sw2.BrickColor = BrickColor.new("Hot pink")
  423.  
  424. local m2 = Instance.new("SpecialMesh",sw2)
  425. m2.MeshId = "rbxassetid://430440803"
  426. m2.Scale = Vector3.new(0.006,0.006,0.006)
  427. local w2 = Instance.new("Weld")
  428.  
  429. w2.Part1 = sw2
  430. w2.Part0 = hed
  431. w2.Parent = char
  432. w2.C0 = CFrame.new(0,-0.9,0)*CFrame.Angles(math.rad(0),math.pi/2,0)
  433.  
  434. local sw = Instance.new("Part",torso)
  435. sw.CanCollide = false
  436. sw.BrickColor = BrickColor.new("Institutional white")
  437.  
  438. local m = Instance.new("SpecialMesh",sw)
  439. m.MeshId = "rbxassetid://11442510"
  440. m.TextureId = "rbxassetid://68366508"
  441. m.Scale = Vector3.new(2.1,2.1,2.1)
  442. local w1 = Instance.new("Weld")
  443.  
  444. w1.Part1 = sw
  445. w1.Part0 = lleg
  446. w1.Parent = char
  447. w1.C0 = CFrame.new(0,-2,0)
  448.  
  449. NoSwordAnims = false
  450.  
  451. coroutine.wrap(function()
  452. while true do
  453. wait()
  454. if NoSwordAnims == false then
  455. if stance == "Normal" then
  456. w1.Part0 = lleg
  457. w1.C0 = Lerp(w1.C0,CFrame.new(-0.5,0.5,0) * CFrame.Angles(math.rad(-155),math.pi,math.pi/2),0.3)
  458. elseif stance == "Katana" then
  459. w1.Part0 = larm
  460. w1.C0 = Lerp(w1.C0,CFrame.new(0,-0.7,-2.3) * CFrame.Angles(math.rad(180),0,-20),0.1)
  461. end
  462. end
  463. end
  464. end)()
  465.  
  466.  
  467. ----------------------------------------------------
  468. newWeld(torso, larm, -1.5, 0.5, 0)
  469. larm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0)
  470. newWeld(torso, rarm, 1.5, 0.5, 0)
  471. rarm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0)
  472. newWeld(torso, hed, 0, 1.5, 0)
  473. newWeld(torso, lleg, -0.5, -1, 0)
  474. lleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0)
  475. newWeld(torso, rleg, 0.5, -1, 0)
  476. rleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0)
  477. newWeld(root, torso, 0, -1, 0)
  478. torso.Weld.C1 = CFrame.new(0, -1, 0) * CFrame.Angles(0,0,0)
  479. local Touche = {char.Name, }
  480. ----------------------------------------------------
  481.  
  482. attack = false
  483. attackhit = false
  484. attacknumber = 0
  485. coroutine.wrap(function()
  486. while true do
  487. rs:wait()
  488. if attacknumber >= 2 then
  489. attacknumber = 0
  490. end
  491. end
  492. end)()
  493. cooldown = 0
  494. stance = "Normal"
  495. local attacking = false
  496. NoAnims = false
  497.  
  498. local ammo = 300
  499. local maxammo = 300
  500.  
  501. coroutine.wrap(function()
  502. while wait() do
  503. if ammo > maxammo then
  504. ammo = maxammo
  505. elseif ammo < maxammo then
  506. ammo = ammo + 1
  507. end
  508. end
  509. end)()
  510.  
  511. attacking = false
  512. local hedattack2 = false
  513. local hedattack = false
  514.  
  515. sw.Touched:connect(function(ht)
  516. if hedattack == true then
  517. hit = ht.Parent
  518. if ht and hit:IsA("Model") then
  519. if hit:FindFirstChild("Humanoid") then
  520. if hit.Name ~= p.Name then
  521. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(hit.Humanoid.MaxHealth/2,hit.Humanoid.MaxHealth))
  522. z = Instance.new("Sound",hed)
  523. z.SoundId = "rbxassetid://330595293"
  524. z.Pitch = ptz[math.random(1,#ptz)]
  525. z.Volume = 1
  526. z:Play()
  527. hedattack2 = false
  528. hedattack = false
  529. decals = {263033191,189728908,178269340,181477718,498948943,485362831,360385366,144325140}
  530. decals2 = {284846352,191089587}
  531.  
  532. local e = Instance.new("Decal",sw)
  533. e.Texture = "rbxassetid://"..decals[math.random(1,#decals)]
  534. e.Face = "Left"
  535.  
  536. local e2 = Instance.new("Decal",sw)
  537. e2.Texture = e.Texture
  538. e2.Face = "Right"
  539. end
  540. end
  541. elseif ht and hit:IsA("Hat") then
  542. if hit.Parent.Name ~= p.Name then
  543. if hit.Parent:FindFirstChild("Humanoid") then
  544. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(hit.Parent.Humanoid.MaxHealth/2,hit.Parent.Humanoid.MaxHealth))
  545. z = Instance.new("Sound",hed)
  546. z.SoundId = "rbxassetid://330595293"
  547. hedattack2 = false
  548. hedattack = false
  549. z.Pitch = ptz[math.random(1,#ptz)]
  550. z.Volume = 1
  551. z:Play()
  552. decals = {263033191,189728908,178269340,181477718,498948943,485362831,360385366,144325140}
  553. decals2 = {284846352,191089587}
  554.  
  555. local e = Instance.new("Decal",sw)
  556. e.Texture = "rbxassetid://"..decals[math.random(1,#decals)]
  557. e.Face = "Left"
  558.  
  559. local e2 = Instance.new("Decal",sw)
  560. e2.Texture = e.Texture
  561. e2.Face = "Right"
  562. end
  563. end
  564. end
  565. end
  566. end)
  567.  
  568. --------------------attacks------------------
  569.  
  570. mouse.KeyDown:connect(function(key)
  571. if key == "x" then
  572. if cooldown == 0 and attacking == false then
  573. NoAnims = true
  574. attacking = true
  575. cooldown = 1
  576.  
  577. coroutine.wrap(function()
  578. while true do
  579.  
  580. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6,0)*CFrame.Angles(math.rad(90),0,.005), 0.2)
  581.  
  582. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6,0)*CFrame.Angles(math.rad(90),0,-.005), 0.2)
  583.  
  584. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  585.  
  586. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  587.  
  588. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
  589.  
  590. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
  591.  
  592. if cooldown == 0 then break end
  593.  
  594. rs:wait()
  595. end
  596. end)()
  597.  
  598. end
  599. end
  600. end)
  601.  
  602. mouse.KeyUp:connect(function(key)
  603. if key == "x" then
  604. NoAnims = false
  605. cooldown = 0
  606. attacking = false
  607. end
  608. end)
  609.  
  610.  
  611. function onclick(mouses)
  612. if attacking == false and cooldown == 0 then
  613. if stance == "Katana" then
  614. attacking = true
  615. cooldown = 1
  616. NoAnims = true
  617.  
  618. StartEffect(sw,0.01,4)
  619.  
  620. for i = 1, 20 do
  621.  
  622. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.6,-0.8)*CFrame.Angles(math.rad(240),0,-math.pi/3), 0.2)
  623.  
  624. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.6,-0.4)*CFrame.Angles(math.rad(240),0,math.pi/6), 0.1)
  625.  
  626. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.1)
  627.  
  628. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.1)
  629.  
  630. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .1)
  631.  
  632. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .1)
  633. end
  634.  
  635. StartEffect(sw,0.01,4)
  636. hedattack = true
  637. so("rbxassetid://553461718")
  638.  
  639. for i = 1, 3 do
  640.  
  641. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(20),0,-math.pi/3), 0.1)
  642.  
  643. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(20),0,math.pi/6), 0.1)
  644.  
  645. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  646.  
  647. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.1)
  648.  
  649. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .1)
  650.  
  651. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .1)
  652.  
  653. rs:wait()
  654. end
  655.  
  656. EndEffect()
  657. NoAnims = false
  658. cooldown = 0
  659. attacking = false
  660. hedattack = false
  661.  
  662. end
  663. end
  664. end
  665.  
  666. mouse.Button1Down:connect(onclick)
  667.  
  668. mouse.KeyDown:connect(function(key)
  669. if key == "f" then
  670. if attacking == false and cooldown == 0 then
  671. if stance == "Normal" then
  672. attacking = true
  673. cooldown = 1
  674. NoAnims = true
  675. stance = "Katana"
  676.  
  677. StartEffect(sw,0.01,4)
  678.  
  679. for i = 1, 20 do
  680.  
  681. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3), 0.2)
  682.  
  683. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6), 0.2)
  684.  
  685. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  686.  
  687. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  688.  
  689. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
  690.  
  691. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
  692. end
  693.  
  694. so("rbxassetid://152052659")
  695.  
  696. for i = 1, 20 do
  697.  
  698. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3), 0.2)
  699.  
  700. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(120),0,math.pi/6), 0.2)
  701.  
  702. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  703.  
  704. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  705.  
  706. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
  707.  
  708. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
  709.  
  710. rs:wait()
  711. end
  712.  
  713. EndEffect()
  714. NoAnims = false
  715. cooldown = 0
  716. attacking = false
  717. elseif stance == "Katana" then
  718.  
  719. attacking = true
  720. cooldown = 1
  721. NoAnims = true
  722. NoSwordAnims = true
  723. stance = "Normal"
  724. for i = 1, 20 do
  725. end
  726.  
  727. NoSwordAnims = false
  728. NoAnims = false
  729. cooldown = 0
  730. attacking = false
  731.  
  732. end
  733. end
  734. end
  735. end)
  736.  
  737.  
  738. -----------GUI creation--------------------
  739.  
  740. local pg = p.PlayerGui
  741.  
  742. local sg = Instance.new("ScreenGui",pg)
  743. sg.Name = "rage"
  744.  
  745. local txt = Instance.new("TextLabel",sg)
  746. txt.Position = UDim2.new(0.9, 0, 0.9, 0)
  747. txt.BackgroundTransparency = 1
  748. txt.FontSize = "Size24"
  749.  
  750. coroutine.wrap(function()
  751. while true do
  752. wait()
  753. txt.TextColor3 = Color3.new(ammo,ammo,ammo)
  754. end
  755. end)()
  756.  
  757. coroutine.wrap(function()
  758. while true do
  759. wait()
  760. txt.Text = ammo.."/"..maxammo
  761. end
  762. end)()
  763.  
  764. ----------------------------------------------
  765. -------------------------------
  766. local animpose = "Idle"
  767. local lastanimpose = "Idle"
  768. local sine = 0
  769. local change = 1
  770. local val = 0
  771. local ffing = false
  772. local jump = false
  773. -------------------------------
  774. local x = Instance.new("Sound", char)
  775. x.SoundId = "http://www.roblox.com/asset/?id=429617891"
  776. x.Looped = true
  777. x.Volume = 1
  778. x.Pitch = 1
  779. local footsteps = false
  780. -------------------------------
  781. game:GetService("RunService").RenderStepped:connect(function()
  782. --[[if char.Humanoid.Jump == true then
  783. jump = true
  784. else
  785. jump = false
  786. end]]
  787. char.Humanoid.FreeFalling:connect(function(f)
  788. if f then
  789. ffing = true
  790. else
  791. ffing = false
  792. end
  793. end)
  794. sine = sine + change
  795. if jump == true then
  796. animpose = "Jumping"
  797. elseif ffing == true then
  798. animpose = "Freefalling"
  799. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  800. animpose = "Idle"
  801. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  802. animpose = "Walking"
  803. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
  804. animpose = "Running"
  805. end
  806. if animpose ~= lastanimpose then
  807. sine = 0
  808. if NoAnims == false then
  809. if animpose == "Idle" then
  810. for i = 1, 0.5 do
  811.  
  812. if NoAnims == false then
  813.  
  814. if stance == "Normal" then
  815. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
  816.  
  817. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,-.05+ -math.sin(sine/7)/14), 0.2)
  818.  
  819. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  820.  
  821. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  822.  
  823. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
  824.  
  825. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
  826.  
  827. elseif stance == "Katana" then
  828.  
  829. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
  830.  
  831. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),math.pi,-.05+ -math.sin(sine/7)/14), 0.2)
  832.  
  833. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  834.  
  835. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  836.  
  837. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
  838.  
  839. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
  840.  
  841. end
  842.  
  843. wait()
  844. end
  845. end
  846.  
  847.  
  848. elseif animpose == "Running" then
  849. change = 1
  850. if NoAnims == false then
  851.  
  852. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2)
  853.  
  854. larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  855.  
  856. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2)
  857.  
  858. torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2)
  859.  
  860. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem - .2,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  861.  
  862. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  863.  
  864.  
  865.  
  866. end
  867.  
  868. elseif animpose == "Walking" then
  869. for i = 1, 1.5 do
  870. if NoAnims == false then
  871.  
  872. if stance == "Normal" then
  873. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
  874.  
  875. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
  876.  
  877. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  878.  
  879. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  880.  
  881. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
  882.  
  883. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
  884. end
  885.  
  886. elseif stance == "Katana" then
  887.  
  888. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
  889.  
  890. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
  891.  
  892. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  893.  
  894. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  895.  
  896. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
  897.  
  898. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
  899.  
  900. wait()
  901. end
  902. end
  903. end
  904. else
  905. end
  906. end
  907. lastanimpose = animpose
  908. if animpose == "Idle" then
  909. change = 0.5
  910. if NoAnims == false then
  911.  
  912. if stance == "Normal" then
  913. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
  914.  
  915. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,-.05+ -math.sin(sine/7)/14), 0.2)
  916.  
  917. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  918.  
  919. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  920.  
  921. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
  922.  
  923. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
  924.  
  925. elseif stance == "Katana" then
  926.  
  927. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3+ -math.sin(sine/14)/15,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3+ math.sin(sine/7)/25), 0.2)
  928.  
  929. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3+ -math.sin(sine/14)/15,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6+ -math.sin(sine/7)/25), 0.2)
  930.  
  931. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  932.  
  933. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  934.  
  935. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
  936.  
  937. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
  938.  
  939. end
  940. end
  941.  
  942.  
  943. elseif animpose == "Running" then
  944. change = 1
  945. if NoAnims == false then
  946.  
  947. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2)
  948.  
  949. larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  950.  
  951. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2)
  952.  
  953. torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2)
  954.  
  955. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  956.  
  957. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
  958.  
  959. end
  960.  
  961. elseif animpose == "Walking" then
  962. change = 1
  963.  
  964.  
  965. if NoAnims == false then
  966.  
  967. if stance == "Normal" then
  968.  
  969. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
  970.  
  971. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
  972.  
  973. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  974.  
  975. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  976.  
  977. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
  978.  
  979. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
  980.  
  981. elseif stance == "Katana" then
  982.  
  983. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3+ -math.sin(sine/14)/15,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3+ math.sin(sine/7)/25), 0.2)
  984.  
  985. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3+ -math.sin(sine/14)/15,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6+ -math.sin(sine/7)/25), 0.2)
  986.  
  987. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
  988.  
  989. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
  990.  
  991. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
  992.  
  993. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
  994.  
  995. end
  996.  
  997. end
  998. end
  999. if animpose == "Walking" then
  1000. if footsteps == false then
  1001. x:Play()
  1002. x.Pitch = ptz[math.random(1,#ptz)]
  1003. footsteps = true
  1004. end
  1005. x.Pitch = 1.1
  1006. elseif animpose == "Idle" then
  1007. x:Stop()
  1008. footsteps = false
  1009. end
  1010. end)
  1011.  
  1012. --------calcs------
  1013. -- +2*math.cos(sine/14)
  1014. -----------------------------
  1015.  
  1016. wait(1)
  1017. hum.Health = math.huge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement