Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GUI = script.Parent.Parent;
- local player = GUI.Parent.Parent;
- local user = player.Character;
- local cam = workspace.CurrentCamera;
- repeat wait(0.045) until workspace.targetFilter:findFirstChild(player.Name.."Ignore");
- repeat wait() until script.Parent:findFirstChild("modelReady");
- --local viewWeld = user.developerObject.viewWeld;
- local torsoWeld = user.developerObject.torsoWeld;
- local headWeld = user.developerObject.headWeld;
- local leftArmWeld = Instance.new("Motor", user.developerObject);
- leftArmWeld.Name = "leftArmWeld";
- leftArmWeld.Part0 = user.developerObject.fakeTorso;
- leftArmWeld.Part1 = user["Left Arm"];
- local rightArmWeld = Instance.new("Motor", user.developerObject);
- rightArmWeld.Name = "rightArmWeld";
- rightArmWeld.Part0 = user.developerObject.fakeTorso;
- rightArmWeld.Part1 = user["Right Arm"];
- local leftLegWeld = Instance.new("Motor", user.developerObject);
- leftLegWeld.Name = "leftLegWeld";
- leftLegWeld.Part0 = user.developerObject.fakeTorso;
- leftLegWeld.Part1 = user["Left Leg"];
- local rightLegWeld = Instance.new("Motor", user.developerObject);
- rightLegWeld.Name = "rightLegWeld";
- rightLegWeld.Part0 = user.developerObject.fakeTorso;
- rightLegWeld.Part1 = user["Right Leg"];
- function getCFrameComponents(value)
- local xPosition, yPosition, zPosition = value.x, value.y, value.z;
- local xAngle, yAngle, zAngle = value:toEulerAnglesXYZ();
- return xPosition, yPosition, zPosition, math.deg(xAngle), math.deg(yAngle), math.deg(zAngle);
- end
- function blendCFrameComponents(value1, value2, boost)
- boost = boost or false;
- local animationSpeed = 3;
- if boost then
- animationSpeed = 100;
- end
- local xPosition1, yPosition1, zPosition1, xAngle1, yAngle1, zAngle1 = getCFrameComponents(value1);
- local xPosition2, yPosition2, zPosition2, xAngle2, yAngle2, zAngle2 = getCFrameComponents(value2);
- local xPosition3, yPosition3, zPosition3, xAngle3, yAngle3, zAngle3 = xPosition1, yPosition1, zPosition1, xAngle1, yAngle1, zAngle1;
- if math.abs(xPosition2-xPosition1) < 0.1*animationSpeed then
- xPosition3 = xPosition2;
- else
- if xPosition2 < xPosition1 then
- xPosition3 = xPosition3-0.1*animationSpeed;
- elseif xPosition2 > xPosition1 then
- xPosition3 = xPosition3+0.1*animationSpeed;
- end
- end
- if math.abs(yPosition2-yPosition1) < 0.1*animationSpeed then
- yPosition3 = yPosition2;
- else
- if yPosition2 < yPosition1 then
- yPosition3 = yPosition3-0.1*animationSpeed;
- elseif yPosition2 > yPosition1 then
- yPosition3 = yPosition3+0.1*animationSpeed;
- end
- end
- if math.abs(zPosition2-zPosition1) < 0.1*animationSpeed then
- zPosition3 = zPosition2;
- else
- if zPosition2 < zPosition1 then
- zPosition3 = zPosition3-0.1*animationSpeed;
- elseif zPosition2 > zPosition1 then
- zPosition3 = zPosition3+0.1*animationSpeed;
- end
- end
- --[[
- local upX = 360-xAngle1+xAngle2;
- local downX = xAngle1+360-xAngle2;
- local normalX = xAngle2-xAngle1;
- if math.abs(normalX) < 11*animationSpeed then
- xAngle3 = xAngle2;
- elseif math.abs(upX) < math.abs(downX) and math.abs(upX) < math.abs(normalX) then
- xAngle3 = xAngle1+10*animationSpeed;
- if xAngle3 > 360 then
- xAngle3 = xAngle3-360;
- end
- elseif math.abs(downX) < math.abs(upX) and math.abs(downX) > math.abs(normalX) then
- xAngle3 = xAngle1-10*animationSpeed;
- if xAngle3 < 0 then
- xAngle3 = 360+xAngle3;
- end
- else
- if xAngle2 < xAngle1 then
- xAngle3 = xAngle1-10*animationSpeed;
- elseif xAngle2 > xAngle1 then
- xAngle3 = xAngle3+10*animationSpeed;
- end
- end
- local upY = 360-yAngle1+yAngle2;
- local downY = yAngle1+360-yAngle2;
- local normalY = yAngle2-yAngle1;
- if math.abs(normalY) < 11*animationSpeed then
- yAngle3 = yAngle2;
- elseif math.abs(upY) < math.abs(downY) and math.abs(upY) < math.abs(normalY) then
- yAngle3 = yAngle1+10*animationSpeed;
- if yAngle3 > 360 then
- yAngle3 = yAngle3-360;
- end
- elseif math.abs(downY) < math.abs(upY) and math.abs(downY) < math.abs(normalY) then
- yAngle3 = yAngle1-10*animationSpeed;
- if yAngle3 < 0 then
- yAngle3 = 360+yAngle3;
- end
- else
- if yAngle2 < yAngle1 then
- yAngle3 = yAngle1-10*animationSpeed;
- elseif yAngle2 > yAngle1 then
- yAngle3 = yAngle3+10*animationSpeed;
- end
- end
- local upZ = 360-zAngle1+zAngle2;
- local downZ = zAngle1+360-zAngle2;
- local normalZ = zAngle2-zAngle1;
- if math.abs(normalZ) < 11*animationSpeed then
- zAngle3 = zAngle2;
- elseif math.abs(upZ) < math.abs(downZ) and math.abs(upZ) < math.abs(normalZ) then
- zAngle3 = zAngle1+10*animationSpeed;
- if zAngle3 > 360 then
- zAngle3 = zAngle3-360;
- end
- elseif math.abs(downZ) < math.abs(upZ) and math.abs(downZ) < math.abs(normalZ) then
- zAngle3 = zAngle1-10*animationSpeed;
- if zAngle3 < 0 then
- zAngle3 = 360+zAngle3;
- end
- else
- if zAngle2 < zAngle1 then
- zAngle3 = zAngle1-10*animationSpeed;
- elseif zAngle2 > zAngle1 then
- zAngle3 = zAngle3+10*animationSpeed;
- end
- end
- ]]--
- if math.abs(xAngle2-xAngle1) < 10*animationSpeed then
- xAngle3 = xAngle2;
- else
- if xAngle2 < xAngle1 then
- xAngle3 = xAngle1-10*animationSpeed;
- elseif xAngle2 > xAngle1 then
- xAngle3 = xAngle3+10*animationSpeed;
- end
- end
- if math.abs(yAngle2-yAngle1) < 10*animationSpeed then
- yAngle3 = yAngle2;
- else
- if yAngle2 < yAngle1 then
- yAngle3 = yAngle1-10*animationSpeed;
- elseif yAngle2 > yAngle1 then
- yAngle3 = yAngle3+10*animationSpeed;
- end
- end
- if math.abs(zAngle2-zAngle1) < 10*animationSpeed then
- zAngle3 = zAngle2;
- else
- if zAngle2 < zAngle1 then
- zAngle3 = zAngle1-10*animationSpeed;
- elseif zAngle2 > zAngle1 then
- zAngle3 = zAngle3+10*animationSpeed;
- end
- end
- return CFrame.new(xPosition3, yPosition3, zPosition3)*CFrame.Angles(math.rad(xAngle3), math.rad(yAngle3), math.rad(zAngle3));
- end
- function getScale()
- return math.sin(tick()*8);
- end
- _G.updateAnimation = function()
- local torso = user.Torso.CFrame:toObjectSpace(user.developerObject.fakeTorso.CFrame);
- local head = user.developerObject.fakeTorso.CFrame:toObjectSpace(user.developerObject.fakeHead.CFrame);
- local leftArm = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Left Arm"].CFrame);
- local rightArm = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Right Arm"].CFrame);
- local leftLeg = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Left Leg"].CFrame);
- local rightLeg = user.developerObject.fakeTorso.CFrame:toObjectSpace(user["Right Leg"].CFrame);
- --[[
- if not GUI.gameData.aiming.Value then
- _G.intendedLeftArm = _G.intendedLeftArm*user.developerObject.fakeTorso.CFrame:toObjectSpace(
- CFrame.new(cam.CoordinateFrame.p, GUI.gameData.mouse.Value)*CFrame.new(-1.5, -1.5, -0.5)
- );
- _G.intendedRightArm = _G.intendedRightArm*user.developerObject.fakeTorso.CFrame:toObjectSpace(
- CFrame.new(cam.CoordinateFrame.p, GUI.gameData.mouse.Value)*CFrame.new(1.5, -1.5, -0.5)
- );
- end
- ]]--
- --[[
- local hitLeft, position = workspace:FindPartOnRayWithIgnoreList(
- Ray.new(user.Torso.CFrame.p,
- ((user.Torso.CFrame*CFrame.new(-2, 0, -4)).p-user.Torso.CFrame.p).unit*4),
- {cam, workspace.targetFilter, workspace.zombies}, true);
- local hitCenter, position = workspace:FindPartOnRayWithIgnoreList(
- Ray.new(user.Torso.CFrame.p,
- ((user.Torso.CFrame*CFrame.new(0, 0, -4)).p-user.Torso.CFrame.p).unit*4),
- {cam, workspace.targetFilter, workspace.zombies}, true);
- local hitRight, position = workspace:FindPartOnRayWithIgnoreList(
- Ray.new(user.Torso.CFrame.p,
- ((user.Torso.CFrame*CFrame.new(2, 0, -4)).p-user.Torso.CFrame.p).unit*4),
- {cam, workspace.targetFilter, workspace.zombies}, true);
- if hitCenter then
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(30), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(30), 0, 0)*CFrame.new(0, -1, 0);
- if not hitLeft and hitRight then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, 0, math.rad(-15));
- elseif not hitRight and hitLeft then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, 0, math.rad(15));
- end
- end
- ]]--
- if GUI.gameData.dead.Value then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), 0, 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, -2.5, -1.5);
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.4, 1.2, 0)*CFrame.Angles(0, 0, math.rad(-10))*CFrame.new(0, -1, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.4, 1.2, 0)*CFrame.Angles(0, 0, math.rad(10))*CFrame.new(0, -1, 0);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(-10));
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(10));
- elseif GUI.gameData.climbing.Value then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, 0, math.rad(getScale()*4));
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(getScale()/2, 1.5, 0);
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
- elseif GUI.gameData.swimming.Value then
- _G.intendedTorso = _G.intendedTorso
- ;
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, 1.5, 0);
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(90), 0, math.rad(getScale()*90))*CFrame.new(0, -1, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(90), 0, -math.rad(getScale()*90))*CFrame.new(0, -1, 0);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*20), 0, 0)*CFrame.new(0, -1, 0);
- elseif GUI.gameData.vaulting.Value then
- user.Torso.CFrame = user.Torso.CFrame*CFrame.new(0, 0.2, 0);
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, math.rad(getScale()*20), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, 1.5, 0);
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -0.5-getScale()/2, 0)*CFrame.Angles(math.rad(10-getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -0.5+getScale()/2, 0)*CFrame.Angles(math.rad(10+getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
- elseif GUI.gameData.prone.Value then
- if GUI.gameData.walking.Value then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), math.rad(getScale()), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(90), 0, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(getScale()/8, -2.5, -1.5);
- if GUI.gameData.aiming.Value then
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.6, -1.5-getScale()/2, 0)*CFrame.Angles(0, 0, math.rad(-10));
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.6, -1.5+getScale()/2, 0)*CFrame.Angles(0, 0, math.rad(10));
- else
- _G.intendedTorso = _G.intendedTorso
- *CFrame.new(0, -2.5, 0)*CFrame.Angles(math.rad(-90), math.rad(getScale()/4), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(90), 0, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, -2.5, -1.5);
- if GUI.gameData.aiming.Value then
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(0, 0, 0)*CFrame.new(0, -0.5, 0);
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(-10));
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.6, -2, 0)*CFrame.Angles(0, 0, math.rad(10));
- end
- elseif GUI.gameData.crouch.Value then
- if GUI.gameData.walking.Value then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(getScale()), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(getScale()/6, 0.5, 0);
- if GUI.gameData.gun.Value then
- if GUI.gameData.aiming.Value then
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/12), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/12), 0, 0)*CFrame.new(0, -0.5, 0);
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20-getScale()*15), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20+getScale()*15), 0, 0)*CFrame.new(0, -1, 0);
- else
- _G.intendedTorso = _G.intendedTorso
- *CFrame.new(0, -1, 0)*CFrame.Angles(0, math.rad(getScale()/4), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, 0.5, 0);
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/16), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/16), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -0.5, -0.5)*CFrame.Angles(math.rad(-20), 0, 0)*CFrame.new(0, -1, 0);
- end
- elseif GUI.gameData.walking.Value then
- if GUI.gameData.sprinting.Value then
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, math.rad(getScale()*6), math.rad(getScale()/2));
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(getScale()/2, 1.5-math.abs(getScale()/4), 0);
- if GUI.gameData.gun.Value then
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*55), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*55), 0, 0)*CFrame.new(0, -1, 0);
- else
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, math.rad(getScale()*4), math.rad(getScale()/2));
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- if GUI.gameData.ouch.Value then
- _G.intendedCam = _G.intendedCam
- *CFrame.new(-math.abs(getScale()/3), 1.5-math.abs(getScale()/3), 0);
- else
- _G.intendedCam = _G.intendedCam
- *CFrame.new(getScale()/4, 1.5-math.abs(getScale()/6), 0);
- end
- if GUI.gameData.gun.Value then
- if GUI.gameData.aiming.Value then
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- else
- _G.intendedLeftArm = _G.intendedLeftArm
- *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);
- _G.intendedRightArm = _G.intendedRightArm
- *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);
- end
- if GUI.gameData.ouch.Value then
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*60), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*30), 0, 0)*CFrame.new(0, -1, 0);
- else
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -1, 0)*CFrame.Angles(math.rad(-getScale()*45), 0, 0)*CFrame.new(0, -1, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -1, 0)*CFrame.Angles(math.rad(getScale()*45), 0, 0)*CFrame.new(0, -1, 0);
- end
- end
- else
- _G.intendedTorso = _G.intendedTorso
- *CFrame.Angles(0, math.rad(getScale()/16), 0);
- _G.intendedHead = _G.intendedHead
- *CFrame.new(0, 1.5, 0);
- _G.intendedCam = _G.intendedCam
- *CFrame.new(0, 1.5, 0);
- _G.intendedLeftArm = _G.intendedLeftArm
- *CFrame.new(-1.5, 0.5, 0)*CFrame.Angles(math.rad(getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedRightArm = _G.intendedRightArm
- *CFrame.new(1.5, 0.5, 0)*CFrame.Angles(math.rad(-getScale()/8), 0, 0)*CFrame.new(0, -0.5, 0);
- _G.intendedLeftLeg = _G.intendedLeftLeg
- *CFrame.new(-0.5, -2, 0);
- _G.intendedRightLeg = _G.intendedRightLeg
- *CFrame.new(0.5, -2, 0);
- end
- local intendedTorso = _G.intendedTorso;
- local intendedHead = _G.intendedHead;
- local intendedCam = _G.intendedCam;
- local intendedLeftArm = _G.intendedLeftArm;
- local intendedRightArm = _G.intendedRightArm;
- local intendedLeftLeg = _G.intendedLeftLeg;
- local intendedRightLeg = _G.intendedRightLeg;
- local blendTorso = blendCFrameComponents(torso, intendedTorso);
- local blendHead = blendCFrameComponents(head, intendedHead);
- local blendCam = blendCFrameComponents(user.Torso.Neck.C0, intendedCam);
- local blendLeftArm = blendCFrameComponents(leftArm, intendedLeftArm, GUI.gameData.aiming.Value);
- local blendRightArm = blendCFrameComponents(rightArm, intendedRightArm, GUI.gameData.aiming.Value);
- local blendLeftLeg = blendCFrameComponents(leftLeg, intendedLeftLeg);
- local blendRightLeg = blendCFrameComponents(rightLeg, intendedRightLeg);
- torsoWeld.C0 = blendTorso;
- headWeld.C0 = blendHead;
- user.Torso.Neck.C0 = blendCam;
- leftArmWeld.C0 = blendLeftArm;
- rightArmWeld.C0 = blendRightArm;
- leftLegWeld.C0 = blendLeftLeg;
- rightLegWeld.C0 = blendRightLeg;
- _G.intendedTorso = CFrame.new(0, 0, 0);
- _G.intendedHead = CFrame.new(0, 0, 0);
- _G.intendedCam = CFrame.new(0, 0, 0);
- _G.intendedLeftArm = CFrame.new(0, 0, 0);
- _G.intendedRightArm = CFrame.new(0, 0, 0);
- _G.intendedLeftLeg = CFrame.new(0, 0, 0);
- _G.intendedRightLeg = CFrame.new(0, 0, 0);
- --[[
- local o = GUI.gameData.mouse.Value.y-user.Head.CFrame.y;
- local a = (GUI.gameData.mouse.Value-user.Head.CFrame.p).magnitude;
- local viewOffset = user.developerObject.fakeHead.CFrame:toObjectSpace(cam.Focus);
- --if (cam.CoordinateFrame.p-cam.Focus.p).magnitude < 1 then
- viewWeld.C0 = viewOffset*CFrame.Angles(-math.tan(o/a)+1.57, 3.14, 0)*CFrame.new(0, -1.5, 0);
- --else
- --viewWeld.C0 = CFrame.Angles(math.tan(o/a), 0, 0)*CFrame.new(0, -1.5, 0);
- --end
- ]]--
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement