Advertisement
RiasGremory0100

Untitled

Jul 8th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.33 KB | None | 0 0
  1. local GUI = script.Parent.Parent;
  2. local player = GUI.Parent.Parent;
  3. local user = player.Character;
  4. local cam = workspace.CurrentCamera;
  5.  
  6. repeat wait(0.045) until workspace.targetFilter:findFirstChild(player.Name.."Ignore");
  7. repeat wait() until script.Parent:findFirstChild("modelReady");
  8.  
  9. --local viewWeld = user.developerObject.viewWeld;
  10.  
  11. local torsoWeld = user.developerObject.torsoWeld;
  12.  
  13. local headWeld = user.developerObject.headWeld;
  14.  
  15. local leftArmWeld = Instance.new("Motor", user.developerObject);
  16. leftArmWeld.Name = "leftArmWeld";
  17. leftArmWeld.Part0 = user.developerObject.fakeTorso;
  18. leftArmWeld.Part1 = user["Left Arm"];
  19.  
  20. local rightArmWeld = Instance.new("Motor", user.developerObject);
  21. rightArmWeld.Name = "rightArmWeld";
  22. rightArmWeld.Part0 = user.developerObject.fakeTorso;
  23. rightArmWeld.Part1 = user["Right Arm"];
  24.  
  25. local leftLegWeld = Instance.new("Motor", user.developerObject);
  26. leftLegWeld.Name = "leftLegWeld";
  27. leftLegWeld.Part0 = user.developerObject.fakeTorso;
  28. leftLegWeld.Part1 = user["Left Leg"];
  29.  
  30. local rightLegWeld = Instance.new("Motor", user.developerObject);
  31. rightLegWeld.Name = "rightLegWeld";
  32. rightLegWeld.Part0 = user.developerObject.fakeTorso;
  33. rightLegWeld.Part1 = user["Right Leg"];
  34.  
  35. function getCFrameComponents(value)
  36. local xPosition, yPosition, zPosition = value.x, value.y, value.z;
  37. local xAngle, yAngle, zAngle = value:toEulerAnglesXYZ();
  38.  
  39. return xPosition, yPosition, zPosition, math.deg(xAngle), math.deg(yAngle), math.deg(zAngle);
  40. end
  41.  
  42. function blendCFrameComponents(value1, value2, boost)
  43. boost = boost or false;
  44. local animationSpeed = 3;
  45. if boost then
  46. animationSpeed = 100;
  47. end
  48.  
  49. local xPosition1, yPosition1, zPosition1, xAngle1, yAngle1, zAngle1 = getCFrameComponents(value1);
  50. local xPosition2, yPosition2, zPosition2, xAngle2, yAngle2, zAngle2 = getCFrameComponents(value2);
  51. local xPosition3, yPosition3, zPosition3, xAngle3, yAngle3, zAngle3 = xPosition1, yPosition1, zPosition1, xAngle1, yAngle1, zAngle1;
  52.  
  53. if math.abs(xPosition2-xPosition1) < 0.1*animationSpeed then
  54. xPosition3 = xPosition2;
  55. else
  56. if xPosition2 < xPosition1 then
  57. xPosition3 = xPosition3-0.1*animationSpeed;
  58. elseif xPosition2 > xPosition1 then
  59. xPosition3 = xPosition3+0.1*animationSpeed;
  60. end
  61. end
  62.  
  63. if math.abs(yPosition2-yPosition1) < 0.1*animationSpeed then
  64. yPosition3 = yPosition2;
  65. else
  66. if yPosition2 < yPosition1 then
  67. yPosition3 = yPosition3-0.1*animationSpeed;
  68. elseif yPosition2 > yPosition1 then
  69. yPosition3 = yPosition3+0.1*animationSpeed;
  70. end
  71. end
  72.  
  73. if math.abs(zPosition2-zPosition1) < 0.1*animationSpeed then
  74. zPosition3 = zPosition2;
  75. else
  76. if zPosition2 < zPosition1 then
  77. zPosition3 = zPosition3-0.1*animationSpeed;
  78. elseif zPosition2 > zPosition1 then
  79. zPosition3 = zPosition3+0.1*animationSpeed;
  80. end
  81. end
  82.  
  83. --[[
  84. local upX = 360-xAngle1+xAngle2;
  85. local downX = xAngle1+360-xAngle2;
  86. local normalX = xAngle2-xAngle1;
  87.  
  88. if math.abs(normalX) < 11*animationSpeed then
  89. xAngle3 = xAngle2;
  90. elseif math.abs(upX) < math.abs(downX) and math.abs(upX) < math.abs(normalX) then
  91. xAngle3 = xAngle1+10*animationSpeed;
  92. if xAngle3 > 360 then
  93. xAngle3 = xAngle3-360;
  94. end
  95. elseif math.abs(downX) < math.abs(upX) and math.abs(downX) > math.abs(normalX) then
  96. xAngle3 = xAngle1-10*animationSpeed;
  97. if xAngle3 < 0 then
  98. xAngle3 = 360+xAngle3;
  99. end
  100. else
  101. if xAngle2 < xAngle1 then
  102. xAngle3 = xAngle1-10*animationSpeed;
  103. elseif xAngle2 > xAngle1 then
  104. xAngle3 = xAngle3+10*animationSpeed;
  105. end
  106. end
  107.  
  108. local upY = 360-yAngle1+yAngle2;
  109. local downY = yAngle1+360-yAngle2;
  110. local normalY = yAngle2-yAngle1;
  111.  
  112. if math.abs(normalY) < 11*animationSpeed then
  113. yAngle3 = yAngle2;
  114. elseif math.abs(upY) < math.abs(downY) and math.abs(upY) < math.abs(normalY) then
  115. yAngle3 = yAngle1+10*animationSpeed;
  116. if yAngle3 > 360 then
  117. yAngle3 = yAngle3-360;
  118. end
  119. elseif math.abs(downY) < math.abs(upY) and math.abs(downY) < math.abs(normalY) then
  120. yAngle3 = yAngle1-10*animationSpeed;
  121. if yAngle3 < 0 then
  122. yAngle3 = 360+yAngle3;
  123. end
  124. else
  125. if yAngle2 < yAngle1 then
  126. yAngle3 = yAngle1-10*animationSpeed;
  127. elseif yAngle2 > yAngle1 then
  128. yAngle3 = yAngle3+10*animationSpeed;
  129. end
  130. end
  131.  
  132. local upZ = 360-zAngle1+zAngle2;
  133. local downZ = zAngle1+360-zAngle2;
  134. local normalZ = zAngle2-zAngle1;
  135.  
  136. if math.abs(normalZ) < 11*animationSpeed then
  137. zAngle3 = zAngle2;
  138. elseif math.abs(upZ) < math.abs(downZ) and math.abs(upZ) < math.abs(normalZ) then
  139. zAngle3 = zAngle1+10*animationSpeed;
  140. if zAngle3 > 360 then
  141. zAngle3 = zAngle3-360;
  142. end
  143. elseif math.abs(downZ) < math.abs(upZ) and math.abs(downZ) < math.abs(normalZ) then
  144. zAngle3 = zAngle1-10*animationSpeed;
  145. if zAngle3 < 0 then
  146. zAngle3 = 360+zAngle3;
  147. end
  148. else
  149. if zAngle2 < zAngle1 then
  150. zAngle3 = zAngle1-10*animationSpeed;
  151. elseif zAngle2 > zAngle1 then
  152. zAngle3 = zAngle3+10*animationSpeed;
  153. end
  154. end
  155. ]]--
  156.  
  157. if math.abs(xAngle2-xAngle1) < 10*animationSpeed then
  158. xAngle3 = xAngle2;
  159. else
  160. if xAngle2 < xAngle1 then
  161. xAngle3 = xAngle1-10*animationSpeed;
  162. elseif xAngle2 > xAngle1 then
  163. xAngle3 = xAngle3+10*animationSpeed;
  164. end
  165. end
  166.  
  167. if math.abs(yAngle2-yAngle1) < 10*animationSpeed then
  168. yAngle3 = yAngle2;
  169. else
  170. if yAngle2 < yAngle1 then
  171. yAngle3 = yAngle1-10*animationSpeed;
  172. elseif yAngle2 > yAngle1 then
  173. yAngle3 = yAngle3+10*animationSpeed;
  174. end
  175. end
  176.  
  177. if math.abs(zAngle2-zAngle1) < 10*animationSpeed then
  178. zAngle3 = zAngle2;
  179. else
  180. if zAngle2 < zAngle1 then
  181. zAngle3 = zAngle1-10*animationSpeed;
  182. elseif zAngle2 > zAngle1 then
  183. zAngle3 = zAngle3+10*animationSpeed;
  184. end
  185. end
  186.  
  187. return CFrame.new(xPosition3, yPosition3, zPosition3)*CFrame.Angles(math.rad(xAngle3), math.rad(yAngle3), math.rad(zAngle3));
  188. end
  189.  
  190. function getScale()
  191. return math.sin(tick()*8);
  192. end
  193.  
  194. _G.updateAnimation = function()
  195. local torso = user.Torso.CFrame:toObjectSpace(user.developerObject.fakeTorso.CFrame);
  196. local head = user.developerObject.fakeTorso.CFrame:toObjectSpace(user.developerObject.fakeHead.CFrame);
  197. local leftArm = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Left Arm"].CFrame);
  198. local rightArm = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Right Arm"].CFrame);
  199. local leftLeg = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Left Leg"].CFrame);
  200. local rightLeg = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Right Leg"].CFrame);
  201.  
  202. --[[
  203. if not GUI.gameData.aiming.Value then
  204. _G.intendedLeftArm = _G.intendedLeftArm*user.developerObject.fakeTorso.CFrame:toObjectSpace(
  205. CFrame.new(cam.CoordinateFrame.p, GUI.gameData.mouse.Value)*CFrame.new(-1.5, -1.5, -0.5)
  206. );
  207. _G.intendedRightArm = _G.intendedRightArm*user.developerObject.fakeTorso.CFrame:toObjectSpace(
  208. CFrame.new(cam.CoordinateFrame.p, GUI.gameData.mouse.Value)*CFrame.new(1.5, -1.5, -0.5)
  209. );
  210. end
  211. ]]--
  212.  
  213. --[[
  214. local hitLeft, position = workspace:FindPartOnRayWithIgnoreList(
  215. Ray.new(user.Torso.CFrame.p,
  216. ((user.Torso.CFrame*CFrame.new(-2, 0, -4)).p-user.Torso.CFrame.p).unit*4),
  217. {cam, workspace.targetFilter, workspace.zombies}, true);
  218.  
  219. local hitCenter, position = workspace:FindPartOnRayWithIgnoreList(
  220. Ray.new(user.Torso.CFrame.p,
  221. ((user.Torso.CFrame*CFrame.new(0, 0, -4)).p-user.Torso.CFrame.p).unit*4),
  222. {cam, workspace.targetFilter, workspace.zombies}, true);
  223.  
  224. local hitRight, position = workspace:FindPartOnRayWithIgnoreList(
  225. Ray.new(user.Torso.CFrame.p,
  226. ((user.Torso.CFrame*CFrame.new(2, 0, -4)).p-user.Torso.CFrame.p).unit*4),
  227. {cam, workspace.targetFilter, workspace.zombies}, true);
  228.  
  229. if hitCenter then
  230. _G.intendedLeftArm = _G.intendedLeftArm
  231. *CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(30), 0, 0)*CFrame.new(0, -1, 0);
  232. _G.intendedRightArm = _G.intendedRightArm
  233. *CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(30), 0, 0)*CFrame.new(0, -1, 0);
  234.  
  235. if not hitLeft and hitRight then
  236. _G.intendedTorso = _G.intendedTorso
  237. *CFrame.Angles(0, 0, math.rad(-15));
  238. elseif not hitRight and hitLeft then
  239. _G.intendedTorso = _G.intendedTorso
  240. *CFrame.Angles(0, 0, math.rad(15));
  241. end
  242. end
  243. ]]--
  244.  
  245. if GUI.gameData.dead.Value then
  246. _G.intendedTorso = _G.intendedTorso
  247. *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), 0, 0);
  248. _G.intendedHead = _G.intendedHead
  249. *CFrame.new(0, 1.5, 0);
  250. _G.intendedCam = _G.intendedCam
  251. *CFrame.new(0, -2.5, -1.5);
  252. _G.intendedLeftArm = _G.intendedLeftArm
  253. *CFrame.new(-1.4, 1.2, 0)*CFrame.Angles(0, 0, math.rad(-10))*CFrame.new(0, -1, 0);
  254. _G.intendedRightArm = _G.intendedRightArm
  255. *CFrame.new(1.4, 1.2, 0)*CFrame.Angles(0, 0, math.rad(10))*CFrame.new(0, -1, 0);
  256. _G.intendedLeftLeg = _G.intendedLeftLeg
  257. *CFrame.new(-0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(-10));
  258. _G.intendedRightLeg = _G.intendedRightLeg
  259. *CFrame.new(0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(10));
  260. elseif GUI.gameData.climbing.Value then
  261. _G.intendedTorso = _G.intendedTorso
  262. *CFrame.Angles(0, 0, math.rad(getScale()*4));
  263. _G.intendedHead = _G.intendedHead
  264. *CFrame.new(0, 1.5, 0);
  265. _G.intendedCam = _G.intendedCam
  266. *CFrame.new(getScale()/2, 1.5, 0);
  267. _G.intendedLeftArm = _G.intendedLeftArm
  268. *CFrame.new(-1.5, 0.5+getScale()/2, -0.1)*CFrame.Angles(math.rad(160)+math.rad(getScale()*10), 0, math.rad(10))*CFrame.new(0, -1, 0);
  269. _G.intendedRightArm = _G.intendedRightArm
  270. *CFrame.new(1.5, 0.5-getScale()/2, -0.1)*CFrame.Angles(math.rad(160)-math.rad(getScale()*10), 0, math.rad(-10))*CFrame.new(0, -1, 0);
  271. _G.intendedLeftLeg = _G.intendedLeftLeg
  272. *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
  273. _G.intendedRightLeg = _G.intendedRightLeg
  274. *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
  275. elseif GUI.gameData.swimming.Value then
  276. _G.intendedTorso = _G.intendedTorso
  277. ;
  278. _G.intendedHead = _G.intendedHead
  279. *CFrame.new(0, 1.5, 0);
  280. _G.intendedCam = _G.intendedCam
  281. *CFrame.new(0, 1.5, 0);
  282. _G.intendedLeftArm = _G.intendedLeftArm
  283. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(getScale()*90))*CFrame.new(0, -1, 0);
  284. _G.intendedRightArm = _G.intendedRightArm
  285. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(90), 0, -math.rad(getScale()*90))*CFrame.new(0, -1, 0);
  286. _G.intendedLeftLeg = _G.intendedLeftLeg
  287. *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
  288. _G.intendedRightLeg = _G.intendedRightLeg
  289. *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
  290. elseif GUI.gameData.vaulting.Value then
  291. user.Torso.CFrame = user.Torso.CFrame*CFrame.new(0, 0.2, 0);
  292.  
  293. _G.intendedTorso = _G.intendedTorso
  294. *CFrame.Angles(0, math.rad(getScale()*20), 0);
  295. _G.intendedHead = _G.intendedHead
  296. *CFrame.new(0, 1.5, 0);
  297. _G.intendedCam = _G.intendedCam
  298. *CFrame.new(0, 1.5, 0);
  299. _G.intendedLeftArm = _G.intendedLeftArm
  300. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()*30), 0, math.rad(-10+getScale()*10))*CFrame.new(0, -0.5, 0);
  301. _G.intendedRightArm = _G.intendedRightArm
  302. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()*30), 0, math.rad(10-getScale()*10))*CFrame.new(0, -0.5, 0);
  303. _G.intendedLeftLeg = _G.intendedLeftLeg
  304. *CFrame.new(-0.5, -0.5-getScale()/2, 0)*CFrame.Angles(math.rad(10-getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
  305. _G.intendedRightLeg = _G.intendedRightLeg
  306. *CFrame.new(0.5, -0.5+getScale()/2, 0)*CFrame.Angles(math.rad(10+getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
  307. elseif GUI.gameData.prone.Value then
  308. if GUI.gameData.walking.Value then
  309. _G.intendedTorso = _G.intendedTorso
  310. *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), math.rad(getScale()), 0);
  311. _G.intendedHead = _G.intendedHead
  312. *CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(90), 0, 0);
  313. _G.intendedCam = _G.intendedCam
  314. *CFrame.new(getScale()/8, -2.5, -1.5);
  315. if GUI.gameData.aiming.Value then
  316. _G.intendedLeftArm = _G.intendedLeftArm
  317. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
  318. _G.intendedRightArm = _G.intendedRightArm
  319. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
  320. else
  321. _G.intendedLeftArm = _G.intendedLeftArm
  322. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, math.rad(170))*CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(170), 0);
  323. _G.intendedRightArm = _G.intendedRightArm
  324. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, math.rad(-170))*CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(-170), 0);
  325. end
  326. _G.intendedLeftLeg = _G.intendedLeftLeg
  327. *CFrame.new(-0.6, -1.5-getScale()/2, 0)*CFrame.Angles(0, 0, math.rad(-10));
  328. _G.intendedRightLeg = _G.intendedRightLeg
  329. *CFrame.new(0.6, -1.5+getScale()/2, 0)*CFrame.Angles(0, 0, math.rad(10));
  330. else
  331. _G.intendedTorso = _G.intendedTorso
  332. *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), math.rad(getScale()/4), 0);
  333. _G.intendedHead = _G.intendedHead
  334. *CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(90), 0, 0);
  335. _G.intendedCam = _G.intendedCam
  336. *CFrame.new(0, -2.5, -1.5);
  337. if GUI.gameData.aiming.Value then
  338. _G.intendedLeftArm = _G.intendedLeftArm
  339. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
  340. _G.intendedRightArm = _G.intendedRightArm
  341. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
  342. else
  343. _G.intendedLeftArm = _G.intendedLeftArm
  344. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, math.rad(170))*CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(170), 0);
  345. _G.intendedRightArm = _G.intendedRightArm
  346. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, math.rad(-170))*CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(-170), 0);
  347. end
  348. _G.intendedLeftLeg = _G.intendedLeftLeg
  349. *CFrame.new(-0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(-10));
  350. _G.intendedRightLeg = _G.intendedRightLeg
  351. *CFrame.new(0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(10));
  352. end
  353. elseif GUI.gameData.crouch.Value then
  354. if GUI.gameData.walking.Value then
  355. _G.intendedTorso = _G.intendedTorso
  356. *CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(getScale()), 0);
  357. _G.intendedHead = _G.intendedHead
  358. *CFrame.new(0, 1.5, 0);
  359. _G.intendedCam = _G.intendedCam
  360. *CFrame.new(getScale()/6, 0.5, 0);
  361. if GUI.gameData.gun.Value then
  362. if GUI.gameData.aiming.Value then
  363. _G.intendedLeftArm = _G.intendedLeftArm
  364. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/12), 0, 0)*CFrame.new(0, -0.5, 0);
  365. _G.intendedRightArm = _G.intendedRightArm
  366. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/12), 0, 0)*CFrame.new(0, -0.5, 0);
  367. else
  368. _G.intendedLeftArm = _G.intendedLeftArm
  369. *CFrame.new(-1, 0.5, 0.2)*CFrame.Angles(math.rad(-15-getScale()*5), 0, math.rad((1-getScale())*3))*CFrame.new(-0.2, -0.5, 0);
  370. _G.intendedRightArm = _G.intendedRightArm
  371. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-15-getScale()*5), 0, math.rad((-1+getScale())*3))*CFrame.new(0, -0.5, 0);
  372. end
  373. else
  374. _G.intendedLeftArm = _G.intendedLeftArm
  375. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()*30), 0, math.rad((1-getScale())*5))*CFrame.new(0, -0.5, 0);
  376. _G.intendedRightArm = _G.intendedRightArm
  377. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()*30), 0, math.rad((-1+getScale())*5))*CFrame.new(0, -0.5, 0);
  378. end
  379. _G.intendedLeftLeg = _G.intendedLeftLeg
  380. *CFrame.new(-0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20-getScale()*15), 0, 0)*CFrame.new(0, -1, 0);
  381. _G.intendedRightLeg = _G.intendedRightLeg
  382. *CFrame.new(0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20+getScale()*15), 0, 0)*CFrame.new(0, -1, 0);
  383. else
  384. _G.intendedTorso = _G.intendedTorso
  385. *CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(getScale()/4), 0);
  386. _G.intendedHead = _G.intendedHead
  387. *CFrame.new(0, 1.5, 0);
  388. _G.intendedCam = _G.intendedCam
  389. *CFrame.new(0, 0.5, 0);
  390. _G.intendedLeftArm = _G.intendedLeftArm
  391. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/16), 0, 0)*CFrame.new(0, -0.5, 0);
  392. _G.intendedRightArm = _G.intendedRightArm
  393. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/16), 0, 0)*CFrame.new(0, -0.5, 0);
  394. _G.intendedLeftLeg = _G.intendedLeftLeg
  395. *CFrame.new(-0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20), 0, 0)*CFrame.new(0, -1, 0);
  396. _G.intendedRightLeg = _G.intendedRightLeg
  397. *CFrame.new(0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20), 0, 0)*CFrame.new(0, -1, 0);
  398. end
  399. elseif GUI.gameData.walking.Value then
  400. if GUI.gameData.sprinting.Value then
  401. _G.intendedTorso = _G.intendedTorso
  402. *CFrame.Angles(0, math.rad(getScale()*6), math.rad(getScale()/2));
  403. _G.intendedHead = _G.intendedHead
  404. *CFrame.new(0, 1.5, 0);
  405. _G.intendedCam = _G.intendedCam
  406. *CFrame.new(getScale()/2, 1.5-math.abs(getScale()/4), 0);
  407. if GUI.gameData.gun.Value then
  408. _G.intendedLeftArm = _G.intendedLeftArm
  409. *CFrame.new(-1, 0.5, 0.2)*CFrame.Angles(math.rad(-30-getScale()*15), 0, math.rad((1-getScale())*6))*CFrame.new(-0.2, -0.5, 0);
  410. _G.intendedRightArm = _G.intendedRightArm
  411. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-30-getScale()*15), 0, math.rad((-1+getScale())*6))*CFrame.new(0, -0.5, 0);
  412. else
  413. _G.intendedLeftArm = _G.intendedLeftArm
  414. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()*65), 0, math.rad((1-getScale())*8))*CFrame.new(0, -0.5, 0);
  415. _G.intendedRightArm = _G.intendedRightArm
  416. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()*65), 0, math.rad((-1+getScale())*8))*CFrame.new(0, -0.5, 0);
  417. end
  418. _G.intendedLeftLeg = _G.intendedLeftLeg
  419. *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*55), 0, 0)*CFrame.new(0, -1, 0);
  420. _G.intendedRightLeg = _G.intendedRightLeg
  421. *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*55), 0, 0)*CFrame.new(0, -1, 0);
  422. else
  423. _G.intendedTorso = _G.intendedTorso
  424. *CFrame.Angles(0, math.rad(getScale()*4), math.rad(getScale()/2));
  425. _G.intendedHead = _G.intendedHead
  426. *CFrame.new(0, 1.5, 0);
  427. if GUI.gameData.ouch.Value then
  428. _G.intendedCam = _G.intendedCam
  429. *CFrame.new(-math.abs(getScale()/3), 1.5-math.abs(getScale()/3), 0);
  430. else
  431. _G.intendedCam = _G.intendedCam
  432. *CFrame.new(getScale()/4, 1.5-math.abs(getScale()/6), 0);
  433. end
  434. if GUI.gameData.gun.Value then
  435. if GUI.gameData.aiming.Value then
  436. _G.intendedLeftArm = _G.intendedLeftArm
  437. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
  438. _G.intendedRightArm = _G.intendedRightArm
  439. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
  440. else
  441. _G.intendedLeftArm = _G.intendedLeftArm
  442. *CFrame.new(-1, 0.5, 0.2)*CFrame.Angles(math.rad(-15-getScale()*5), 0, math.rad((1-getScale())*3))*CFrame.new(-0.2, -0.5, 0);
  443. _G.intendedRightArm = _G.intendedRightArm
  444. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-15-getScale()*5), 0, math.rad((-1+getScale())*3))*CFrame.new(0, -0.5, 0);
  445. end
  446. else
  447. _G.intendedLeftArm = _G.intendedLeftArm
  448. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()*45), 0, math.rad((1-getScale())*5))*CFrame.new(0, -0.5, 0);
  449. _G.intendedRightArm = _G.intendedRightArm
  450. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()*45), 0, math.rad((-1+getScale())*5))*CFrame.new(0, -0.5, 0);
  451. end
  452. if GUI.gameData.ouch.Value then
  453. _G.intendedLeftLeg = _G.intendedLeftLeg
  454. *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*60), 0, 0)*CFrame.new(0, -1, 0);
  455. _G.intendedRightLeg = _G.intendedRightLeg
  456. *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
  457. else
  458. _G.intendedLeftLeg = _G.intendedLeftLeg
  459. *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*45), 0, 0)*CFrame.new(0, -1, 0);
  460. _G.intendedRightLeg = _G.intendedRightLeg
  461. *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*45), 0, 0)*CFrame.new(0, -1, 0);
  462. end
  463. end
  464. else
  465. _G.intendedTorso = _G.intendedTorso
  466. *CFrame.Angles(0, math.rad(getScale()/16), 0);
  467. _G.intendedHead = _G.intendedHead
  468. *CFrame.new(0, 1.5, 0);
  469. _G.intendedCam = _G.intendedCam
  470. *CFrame.new(0, 1.5, 0);
  471. _G.intendedLeftArm = _G.intendedLeftArm
  472. *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
  473. _G.intendedRightArm = _G.intendedRightArm
  474. *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
  475. _G.intendedLeftLeg = _G.intendedLeftLeg
  476. *CFrame.new(-0.5, -2, 0);
  477. _G.intendedRightLeg = _G.intendedRightLeg
  478. *CFrame.new(0.5, -2, 0);
  479. end
  480.  
  481. local intendedTorso = _G.intendedTorso;
  482. local intendedHead = _G.intendedHead;
  483. local intendedCam = _G.intendedCam;
  484. local intendedLeftArm = _G.intendedLeftArm;
  485. local intendedRightArm = _G.intendedRightArm;
  486. local intendedLeftLeg = _G.intendedLeftLeg;
  487. local intendedRightLeg = _G.intendedRightLeg;
  488.  
  489. local blendTorso = blendCFrameComponents(torso, intendedTorso);
  490. local blendHead = blendCFrameComponents(head, intendedHead);
  491. local blendCam = blendCFrameComponents(user.Torso.Neck.C0, intendedCam);
  492. local blendLeftArm = blendCFrameComponents(leftArm, intendedLeftArm, GUI.gameData.aiming.Value);
  493. local blendRightArm = blendCFrameComponents(rightArm, intendedRightArm, GUI.gameData.aiming.Value);
  494. local blendLeftLeg = blendCFrameComponents(leftLeg, intendedLeftLeg);
  495. local blendRightLeg = blendCFrameComponents(rightLeg, intendedRightLeg);
  496.  
  497. torsoWeld.C0 = blendTorso;
  498. headWeld.C0 = blendHead;
  499. user.Torso.Neck.C0 = blendCam;
  500. leftArmWeld.C0 = blendLeftArm;
  501. rightArmWeld.C0 = blendRightArm;
  502. leftLegWeld.C0 = blendLeftLeg;
  503. rightLegWeld.C0 = blendRightLeg;
  504.  
  505. _G.intendedTorso = CFrame.new(0, 0, 0);
  506. _G.intendedHead = CFrame.new(0, 0, 0);
  507. _G.intendedCam = CFrame.new(0, 0, 0);
  508. _G.intendedLeftArm = CFrame.new(0, 0, 0);
  509. _G.intendedRightArm = CFrame.new(0, 0, 0);
  510. _G.intendedLeftLeg = CFrame.new(0, 0, 0);
  511. _G.intendedRightLeg = CFrame.new(0, 0, 0);
  512.  
  513. --[[
  514. local o = GUI.gameData.mouse.Value.y-user.Head.CFrame.y;
  515. local a = (GUI.gameData.mouse.Value-user.Head.CFrame.p).magnitude;
  516. local viewOffset = user.developerObject.fakeHead.CFrame:toObjectSpace(cam.Focus);
  517.  
  518. --if (cam.CoordinateFrame.p-cam.Focus.p).magnitude < 1 then
  519. viewWeld.C0 = viewOffset*CFrame.Angles(-math.tan(o/a)+1.57, 3.14, 0)*CFrame.new(0, -1.5, 0);
  520. --else
  521. --viewWeld.C0 = CFrame.Angles(math.tan(o/a), 0, 0)*CFrame.new(0, -1.5, 0);
  522. --end
  523. ]]--
  524. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement