Advertisement
Josemmoya

Untitled

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