Advertisement
Rawscript

Untitled

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