Advertisement
wamandnj

Untitled

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