Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createface()
- local Model0 = Instance.new("Model");
- local Part1 = Instance.new("Part");
- local SpecialMesh2 = Instance.new("SpecialMesh");
- local Part3 = Instance.new("Part");
- local Decal4 = Instance.new("Decal");
- local SpecialMesh5 = Instance.new("SpecialMesh");
- local Weld6 = Instance.new("Weld");
- local Weld7 = Instance.new("Weld");
- local Part8 = Instance.new("Part");
- local SpecialMesh9 = Instance.new("SpecialMesh");
- local Weld10 = Instance.new("Weld");
- Model0.Name = "HeadAcc";
- Part1.Name = "Hair";
- Part1.Parent = Model0;
- Part1.CFrame = CFrame.new(-10.5516481, 3.84958363, -39.6669617, -0.139173076, 0, 0.990268052, 0, 1, 0, -0.990268052, 0, -0.139173076);
- Part1.Orientation = Vector3.new(0, 98, 0);
- Part1.Position = Vector3.new(-10.551648139954, 3.8495836257935, -39.666961669922);
- Part1.Rotation = Vector3.new(-180, 82, -180);
- Part1.Size = Vector3.new(1, 1, 1);
- Part1.BottomSurface = Enum.SurfaceType.Smooth;
- Part1.TopSurface = Enum.SurfaceType.Smooth;
- SpecialMesh2.Name = "SpecialMesh";
- SpecialMesh2.Parent = Part1;
- SpecialMesh2.MeshId = "rbxassetid://6521980205";
- SpecialMesh2.Scale = Vector3.new(0.94999998807907, 0.95999997854233, 0.91000002622604);
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=6517665515";
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh;
- Part3.Name = "Head";
- Part3.Parent = Model0;
- Part3.CFrame = CFrame.new(-10.8355103, 4.5, -39.626709, 0, 0, 1, 0, 1, -0, -1, 0, 0);
- Part3.Orientation = Vector3.new(0, 90, 0);
- Part3.Position = Vector3.new(-10.835510253906, 4.5, -39.626708984375);
- Part3.Rotation = Vector3.new(0, 90, 0);
- Part3.Size = Vector3.new(2, 1, 1);
- Part3.BottomSurface = Enum.SurfaceType.Smooth;
- Part3.TopSurface = Enum.SurfaceType.Smooth;
- Decal4.Name = "Face";
- Decal4.Parent = Part3;
- Decal4.Texture = "rbxasset://textures/face.png";
- SpecialMesh5.Parent = Part3;
- SpecialMesh5.Scale = Vector3.new(1.25, 1.25, 1.25);
- Weld6.Name = "Hair";
- Weld6.Parent = Part3;
- Weld6.C0 = CFrame.new(0.0402526855, -0.650416374, 0.283862114, 0.990268052, 0, 0.139173076, 0, 1, 0, -0.139173076, 0, 0.990268052);
- Weld6.Part0 = Part3;
- Weld6.Part1 = Part1;
- Weld6.part1 = Part1;
- Weld7.Name = "Mask";
- Weld7.Parent = Part3;
- Weld7.C0 = CFrame.new(0.000289916992, 0, -0.0448408127, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994);
- Weld7.Part0 = Part3;
- Weld7.Part1 = Part8;
- Weld7.part1 = Part8;
- Part8.Name = "Mask";
- Part8.Parent = Model0;
- Part8.CFrame = CFrame.new(-10.8803511, 4.5, -39.6269989, 0, 0, 0.99999994, 0, 1, 0, -0.99999994, 0, 0);
- Part8.Orientation = Vector3.new(0, 90, 0);
- Part8.Position = Vector3.new(-10.880351066589, 4.5, -39.626998901367);
- Part8.Rotation = Vector3.new(0, 89.980003356934, 0);
- Part8.Size = Vector3.new(1, 1, 1);
- Part8.BottomSurface = Enum.SurfaceType.Smooth;
- Part8.TopSurface = Enum.SurfaceType.Smooth;
- SpecialMesh9.Name = "SpecialMesh";
- SpecialMesh9.Parent = Part8;
- SpecialMesh9.MeshId = "rbxassetid://5728632913";
- SpecialMesh9.TextureId = "http://www.roblox.com/asset/?id=4809181158";
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh;
- Weld10.Name = "Hair";
- Weld10.Parent = Part8;
- Weld10.C0 = CFrame.new(0.0399627686, -0.650416374, 0.328702927, 0.990268052, 0, 0.139173076, 0, 1, 0, -0.139173076, 0, 0.990268052);
- Weld10.Part0 = Part8;
- Weld10.Part1 = Part1;
- Weld10.part1 = Part1;
- return Model0;
- end
- function creategun()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- local Weld3 = Instance.new("Weld")
- local Part4 = Instance.new("Part")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- Model0.Name = "GunModel"
- Model0.PrimaryPart = Part1
- Part1.Name = "gun"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-36.0459862, 2.68512678, 5.4637394, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-36.045986175537, 2.6851267814636, 5.4637393951416)
- Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part1.Size = Vector3.new(0.20847088098526, 0.94680535793304, 6.3699998855591)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Really black")
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.Reflectance = -100
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Really black")
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://7515835851"
- SpecialMesh2.Scale = Vector3.new(0.45717298984528, 0.4571730196476, 0.45717298984528)
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Weld3.Name = "Bullet"
- Weld3.Parent = Part1
- Weld3.C0 = CFrame.new(0, 0.313477516, -3.12394595, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld3.Part0 = Part1
- Weld3.Part1 = Part4
- Weld3.part1 = Part4
- Part4.Name = "Bullet"
- Part4.Parent = Model0
- Part4.CFrame = CFrame.new(-36.0459862, 2.9986043, 2.33979344, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(-36.045986175537, 2.9986042976379, 2.3397934436798)
- Part4.Size = Vector3.new(0.10000000149012, 0.10000000149012, 0.10000000149012)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part4.Locked = true
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part5.Name = "Handle"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-36.0605736, 3.12793541, 7.73314953, 1, 0, 0, 0, 0.464352816, -0.885652781, 0, 0.885652781, 0.464352816)
- Part5.Orientation = Vector3.new(62.330001831055, 0, 0)
- Part5.Position = Vector3.new(-36.060573577881, 3.1279354095459, 7.7331495285034)
- Part5.Rotation = Vector3.new(62.330001831055, 0, 0)
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.CanCollide = false
- Part5.Locked = true
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Weld6.Name = "gun"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(0.0725860596, -2.21551895, -0.661629438, 1, 0, 0, 0, 0.464352816, 0.885652781, 0, -0.885652781, 0.464352816)
- Weld6.C1 = CFrame.new(0.0580000021, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part1
- Weld6.part1 = Part1
- return Model0
- end
- function creategun2()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local Part2 = Instance.new("Part")
- local SpecialMesh3 = Instance.new("SpecialMesh")
- local Weld4 = Instance.new("Weld")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- Model0.Name = "Gun"
- Model0.PrimaryPart = Part2
- Part1.Name = "Handle"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-56.3740005, 3.78794551, 7.83799982, 1, 3.82137432e-15, -8.74228334e-08, -3.82137093e-15, 1.00000095, 3.34075197e-22, 8.74227837e-08, 1.26217745e-28, 1.00000072)
- Part1.Position = Vector3.new(-56.374000549316, 3.7879455089569, 7.8379998207092)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(1, 2, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part2.Name = "Gun"
- Part2.Parent = Model0
- Part2.CFrame = CFrame.new(-56.3740005, 2.14700007, 7.55256653, -1, 8.74227624e-08, -3.82137093e-15, 3.82137093e-15, 0, -1, -8.74227766e-08, -0.999999881, -3.34074869e-22)
- Part2.Orientation = Vector3.new(90, 180, 0)
- Part2.Position = Vector3.new(-56.374000549316, 2.1470000743866, 7.5525665283203)
- Part2.Rotation = Vector3.new(90, 0, -180)
- Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part2.Size = Vector3.new(0.37797310948372, 0.94999998807907, 2.6956248283386)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Really black")
- Part2.Reflectance = -1000
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.brickColor = BrickColor.new("Really black")
- Part2.CanCollide = false
- SpecialMesh3.Parent = Part2
- SpecialMesh3.MeshId = "rbxassetid://7523374921"
- SpecialMesh3.Scale = Vector3.new(0.38372907042503, 0.38372913002968, 0.38372910022736)
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- Weld4.Name = "Handle"
- Weld4.Parent = Part2
- Weld4.C0 = CFrame.new(0, -0.285433292, -1.64094543, -1, 4.23516474e-22, 0, -7.10542736e-15, 3.34075096e-22, -1.00000083, -2.92057526e-29, -1.00000095, -3.34075197e-22)
- Weld4.Part0 = Part2
- Weld4.Part1 = Part1
- Weld4.part1 = Part1
- Part5.Name = "Bullet"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-56.3740005, 0.811995029, 7.22424364, 1, 0, 2.13162821e-14, 0, 1, 0, 2.13162821e-14, 0, 0.999999762)
- Part5.Position = Vector3.new(-56.374000549316, 0.81199502944946, 7.2242436408997)
- Part5.Transparency = 1
- Part5.Size = Vector3.new(0.10000000149012, 0.10000000149012, 0.10000000149012)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.CanCollide = false
- Weld6.Name = "Part"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(0, 1.33500504, 0.328322887, -1, 8.74227624e-08, -3.82137093e-15, 3.82137093e-15, 0, -1, -8.74227766e-08, -0.999999881, -3.34074869e-22)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part2
- Weld6.part1 = Part2
- return Model0
- end
- function createsword()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- local Part3 = Instance.new("Part")
- local Weld4 = Instance.new("Weld")
- local Part5 = Instance.new("Part")
- local Weld6 = Instance.new("Weld")
- local SpecialMesh7 = Instance.new("SpecialMesh")
- Model0.Name = "Main"
- Model0.PrimaryPart = Part1
- Part1.Name = "Hitbox"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-65.1884003, 2.34880948, 29.0725231, 1, 0, 0, 0, 1, 4.37113883e-08, 0, -4.37113883e-08, 1)
- Part1.Position = Vector3.new(-65.188400268555, 2.3488094806671, 29.072523117065)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(0.0010000000474975, 0.6583531498909, 11.325116157532)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- ParticleEmitter2.Parent = Part1
- ParticleEmitter2.Speed = NumberRange.new(0, 0)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0.117647, 0.117647, 0.117647))
- ParticleEmitter2.LightInfluence = 1
- ParticleEmitter2.Texture = "rbxassetid://603193846"
- ParticleEmitter2.Transparency = NumberSequence.new(0,1)
- ParticleEmitter2.ZOffset = 1
- ParticleEmitter2.Size = NumberSequence.new(0.3125,0)
- ParticleEmitter2.Acceleration = Vector3.new(0, 5, 0)
- ParticleEmitter2.EmissionDirection = Enum.NormalId.Back
- ParticleEmitter2.Lifetime = NumberRange.new(0.75, 1)
- ParticleEmitter2.Rate = 3000
- Part3.Name = "Handle"
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-65.2248993, 3.1950767, 37.3521118, 1, 0, 0, 0, 0.985921264, -0.167210802, 0, 0.167210802, 0.985921264)
- Part3.Orientation = Vector3.new(9.6300001144409, 0, 0)
- Part3.Position = Vector3.new(-65.224899291992, 3.1950767040253, 37.352111816406)
- Part3.Rotation = Vector3.new(9.6300001144409, 0, 0)
- Part3.Transparency = 1
- Part3.Size = Vector3.new(1, 2, 1)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.CanCollide = false
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Weld4.Name = "Sword"
- Weld4.Parent = Part3
- Weld4.C0 = CFrame.new(0.0368614197, -0.65113759, -6.00376034, 1, 0, 0, 0, 0, 1, 0, -1, 0)
- Weld4.C1 = CFrame.new(0, 0, 1.20799994, 1, 0, 0, 0, 0.985921264, -0.167210847, 0, 0.167210847, 0.985921264)
- Weld4.Part0 = Part3
- Weld4.Part1 = Part5
- Weld4.part1 = Part5
- Part5.Name = "Sword"
- Part5.Parent = Model0
- Part5.CFrame = CFrame.new(-65.1880417, 2.34899998, 31.3239994, 1, 0, 0, 0, -4.37113883e-08, 1, 0, -1, -4.37113883e-08)
- Part5.Orientation = Vector3.new(-90, 0, 0)
- Part5.Position = Vector3.new(-65.188041687012, 2.3489999771118, 31.323999404907)
- Part5.Rotation = Vector3.new(-90, 0, 0)
- Part5.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part5.Size = Vector3.new(0.67699998617172, 15.430000305176, 1.5319999456406)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.BrickColor = BrickColor.new("Really black")
- Part5.CanCollide = false
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.brickColor = BrickColor.new("Really black")
- Weld6.Name = "Hitbox"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(-0.000358581543, 2.25147676, -0.000190496445, 1, 0, 0, 0, 0, -1, 0, 1, 0)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part1
- Weld6.part1 = Part1
- SpecialMesh7.Parent = Part5
- SpecialMesh7.MeshId = "rbxassetid://7513632006"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- return Model0
- end
- function createsword2()
- local Model0 = Instance.new("Model")
- local Part1 = Instance.new("Part")
- local Weld2 = Instance.new("Weld")
- local Part3 = Instance.new("Part")
- local SpecialMesh4 = Instance.new("SpecialMesh")
- local Weld5 = Instance.new("Weld")
- local Weld6 = Instance.new("Weld")
- local Weld7 = Instance.new("Weld")
- local Weld8 = Instance.new("Weld")
- local Part9 = Instance.new("Part")
- local Part10 = Instance.new("Part")
- local Part11 = Instance.new("Part")
- local Part12 = Instance.new("Part")
- Model0.Name = "Sword2"
- Model0.PrimaryPart = Part1
- Part1.Name = "Handle"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-57.4780884, 3.45233488, 9.50007629, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-57.478088378906, 3.4523348808289, 9.5000762939453)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(1, 2, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Weld2.Name = "Sword"
- Weld2.Parent = Part1
- Weld2.C0 = CFrame.new(-0.111911774, -0.549632311, -4.20755672, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
- Weld2.Part0 = Part1
- Weld2.Part1 = Part3
- Weld2.part1 = Part3
- Part3.Name = "Sword"
- Part3.Parent = Model0
- Part3.CFrame = CFrame.new(-57.5900002, 2.90270257, 5.29251957, -1, 0, 8.74227766e-08, 0, 1, 0, -8.74227766e-08, 0, -1)
- Part3.Orientation = Vector3.new(0, 180, 0)
- Part3.Position = Vector3.new(-57.590000152588, 2.9027025699615, 5.292519569397)
- Part3.Rotation = Vector3.new(-180, 0, -180)
- Part3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part3.Size = Vector3.new(0.3568326830864, 1.1743521690369, 11.178980827332)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Really black")
- Part3.CanCollide = false
- Part3.Locked = true
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Really black")
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "rbxassetid://7527652353"
- SpecialMesh4.Scale = Vector3.new(0.53258603811264, 0.53258603811264, 0.53258603811264)
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Weld5.Name = "Hitbox0"
- Weld5.Parent = Part3
- Weld5.C0 = CFrame.new(0.00191879272, 0.087678194, 5.09866619, -1, -4.63827234e-08, -7.41038804e-08, 0, 0.847649574, -0.5305565, 8.74227766e-08, -0.5305565, -0.847649574)
- Weld5.Part0 = Part3
- Weld5.Part1 = Part10
- Weld5.part1 = Part10
- Weld6.Name = "Hitbox1"
- Weld6.Parent = Part3
- Weld6.C0 = CFrame.new(0.0409698486, -0.228977919, 1.76255965, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1)
- Weld6.Part0 = Part3
- Weld6.Part1 = Part9
- Weld6.part1 = Part9
- Weld7.Name = "Hitbox2"
- Weld7.Parent = Part3
- Weld7.C0 = CFrame.new(0.0409698486, -0.346400023, -2.01896858, -1, 3.68905511e-08, -7.92580224e-08, 0, 0.906606138, 0.421978712, 8.74227766e-08, 0.421978712, -0.906606138)
- Weld7.Part0 = Part3
- Weld7.Part1 = Part12
- Weld7.part1 = Part12
- Weld8.Name = "Hitbox3"
- Weld8.Parent = Part3
- Weld8.C0 = CFrame.new(0.0409698486, -0.32441926, -1.37172031, -1, -1.94975538e-08, -8.52208188e-08, 0, 0.974812508, -0.223026022, 8.74227766e-08, -0.223026022, -0.974812508)
- Weld8.Part0 = Part3
- Weld8.Part1 = Part11
- Weld8.part1 = Part11
- Part9.Name = "Hitbox1"
- Part9.Parent = Model0
- Part9.CFrame = CFrame.new(-57.63097, 2.67372465, 3.52995992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part9.Position = Vector3.new(-57.630970001221, 2.6737246513367, 3.5299599170685)
- Part9.Transparency = 1
- Part9.Size = Vector3.new(0.14361953735352, 0.11858534812927, 5.6687269210815)
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.CanCollide = false
- Part9.Locked = true
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part10.Name = "Hitbox0"
- Part10.Parent = Model0
- Part10.CFrame = CFrame.new(-57.5919189, 2.99038076, 0.193853378, 1, 0, 0, 0, 0.847649574, -0.5305565, 0, 0.5305565, 0.847649574)
- Part10.Orientation = Vector3.new(32.040000915527, 0, 0)
- Part10.Position = Vector3.new(-57.591918945313, 2.9903807640076, 0.1938533782959)
- Part10.Rotation = Vector3.new(32.040000915527, 0, 0)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(0.13296127319336, 0.11858534812927, 1.2458262443542)
- Part10.BottomSurface = Enum.SurfaceType.Smooth
- Part10.CanCollide = false
- Part10.Locked = true
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part11.Name = "Hitbox3"
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(-57.63097, 2.57828331, 6.66423988, 1, 0, 0, 0, 0.974812508, -0.223026022, 0, 0.223026022, 0.974812508)
- Part11.Orientation = Vector3.new(12.890000343323, 0, 0)
- Part11.Position = Vector3.new(-57.630970001221, 2.5782833099365, 6.6642398834229)
- Part11.Rotation = Vector3.new(12.890000343323, 0, 0)
- Part11.Transparency = 1
- Part11.Size = Vector3.new(0.14361953735352, 0.11858534812927, 0.9631462097168)
- Part11.BottomSurface = Enum.SurfaceType.Smooth
- Part11.CanCollide = false
- Part11.Locked = true
- Part11.TopSurface = Enum.SurfaceType.Smooth
- Part12.Name = "Hitbox2"
- Part12.Parent = Model0
- Part12.CFrame = CFrame.new(-57.63097, 2.55630255, 7.31148815, 1, 0, 0, 0, 0.906606138, 0.421978712, 0, -0.421978712, 0.906606138)
- Part12.Orientation = Vector3.new(-24.959999084473, 0, 0)
- Part12.Position = Vector3.new(-57.630970001221, 2.5563025474548, 7.3114881515503)
- Part12.Rotation = Vector3.new(-24.959999084473, 0, 0)
- Part12.Transparency = 1
- Part12.Size = Vector3.new(0.14361953735352, 0.11858534812927, 0.46920847892761)
- Part12.BottomSurface = Enum.SurfaceType.Smooth
- Part12.CanCollide = false
- Part12.Locked = true
- Part12.TopSurface = Enum.SurfaceType.Smooth
- return Model0
- end
- local swordmodel = createsword()
- function newshirt()
- local a = Instance.new("Shirt")
- local b = Instance.new("Pants")
- a.ShirtTemplate = "http://www.roblox.com/asset/?id=1210857659"
- b.PantsTemplate = "http://www.roblox.com/asset/?id=1210858273"
- return a,b
- end
- local Player = owner or game:GetService("Players"):WaitForChild("plytalent")
- wait(1)
- local char = Player.Character
- script.Parent = char
- local weldweapon = Instance.new("Weld",char:WaitForChild("Right Arm"))
- weldweapon.Part0 = weldweapon.Parent
- weldweapon.Part1 = swordmodel.Handle
- swordmodel.Parent = char
- local facemodel = createface()
- facemodel.Parent = char
- local weldface = Instance.new("Weld",char:WaitForChild("Head"))
- weldface.Part0 = weldface.Parent
- weldface.Part1 = facemodel.Head
- local gunmodel = creategun()
- gunmodel.Parent = char
- local weldgun = Instance.new("Weld",char:WaitForChild("Right Arm"))
- weldgun.Part0 = weldgun.Parent
- weldgun.Part1 = gunmodel.Handle
- local dualweld_folder = Instance.new("Folder",char)
- dualweld_folder.Name = "Dual_Welded_Gun"
- local gunright = creategun2()
- gunright.Parent = char
- local gunleft = creategun2()
- gunleft.Parent = char
- local weldright_hand = Instance.new("Weld",char:WaitForChild("Right Arm"))
- weldright_hand.Part0 = weldright_hand.Parent
- weldright_hand.Part1 = gunright.Handle
- local weldleft_hand = Instance.new("Weld",char:WaitForChild("Left Arm"))
- weldleft_hand.Part0 = weldleft_hand.Parent
- weldleft_hand.Part1 = gunleft.Handle
- local swordright = createsword2()
- swordright.Parent = char
- local swordleft = createsword2()
- swordleft.Parent = char
- local weldright_handsword = Instance.new("Weld",char:WaitForChild("Right Arm"))
- weldright_handsword.Part0 = weldright_handsword.Parent
- weldright_handsword.Part1 = swordright.Handle
- local weldleft_handsword = Instance.new("Weld",char:WaitForChild("Left Arm"))
- weldleft_handsword.Part0 = weldleft_handsword.Parent
- weldleft_handsword.Part1 = swordleft.Handle
- local weaponlist={
- ["Dual_Weld_Gun"]={gunleft,gunright},
- ["Gun"] = {gunmodel},
- ["Dual_Weld_Sword"] = {swordright,swordleft}
- }
- for _,models in pairs(weaponlist) do
- for _,model in pairs(models) do
- spawn(function()
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart")then
- v.Transparency = 1
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- end
- end)
- end
- end
- weaponlist["Sword"] = {swordmodel}
- local mode = "Sword"
- local lastswitch = mode
- function switchweapon_f()
- for _,model in pairs(weaponlist[lastswitch]) do
- spawn(function()
- for i=0,1,1/60 do
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart") and v.Name ~= "Handle" and not v.Name:find("Hitbox") and v.Name ~= "Bullet"then
- if v.Transparency < i then
- v.Transparency = i
- end
- wait(1/60)
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = false
- end
- end
- end
- end)
- end
- for _,model in pairs(weaponlist[mode]) do
- spawn(function()
- for i=1,0,-1/60 do
- for _,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart") and v.Name ~= "Handle" and not v.Name:find("Hitbox") and v.Name ~= "Bullet"then
- v.Transparency = i
- wait(1/60)
- elseif v:IsA("ParticleEmitter") then
- v.Enabled = true
- end
- end
- end
- end)
- end
- end
- switchweapon_f(mode)
- local shirt, pants = newshirt()
- for _,ac in pairs(char:GetChildren())do
- if ac:IsA("Accessory") or ac:IsA("Shirt") or ac:IsA("Pants") then
- ac:Destroy()
- elseif ac:IsA("BasePart") then
- ac.Color = Color3.new(231/255, 231/255, 236/255)
- end
- end
- shirt.Parent = char
- pants.Parent = char
- Character=Player.Character
- Torso=Character.Torso
- Humanoid=Character.Humanoid
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- LS=Torso["Left Shoulder"]
- LH=Torso["Left Hip"]
- RS=Torso["Right Shoulder"]
- RH=Torso["Right Hip"]
- Neck=Torso.Neck
- RootPart=Character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- cf = CFrame.new
- angles = CFrame.Angles
- ROOTC0 = RootJoint.C0
- NECKC0 = Torso.Neck.C0
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- cf=CFrame.new
- cn=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- RW, LW=Instance.new("Weld"), Instance.new("Weld")
- RW.Name="Right Shoulder" LW.Name="Left Shoulder"
- LH=Torso["Left Hip"]
- RH=Torso["Right Hip"]
- RootCF=euler(-1.57,0,3.14)
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RSH=Character.Torso["Right Shoulder"]
- LSH=Character.Torso["Left Shoulder"]
- RSH.Parent=nil
- LSH.Parent=nil
- RW.Name="Right Shoulder"
- RW.Part0=Character.Torso
- RW.C0=cf(1.5, 0.5, 0)
- RW.C1=cf(0, 0.5, 0)
- RW.Part1=Character["Right Arm"]
- RW.Parent=Character.Torso
- LW.Name="Left Shoulder"
- LW.Part0=Character.Torso
- LW.C0=cf(-1.5, 0.5, 0)
- LW.C1=cf(0, 0.5, 0)
- LW.Part1=Character["Left Arm"]
- LW.Parent=Character.Torso
- local currentsine = 0
- local attack = false
- function create_homing_script_f(parent,type)
- local scstring = [==[
- local part = script.Parent
- local BodyGyro = Instance.new("BodyGyro",part)
- local BodyPosition = Instance.new("BodyPosition",part)
- part.Anchored = false
- function moveTo(target)
- local dir = (target.Position - part.Position).unit
- BodyGyro.cframe = CFrame.new(Vector3.new(0,0,0), dir)
- BodyGyro.D = 100
- BodyGyro.maxTorque = Vector3.new(1000000, 1000000, 1000000)
- BodyPosition.position = target.Position
- BodyPosition.D = 100
- BodyPosition.maxForce = Vector3.new(1000000, 1000000, 1000000)
- end
- function findNearestTorso(pos)
- local nearest = {
- torso = nil,
- distance = math.huge
- }
- for _, object in ipairs(game:GetService("Players"):GetPlayers()) do
- if object and object ~= owner then
- if object.Character then
- local torso = object.Character:FindFirstChild("HumanoidRootPart")
- local human = object.Character:FindFirstChildOfClass("Humanoid")
- if torso and human and human.Health > 0 then
- local this = {
- torso = torso,
- distance = (torso.Position - pos).magnitude
- }
- if this.distance < nearest.distance then
- nearest = this
- end
- end
- end
- end
- end
- return nearest.torso, nearest.distance
- end
- local debris=game:GetService("Debris")]==]
- if type == "Heal" then
- scstring = scstring.. [==[
- function damage(PartParent,hit)
- if PartParent then
- if game:GetService("Players"):FindFirstChild(PartParent.Name) and PartParent.Name ~= "plytalent" and PartParent.Name ~= "FacelessOne" and PartParent.Name ~= "Mami Tomoe Armor" and PartParent.Name ~= "NekoBeast" then
- if part.Anchored then
- return
- end
- part.Anchored = true
- part.Position = hit.Position
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = true
- local fake = game:GetService("Players"):FindFirstChild(PartParent.Name).Character:Clone()
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = false
- if PartParent:FindFirstChildOfClass("Humanoid") then
- PartParent:FindFirstChildOfClass("Humanoid").Health = PartParent:FindFirstChildOfClass("Humanoid").MaxHealth
- if fake then
- for _,partfake in pairs(fake:GetChildren())do
- if partfake:IsA("BasePart")then
- partfake.Anchored = true
- spawn(function()
- for i=0,1,1/60 do
- partfake.Transparency = i
- wait(1/60)
- end
- end)
- partfake.Color = Color3.new(0,1,0)
- partfake.CanCollide = false
- else
- partfake:Destroy()
- end
- end
- fake.Parent = workspace
- debris:AddItem(fake,2)
- end
- for i =0 , 1 , 0.01 do
- part.Transparency = i
- wait(0.01)
- end
- cleanup()
- end
- end
- end
- end
- ]==]
- elseif type == "Damage" then
- scstring = scstring.. [==[
- function damage(PartParent,hit)
- if PartParent then
- if game:GetService("Players"):FindFirstChild(PartParent.Name) and PartParent.Name ~= "plytalent" and PartParent.Name ~= "FacelessOne" and PartParent.Name ~= "Mami Tomoe Armor" and PartParent.Name ~= "NekoBeast" then
- if part.Anchored then
- return
- end
- part.Anchored = true
- part.Position = hit.Position
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = true
- local fake = game:GetService("Players"):FindFirstChild(PartParent.Name).Character:Clone()
- game:GetService("Players"):FindFirstChild(PartParent.Name).Character.Archivable = false
- if PartParent:FindFirstChildOfClass("Humanoid") then
- PartParent:FindFirstChildOfClass("Humanoid").Health = PartParent:FindFirstChildOfClass("Humanoid").Health - 10
- if fake then
- for _,partfake in pairs(fake:GetChildren())do
- if partfake:IsA("BasePart")then
- partfake.Anchored = true
- spawn(function()
- for i=0,1,1/60 do
- partfake.Transparency = i
- wait(1/60)
- end
- end)
- partfake.Color = Color3.new(1,0,0)
- partfake.CanCollide = false
- else
- partfake:Destroy()
- end
- end
- fake.Parent = workspace
- debris:AddItem(fake,2)
- end
- for i =0 , 1 , 0.01 do
- part.Transparency = i
- wait(0.01)
- end
- cleanup()
- end
- end
- end
- end
- ]==]
- end
- scstring = scstring..[==[
- Homing=game:GetService("RunService").Stepped:Connect(function()
- local torso,far = findNearestTorso(part.Position)
- if torso ~= nil then
- moveTo(torso)
- end
- end)
- touch=part.Touched:Connect(function(hit)
- damage(hit.Parent,hit)
- end)
- function cleanup()
- print("Disconnecting Event")
- part:Destroy()
- Homing:Disconnect()
- touch:Disconnect()
- script:Destroy()
- end]==]
- return NS(scstring,parent)
- end
- function teleport(plr,where)
- if plr ~= Player then
- return
- end
- char:SetPrimaryPartCFrame(where*CFrame.new(0,3.5,0))
- end
- local Dual_Weld_Gun_combo = 0
- local damagetype = "Heal"
- function attack_f(plr)
- if plr ~= Player or attack then
- return
- end
- print("CheckMode:",mode)
- attack = true
- if mode == "Gun" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(0)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(60 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunmodel.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(0)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(80 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- elseif mode == "Dual_Weld_Gun" then
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(90 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(45)),i)
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunleft.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(110 - 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(45)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(-45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(90 + 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(-45)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- local clone = Instance.new("Part")
- clone.Size = Vector3.new(0.1,0.1,0.1)
- clone.Color = Color3.new(0,1,0)
- clone.Parent = workspace
- clone.CFrame = gunright.Bullet.CFrame
- create_homing_script_f(clone,damagetype)
- for i=0,1,1/60 do
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(currentsine / 34))),i)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(currentsine / 28))*angles(math.rad(0 - 1 * math.cos(currentsine / 34)),math.rad(0),math.rad(-45)),i)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),i)
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),i)
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(currentsine / 28),0)*angles(math.rad(110 + 1 * math.cos(currentsine / 8)),math.rad(0),math.rad(-45)),i)
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- attack = false
- end
- function switch_f(plr,key)
- if plr ~= Player then
- return
- end
- local switched = false
- if mode ~= lastswitch then
- lastswitch = mode
- end
- if key == "q" and mode ~= "Sword" then
- mode = "Sword"
- switched = true
- elseif key == "e" and mode ~= "Gun" then
- mode = "Gun"
- switched = true
- elseif key == "r" and mode ~= "Dual_Weld_Gun" then
- mode = "Dual_Weld_Gun"
- switched = true
- elseif key == "t" and mode ~= "Dual_Weld_Sword" then
- mode = "Dual_Weld_Sword"
- switched = true
- elseif key == "f" and damagetype == "Damage" then
- damagetype = "Heal"
- print("Damage Mode:",damagetype)
- elseif key == "f" and damagetype == "Heal" then
- damagetype = "Damage"
- print("Damage Mode:",damagetype)
- end
- if switched then
- switchweapon_f(mode)
- print("Current Mode:", mode)
- end
- end
- local music = Instance.new("Sound",char.HumanoidRootPart)
- music.SoundId = "rbxassetid://6659445380"
- music.Volume = 0.1
- music.Looped = true
- music:Play()
- local skill_folder = Instance.new("Folder",script)
- local switch_remote = Instance.new("RemoteEvent",skill_folder)
- local attack_remote = Instance.new("RemoteEvent",skill_folder)
- local teleport_remote = Instance.new("RemoteEvent",skill_folder)
- skill_folder.Name = "Skill_Folder"
- switch_remote.Name = "Switch"
- attack_remote.Name = "Attack"
- teleport_remote.Name = "Teleport"
- attack_remote.OnServerEvent:Connect(attack_f)
- switch_remote.OnServerEvent:Connect(switch_f)
- teleport_remote.OnServerEvent:Connect(teleport)
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- end
- function Clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- end
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(
- at.x, at.y, at.z,
- right.x, top.x, back.x,
- right.y, top.y, back.y,
- right.z, top.z, back.z
- )
- end
- function rayCast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or math.huge)), Ignore)
- end
- local destroy_animate = true
- function animation(sine)
- if not attack then
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
- if hitfloor then
- if Character:FindFirstChild("Animate") and destroy_animate then
- destroy_animate=false
- wait(1)
- Character:FindFirstChild("Animate"):Destroy()
- end
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
- RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
- LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine/25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine/25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- RW.C0=Clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1)
- LW.C0=Clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine/25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1)
- elseif torvel<1 and hitfloor~=nil then
- RH.C0=Clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(22.5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
- if mode == "Dual_Weld_Gun" or mode == "Sword" then
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- else
- RW.C0=Clerp(RW.C0,cf(1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- if mode == "Sword" then
- LW.C0=Clerp(LW.C0,cf(-1.25,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(75 - 1 * math.cos(sine / 8)),math.rad(0),math.rad(20)),.1)
- else
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5 + 0.1 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- elseif torvel>2 and hitfloor~=nil then
- RH.C0=Clerp(RH.C0,cf(1,-0.85,-0.15 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
- LH.C0=Clerp(LH.C0,cf(-1,-0.85,-0.15 + 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 25 * math.cos(sine / 8))),.1)
- RootJoint.C0=Clerp(RootJoint.C0,RootCF*cf(0,0,-0.15 - 0.1 * math.cos(sine / 4))*angles(math.rad(5),math.rad(0),math.rad(0 - 5 * math.cos(sine / 8))),.1)
- Torso.Neck.C0=Clerp(Torso.Neck.C0,necko*angles(math.rad(10 + 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(0 + 5 * math.cos(sine / 8))),.1)
- if mode == "Dual_Weld_Gun" or mode == "Sword" then
- RW.C0=Clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 10 * math.cos(sine / 8)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 4))),.1)
- else
- RW.C0=Clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 45 * math.cos(sine / 8)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 4))),.1)
- end
- if mode == "Dual_Weld_Gun" then
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 10 * math.cos(sine / 8)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 4))),.1)
- else
- LW.C0=Clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 45 * math.cos(sine / 8)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 4))),.1)
- end
- end
- end
- end
- game:GetService("RunService").Heartbeat:Connect(function(delta)
- music:Resume()
- if Humanoid.MaxHealth < 999 then
- Humanoid.MaxHealth = 999
- end
- if Humanoid.Health ~=Humanoid.MaxHealth then
- Humanoid.Health =Humanoid.MaxHealth
- end
- currentsine = currentsine + (25*delta)
- animation(currentsine)
- end)
- NLS(
- [=[
- local player = owner or game:GetService("Players").LocalPlayer
- local keylist={
- ["Teleport"] = {"n"},
- ["Switch"] = {"q","e","r","t","f"}
- }
- local needargs = {
- ["Teleport"] = "Hit",
- ["Switch"] = "Key",
- ["Attack"] = "Hit"
- }
- local mouse = player:GetMouse()
- mouse.Button1Down:Connect(function()
- if script.Parent:FindFirstChild("Skill_Folder") then
- if script.Parent.Skill_Folder:FindFirstChild("Attack") then
- print("Fired Remote Attack")
- script.Parent.Skill_Folder:FindFirstChild("Attack"):FireServer()
- end
- end
- end)
- mouse.KeyDown:Connect(function(k)
- for index, keybinds in pairs(keylist) do
- for i=1,#keybinds do
- if keybinds[i] == k then
- if script.Parent:FindFirstChild("Skill_Folder") then
- if script.Parent.Skill_Folder:FindFirstChild(index) then
- local args = needargs[index]
- if args == "Key" then
- args = k
- else
- args = mouse[args]
- end
- script.Parent.Skill_Folder:FindFirstChild(index):FireServer(args)
- end
- end
- end
- end
- end
- end)
- ]=]
- ,script)
Add Comment
Please, Sign In to add comment