Bird Wings
Bird Wings
Bird Wings
script.Parent = nil
function fly()
game:GetService("Debris"):AddItem(v,.1)
end
function weld(p0,p1,c0,c1,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)
w.Part0 = p0
w.Part1 = p1
w.C0 = c0 or CFrame.new()
w.C1 = c1 or CFrame.new()
w.DesiredAngle = tonumber(des) or 0
return w
end
function lerp(a,b,c)
return a+(b-a)*c
end
function clerp(c1,c2,al)
com1[i] = lerp(v,com2[i],al)
end
return CFrame.new(com1[1],com1[2],com1[3]) *
CFrame.Angles(select(4,unpack(com1)))
end
function ccomplerp(c1,c2,al)
com1[i] = lerp(v,com2[i],al)
end
return CFrame.new(unpack(com1))
end
function tickwave(time,length,offset)
end
function invcol(c)
c = c.Color
return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
end
hum.PlatformStand = false
pcall(function()
char.Wings:Destroy()
end)
pcall(function()
char.Angel:Destroy() -- hat
end)
mod.Name = "Wings"
local special = {
antiboomz0r = {"New
Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)},
--antiboomz0r =
{"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
mitta = {"Black",nil,0,0,false},
penjuin3 = {"White",nil,0,0,false},
thepc8110 = {"Black","Bright
red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
nonspeaker =
{"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
oxcool1 = {"Really
black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
local pref = 0
if spec then
end
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
ef.Size = .15
part:BreakJoints()
function newpart()
clone.Parent = mod
clone:BreakJoints()
return clone
end
local feath = newpart()
feath.BrickColor = feacolor
feath.Transparency = 0
Instance.new("SpecialMesh",feath).MeshType = "Sphere"
function newfeather()
clone.Parent = mod
clone:BreakJoints()
return clone
end
local r1 = newpart()
r1.Size = Vector3.new(.3,1.5,.3)*1.2
local r2 = newpart()
r2.Size = Vector3.new(.4,1.8,.4)*1.2
local r3 = newpart()
r3.Size = Vector3.new(.3,2.2,.3)*1.2
local r4 = newpart()
r4.Size = Vector3.new(.25,1.2,.25)*1.2
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,6 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 l2 = newpart()
l2.Size = Vector3.new(.4,1.8,.4)*1.2
local l3 = newpart()
l3.Size = Vector3.new(.3,2.2,.3)*1.2
local l4 = newpart()
l4.Size = Vector3.new(.25,1.2,.25)*1.2
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,6 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 oc0 = {}
for i,v in pairs(rwing) do
oc0[v] = v.C0
end
oc0[v] = v.C0
end
function gotResized()
if lastsize then
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()
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
end
v.DesiredAngle = tab[9]
v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
end
v.DesiredAngle = tab[9]
v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
end
v.DesiredAngle = tab[10]
v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
end
v.DesiredAngle = tab[10]
v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
end
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)
flying = false
moving = false
if v.ClassName:lower():match("body") then
v:Destroy()
end
end
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
vel = Vector3.new()
cf = CFrame.new()
flspd = 0
keysdown = {}
keypressed = {}
ktime = {}
descendtimer = 0
jumptime = tick()
hum.Jumping:connect(function()
jumptime = tick()
end)
cam = workspace.CurrentCamera
kd = plr:GetMouse().KeyDown:connect(oc(function(key)
keysdown[key] = true
keypressed[key] = true
descendtimer = tick()
jumptime = tick()
elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3
and math.abs(reqrotx) < .3 then
end
ktime[key] = tick()
end))
ku = plr:GetMouse().KeyUp:connect(function(key)
keysdown[key] = false
descendtimer = tick()
end
end)
function mid(a,b,c)
end
function bn(a)
return a and 1 or 0
end
function gm(tar)
local m = 0
if v:IsA("BasePart") then
m = m + v:GetMass()
end
m = m + gm(v)
end
return m
end
reqrotx = 0
local con
con = game:GetService("RunService").Stepped:connect(oc(function()
bg:Destroy()
bv:Destroy()
con:disconnect()
script:Destroy()
return
end]]
if flying then
fldir =
cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-
bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
idledir = lfldir*Vector3.new(1,0,1)
descendtimer = tick()
end
fldir =
(Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+
(fldir*Vector3.new(1,0,1))*.05).unit
end
cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving
and idledir or fldir)),keysdown["0"] and .02 or .07)
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
for i=1,4 do
--CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-
bn(i==3)*1.1,bn(i==3)*.1)
end
local hit,ray =
workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-
3.5+math.min(0,bv.velocity.y)/30,0)),{char})
flying = false
hum.PlatformStand = false
tor.Velocity = Vector3.new()
end
else
bg.maxTorque = Vector3.new()
bv.maxForce = Vector3.new()
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)),.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)),.2)
end
if keypressed[" "] and not flying and (tick()-jumptime > .05 and
(tick()-jumptime < 3 or hum.Jump)) 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))
end fly()