Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Archangel Gauntlet, made by yeox769.
- --Feel free to use this in your scripts, but please give credit if you do so.
- --Credit goes to the Kaerin script for some of the animations, and to pitaden for one of the meshes (Warglaive of Azzinoth).
- wait(0.5)
- player = game.Players.LocalPlayer
- char = player.Character
- hmnd = char.Humanoid
- larm = char["Left Arm"]
- rarm = char["Right Arm"]
- lleg = char["Left Leg"]
- rleg = char["Right Leg"]
- torso = char.Torso
- mouse = player:GetMouse()
- lght = game.Lighting
- bdclr = char["Body Colors"]
- Neck = torso.Neck
- -- More variables, just in case.
- Player=game:GetService("Players").LocalPlayer
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- m=Instance.new('Model',Character)
- 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"]
- Face = Head.face
- Neck=Torso.Neck
- it=Instance.new
- attacktype=1
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- cloaked=false
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
- RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
- RootPart=Character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- RootCF=euler(-1.57,0,3.14)
- attack = false
- attackdebounce = false
- deb=false
- equipped=true
- hand=false
- MMouse=nil
- combo=0
- mana=0
- trispeed=.2
- attackmode='none'
- local idle=0
- local Anim="Idle"
- local Effects={}
- local gun=false
- local shoot=false
- player=nil
- mana=0
- it = Instance.new
- -- Music --
- z = it("Sound",char)
- z.Looped = true
- z.SoundId = "rbxassetid://174532761"
- z.Volume = 0
- z:Play()
- themeBegan = false
- function fadeInTheme()
- i = 0
- while i < 1 do
- z.Volume = z.Volume + 0.02
- i = i + 0.02
- wait()
- end
- end
- delay(0,fadeInTheme)
- -- Functions --
- local inv = function()
- while true do
- wait()
- hmnd.MaxHealth = math.huge
- hmnd.Health = math.huge
- if char:FindFirstChild("ForceField") == nil then
- ff = it("ForceField",char)
- ff.Visible = false
- end
- end
- end
- delay(0,inv)
- local part = function(name,parent,brkclr,mtrl,rfl,trns,sz)
- prt = it("Part",parent)
- prt.Name = name
- prt.CanCollide = false
- prt.BrickColor = BrickColor.new(brkclr)
- if brkclr == "White" then
- prt.Color = Color3.new(255,255,255)
- end
- if brkclr == "Gold" then
- prt.Color = Color3.fromRGB(245, 190, 75)
- end
- prt.Material = mtrl
- prt.Reflectance = rfl
- prt.Transparency = trns
- prt.Size = sz
- prt.Anchored = true
- return prt
- end
- local mesh = function(meshtype,parent,meshid,textureid,scale)
- msh = it("SpecialMesh",parent)
- if meshtype == "FileMesh" then
- msh.MeshId = meshid
- msh.TextureId = textureid
- end
- msh.MeshType = meshtype
- msh.Scale = scale
- return(msh)
- end
- local weld = function(part1,part2,x1,y1,z1,x2,y2,z2)
- w = it("Weld",part1)
- w.Part0 = part1
- w.Part1 = part2
- if part1.Anchored or part2.Anchored then
- part1.Anchored = false
- part2.Anchored = false
- end
- w.C0 = (CFrame.new(x1,y1,z1)*CFrame.Angles(math.rad(z2),math.rad(y2),math.rad(x2)))
- return(w)
- end
- local emit = function(parent,tex,startcolor, endcolor, startsize,endsize,lightem,emdir,lif,rate,speed,rotspeed,sprdang)
- emm = it("ParticleEmitter",parent)
- emm.Texture = tex
- emm.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,startcolor),ColorSequenceKeypoint.new(1,endcolor)})
- emm.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,startsize),NumberSequenceKeypoint.new(1,endsize)})
- emm.LightEmission = lightem
- emm.EmissionDirection = emdir
- emm.Lifetime = NumberRange.new(lif)
- emm.Rate = rate
- emm.Speed = NumberRange.new(speed)
- emm.RotSpeed = NumberRange.new(rotspeed)
- emm.SpreadAngle = Vector2.new(sprdang,sprdang)
- 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
- 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
- local sine = 0
- local change = 1
- local val = 0
- mouse=Player:GetMouse()
- RSH, LSH=nil, nil
- --welds
- RW, LW=Instance.new("Weld"), Instance.new("Weld")
- RW.Name="Right Shoulder" LW.Name="Left Shoulder"
- LH=Torso["Left Hip"]
- RH=Torso["Right Hip"]
- TorsoColor=Torso.BrickColor
- function NoOutline(Part)
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
- end
- player=Player
- ch=Character
- RSH=ch.Torso["Right Shoulder"]
- LSH=ch.Torso["Left Shoulder"]
- --
- RSH.Parent=nil
- LSH.Parent=nil
- --
- RW.Name="Right Shoulder"
- RW.Part0=ch.Torso
- RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
- RW.C1=cf(0, 0.5, 0)
- RW.Part1=ch["Right Arm"]
- RW.Parent=ch.Torso
- --
- LW.Name="Left Shoulder"
- LW.Part0=ch.Torso
- LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
- LW.C1=cf(0, 0.5, 0)
- LW.Part1=ch["Left Arm"]
- LW.Parent=ch.Torso
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- -- Character Model --
- fxb = part("FXBase",char,"Institutional white","Plastic",0,1,Vector3.new(2.5,0.5,2.5))
- fxw = weld(rarm,fxb,0,-0.5,0,0,0,0)
- fx1 = part("FX1",char,"Institutional white","Plastic",0,1,Vector3.new(0.05,0.05,0.05))
- weld(fxb,fx1,0,0,1.25,0,0,0)
- emit(fx1,"rbxasset://textures/particles/sparkles_main.dds",Color3.new(1,1,1),Color3.new(1,1,1),1,0,1,"Left",0.5,150,0,0,0)
- fx2 = part("FX2",char,"Institutional white","Plastic",0,1,Vector3.new(0.05,0.05,0.05))
- weld(fxb,fx2,-1.25,0,-0.625,0,0,0)
- emit(fx2,"rbxasset://textures/particles/sparkles_main.dds",Color3.new(1,1,1),Color3.new(1,1,1),1,0,1,"Left",0.5,150,0,0,0)
- fx3 = part("FX3",char,"Institutional white","Plastic",0,1,Vector3.new(0.05,0.05,0.05))
- weld(fxb,fx3,1.25,0,-0.625,0,0,0)
- emit(fx3,"rbxasset://textures/particles/sparkles_main.dds",Color3.new(1,1,1),Color3.new(1,1,1),1,0,1,"Left",0.5,150,0,0,0)
- local gntmd = Instance.new("Model",char)
- gntmd.Name = "Gauntlet"
- p = part("Part",gntmd,"White","Granite",0,0,Vector3.new(1.15, 0.95, 1.15))
- weld(rarm,p,0,-0.25,0,0,0,0)
- p = part("Part",gntmd,"Gold","Marble",0,0,Vector3.new(1.1, 1.1, 1.1))
- weld(rarm,p,0,-0.25,0,0,0,0)
- p = part("Orb",gntmd,"Institutional white","Neon",0,0,Vector3.new(0.05, 0.15, 0.15))
- weld(rarm,p,0.59,0.25,0,0,0,0)
- mesh("Sphere",p,"","",Vector3.new(1,1,1))
- p = part("Part",gntmd,"White","Granite",0,0,Vector3.new(1.15, 0.65, 0.5))
- weld(rarm,p,0.325,0.5,0,0,90,0)
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- p = part("Part",gntmd,"Gold","Marble",0,0,Vector3.new(1.1, 0.65, 0.4))
- weld(rarm,p,0.25,0.45,0,0,-90,0)
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- p = part("Wings",gntmd,"Gold","Marble",0.1,0,Vector3.new(0.75, 0.2, 0.2))
- weld(rarm,p,0.59,0.35,0,0,-90,0)
- mesh("FileMesh",p,"rbxassetid://442958617","",Vector3.new(0.01, 0.01, 0.002))
- p = part("Thing",gntmd,"Gold","Marble",0.1,0,Vector3.new(0.75, 0.2, 0.75))
- weld(rarm,p,0.575,0,0,90,0,90)
- mesh("FileMesh",p,"rbxassetid://11996935","",Vector3.new(0.75, 0.05, 0.25))
- p = part("Claw1",gntmd,"Gold","Marble",0.1,0,Vector3.new(0.75, 0.2, 0.75))
- weld(rarm,p,0.55,0.5,0,-90,0,90)
- mesh("FileMesh",p,"http://www.roblox.com/Asset?ID=105262978","",Vector3.new(0.15, 0.2, 0.5))
- p = part("Claw2",gntmd,"Gold","Marble",0.1,0,Vector3.new(0.75, 0.2, 0.75))
- weld(rarm,p,0.55,-0.15,0,90,180,90)
- mesh("FileMesh",p,"http://www.roblox.com/Asset?ID=105262978","",Vector3.new(0.15, 0.2, 0.5))
- -- Animations --
- function fx()
- r = 0
- while true do
- r = r + 5
- wait()
- fxw.C0 = CFrame.new(0,-0.5,0)*CFrame.Angles(0,math.rad(r),0)
- end
- end
- delay(0,fx)
- function Animate()
- while true do
- wait()
- sine = sine + change
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp=RootPart.Velocity.y
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
- if equipped==true or equipped==false then
- if attack==false then
- idle=idle+1
- else
- idle=0
- end
- if idle>=500 then
- if attack==false then
- --Sheath()
- end
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- Anim="Jump"
- if attack==false then
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(20),math.rad(0),math.rad(15)),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(20),math.rad(0),math.rad(-15)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- Anim="Fall"
- if attack==false then
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-50),math.rad(0),math.rad(30)),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-50),math.rad(0),math.rad(-30)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
- end
- elseif torvel<1 and hitfloor~=nil then
- Anim="Idle"
- if attack==false then
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-40)),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(40)),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-10),math.rad(0),math.rad(10)),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(10),math.rad(10),math.rad(-10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(-10)),.3)
- end
- elseif torvel>2 and torvel<22 and hitfloor~=nil then
- Anim="Walk"
- if attack==false then
- change=3
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(-20),math.rad(0),math.rad(15)),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-20),math.rad(0),math.rad(-15)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
- end
- elseif torvel>=22 and hitfloor~=nil then
- Anim="Run"
- if attack==false then
- end
- end
- end
- end
- end
- delay(0,Animate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement