Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Retributor, without all the fun stuff. Just the coat.
- ---AgentVKNoob
- wait(0.5)
- 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
- trispeed=.2
- attackmode='none'
- local idle=0
- local Anim="Idle"
- it = Instance.new
- local part = function(name,parent,brkclr,mtrl,rfl,trns,sz)
- local prt = it("Part",parent)
- prt.Name = name
- prt.CanCollide = false
- prt.BrickColor = BrickColor.new(brkclr)
- if brkclr == "Really black" and mtrl == "Neon" then prt.Color = Color3.new(0,0,0) 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)
- local 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)
- local 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)
- local 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)
- return(emm)
- end
- eye = part("Eye",m,"Really red","Neon",0,0,Vector3.new(0.08,0.175,0.05))
- mesh("Sphere",eye,"","",Vector3.new(1,1,1))
- weld(Head,eye,-0.11,0.2625,-0.59,0,0,0)
- p = part("Collar1",m,"Black","Sand",0,0,Vector3.new(1,1,1))
- weld(Torso,p,0,1.15,0,0,22.5,190)
- mesh("FileMesh",p,"http://www.roblox.com/asset/?id=20637493","",Vector3.new(1,1,1))
- p = part("Collar2",m,"Black","Sand",0,0,Vector3.new(1,1,1))
- weld(Torso,p,0,1.15,0,0,-22.5,190)
- mesh("FileMesh",p,"http://www.roblox.com/asset/?id=20637493","",Vector3.new(1,1,1))
- p = part("Collar3",m,"Black","Sand",0,0,Vector3.new(1,1,1))
- weld(Torso,p,0,0.9,0.1,0,0,-15)
- mesh("FileMesh",p,"http://www.roblox.com/asset/?id=20637493","",Vector3.new(1,1,1))
- p = part("Coat1",m,"Black","Sand",0,0,Vector3.new(2.05,1.55,1.05))
- weld(Torso,p,0,0.25,0,0,0,0)
- p = part("Coat2",m,"Black","Sand",0,0,Vector3.new(0.55,2.05,1.04))
- weld(Torso,p,1,-1.25,0,22,0,0)
- p = part("Coat3",m,"Black","Sand",0,0,Vector3.new(0.55,2.05,1.04))
- weld(Torso,p,-1,-1.25,0,-22,0,0)
- p = part("Coat4",m,"Black","Sand",0,0,Vector3.new(2.1,1.05,0.54))
- weld(Torso,p,0,-1,0.24,0,0,0)
- p = part("Coat5",m,"Black","Sand",0,0,Vector3.new(0.925,0.75,0.54))
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- weld(Torso,p,0.3,-0.75,-0.05,90,0,-90)
- p = part("Coat6",m,"Black","Sand",0,0,Vector3.new(0.925,0.75,0.54))
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- weld(Torso,p,-0.3,-0.75,-0.05,-90,0,-90)
- p = part("Coat7",m,"Black","Sand",0,0,Vector3.new(0.975,0.5,0.75))
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- weld(Torso,p,-1.4,-2.45,0,90,0,-90)
- p = part("Coat8",m,"Black","Sand",0,0,Vector3.new(0.975,0.5,0.75))
- mesh("Wedge",p,"","",Vector3.new(1,1,1))
- weld(Torso,p,1.4,-2.45,0,-90,0,-90)
- p = part("Coat9",m,"Black","Sand",0,0,Vector3.new(1.05,0.5,0.525))
- weld(RightLeg,p,0,0.75,0.25,0,0,0)
- p = part("Coat10",m,"Black","Sand",0,0,Vector3.new(1.05,0.5,0.525))
- weld(LeftLeg,p,0,0.75,0.25,0,0,0)
- p = part("Sleeves1",m,"Black","Granite",0,0,Vector3.new(1.1,0.5,1.1))
- weld(LeftArm,p,0,0.875,0,0,0,0)
- p = part("Sleeves2",m,"Black","Sand",0,0,Vector3.new(1.05,1.5,1.05))
- weld(LeftArm,p,0,0.25,0,0,0,0)
- p = part("Sleeves3",m,"Really red","Neon",0,0,Vector3.new(0.25,0.5,0.5))
- mesh("Cylinder",p,"","",Vector3.new(1,1,1))
- weld(LeftArm,p,-0.41,0.15,0,0,0,0)
- p = part("Sleeves4",m,"Really red","Neon",0,0,Vector3.new(0.25,0.075,0.075))
- mesh("Cylinder",p,"","",Vector3.new(1,1,1))
- weld(LeftArm,p,-0.44,0.15,0,0,0,0)
- p = part("Sleeves5",m,"Black","Sand",0,0,Vector3.new(0.25,0.375,0.375))
- mesh("Cylinder",p,"","",Vector3.new(1,1,1))
- weld(LeftArm,p,-0.43,0.15,0,0,0,0)
- p = part("Sleeves6",m,"Black","Sand",0,0,Vector3.new(0.25,0.75,0.075))
- weld(LeftArm,p,-0.42,0.2,0.0375,0,0,-45)
- p = part("Sleeves7",m,"Black","Sand",0,0,Vector3.new(0.25,0.75,0.075))
- weld(LeftArm,p,-0.42,0.1,-0.0375,0,0,-45)
- p = part("Sleeves8",m,"Black","Granite",0,0,Vector3.new(1.1,0.25,1.1))
- weld(LeftArm,p,0,-0.4,0,0,0,0)
- p = part("Sleeves9",m,"Black","Granite",0,0,Vector3.new(1.1,0.5,1.1))
- weld(RightArm,p,0,0.875,0,0,0,0)
- function weld(p0,p1,c0,c1,par)
- local w = Instance.new("Weld",p0 or par)
- w.Part0 = p0
- w.Part1 = p1
- w.C0 = c0 or CFrame.new()
- w.C1 = c1 or CFrame.new()
- return w
- end
- local motors = {}
- function motor(p0,p1,c0,c1,des,vel,par)
- local w = Instance.new("Motor6D",p0 or par)
- w.Part0 = p0
- w.Part1 = p1
- w.C0 = c0 or CFrame.new()
- w.C1 = c1 or CFrame.new()
- w.MaxVelocity = tonumber(vel) or .05
- w.DesiredAngle = tonumber(des) or 0
- return w
- end
- function lerp(a,b,c)
- return a+(b-a)*c
- end
- function ctlerp(c1,c2,al)
- local com1 = {c1:components()}
- local com2 = {c2:components()}
- for i,v in pairs(com1) do
- com1[i] = lerp(v,com2[i],al)
- end
- return CFrame.new(unpack(com1))
- end
- do
- local 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 local 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 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 end
- function tickwave(time,length,offset) return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length end function invcol(c) c = c.Color return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r)) end local oc = oc or function(...) return ... end local plr = game.Players.LocalPlayer local char = plr.Character local tor = char.Torso local hum = char.Humanoid local vel = Vector3.new() local cf = CFrame.new() local flspd = 0 local keysdown = {} local keypressed = {} local ktime = {} local descendtimer = 0 local possiblefly = 0 local cam = workspace.CurrentCamera local flying = false local moving = false hum.PlatformStand = false local winghats = {"Wings","Angel","EmpyreanreignmentII"} for _,o in pairs(char:GetChildren()) do for i,v in pairs(winghats) do if o.Name:lower() == v:lower() then o:Destroy() end end end local mod = Instance.new("Model",char) mod.Name = "Wings" local topcolor = BrickColor.new("Really black") local feacolor = topcolor local ptrans = 0 local pref = 0 local fire = false local fmcol = Color3.new() local fscol = Color3.new() local part = Instance.new("Part") part.Locked = true part.FormFactor = "Custom" part.Size = Vector3.new(.2,.2,.2) part.TopSurface,part.BottomSurface = 0,0 part.CanCollide = false part.BrickColor = topcolor part.Transparency = ptrans part.Reflectance = pref local ef = Instance.new("Fire",fire and part or nil) ef.Size = .15 ef.Color = fmcol or Color3.new() ef.SecondaryColor = fscol or Color3.new() part:BreakJoints() function newpart() local clone = part:Clone() clone.Parent = mod clone:BreakJoints() return clone end local feath = newpart() feath.BrickColor = feacolor Instance.new("SpecialMesh",feath).MeshType = "Sphere" function newfeather() local clone = feath:Clone() clone.Parent = mod clone:BreakJoints() return clone end local r1 = newpart() r1.Size = Vector3.new(.3,1.5,.3)*1.2 local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1)
- local r2 = newpart() r2.Size = Vector3.new(.4,1.8,.4)*1.2 local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1) local r3 = newpart() r3.Size = Vector3.new(.3,2.2,.3)*1.2 local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1) local r4 = newpart() r4.Size = Vector3.new(.25,1.2,.25)*1.2 local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1) local feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.4,3,.3) weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.4,2.3,.3) weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.35,2.2,.25) weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) local rf3 = {} for i=0,7 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.45,2.2,.35) table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0))) end local rf2 = {} for i=0,7 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.45,2.2-i*.08,.3) table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0))) end local rf1 = {} for i=0,6 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.37,1.65-i*.06,.25)
- table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0))) end local l1 = newpart() l1.Size = Vector3.new(.3,1.5,.3)*1.2 local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1) local l2 = newpart() l2.Size = Vector3.new(.4,1.8,.4)*1.2 local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1) local l3 = newpart() l3.Size = Vector3.new(.3,2.2,.3)*1.2 local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1) local l4 = newpart() l4.Size = Vector3.new(.25,1.2,.25)*1.2 local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1) local feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.4,3,.3) weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.4,2.3,.3) weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.35,2.2,.25) weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) local lf3 = {} for i=0,7 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.45,2.2,.35) table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0))) end local lf2 = {} for i=0,7 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.45,2.2-i*.08,.3)
- table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0))) end local lf1 = {} for i=0,6 do feather = newfeather() feather.Mesh.Scale = Vector3.new(1,1,1) feather.Size = Vector3.new(.37,1.65-i*.06,.25) table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0))) end local rwing = {rm1,rm2,rm3,rm4} local lwing = {lm1,lm2,lm3,lm4} local oc0 = {} for i,v in pairs(rwing) do oc0[v] = v.C0 end for i,v in pairs(lwing) do oc0[v] = v.C0 end function gotResized() if lastsize then if tor.Size == lastsize then return end local scaleVec = tor.Size/lastsize for i,v in pairs(oc0) do oc0[i] = v-v.p+scaleVec*v.p end lastsize = tor.Size end lastsize = tor.Size end tor.Changed:connect(function(p) if p == "Size" then gotResized() end end) gotResized() local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;} local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0} local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0} local outnormal = {0,-.2,1.8,0; .05,.05,.1,.05; -.3,0,0,0} local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0} local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; -.2,-.6,0,0} local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0} function setwings(tab,time) time = time or 10 for i=1,4 do rwing[i].DesiredAngle = tab[i] lwing[i].DesiredAngle = tab[i] rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new()) local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new()) end for i,v in pairs(rf1) do v.DesiredAngle = tab[9] v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end for i,v in pairs(lf1) do v.DesiredAngle = tab[9] v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end for i,v in pairs(rf2) do v.DesiredAngle = tab[10] v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end for i,v in pairs(lf2) do v.DesiredAngle = tab[10]
- v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end for i,v in pairs(rf3) do v.DesiredAngle = tab[11] v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end for i,v in pairs(lf3) do v.DesiredAngle = tab[11] v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time end end setwings(outhigh,1) for i,v in pairs(tor:GetChildren()) do if v.ClassName:lower():match("body") then v:Destroy() end end local ctor = tor:Clone() ctor:ClearAllChildren() ctor.Name = "cTorso" ctor.Transparency = 1 ctor.CanCollide = false ctor.FormFactor = "Custom" ctor.Size = Vector3.new(.2,.2,.2) ctor.Parent = mod weld(tor,ctor) local bg = Instance.new("BodyGyro",ctor) bg.maxTorque = Vector3.new() bg.P = 15000 bg.D = 1000 local bv = Instance.new("BodyVelocity",ctor) bv.maxForce = Vector3.new() bv.P = 15000 kd = plr:GetMouse().KeyDown:connect(oc(function(key) keysdown[key] = true keypressed[key] = true if key == "2" then descendtimer = tick() elseif key == " " and tick()-(ktime[key] or 0) < .5 then possiblefly = tick() elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then reqrotx = key == "a" and math.pi*2 or -math.pi*2 end ktime[key] = tick() end)) ku = plr:GetMouse().KeyUp:connect(function(key) keysdown[key] = false if key == " " then descendtimer = tick() end end) function mid(a,b,c) return math.max(a,math.min(b,c or -a)) end function bn(a) return a and 1 or 0 end function gm(tar) local m = 0 for i,v in pairs(tar:GetChildren()) do if v:IsA("BasePart") then m = m + v:GetMass() end m = m + gm(v) end return m end reqrotx = 0 local grav = 196.2 local flyspeed = 80 local maxspeed = 150 local con con = game:GetService("RunService").Stepped:connect(oc(function() if not mod:IsDescendantOf(workspace) then pcall(function() kd:disconnect() end) pcall(function() ku:disconnect() end) bg:Destroy() bv:Destroy() con:disconnect() hum.PlatformStand = false return end
- local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity) local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z if flying then local lfldir = fldir fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit local lmoving = moving moving = fldir.magnitude > .1 if lmoving and not moving then idledir = lfldir*Vector3.new(1,0,1) descendtimer = tick() end local dbomb = fldir.Y < -.6 or (moving and keysdown["0"]) if moving and keysdown["0"] and lmoving then fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit end local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0)) local descending = (not moving and keysdown["2"] and not keysdown[" "]) cf = ctlerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07) local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05 hum.PlatformStand = true bg.maxTorque = Vector3.new(1,1,1)*9e5 local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0) reqrotx = reqrotx - reqrotx/10 bv.maxForce = Vector3.new(1,1,1)*9e4*.5 local anioff =(bn(keysdown[" "])-bn(keysdown["2"]))/2 local ani = tickwave(1.5-anioff,1) bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["2"]))*15,0)+vel,.6) vel = moving and cf.lookVector*flspd or Vector3.new() acceleration = moving and (fldir.Y < 0 and (acceleration or 0) + -fldir.Y*grav/60) or lerp((acceleration or 0),0,.02) or 0 flspd = lerp(flspd,moving and math.min(maxspeed,flyspeed + acceleration) or 0,.1) setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15) for i=1,4 do
- rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2) lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2) end if down.Y < -.85 then local ignlist = {char} local hit,ray repeat hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),ignlist) if hit then if hit.CanCollide then break else table.insert(ignlist,hit) end else break end until false if hit then flying = false hum.PlatformStand = false tor.Velocity = Vector3.new() end end else bg.maxTorque = Vector3.new() bv.maxForce = Vector3.new() local ani = tickwave(walking and .8 or 4.5,1) setwings(keysdown["2"] and outnormal or idle,15) local x,y,z = fspd/160,uspd/700,sspd/900 for i=1,4 do rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)) * CFrame.Angles(0,bn(i==2)*-.1,0),.2) lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)) * CFrame.Angles(0,bn(i==2)*-.1,0),.2) end if keypressed[" "] and not flying and (tick()-possiblefly < .5) then vel = Vector3.new(0,50,0) bv.velocity = vel idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) cf = tor.CFrame * CFrame.Angles(-.01,0,0) tor.CFrame = cf bg.cframe = cf flystart = tick() flying = true end end keypressed = {} end))
- wait(1) --For running in rbx studio
- mee = game.Players.LocalPlayer
- pistol = Instance.new("Tool", mee.Backpack)
- pistol.GripForward = Vector3.new(-0.149, 0.984, -0.099)
- pistol.GripPos = Vector3.new(0.1, -0.55, -0.2)
- pistol.GripRight = Vector3.new(0.989, 0.148, -0.015)
- pistol.GripUp = Vector3.new(0, 0.1, 0.995)
- pistol.ToolTip = "Umm... where did you get that?"
- pistol.Name = "Pistol"
- pistolpart = Instance.new("Part", pistol)
- pistolpart.Name = "Handle"
- pistolpart.BrickColor = BrickColor.new("Black")
- pistolpart.Material = "SmoothPlastic"
- pistolpart.Orientation = Vector3.new(-88.99, 152.78, 135.7)
- pistolpart.Size = Vector3.new(0.2, 1.12, 0.6)
- pistolmesh = Instance.new("SpecialMesh", pistolpart)
- pistolmesh.MeshId = "rbxassetid://430060386"
- pistolmesh.Scale = Vector3.new(1.7, 1.7, 1.7)
- pistolmesh.TextureId = "rbxassetid://430060404"
- pistolmesh.VertexColor = Vector3.new(2, 2, 2)
- gunshotsound = Instance.new("Sound", pistolpart)
- gunshotsound.SoundId = "rbxassetid://213603013"
- mouserotatecharacter = true
- pistol.Equipped:connect(function(mouse)
- mouserotatecharacter = true
- local torso = mee.Character.HumanoidRootPart
- local mouseturning = mee:GetMouse()
- mee.Character.Humanoid.AutoRotate = false
- mouseturning.Move:connect(function()
- if mouserotatecharacter == true then
- torso.CFrame = CFrame.new(torso.Position, mouseturning.Hit.p*Vector3.new(1,0,1) + torso.Position*Vector3.new(0, 1, 0))
- end
- end)
- mouse.Button1Down:connect(function()
- gunshotsound:Play()
- MakeShell()
- local ray = Ray.new(pistol.Handle.CFrame.p, (mouse.Hit.p - pistol.Handle.CFrame.p).unit * 300)
- local part, position = workspace:FindPartOnRay(ray, mee.Character, false, true)
- local beam = Instance.new("Part", workspace)
- beam.BrickColor = BrickColor.new("White")
- beam.FormFactor = "Custom"
- beam.Material = "Neon"
- beam.Transparency = 0.7
- beam.Anchored = true
- beam.Locked = true
- beam.CanCollide = false
- local distance = (pistol.Handle.CFrame.p - position).magnitude
- beam.Size = Vector3.new(0.3, 0.3, distance)
- beam.CFrame = CFrame.new(pistol.Handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
- game:GetService("Debris"):AddItem(beam, 0.1)
- if part then
- local humanoid = part.Parent:FindFirstChild("Humanoid")
- if not humanoid then
- humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
- end
- if humanoid then
- plrmodel = humanoid.Parent
- if plrmodel.Humanoid.Health ~= 0 then
- --blood
- plrmodel.Archivable = true
- local Char = plrmodel
- local Hum = Char:FindFirstChild("Humanoid")
- local Tor = Char:FindFirstChild("Torso") or Char:FindFirstChild("UpperTorso")
- local Health = Hum.Health
- local M = math.random
- local R = math.rad
- local rates = {.05, .075, .1, .15}
- local smooth = function(P)
- local SM = Enum.SurfaceType.SmoothNoOutlines
- P.TopSurface = SM
- P.BottomSurface = SM
- P.RightSurface = SM
- P.LeftSurface = SM
- P.FrontSurface = SM
- P.BackSurface = SM
- end
- local function BloodPool(Part,Size)
- local Pool = Instance.new("Part",game.Workspace)
- Pool.TopSurface = 0
- Pool.CanCollide = false
- Pool.BrickColor = BrickColor.new("Crimson")
- Pool.Transparency = 0
- Instance.new("CylinderMesh",Pool)
- Pool.Anchored = true
- Pool.Name = "BloodPoolPart"
- smooth(Pool)
- Pool.FormFactor = Enum.FormFactor.Custom
- Pool.Size = Size
- local c = Part.CFrame*CFrame.new(M(-3.01,3.01),-2.9,M(-3.01,3.01))
- coroutine.resume(coroutine.create(function()
- local rate = rates[M(1,#rates)]
- game.Debris:AddItem(Pool,15)
- for i = 1,M(25,70) do
- wait()
- Pool.CFrame = c
- Pool.Size = Pool.Size+Vector3.new(rate,0,rate)
- end
- wait(5)
- Pool:Destroy()
- end))
- end
- local function BloodDrops(Size,Area)
- local Blood = Instance.new("Part",game.Workspace)
- Blood.BrickColor = BrickColor.new("Crimson")
- Blood.Parent = plrmodel
- Blood.TopSurface = 0
- Blood.CanCollide = false
- Blood.Anchored = false
- Blood.FormFactor = Enum.FormFactor.Custom
- Blood.Size = Size
- Blood.CFrame = Area*CFrame.new(M(-1.00,1.00),M(-1.00,1.00),M(-1.00,1.00))
- return Blood
- end
- Hum.Changed:connect(function()
- if Hum.Health < Health then
- Health = Hum.Health
- for i = 1, math.random(4,10)do
- local Size = Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
- local Blood = BloodDrops(Size,Tor.CFrame)
- local Stopper = false
- local Size2 = Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
- BloodPool(Tor,Size2)
- end
- end
- end)
- end
- --Ragdoll
- wait()
- function getAttachment0(attachmentName)
- for _,child in next,plrmodel:GetChildren() do
- local attachment = child:FindFirstChild(attachmentName)
- if attachment then
- return attachment
- end
- end
- end
- plrmodel.Humanoid.Died:Connect(function(var)
- local removeHRP = true
- local head = plrmodel["Head"]
- local leftarm = plrmodel["Left Arm"]
- local leftleg = plrmodel["Left Leg"]
- local rightleg = plrmodel["Right Leg"]
- local rightarm = plrmodel["Right Arm"]
- local torso = plrmodel.Torso
- local root = plrmodel.HumanoidRootPart
- if removeHRP == true then
- root:Destroy()
- end
- local rootA =Instance.new("Attachment")
- local HeadA = Instance.new("Attachment")
- local LeftArmA = Instance.new("Attachment")
- local LeftLegA = Instance.new("Attachment")
- local RightArmA = Instance.new("Attachment")
- local RightLegA = Instance.new("Attachment")
- local TorsoA = Instance.new("Attachment")
- local TorsoA1 = Instance.new("Attachment")
- local TorsoA2 = Instance.new("Attachment")
- local TorsoA3 = Instance.new("Attachment")
- local TorsoA4 = Instance.new("Attachment")
- local TorsoA5 = Instance.new("Attachment")
- local function set1()
- HeadA.Name = "HeadA"
- HeadA.Parent = head
- HeadA.Position = Vector3.new(0, -0.5, 0)
- HeadA.Rotation = Vector3.new(0, 0, 0)
- HeadA.Axis = Vector3.new(1, 0, 0)
- HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
- LeftArmA.Name = "LeftArmA"
- LeftArmA.Parent = leftarm
- LeftArmA.Position = Vector3.new(0.5, 1, 0)
- LeftArmA.Rotation = Vector3.new(0, 0, 0)
- LeftArmA.Axis = Vector3.new(1, 0, 0)
- LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0)
- LeftLegA.Name = "LeftLegA"
- LeftLegA.Parent = leftleg
- LeftLegA.Position = Vector3.new(0, 1, 0)
- LeftLegA.Rotation = Vector3.new(0, 0, 0)
- LeftLegA.Axis = Vector3.new(1, 0, 0)
- LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0)
- RightArmA.Name = "RightArmA"
- RightArmA.Parent = rightarm
- RightArmA.Position = Vector3.new(-0.5, 1, 0)
- RightArmA.Rotation = Vector3.new(0, 0, 0)
- RightArmA.Axis = Vector3.new(1, 0, 0)
- RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)
- RightLegA.Name = "RightLegA"
- RightLegA.Parent = rightleg
- RightLegA.Position = Vector3.new(0, 1, 0)
- RightLegA.Rotation = Vector3.new(0, 0, 0)
- RightLegA.Axis = Vector3.new(1, 0, 0)
- RightLegA.SecondaryAxis = Vector3.new(0, 1, 0)
- rootA.Name= "rootA"
- rootA.Parent = root
- rootA.Position = Vector3.new(0, 0, 0)
- rootA.Rotation = Vector3.new(0, 90, 0)
- rootA.Axis = Vector3.new(0, 0, -1)
- rootA.SecondaryAxis = Vector3.new(0, 1, 0)
- end
- local function set2()
- TorsoA.Name = "TorsoA"
- TorsoA.Parent = torso
- TorsoA.Position = Vector3.new(0.5, -1, 0)
- TorsoA.Rotation = Vector3.new(0, 0, 0)
- TorsoA.Axis = Vector3.new(1, 0, 0)
- TorsoA.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA1.Name = "TorsoA1"
- TorsoA1.Parent = torso
- TorsoA1.Position = Vector3.new(-0.5, -1, 0)
- TorsoA1.Rotation = Vector3.new(0, 0, 0)
- TorsoA1.Axis = Vector3.new(1, 0, 0)
- TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA2.Name = "TorsoA2"
- TorsoA2.Parent = torso
- TorsoA2.Position = Vector3.new(-1, 1, 0)
- TorsoA2.Rotation = Vector3.new(0, 0, 0)
- TorsoA2.Axis = Vector3.new(1, 0, 0)
- TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA3.Name = "TorsoA3"
- TorsoA3.Parent = torso
- TorsoA3.Position = Vector3.new(1, 1, 0)
- TorsoA3.Rotation = Vector3.new(0, 0, 0)
- TorsoA3.Axis = Vector3.new(1, 0, 0)
- TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA4.Name = "TorsoA4"
- TorsoA4.Parent = torso
- TorsoA4.Position = Vector3.new(0, 1, 0)
- TorsoA4.Rotation = Vector3.new(0, 0, 0)
- TorsoA4.Axis = Vector3.new(1, 0, 0)
- TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA5.Name = "TorsoA5"
- TorsoA5.Parent = torso
- TorsoA5.Position = Vector3.new(0, 0, 0)
- TorsoA5.Rotation = Vector3.new(0, 90, 0)
- TorsoA5.Axis = Vector3.new(0, 0, -1)
- TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
- end
- local function set3()
- end
- spawn(set1);
- spawn(set2);
- local HA = Instance.new("HingeConstraint")
- HA.Parent = head
- HA.Attachment0 = HeadA
- HA.Attachment1 = TorsoA4
- HA.Enabled = true
- HA.LimitsEnabled=true
- HA.LowerAngle=0
- HA.UpperAngle=0
- local LAT = Instance.new("BallSocketConstraint")
- LAT.Parent = leftarm
- LAT.Attachment0 = LeftArmA
- LAT.Attachment1 = TorsoA2
- LAT.Enabled = true
- LAT.LimitsEnabled=true
- LAT.UpperAngle=90
- local RAT = Instance.new("BallSocketConstraint")
- RAT.Parent = rightarm
- RAT.Attachment0 = RightArmA
- RAT.Attachment1 = TorsoA3
- RAT.Enabled = true
- RAT.LimitsEnabled=true
- RAT.UpperAngle=90
- local HA = Instance.new("BallSocketConstraint")
- HA.Parent = head
- HA.Attachment0 = HeadA
- HA.Attachment1 = TorsoA4
- HA.Enabled = true
- local TLL = Instance.new("BallSocketConstraint")
- TLL.Parent = torso
- TLL.Attachment0 = TorsoA1
- TLL.Attachment1 = LeftLegA
- TLL.Enabled = true
- TLL.LimitsEnabled=true
- TLL.UpperAngle=90
- local TRL = Instance.new("BallSocketConstraint")
- TRL.Parent = torso
- TRL.Attachment0 = TorsoA
- TRL.Attachment1 = RightLegA
- TRL.Enabled = true
- TRL.LimitsEnabled=true
- TRL.UpperAngle=90
- local RTA = Instance.new("BallSocketConstraint")
- RTA.Parent = root
- RTA.Attachment0 = rootA
- RTA.Attachment1 = TorsoA5
- RTA.Enabled = true
- RTA.LimitsEnabled=true
- RTA.UpperAngle=0
- head.Velocity = head.CFrame.lookVector*30
- for _,child in next,plrmodel:GetChildren() do
- if child:IsA("Accoutrement") then
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") then
- part.Parent = plrmodel
- child:remove()
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(attachment1.Name)
- if attachment0 and attachment1 then
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0
- constraint.LowerAngle = 0
- constraint.Parent = plrmodel
- end
- end
- end
- end
- end
- end)
- end
- if humanoid.Health ~= 0 then
- humanoid.Health = 0
- wait(3)
- while true do
- if humanoid.Health ~= 0 then
- humanoid.Health = 0 --This loop is a strange kill system I know, but this prevents doing 99 damage instead of 100 for some reason.s
- else
- break
- end
- wait(0.3)
- end
- end
- end
- end)
- end)
- pistol.Unequipped:connect(function()
- wait(0.2)
- mouserotatecharacter = false
- mee.Character.Humanoid.AutoRotate = true
- end)
- function MakeShell()
- Shell = Instance.new("Part", workspace)
- Shell.Size = Vector3.new(0.2, 0.2, 0.6)
- ShellMesh = Instance.new("SpecialMesh", Shell)
- ShellMesh.MeshId = "http://www.roblox.com/asset/?id=94295100"
- ShellMesh.Scale = Vector3.new(4, 4, 4)
- ShellMesh.TextureId = "http://www.roblox.com/asset/?id=94287792"
- Shell.Position = pistolpart.Position
- end
- --//====================================================\\--
- --|| CREATED BY SHACKLUSTER
- --\\====================================================//--
- wait(0.2)
- Player = game:GetService("Players").LocalPlayer
- PlayerGui = Player.PlayerGui
- Cam = workspace.CurrentCamera
- Backpack = Player.Backpack
- Character = Player.Character
- Humanoid = Character.Humanoid
- Mouse = Player:GetMouse()
- RootPart = Character["HumanoidRootPart"]
- Torso = Character["Torso"]
- Head = Character["Head"]
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- --//=================================\\
- --|| CUSTOMIZATION
- --\\=================================//
- Class_Name = "Immortal curse"
- Weapon_Name = "Add-ons"
- Custom_Colors = {
- Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
- Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
- Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
- Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
- Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
- Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
- Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
- Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
- Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
- Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
- Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
- Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
- }
- Player_Size = 1 --Size of the player.
- Animation_Speed = 3
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- local Speed = 16
- local Effects2 = {}
- --//=================================\\
- --|| END OF CUSTOMIZATION
- --\\=================================//
- local function weldBetween(a, b)
- local weldd = Instance.new("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CFrame.new()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- end
- function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
- local acs = Instance.new("Part")
- acs.CanCollide = false
- acs.Anchored = false
- acs.Size = Vector3.new(0,0,0)
- acs.CFrame = attachmentpart.CFrame
- acs.Parent = Character
- acs.BrickColor = color
- local meshs = Instance.new("SpecialMesh")
- meshs.MeshId = mesh
- meshs.TextureId = texture
- meshs.Parent = acs
- meshs.Scale = scale
- meshs.Offset = offset
- weldBetween(attachmentpart,acs)
- end
- function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
- if TYPE == "Gem" then
- local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
- acs.Anchored = false
- acs.CanCollide = false
- acs.CFrame = PART.CFrame
- local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
- weldBetween(PART,acs)
- elseif TYPE == "Skull" then
- local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
- acs.Anchored = false
- acs.CanCollide = false
- acs.CFrame = PART.CFrame
- local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
- weldBetween(PART,acs)
- elseif TYPE == "Eye" then
- local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
- acs.Anchored = false
- acs.CanCollide = false
- acs.CFrame = PART.CFrame
- local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
- weldBetween(PART,acs)
- end
- end
- --//=================================\\
- --|| USEFUL VALUES
- --\\=================================//
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- local CHANGEDEFENSE = 0
- local CHANGEDAMAGE = 0
- local CHANGEMOVEMENT = 0
- local ANIM = "Idle"
- local ATTACK = false
- local EQUIPPED = false
- local HOLD = false
- local COMBO = 1
- local Rooted = false
- local SINE = 0
- local KEYHOLD = false
- local CHANGE = 2 / Animation_Speed
- local WALKINGANIM = false
- local WALK = 0
- local VALUE1 = false
- local VALUE2 = false
- local ROBLOXIDLEANIMATION = IT("Animation")
- ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
- ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- --ROBLOXIDLEANIMATION.Parent = Humanoid
- local WEAPONGUI = IT("ScreenGui", PlayerGui)
- WEAPONGUI.Name = "Weapon GUI"
- local Weapon = IT("Model")
- Weapon.Name = Weapon_Name
- local Effects = IT("Folder", Weapon)
- Effects.Name = "Effects"
- local ANIMATOR = Humanoid.Animator
- local ANIMATE = Character.Animate
- local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
- local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
- local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
- local HITBLOCKSOUNDS = {"199148933", "199148947"}
- local UNANCHOR = true
- local SKILLTEXTCOLOR = C3(0,0,0)
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SOME FUNCTIONS
- --\\=================================//
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- 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 = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = 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 CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
- local frame = IT("Frame")
- frame.BackgroundTransparency = TRANSPARENCY
- frame.BorderSizePixel = BORDERSIZEPIXEL
- frame.Position = POSITION
- frame.Size = SIZE
- frame.BackgroundColor3 = COLOR
- frame.BorderColor3 = BORDERCOLOR
- frame.Name = NAME
- frame.Parent = PARENT
- return frame
- end
- function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
- local label = IT("TextLabel")
- label.BackgroundTransparency = 1
- label.Size = UD2(1, 0, 1, 0)
- label.Position = UD2(0, 0, 0, 0)
- label.TextColor3 = TEXTCOLOR
- label.TextStrokeTransparency = STROKETRANSPARENCY
- label.TextTransparency = TRANSPARENCY
- label.FontSize = TEXTFONTSIZE
- label.Font = TEXTFONT
- label.BorderSizePixel = BORDERSIZEPIXEL
- label.TextScaled = false
- label.Text = TEXT
- label.Name = NAME
- label.Parent = PARENT
- return label
- end
- function NoOutlines(PART)
- PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
- local NEWWELD = IT(TYPE)
- NEWWELD.Part0 = PART0
- NEWWELD.Part1 = PART1
- NEWWELD.C0 = C0
- NEWWELD.C1 = C1
- NEWWELD.Parent = PARENT
- return NEWWELD
- end
- function CreateSound(ID, PARENT, VOLUME, PITCH)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = IT("Sound", PARENT)
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- Swait()
- NEWSOUND:play()
- game:GetService("Debris"):AddItem(NEWSOUND, 10)
- end))
- return NEWSOUND
- end
- function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CF(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 CreateWave(inair,size,doesrotate,rotatedirection,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
- mesh.Scale = VT(size,size,size)
- mesh.Offset = VT(0,0,-size/8)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
- mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
- if doesrotate == true then
- wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
- end
- wave.Transparency = wave.Transparency + (0.5/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function CreateSwirl(inair,size,doesrotate,rotatedirection,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
- mesh.Scale = VT(size,size,size)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
- if doesrotate == true then
- wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
- end
- wave.Transparency = wave.Transparency + (0.5/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function MakeForm(PART,TYPE)
- if TYPE == "Cyl" then
- local MSH = IT("CylinderMesh",PART)
- elseif TYPE == "Ball" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Sphere"
- elseif TYPE == "Wedge" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Wedge"
- end
- end
- function CreateTornado(inair,size,doesrotate,rotatedirection,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
- mesh.Scale = VT(size,size,size)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,0,size/5)
- if doesrotate == true then
- wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0)
- end
- wave.Transparency = wave.Transparency + (0.5/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function CreateRing(inair,size,doesrotate,rotatedirection,waitt,cframe,spin1,spin2,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0))
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- mesh.Scale = VT(size,size,size)
- mesh.Offset = VT(0,0,0)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
- if doesrotate == true then
- wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(spin2, rotatedirection, spin1)
- end
- wave.Transparency = wave.Transparency + (0.5/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function MagicSphere(size,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(1,1,1), true)
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "Sphere"
- mesh.Scale = VT(size,size,size)
- mesh.Offset = VT(0,0,0)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
- wave.Transparency = wave.Transparency + (1/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function MagicSphere2(size,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 1, BRICKC(color), "Effect", VT(1,1,1), true)
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "Sphere"
- mesh.Scale = VT(size,size,size)
- mesh.Offset = VT(0,0,0)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale - VT(size/waitt,size/waitt,size/waitt)
- wave.Transparency = wave.Transparency - (1/waitt)
- end
- wave:remove()
- end))
- end
- function MagicBlock(size,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(size,size,size), true)
- local mesh = IT("BlockMesh",wave)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
- wave.CFrame = cframe * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
- wave.Transparency = wave.Transparency + (1/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function MagicBlock2(size,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 1, BRICKC(color), "Effect", VT(size,size,size), true)
- local mesh = IT("BlockMesh",wave)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale - VT(1/waitt,1/waitt,1/waitt)
- wave.CFrame = cframe * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
- wave.Transparency = wave.Transparency - (1/waitt)
- end
- wave:Destroy()
- end))
- end
- function MagicBlock(size,waitt,cframe,color)
- local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(size,size,size))
- local mesh = IT("BlockMesh",wave)
- wave.CFrame = cframe
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, waitt do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
- wave.CFrame = CF(wave.Position) * ANGLES(RAD(math(-360,360)),RAD(math(-360,360)),RAD(math(-360,360)))
- wave.Transparency = wave.Transparency + (1/waitt)
- if wave.Transparency > 0.99 then
- wave:remove()
- end
- end
- end))
- end
- function CheckTableForString(Table, String)
- for i, v in pairs(Table) do
- if string.find(string.lower(String), string.lower(v)) then
- return true
- end
- end
- return false
- end
- function CheckIntangible(Hit)
- local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
- if Hit and Hit.Parent then
- if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
- return true
- end
- end
- return false
- end
- Debris = game:GetService("Debris")
- function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
- local Direction = CFrame.new(StartPos, Vec).lookVector
- local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
- local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
- if RayHit and CheckIntangible(RayHit) then
- if DelayIfHit then
- wait()
- end
- RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
- end
- return RayHit, RayPos, RayNormal
- end
- function turnto(position)
- RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
- end
- --//=================================\\
- --|| WEAPON CREATION
- --\\=================================//
- for _, c in pairs(Weapon:GetChildren()) do
- if c.ClassName == "Part" then
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- end
- Weapon.Parent = Character
- Humanoid.Died:connect(function()
- ATTACK = true
- end)
- print(Class_Name.." loaded.")
- local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
- local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[X] Toggle [ON]", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 1")
- --//=================================\\
- --|| DAMAGE FUNCTIONS
- --\\=================================//
- function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
- local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
- STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
- local BODYGYRO = IT("BodyGyro", STATPART)
- local BODYPOSITION = IT("BodyPosition", STATPART)
- BODYPOSITION.P = 2000
- BODYPOSITION.D = 100
- BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
- if LABELTYPE == "Normal" then
- BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
- elseif LABELTYPE == "Debuff" then
- BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
- elseif LABELTYPE == "Interruption" then
- BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
- end
- game:GetService("Debris"):AddItem(STATPART ,5)
- local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
- BILLBOARDGUI.Adornee = STATPART
- BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
- BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
- BILLBOARDGUI.AlwaysOnTop = false
- local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
- TEXTLABEL.BackgroundTransparency = 1
- TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
- TEXTLABEL.Text = TEXT
- TEXTLABEL.Font = "SciFi"
- TEXTLABEL.FontSize="Size42"
- TEXTLABEL.TextColor3 = COLOR
- TEXTLABEL.TextStrokeTransparency = 1
- TEXTLABEL.TextScaled = true
- TEXTLABEL.TextWrapped = true
- coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
- wait(0.2)
- for i=1, 5 do
- wait()
- THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
- end
- wait(1.2)
- for i=1, 5 do
- wait()
- THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
- THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
- THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
- end
- THEPART.Parent = nil
- end),STATPART, BODYPOSITION, TEXTLABEL)
- end
- --//=================================\\
- --|| DAMAGING
- --\\=================================//
- function GoDeeper(object,position,range,maxstrength,hasdugdeep)
- if object ~= Character and object~= Effects then
- local body = object:GetChildren()
- for part = 1, #body do
- if (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") then
- if (body[part].Position - position).Magnitude < range then
- if body[part]:FindFirstChild("OOF") == nil then
- CastBlast(range/2)
- local defence = Instance.new("BoolValue",body[part])
- defence.Name = ("OOF")
- body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
- end
- if hasdugdeep == true then
- body[part]:Destroy()
- end
- end
- elseif body[part].ClassName == "Model" or body[part].ClassName == "Folder" then
- GoDeeper(body[part],position,range,maxstrength,true)
- end
- end
- end
- end
- function CastEffective(position,range,maxstrength)
- for i,v in ipairs(workspace:GetChildren()) do
- GoDeeper(v,position,range,maxstrength,false)
- local body = v:GetChildren()
- for part = 1, #body do
- if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
- if(body[part].Position - position).Magnitude < range then
- if v.ClassName == "Model" then
- v:BreakJoints()
- end
- if body[part]:FindFirstChild("OOF") == nil then
- CastBlast(range/2)
- local defence = Instance.new("BoolValue",body[part])
- defence.Name = ("OOF")
- end
- --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
- body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
- end
- end
- end
- if v.ClassName == "Part" then
- if v.Anchored == false and (v.Position - position).Magnitude < range then
- --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
- v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
- end
- end
- end
- end
- --//=================================\\
- --|| ATTACK FUNCTIONS AND STUFF
- --\\=================================//
- function CastBlast(size)
- coroutine.resume(coroutine.create(function()
- for i = 1, 3 do
- CreateSwirl(0,size*0.8,true,-0.2,25,Torso.CFrame * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360))),"Pear")
- end
- local wave = CreatePart(3, Effects, "Neon", 0, 0.8, BRICKC("Pearl"), "Effect", VT(1,1,1))
- local mesh = IT("SpecialMesh",wave)
- mesh.MeshType = "Sphere"
- mesh.Scale = VT(size,size,size)
- mesh.Offset = VT(0,0,0)
- wave.CFrame = Torso.CFrame
- coroutine.resume(coroutine.create(function(PART)
- for i = 1, 25 do
- Swait()
- mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5)
- wave.Transparency = wave.Transparency + (0.2/25)
- end
- wave:remove()
- end))
- end))
- end
- --//=================================\\
- --|| ASSIGN THINGS TO KEYS
- --\\=================================//
- function MouseDown(Mouse)
- if ATTACK == false then
- end
- end
- function MouseUp(Mouse)
- HOLD = false
- end
- function KeyDown(Key)
- KEYHOLD = true
- if Key == "x" and ATTACK == false then
- if VALUE1 == true then
- VALUE1 = false
- SKILL1TEXT.Text = "[X] Toggle [OFF]"
- elseif VALUE1 == false then
- VALUE1 = true
- SKILL1TEXT.Text = "[X] Toggle [ON]"
- end
- end
- end
- function KeyUp(Key)
- KEYHOLD = false
- end
- Mouse.Button1Down:connect(function(NEWKEY)
- MouseDown(NEWKEY)
- end)
- Mouse.Button1Up:connect(function(NEWKEY)
- MouseUp(NEWKEY)
- end)
- Mouse.KeyDown:connect(function(NEWKEY)
- KeyDown(NEWKEY)
- end)
- Mouse.KeyUp:connect(function(NEWKEY)
- KeyUp(NEWKEY)
- end)
- --//=================================\\
- --\\=================================//
- function unanchor()
- if UNANCHOR == true then
- g = Character:GetChildren()
- for i = 1, #g do
- if g[i].ClassName == "Part" then
- g[i].Anchored = false
- end
- end
- end
- end
- local ff = IT("ForceField",Character)
- ff.Visible = false
- --//=================================\\
- --|| WRAP THE WHOLE SCRIPT UP
- --\\=================================//
- Humanoid.HealthChanged:connect(function()
- if Humanoid.Health ~= "inf" then
- Humanoid.Health = "inf"
- end
- if Humanoid.MaxHealth ~= "inf" then
- Humanoid.MaxHealth = "inf"
- end
- end)
- VALUE1 = true
- while true do
- Swait()
- if #Effects2>0 then
- for e=1,#Effects2 do
- if Effects2[e]~=nil then
- local Thing=Effects2[e]
- if Thing~=nil then
- local Part=Thing[1]
- local Mode=Thing[2]
- local Delay=Thing[3]
- local IncX=Thing[4]
- local IncY=Thing[5]
- local IncZ=Thing[6]
- local Part2=Thing[8]
- if Thing[1].Transparency<=1 then
- if Thing[2]=="Block1" then
- Thing[1].CFrame=Thing[1].CFrame
- Mesh=Thing[1].Mesh
- Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder" then
- Mesh=Thing[1].Mesh
- Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Blood" then
- Mesh=Thing[7]
- Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
- Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Elec" then
- Mesh=Thing[1].Mesh
- Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Disappear" then
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- end
- else
- Part.Parent=nil
- table.remove(Effects2,e)
- end
- end
- end
- end
- end
- unanchor()
- Humanoid.MaxHealth = "inf"
- Humanoid.Health = "inf"
- if VALUE1 == true then
- CastEffective(Torso.Position,10,100)
- end
- local MATHS = {"A","C","E","G","I","K","N","P"}
- Humanoid.Name = MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]
- end
- --//=================================\\
- --\\=================================//
- --//====================================================\\--
- --|| END OF SCRIPT
- --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement