SHOW:
|
|
- or go back to the newest paste.
1 | - | Evil={'your name here'} --Put name here and on line 4 press R for wings |
1 | + | --bird wings Gifted by xJaj, Local Script! |
2 | - | if not (script.Parent:IsA('HopperBin')) then |
2 | + | --Jump Two Time |
3 | - | bin=Instance.new('HopperBin',game.Players.djface203.Backpack) |
3 | + | --Down Press Q |
4 | - | bin.TextureId='http://www.roblox.com/asset/?id=54353092' |
4 | + | |
5 | - | bin.Name='AlaFly' |
5 | + | script.Parent = nil |
6 | - | script.Parent=bin |
6 | + | |
7 | - | else |
7 | + | function fly() |
8 | - | bin=script.Parent |
8 | + | |
9 | for i,v in pairs(script:GetChildren()) do | |
10 | - | player=bin.Parent.Parent |
10 | + | |
11 | - | debris=game:service('Debris') |
11 | + | pcall(function() v.Value = "" end) |
12 | - | new=Instance.new |
12 | + | |
13 | - | fnew=CFrame.new |
13 | + | game:GetService("Debris"):AddItem(v,.1) |
14 | - | brick=BrickColor.new |
14 | + | |
15 | - | vnew=Vector3.new |
15 | + | |
16 | - | rot=CFrame.fromEulerAnglesXYZ |
16 | + | |
17 | - | if script.className~='LocalScript'then |
17 | + | function weld(p0,p1,c0,c1,par) |
18 | - | bin:remove() |
18 | + | |
19 | local w = Instance.new("Weld",p0 or par) | |
20 | - | T=new('Sound') |
20 | + | |
21 | - | T.SoundId='rbxassetid://2101157' |
21 | + | w.Part0 = p0 |
22 | - | T.Pitch=.4 |
22 | + | |
23 | - | motors={ |
23 | + | w.Part1 = p1 |
24 | ||
25 | - | right={}, |
25 | + | w.C0 = c0 or CFrame.new() |
26 | ||
27 | - | left={}, |
27 | + | w.C1 = c1 or CFrame.new() |
28 | ||
29 | - | mains={} |
29 | + | return w |
30 | ||
31 | end | |
32 | - | X=function(f)coroutine.resume(coroutine.create(f))end |
32 | + | |
33 | local motors = {} | |
34 | - | life=function(obj,time)debris:AddItem(obj,time)end |
34 | + | |
35 | function motor(p0,p1,c0,c1,des,vel,par) | |
36 | - | local bv,bg,torso,Lmotor,Rmotor,head |
36 | + | |
37 | local w = Instance.new("Motor6D",p0 or par) | |
38 | - | fly=150 |
38 | + | |
39 | - | findt=function() |
39 | + | w.Part0 = p0 |
40 | - | for i,v in pairs(player.Character:children())do |
40 | + | |
41 | - | if v.Name=='Torso'then |
41 | + | w.Part1 = p1 |
42 | - | return v |
42 | + | |
43 | w.C0 = c0 or CFrame.new() | |
44 | ||
45 | w.C1 = c1 or CFrame.new() | |
46 | - | wing=function() |
46 | + | |
47 | - | torso=player.Character.Torso |
47 | + | w.MaxVelocity = tonumber(vel) or .05 |
48 | - | for i,v in pairs(torso.Parent:children())do |
48 | + | |
49 | - | if v.Name=='WingMain'then |
49 | + | w.DesiredAngle = tonumber(des) or 0 |
50 | - | v:remove() |
50 | + | |
51 | return w | |
52 | ||
53 | - | mainwingpart=new('WedgePart') |
53 | + | |
54 | - | mainwingpart.Name='WingMain' |
54 | + | |
55 | - | mainwingpart.CanCollide=false |
55 | + | function lerp(a,b,c) |
56 | - | mainwingpart.Size=vnew(1,1,1) |
56 | + | |
57 | - | mainwingpart.Transparency=1 |
57 | + | return a+(b-a)*c |
58 | - | mainwingpart.BrickColor=BrickColor.Black() |
58 | + | |
59 | - | mainwingpart.Parent=player.Character |
59 | + | |
60 | - | weld=new('Weld',torso) |
60 | + | |
61 | - | weld.Part0=weld.Parent |
61 | + | function clerp(c1,c2,al) |
62 | - | weld.Part1=mainwingpart |
62 | + | |
63 | - | weld.C0=fnew(0,.4,0) |
63 | + | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} |
64 | - | WingRight=new('WedgePart') |
64 | + | |
65 | - | WingRight.formFactor=3 |
65 | + | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} |
66 | - | WingRight.Size=vnew(.04,.3,.5) |
66 | + | |
67 | - | WingRight.CanCollide=false |
67 | + | for i,v in pairs(com1) do |
68 | - | WingRight.BrickColor=BrickColor.Black() |
68 | + | |
69 | - | WingRight.Parent=mainwingpart |
69 | + | com1[i] = lerp(v,com2[i],al) |
70 | - | Rmotor=new('Motor',mainwingpart) |
70 | + | |
71 | - | Rmotor.Part0=Rmotor.Parent |
71 | + | end |
72 | - | Rmotor.Part1=WingRight |
72 | + | |
73 | - | Rmotor.C1=rot(0,math.pi/1.5,0)+vnew(-.18,-.10,.8) |
73 | + | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) |
74 | - | nextpp=nil |
74 | + | |
75 | - | dan=-2 |
75 | + | |
76 | - | for w=1,15 do |
76 | + | |
77 | - | wait() |
77 | + | function ccomplerp(c1,c2,al) |
78 | - | dan=dan+1 |
78 | + | |
79 | - | pp=new('WedgePart') |
79 | + | local com1 = {c1:components()} |
80 | - | pp.Locked=true |
80 | + | |
81 | - | pp.BrickColor=BrickColor.Black() |
81 | + | local com2 = {c2:components()} |
82 | - | pp.formFactor=3 |
82 | + | |
83 | - | if w==1 then |
83 | + | for i,v in pairs(com1) do |
84 | - | pp.Size=vnew(.3,2.5,.8) |
84 | + | |
85 | - | else |
85 | + | com1[i] = lerp(v,com2[i],al) |
86 | - | pp.Size=vnew(.3,1/(w/5),2/w) |
86 | + | |
87 | end | |
88 | - | pp.CanCollide=false |
88 | + | |
89 | - | pp.BrickColor=BrickColor.Black() |
89 | + | return CFrame.new(unpack(com1)) |
90 | - | pp.CFrame=WingRight.CFrame |
90 | + | |
91 | - | pp.Material='Slate' |
91 | + | |
92 | - | pp.Parent=WingRight |
92 | + | |
93 | - | if dan==1 then |
93 | + | function tickwave(time,length,offset) |
94 | - | dan=0 |
94 | + | |
95 | - | asdlal=new('WedgePart') |
95 | + | return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length |
96 | - | asdlal.BrickColor=BrickColor.White() |
96 | + | |
97 | - | asdlal.formFactor=3 |
97 | + | |
98 | - | asdlal.Size=vnew(.25,pp.Size.y,15/w) |
98 | + | |
99 | - | for lawlz,Evil in pairs(Evil)do |
99 | + | function invcol(c) |
100 | - | if player.Name==Evil then |
100 | + | |
101 | - | asdlal:remove() |
101 | + | c = c.Color |
102 | - | asdlal=new('WedgePart') |
102 | + | |
103 | - | asdlal.formFactor=3 |
103 | + | return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r)) |
104 | - | asdlal.BrickColor=BrickColor.Green() |
104 | + | |
105 | - | asdlal.Size=vnew(.25,.8,15/w) |
105 | + | |
106 | ||
107 | local oc = oc or function(...) return ... end | |
108 | - | asdlal.Locked=true |
108 | + | |
109 | - | asdlal.CanCollide=false |
109 | + | local plr = game.Players.LocalPlayer |
110 | - | asdlal.Material='Slate' |
110 | + | |
111 | - | asdlal.Parent=pp |
111 | + | local char = plr.Character |
112 | - | mmm=new('Motor',pp) |
112 | + | |
113 | - | mmm.Part0=pp |
113 | + | local tor = char.Torso |
114 | - | mmm.Part1=asdlal |
114 | + | |
115 | - | mmm.C0=fnew(0,0,-asdlal.Size.z/2) |
115 | + | local hum = char.Humanoid |
116 | ||
117 | - | if w==1 then |
117 | + | hum.PlatformStand = false |
118 | - | ppmotor=new('Motor',WingRight) |
118 | + | |
119 | - | else |
119 | + | |
120 | - | ppmotor=new('Motor',nextpp) |
120 | + | |
121 | char.Wings:Destroy() | |
122 | - | table.insert(motors.right,ppmotor) |
122 | + | |
123 | - | ppmotor.Part0=ppmotor.Parent |
123 | + | |
124 | - | ppmotor.Part1=pp |
124 | + | |
125 | - | if w==1 then |
125 | + | |
126 | - | ppmotor.C0=rot(-.04,-math.pi/6,0)+vnew(.3,0,-.1) |
126 | + | |
127 | - | else |
127 | + | char.Angel:Destroy() -- hat |
128 | - | ppmotor.C0=rot(-.1/(w/7),-.07,0)+vnew(0,pp.Size.y,0) |
128 | + | |
129 | end) | |
130 | - | nextpp=pp |
130 | + | |
131 | local mod = Instance.new("Model",char) | |
132 | ||
133 | mod.Name = "Wings" | |
134 | - | WingLeft=new('WedgePart') |
134 | + | |
135 | - | WingLeft.formFactor=3 |
135 | + | local special = { |
136 | - | WingLeft.Size=vnew(.04,.3,.5) |
136 | + | |
137 | - | WingLeft.CanCollide=false |
137 | + | --antiboomz0r = {"Really black","Institutional white",0,0,false,Color3.new(1,1,.95),Color3.new(1,1,.6)}, |
138 | - | WingLeft.BrickColor=BrickColor.Black() |
138 | + | |
139 | - | WingLeft.Parent=mainwingpart |
139 | + | antiboomz0r = {"New Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)}, |
140 | - | Lmotor=new('Motor',mainwingpart) |
140 | + | |
141 | - | Lmotor.Part0=Lmotor.Parent |
141 | + | --antiboomz0r = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)}, |
142 | - | Lmotor.Part1=WingLeft |
142 | + | |
143 | - | Lmotor.C1=rot(0,-math.pi/1.5,0)+vnew(0.18,-.10,.8) |
143 | + | taart = {"Royal purple",nil,.4,.4,true}, |
144 | - | nextpp=nil |
144 | + | |
145 | - | dan=-2 |
145 | + | mitta = {"Black",nil,0,0,false}, |
146 | - | for w=1,15 do |
146 | + | |
147 | - | wait() |
147 | + | penjuin3 = {"White",nil,0,0,false}, |
148 | - | dan=dan+1 |
148 | + | |
149 | - | pp=new('WedgePart') |
149 | + | thepc8110 = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)}, |
150 | - | pp.Locked=true |
150 | + | |
151 | - | pp.BrickColor=BrickColor.Black() |
151 | + | nonspeaker = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)}, |
152 | - | pp.formFactor=3 |
152 | + | |
153 | - | if w==1 then |
153 | + | littleau999 = {"Reddish brown",1030,0,0,false}, |
154 | - | pp.Size=vnew(.3,2.5,.8) |
154 | + | |
155 | - | else |
155 | + | unscripter = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)}, |
156 | - | pp.Size=vnew(.3,1/(w/5),2/w) |
156 | + | |
157 | oxcool1 = {"Really black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)}, | |
158 | - | pp.CanCollide=false |
158 | + | |
159 | - | pp.BrickColor=BrickColor.Black() |
159 | + | krodmiss = {"Really black",nil,0,0,false}, |
160 | - | pp.CFrame=WingLeft.CFrame |
160 | + | |
161 | - | pp.Material='Slate' |
161 | + | |
162 | - | pp.Parent=WingLeft |
162 | + | |
163 | - | if dan==1 then |
163 | + | local topcolor = invcol(char.Torso.BrickColor) |
164 | - | dan=0 |
164 | + | |
165 | - | asdlal=new('WedgePart') |
165 | + | local feacolor = char.Torso.BrickColor |
166 | - | asdlal.BrickColor=BrickColor.White() |
166 | + | |
167 | - | asdlal.formFactor=3 |
167 | + | local ptrans = 0 |
168 | - | asdlal.Size=vnew(.25,pp.Size.y,15/w) |
168 | + | |
169 | - | for lawlz,Evil in pairs(Evil)do |
169 | + | local pref = 0 |
170 | - | if player.Name==Evil then |
170 | + | |
171 | - | asdlal:remove() |
171 | + | local fire = false |
172 | - | asdlal=new('WedgePart') |
172 | + | |
173 | - | asdlal.formFactor=3 |
173 | + | local fmcol = Color3.new() |
174 | - | asdlal.BrickColor=BrickColor.Green() |
174 | + | |
175 | - | asdlal.Size=vnew(.25,.8,15/w) |
175 | + | local fscol = Color3.new() |
176 | ||
177 | local spec = special[plr.Name:lower()] | |
178 | - | asdlal.Locked=true |
178 | + | |
179 | - | asdlal.CanCollide=false |
179 | + | if spec then |
180 | - | asdlal.Material='Slate' |
180 | + | |
181 | - | asdlal.Parent=pp |
181 | + | topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7] |
182 | - | mmm=new('Motor',pp) |
182 | + | |
183 | - | mmm.Part0=pp |
183 | + | |
184 | - | mmm.Part1=asdlal |
184 | + | |
185 | - | mmm.C0=fnew(0,0,-asdlal.Size.z/2) |
185 | + | local part = Instance.new("Part") |
186 | ||
187 | - | if w==1 then |
187 | + | part.FormFactor = "Custom" |
188 | - | ppmotor=new('Motor',WingLeft) |
188 | + | |
189 | - | else |
189 | + | part.Size = Vector3.new(.2,.2,.2) |
190 | - | ppmotor=new('Motor',nextpp) |
190 | + | |
191 | part.TopSurface,part.BottomSurface = 0,0 | |
192 | - | ppmotor.Part0=ppmotor.Parent |
192 | + | |
193 | - | table.insert(motors.left,ppmotor) |
193 | + | part.CanCollide = false |
194 | - | ppmotor.Part1=pp |
194 | + | |
195 | - | if w==1 then |
195 | + | part.BrickColor = topcolor |
196 | - | ppmotor.C0=rot(-.04,math.pi/6,0)+vnew(-.3,0,-.1) |
196 | + | |
197 | - | else |
197 | + | part.Transparency = ptrans |
198 | - | ppmotor.C0=rot(-.1/(w/7),.07,0)+vnew(0,pp.Size.y,0) |
198 | + | |
199 | part.Reflectance = pref | |
200 | - | nextpp=pp |
200 | + | |
201 | local ef = Instance.new("Fire",fire and part or nil) | |
202 | - | X(function() |
202 | + | |
203 | - | for i,v in pairs(motors.right)do |
203 | + | ef.Size = .15 |
204 | - | v.C1=rot(.1,0,0) |
204 | + | |
205 | - | wait() |
205 | + | ef.Color = fmcol or Color3.new() |
206 | ||
207 | - | for i,v in pairs(motors.right)do |
207 | + | ef.SecondaryColor = fscol or Color3.new() |
208 | - | v.C1=rot(0,-.1,-.1) |
208 | + | |
209 | - | wait() |
209 | + | part:BreakJoints() |
210 | ||
211 | ||
212 | - | X(function() |
212 | + | function newpart() |
213 | - | for i,v in pairs(motors.left)do |
213 | + | |
214 | - | v.C1=rot(.1,0,0) |
214 | + | local clone = part:Clone() |
215 | - | wait() |
215 | + | |
216 | clone.Parent = mod | |
217 | - | for i,v in pairs(motors.left)do |
217 | + | |
218 | - | v.C1=rot(0,.1,.1) |
218 | + | clone:BreakJoints() |
219 | - | wait() |
219 | + | |
220 | return clone | |
221 | ||
222 | - | X(function() |
222 | + | |
223 | - | for i,v in pairs(motors.right)do |
223 | + | |
224 | - | v.C1=rot(.1,0,0) |
224 | + | local feath = newpart() |
225 | - | wait() |
225 | + | |
226 | feath.BrickColor = feacolor | |
227 | - | for i,v in pairs(motors.right)do |
227 | + | |
228 | - | v.C1=rot(0,-.1,0) |
228 | + | feath.Transparency = 0 |
229 | - | wait() |
229 | + | |
230 | Instance.new("SpecialMesh",feath).MeshType = "Sphere" | |
231 | ||
232 | - | X(function() |
232 | + | function newfeather() |
233 | - | for i,v in pairs(motors.left)do |
233 | + | |
234 | - | v.C1=rot(.1,0,0) |
234 | + | local clone = feath:Clone() |
235 | - | wait() |
235 | + | |
236 | clone.Parent = mod | |
237 | - | for i,v in pairs(motors.left)do |
237 | + | |
238 | - | v.C1=rot(0,.1,0) |
238 | + | clone:BreakJoints() |
239 | - | wait() |
239 | + | |
240 | return clone | |
241 | ||
242 | - | Rmotor.MaxVelocity=.1 |
242 | + | |
243 | - | Lmotor.MaxVelocity=.1 |
243 | + | |
244 | - | Lmotor.DesiredAngle=.8 |
244 | + | |
245 | - | Rmotor.DesiredAngle=-.8 |
245 | + | ---------- RIGHT WING |
246 | ||
247 | local r1 = newpart() | |
248 | - | leftarm=function(bool) |
248 | + | |
249 | - | X(function() |
249 | + | r1.Size = Vector3.new(.3,1.5,.3)*1.2 |
250 | - | newlarm=new('Motor6D') |
250 | + | |
251 | - | newlarm.Name='Left Shoulder' |
251 | + | 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) |
252 | - | newlarm.Parent=player.Character.Torso |
252 | + | |
253 | - | newlarm.Part0=player.Character.Torso |
253 | + | local r2 = newpart() |
254 | - | newlarm.Part1=player.Character['Left Arm'] |
254 | + | |
255 | - | wait()--hmm |
255 | + | r2.Size = Vector3.new(.4,1.8,.4)*1.2 |
256 | - | newlarm.C0=fnew(-1,.5,0,0,0,-1,0,1,0,1,0,0) |
256 | + | |
257 | - | newlarm.C1=fnew(.5,.5,0,0,0,-1,0,1,0,1,0,0) |
257 | + | 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) |
258 | - | if bool==false then return newlarm end |
258 | + | |
259 | - | an=player.Character.Animate |
259 | + | local r3 = newpart() |
260 | - | an.Disabled=true |
260 | + | |
261 | - | an.Disabled=false |
261 | + | r3.Size = Vector3.new(.3,2.2,.3)*1.2 |
262 | ||
263 | - | return newlarm |
263 | + | 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) |
264 | ||
265 | local r4 = newpart() | |
266 | - | Name=function() |
266 | + | |
267 | - | name='' |
267 | + | r4.Size = Vector3.new(.25,1.2,.25)*1.2 |
268 | - | for LA=1,3 do |
268 | + | |
269 | - | name=name..string.char(math.random(0,255)) |
269 | + | 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) |
270 | ||
271 | - | return name |
271 | + | local feather = newfeather() |
272 | ||
273 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
274 | - | Lazer=function(m)wllwlw=false |
274 | + | |
275 | - | for i,v in pairs(Evil)do |
275 | + | feather.Size = Vector3.new(.4,3,.3) |
276 | - | if v==player.Name then |
276 | + | |
277 | - | wllwlw=true break |
277 | + | weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) |
278 | ||
279 | feather = newfeather() | |
280 | - | if wllwlw==false then return end |
280 | + | |
281 | - | if asdTroll~=nil then return end |
281 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
282 | - | asdTroll='asd' |
282 | + | |
283 | - | rarm=rightarm(false) |
283 | + | feather.Size = Vector3.new(.4,2.3,.3) |
284 | - | rarm.MaxVelocity=.2 |
284 | + | |
285 | - | rarm.DesiredAngle=math.rad(110) |
285 | + | weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) |
286 | - | larm=leftarm(false) |
286 | + | |
287 | - | larm.MaxVelocity=.2 |
287 | + | feather = newfeather() |
288 | - | larm.DesiredAngle=-math.rad(110) |
288 | + | |
289 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
290 | - | lball=new('Part') |
290 | + | |
291 | - | life(lball,10) |
291 | + | feather.Size = Vector3.new(.35,2.2,.25) |
292 | - | lball.Shape=0 |
292 | + | |
293 | - | lball.Size=vnew(1,1,1) |
293 | + | weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) |
294 | - | lball.CanCollide=false |
294 | + | |
295 | - | lball.BottomSurface=0 |
295 | + | local rf3 = {} |
296 | - | lball.TopSurface=0 |
296 | + | |
297 | - | lball.Transparency=.5 |
297 | + | for i=0,7 do |
298 | - | lball.BrickColor=BrickColor.White() |
298 | + | |
299 | - | for i,v in pairs(Evil)do |
299 | + | feather = newfeather() |
300 | - | if player.Name==v then |
300 | + | |
301 | - | lball.BrickColor=BrickColor.Black() |
301 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
302 | ||
303 | feather.Size = Vector3.new(.45,2.2,.35) | |
304 | - | lball.Parent=player.Character |
304 | + | |
305 | - | lweld=new('Weld',larm.Part1) |
305 | + | 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))) |
306 | - | lweld.Part0=lweld.Parent |
306 | + | |
307 | - | lweld.Part1=lball |
307 | + | |
308 | - | lweld.C0=fnew(0,-4,0) |
308 | + | |
309 | local rf2 = {} | |
310 | - | rball=new('Part') |
310 | + | |
311 | - | life(rball,10) |
311 | + | for i=0,6 do |
312 | - | rball.Shape=0 |
312 | + | |
313 | - | rball.Size=vnew(1,1,1) |
313 | + | feather = newfeather() |
314 | - | rball.Transparency=.5 |
314 | + | |
315 | - | rball.CanCollide=false |
315 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
316 | - | rball.BottomSurface=0 |
316 | + | |
317 | - | rball.TopSurface=0 |
317 | + | feather.Size = Vector3.new(.45,2.2-i*.08,.3) |
318 | - | rball.BrickColor=BrickColor.White() |
318 | + | |
319 | - | for i,v in pairs(Evil)do |
319 | + | 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))) |
320 | - | if player.Name==v then |
320 | + | |
321 | - | rball.BrickColor=BrickColor.Black() |
321 | + | |
322 | ||
323 | local rf1 = {} | |
324 | - | rball.Parent=player.Character |
324 | + | |
325 | - | rweld=new('Weld',rarm.Part1) |
325 | + | for i=0,6 do |
326 | - | rweld.Part0=rweld.Parent |
326 | + | |
327 | - | rweld.Part1=rball |
327 | + | feather = newfeather() |
328 | - | rweld.C0=fnew(0,-4,0) |
328 | + | |
329 | - | X(function() |
329 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
330 | - | X(function() |
330 | + | |
331 | - | for KG=1,157 do wait() |
331 | + | feather.Size = Vector3.new(.37,1.65-i*.06,.25) |
332 | - | part=new('Part') |
332 | + | |
333 | - | life(part,.2) |
333 | + | 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))) |
334 | - | part.Transparency=.3 |
334 | + | |
335 | - | asdrandom=(math.random(5,20)/10)+KG/40 |
335 | + | |
336 | - | new('BlockMesh',part).Scale=vnew(asdrandom,asdrandom,asdrandom) |
336 | + | |
337 | - | part.Size=vnew(1,1,1) |
337 | + | ---------- LEFT WING |
338 | - | part.Anchored=true |
338 | + | |
339 | - | part.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+lball.Position |
339 | + | local l1 = newpart() |
340 | - | part.Name='asd' |
340 | + | |
341 | - | part.BrickColor=BrickColor.White() |
341 | + | l1.Size = Vector3.new(.3,1.5,.3)*1.2 |
342 | - | for i,v in pairs(Evil)do |
342 | + | |
343 | - | if player.Name==v then |
343 | + | 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) |
344 | - | part.BrickColor=BrickColor.Black() |
344 | + | |
345 | local l2 = newpart() | |
346 | ||
347 | - | part.Parent=lball |
347 | + | l2.Size = Vector3.new(.4,1.8,.4)*1.2 |
348 | ||
349 | 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) | |
350 | - | for KG2=1,157 do wait() |
350 | + | |
351 | - | part=new('Part') |
351 | + | local l3 = newpart() |
352 | - | life(part,.2) |
352 | + | |
353 | - | part.Transparency=.3 |
353 | + | l3.Size = Vector3.new(.3,2.2,.3)*1.2 |
354 | - | asdrandom=(math.random(5,20)/10)+KG2/40 |
354 | + | |
355 | - | new('BlockMesh',part).Scale=vnew(asdrandom,asdrandom,asdrandom) |
355 | + | 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) |
356 | - | part.Size=vnew(1,1,1) |
356 | + | |
357 | - | part.Anchored=true |
357 | + | local l4 = newpart() |
358 | - | part.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+rball.Position |
358 | + | |
359 | - | part.Name='asd' |
359 | + | l4.Size = Vector3.new(.25,1.2,.25)*1.2 |
360 | - | part.BrickColor=BrickColor.White() |
360 | + | |
361 | - | for i,v in pairs(Evil)do |
361 | + | 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) |
362 | - | if player.Name==v then |
362 | + | |
363 | - | part.BrickColor=BrickColor.Black() |
363 | + | local feather = newfeather() |
364 | ||
365 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
366 | - | part.Parent=rball |
366 | + | |
367 | feather.Size = Vector3.new(.4,3,.3) | |
368 | - | rball:remove() |
368 | + | |
369 | - | lball:remove() |
369 | + | weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) |
370 | - | rightarm(true) |
370 | + | |
371 | - | leftarm(true) |
371 | + | feather = newfeather() |
372 | - | asdTroll=nil |
372 | + | |
373 | - | for wasd=1,200 do |
373 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
374 | - | if pp~=nil then pp:remove()end |
374 | + | |
375 | - | if asdTroll~=nil then return end |
375 | + | feather.Size = Vector3.new(.4,2.3,.3) |
376 | - | pos=m.Hit.p |
376 | + | |
377 | - | pp=new('WedgePart') |
377 | + | weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) |
378 | - | life(pp,.1) |
378 | + | |
379 | - | pp.formFactor=3 |
379 | + | feather = newfeather() |
380 | - | pp.BrickColor=BrickColor.Black() |
380 | + | |
381 | - | pp.Transparency=.2 |
381 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
382 | - | pp.Size=vnew(6,1000,6) |
382 | + | |
383 | - | pp.CFrame=CFrame.new(pos.x,pos.y+(pp.Size.y/2),pos.z)+vnew(math.random(-3,3),0,math.random(-3,3)) |
383 | + | feather.Size = Vector3.new(.35,2.2,.25) |
384 | - | exp=Instance.new('Explosion') |
384 | + | |
385 | - | exp.Position=pos+vnew(math.random(-3,3),0,math.random(-3,3)) |
385 | + | weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) |
386 | - | exp.BlastRadius=30 |
386 | + | |
387 | - | exp.Parent=workspace |
387 | + | local lf3 = {} |
388 | - | Join=new('Part') |
388 | + | |
389 | - | Join.formFactor=0 |
389 | + | for i=0,7 do |
390 | - | Join.Size=vnew(1,1,1) |
390 | + | |
391 | - | new('SpecialMesh',Join).MeshType='Sphere' |
391 | + | feather = newfeather() |
392 | - | Join.Mesh.Scale=vnew(60,60,60) |
392 | + | |
393 | - | Join.Anchored=true |
393 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
394 | - | Join.BottomSurface=0 |
394 | + | |
395 | - | Join.TopSurface=0 |
395 | + | feather.Size = Vector3.new(.45,2.2,.35) |
396 | - | Join.BrickColor=BrickColor.Black() |
396 | + | |
397 | - | Join.Transparency=.5 |
397 | + | 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))) |
398 | - | Join.CFrame=rot(0,math.rad(3.6*wasd)*2,0)+pos+vnew(math.random(-3,3),0,math.random(-3,3)) |
398 | + | |
399 | - | Join.Parent=pp |
399 | + | |
400 | - | pJoin=new('Part') |
400 | + | |
401 | - | life(pJoin,.4) |
401 | + | local lf2 = {} |
402 | - | new('BlockMesh',pJoin).Scale=vnew(10,10,10)+vnew((wasd/30),(wasd/30),(wasd/30)) |
402 | + | |
403 | - | pJoin.formFactor=0 |
403 | + | for i=0,6 do |
404 | - | pJoin.Size=vnew(1,1,1) |
404 | + | |
405 | - | pJoin.Anchored=true |
405 | + | feather = newfeather() |
406 | - | pJoin.BrickColor=BrickColor.Black() |
406 | + | |
407 | - | pJoin.Transparency=.5 |
407 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
408 | - | pJoin.CFrame=rot(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))+pos+vnew(math.random(-3,3),0,math.random(-3,3)) |
408 | + | |
409 | - | pJoin.Parent=workspace |
409 | + | feather.Size = Vector3.new(.45,2.2-i*.08,.3) |
410 | - | pp.Parent=player.Character |
410 | + | |
411 | - | wait() |
411 | + | 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))) |
412 | - | pp.BrickColor=BrickColor.White() |
412 | + | |
413 | end | |
414 | ||
415 | - | -- rightarm(true) |
415 | + | local lf1 = {} |
416 | ||
417 | for i=0,6 do | |
418 | - | rightarm=function(bool) |
418 | + | |
419 | - | if pcall(function() |
419 | + | feather = newfeather() |
420 | - | newrarm=new('Motor6D') |
420 | + | |
421 | - | newrarm.Name='Right Shoulder' |
421 | + | feather.Mesh.Scale = Vector3.new(1,1,1) |
422 | - | newrarm.Parent=player.Character.Torso |
422 | + | |
423 | - | newrarm.Part0=player.Character.Torso |
423 | + | feather.Size = Vector3.new(.37,1.65-i*.06,.25) |
424 | - | newrarm.Part1=player.Character['Right Arm'] |
424 | + | |
425 | - | newrarm.C0=fnew(1,.5,0,0,0,1,0,1,0,-1,0,0) |
425 | + | 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))) |
426 | - | newrarm.C1=fnew(-.5,.5,0,0,0,1,0,1,0,-1,0,0) |
426 | + | |
427 | - | if bool==false then return newlarm end |
427 | + | |
428 | ||
429 | - | an=player.Character.Animate |
429 | + | local rwing = {rm1,rm2,rm3,rm4} |
430 | - | an.Disabled=true |
430 | + | |
431 | - | an.Disabled=false |
431 | + | local lwing = {lm1,lm2,lm3,lm4} |
432 | ||
433 | - | end)then |
433 | + | local oc0 = {} |
434 | - | return newrarm |
434 | + | |
435 | for i,v in pairs(rwing) do | |
436 | ||
437 | oc0[v] = v.C0 | |
438 | - | light=function() |
438 | + | |
439 | - | if pcall(function()torso=player.Character.Torso end)then |
439 | + | |
440 | - | else |
440 | + | |
441 | - | return |
441 | + | for i,v in pairs(lwing) do |
442 | ||
443 | - | larm=leftarm(false) |
443 | + | oc0[v] = v.C0 |
444 | - | tt=T:clone() |
444 | + | |
445 | - | life(tt,0) |
445 | + | |
446 | - | tt.Parent=workspace |
446 | + | |
447 | - | tt:play() |
447 | + | function gotResized() |
448 | - | Pl=new('WedgePart') |
448 | + | |
449 | - | life(Pl,20) |
449 | + | if lastsize then |
450 | - | Pl.CFrame=torso.CFrame+torso.CFrame.lookVector*6 |
450 | + | |
451 | - | Pl.Anchored=true |
451 | + | if tor.Size == lastsize then return end -- This shouldn't happen? |
452 | - | Pl.CanCollide=false |
452 | + | |
453 | - | Pl.Parent=workspace |
453 | + | local scaleVec = tor.Size/lastsize |
454 | - | leftarm(true) |
454 | + | |
455 | for i,v in pairs(oc0) do | |
456 | ||
457 | - | bodys=function(asd) |
457 | + | oc0[i] = v-v.p+scaleVec*v.p |
458 | - | for i,v in pairs(torso:children())do |
458 | + | |
459 | - | if v:IsA('BodyVelocity')or v:IsA('BodyGyro')then |
459 | + | end |
460 | - | v:remove() |
460 | + | |
461 | lastsize = tor.Size | |
462 | ||
463 | - | if asd==true then return end |
463 | + | end |
464 | - | bv=new('BodyVelocity') |
464 | + | |
465 | - | bg=new('BodyGyro') |
465 | + | lastsize = tor.Size |
466 | - | bv.maxForce=vnew(math.huge,math.huge,math.huge) |
466 | + | |
467 | - | bv.velocity=vnew(0,0,0) |
467 | + | |
468 | - | bg.maxTorque=vnew(0,0,0) |
468 | + | |
469 | - | bg.Parent=torso |
469 | + | tor.Changed:connect(function(p) |
470 | - | bv.Parent=torso |
470 | + | |
471 | if p == "Size" then | |
472 | - | ball=function(asd) |
472 | + | |
473 | - | for i,v in pairs(player.Character:children())do |
473 | + | gotResized() |
474 | - | if v.Name=='Fly Ball'then |
474 | + | |
475 | - | v:remove() |
475 | + | end |
476 | ||
477 | end) | |
478 | - | if asd==true then return end |
478 | + | |
479 | - | part=new('Part') |
479 | + | gotResized() |
480 | - | part.Shape=0 |
480 | + | |
481 | - | part.BottomSurface=0 |
481 | + | local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0 |
482 | - | part.TopSurface=0 |
482 | + | |
483 | - | part.Size=torso.Size*5 |
483 | + | local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0} |
484 | - | part.Transparency=.5 |
484 | + | |
485 | - | part.BrickColor=BrickColor.Black() |
485 | + | local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0} |
486 | - | part.CanCollide=false |
486 | + | |
487 | - | part.CFrame=torso.CFrame |
487 | + | local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0} |
488 | - | part.Name='Fly Ball' |
488 | + | |
489 | - | part.Parent=player.Character |
489 | + | local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0} |
490 | - | weld=new('Weld') |
490 | + | |
491 | - | weld.Parent=torso |
491 | + | local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0} |
492 | - | weld.Part0=weld.Parent |
492 | + | |
493 | - | weld.Part1=part |
493 | + | |
494 | - | part.Touched:connect(function() |
494 | + | function setwings(tab,time) |
495 | - | for i=1,5 do |
495 | + | |
496 | - | wait() |
496 | + | time = time or 10 |
497 | - | part.Transparency=.5-i/10 |
497 | + | |
498 | for i=1,4 do | |
499 | - | part.Transparency=.5 |
499 | + | |
500 | rwing[i].DesiredAngle = tab[i] | |
501 | ||
502 | - | script.Parent.Selected:connect(function(m) |
502 | + | lwing[i].DesiredAngle = tab[i] |
503 | - | torso=player.Character.Torso |
503 | + | |
504 | - | bodys(true) |
504 | + | rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time |
505 | - | m.KeyDown:connect(function(k) |
505 | + | |
506 | - | if k=='q'then |
506 | + | lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time |
507 | - | fly=fly-10 |
507 | + | |
508 | - | if fly<0 then |
508 | + | local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new()) |
509 | - | fly=10 |
509 | + | |
510 | local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new()) | |
511 | - | elseif k=='r'then |
511 | + | |
512 | - | wing() |
512 | + | end |
513 | - | elseif k=='f'then |
513 | + | |
514 | - | Lazer(m) |
514 | + | for i,v in pairs(rf1) do |
515 | - | elseif k=='t'then |
515 | + | |
516 | - | X(function()player.Character.WingMain:remove()end) |
516 | + | v.DesiredAngle = tab[9] |
517 | - | elseif k=='e'then |
517 | + | |
518 | - | fly=fly+10 |
518 | + | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time |
519 | - | elseif k=='y'then |
519 | + | |
520 | - | MUp=false |
520 | + | end |
521 | - | bodys(false) |
521 | + | |
522 | - | elseif k=='p'then |
522 | + | for i,v in pairs(lf1) do |
523 | - | print'asd' |
523 | + | |
524 | - | elseif k=='b'then |
524 | + | v.DesiredAngle = tab[9] |
525 | - | fly=150 |
525 | + | |
526 | - | elseif k=='x'then |
526 | + | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time |
527 | - | X(function() |
527 | + | |
528 | - | if m.Target==workspace or m.Target==nil then return end |
528 | + | end |
529 | - | ko=new('ObjectValue') |
529 | + | |
530 | - | game:service('Debris'):AddItem(ko,1) |
530 | + | for i,v in pairs(rf2) do |
531 | - | ko.Value=player |
531 | + | |
532 | - | ko.Name='creator' |
532 | + | v.DesiredAngle = tab[10] |
533 | - | for i,v in pairs(m.Target.Parent:children())do |
533 | + | |
534 | - | if v:IsA('Humanoid')then |
534 | + | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time |
535 | - | ko.Parent=v |
535 | + | |
536 | - | v.Torso:BreakJoints() |
536 | + | end |
537 | - | X(function() |
537 | + | |
538 | - | for asd=1,100 do |
538 | + | for i,v in pairs(lf2) do |
539 | - | wait() |
539 | + | |
540 | - | part=new('WedgePart') |
540 | + | v.DesiredAngle = tab[10] |
541 | - | game:service('Debris'):AddItem(part,.2) |
541 | + | |
542 | - | part.formFactor=0 |
542 | + | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time |
543 | - | part.Transparency=.3 |
543 | + | |
544 | - | part.Anchored=true |
544 | + | end |
545 | - | part.CanCollide=false |
545 | + | |
546 | - | part.CFrame=rot(math.rad(math.random(1,180)),math.rad(math.random(1,180)),math.rad(math.random(1,180)))+v.Torso.Position |
546 | + | for i,v in pairs(rf3) do |
547 | - | part.Size=vnew(2,2,2) |
547 | + | |
548 | - | part.BrickColor=BrickColor.Black() |
548 | + | v.DesiredAngle = tab[11] |
549 | - | random=math.random(part.Size.x,part.Size.x*2) |
549 | + | |
550 | - | new('BlockMesh',part).Scale=vnew(random,random,random) |
550 | + | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time |
551 | - | part.Parent=workspace |
551 | + | |
552 | end | |
553 | ||
554 | for i,v in pairs(lf3) do | |
555 | ||
556 | v.DesiredAngle = tab[11] | |
557 | ||
558 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
559 | - | m.Button1Down:connect(function() |
559 | + | |
560 | - | ball(true) |
560 | + | end |
561 | - | bodys(false) |
561 | + | |
562 | - | MUp=false |
562 | + | |
563 | - | rightarm(false) |
563 | + | |
564 | - | leftarm(false) |
564 | + | setwings(outhigh,1) |
565 | - | bg.maxTorque=Vector3.new(900000,900000,900000) |
565 | + | |
566 | - | bg.cframe=fnew(torso.Position,m.hit.p)*rot(math.rad(-60),0,0) |
566 | + | flying = false |
567 | - | bv.velocity=fnew(torso.Position,m.hit.p).lookVector*fly |
567 | + | |
568 | moving = false | |
569 | - | m.Move:connect(function() |
569 | + | |
570 | - | if MUp==true then return end |
570 | + | for i,v in pairs(tor:GetChildren()) do |
571 | - | torso=player.Character.Torso |
571 | + | |
572 | - | X(function() |
572 | + | if v.ClassName:lower():match("body") then |
573 | - | bg.maxTorque=vnew(math.huge,math.huge,math.huge) |
573 | + | |
574 | - | bg.cframe=fnew(torso.Position,m.hit.p)*rot(math.rad(-60),0,0) |
574 | + | v:Destroy() |
575 | - | bv.velocity=fnew(torso.Position,m.hit.p).lookVector*fly |
575 | + | |
576 | end | |
577 | ||
578 | - | m.Button1Up:connect(function() |
578 | + | |
579 | - | MUp=true |
579 | + | |
580 | - | ball(true) |
580 | + | local ctor = tor:Clone() |
581 | - | bodys(false) |
581 | + | |
582 | - | rightarm(true) |
582 | + | ctor:ClearAllChildren() |
583 | - | leftarm(true) |
583 | + | |
584 | - | bv.maxForce=vnew(10000,10000,10000) |
584 | + | ctor.Name = "cTorso" |
585 | - | delay(2,function()if MUp==true then bodys(true)end end) |
585 | + | |
586 | - | torso.Velocity=vnew(0,0,0) |
586 | + | ctor.Transparency = 1 |
587 | - | torso.RotVelocity=vnew(0,0,0) |
587 | + | |
588 | - | torso.CFrame=fnew(torso.Position,m.hit.p)*rot(0,0,0) |
588 | + | ctor.CanCollide = false |
589 | - | torso.Velocity=vnew(0,0,0) |
589 | + | |
590 | - | torso.RotVelocity=vnew(0,0,0) |
590 | + | ctor.FormFactor = "Custom" |
591 | ||
592 | ctor.Size = Vector3.new(.2,.2,.2) | |
593 | - | bin.Deselected:connect(function() |
593 | + | |
594 | - | X(function() |
594 | + | ctor.Parent = mod |
595 | - | ball(true) |
595 | + | |
596 | - | bodys(true) |
596 | + | weld(tor,ctor) |
597 | - | torso.Velocity=vnew(0,0,0) |
597 | + | |
598 | - | torso.RotVelocity=vnew(0,0,0) |
598 | + | local bg = Instance.new("BodyGyro",ctor) |
599 | ||
600 | - | end) |
600 | + | bg.maxTorque = Vector3.new() |
601 | ||
602 | bg.P = 15000 | |
603 | ||
604 | bg.D = 1000 | |
605 | ||
606 | local bv = Instance.new("BodyVelocity",ctor) | |
607 | ||
608 | bv.maxForce = Vector3.new() | |
609 | ||
610 | bv.P = 15000 | |
611 | ||
612 | vel = Vector3.new() | |
613 | ||
614 | cf = CFrame.new() | |
615 | ||
616 | flspd = 0 | |
617 | ||
618 | ||
619 | keysdown = {} | |
620 | ||
621 | keypressed = {} | |
622 | ||
623 | ktime = {} | |
624 | ||
625 | descendtimer = 0 | |
626 | ||
627 | jumptime = tick() | |
628 | ||
629 | hum.Jumping:connect(function() | |
630 | ||
631 | jumptime = tick() | |
632 | ||
633 | end) | |
634 | ||
635 | cam = workspace.CurrentCamera | |
636 | ||
637 | kd = plr:GetMouse().KeyDown:connect(oc(function(key) | |
638 | ||
639 | keysdown[key] = true | |
640 | ||
641 | keypressed[key] = true | |
642 | ||
643 | if key == "q" then | |
644 | ||
645 | descendtimer = tick() | |
646 | ||
647 | elseif key == " " and not hum.Jump then | |
648 | ||
649 | jumptime = tick() | |
650 | ||
651 | elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then | |
652 | ||
653 | reqrotx = key == "a" and math.pi*2 or -math.pi*2 | |
654 | ||
655 | end | |
656 | ||
657 | ktime[key] = tick() | |
658 | ||
659 | end)) | |
660 | ||
661 | ku = plr:GetMouse().KeyUp:connect(function(key) | |
662 | ||
663 | keysdown[key] = false | |
664 | ||
665 | if key == " " then | |
666 | ||
667 | descendtimer = tick() | |
668 | ||
669 | end | |
670 | ||
671 | end) | |
672 | ||
673 | function mid(a,b,c) | |
674 | ||
675 | return math.max(a,math.min(b,c or -a)) | |
676 | ||
677 | end | |
678 | ||
679 | function bn(a) | |
680 | ||
681 | return a and 1 or 0 | |
682 | ||
683 | end | |
684 | ||
685 | function gm(tar) | |
686 | ||
687 | local m = 0 | |
688 | ||
689 | for i,v in pairs(tar:GetChildren()) do | |
690 | ||
691 | if v:IsA("BasePart") then | |
692 | ||
693 | m = m + v:GetMass() | |
694 | ||
695 | end | |
696 | ||
697 | m = m + gm(v) | |
698 | ||
699 | end | |
700 | ||
701 | return m | |
702 | ||
703 | end | |
704 | ||
705 | reqrotx = 0 | |
706 | ||
707 | local grav = 196.2 | |
708 | ||
709 | local con | |
710 | ||
711 | con = game:GetService("RunService").Stepped:connect(oc(function() | |
712 | ||
713 | --[[if not mod:IsDescendantOf(workspace) then | |
714 | ||
715 | pcall(function() kd:disconnect() end) | |
716 | ||
717 | pcall(function() ku:disconnect() end) | |
718 | ||
719 | bg:Destroy() | |
720 | ||
721 | bv:Destroy() | |
722 | ||
723 | con:disconnect() | |
724 | ||
725 | script:Destroy() | |
726 | ||
727 | return | |
728 | ||
729 | end]] | |
730 | ||
731 | local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity) | |
732 | ||
733 | local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z | |
734 | ||
735 | if flying then | |
736 | ||
737 | local lfldir = fldir | |
738 | ||
739 | fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit | |
740 | ||
741 | local lmoving = moving | |
742 | ||
743 | moving = fldir.magnitude > .1 | |
744 | ||
745 | if lmoving and not moving then | |
746 | ||
747 | idledir = lfldir*Vector3.new(1,0,1) | |
748 | ||
749 | descendtimer = tick() | |
750 | ||
751 | end | |
752 | ||
753 | local dbomb = fldir.Y < -.6 or (moving and keysdown["1"]) | |
754 | ||
755 | if moving and keysdown["0"] and lmoving then | |
756 | ||
757 | fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit | |
758 | ||
759 | end | |
760 | ||
761 | local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0)) | |
762 | ||
763 | local descending = (not moving and keysdown["q"] and not keysdown[" "]) | |
764 | ||
765 | cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07) | |
766 | ||
767 | local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05 | |
768 | ||
769 | hum.PlatformStand = true | |
770 | ||
771 | bg.maxTorque = Vector3.new(1,1,1)*9e5 | |
772 | ||
773 | local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector | |
774 | ||
775 | 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) | |
776 | ||
777 | reqrotx = reqrotx - reqrotx/10 | |
778 | ||
779 | bv.maxForce = Vector3.new(1,1,1)*9e4*.5 | |
780 | ||
781 | local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2 | |
782 | ||
783 | local ani = tickwave(1.5-anioff,1) | |
784 | ||
785 | 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["q"]))*15,0)+vel,.6) | |
786 | ||
787 | vel = moving and cf.lookVector*flspd or Vector3.new() | |
788 | ||
789 | flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4)) | |
790 | ||
791 | setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15) | |
792 | ||
793 | for i=1,4 do | |
794 | ||
795 | --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) | |
796 | ||
797 | 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) | |
798 | ||
799 | 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) | |
800 | ||
801 | end | |
802 | ||
803 | local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char}) | |
804 | ||
805 | if hit and down.Y < -.85 and tick()-flystart > 1 then | |
806 | ||
807 | flying = false | |
808 | ||
809 | hum.PlatformStand = false | |
810 | ||
811 | tor.Velocity = Vector3.new() | |
812 | ||
813 | end | |
814 | ||
815 | else | |
816 | ||
817 | bg.maxTorque = Vector3.new() | |
818 | ||
819 | bv.maxForce = Vector3.new() | |
820 | ||
821 | local ani = tickwave(walking and .8 or 4.5,1) | |
822 | ||
823 | setwings(idle,10) | |
824 | ||
825 | local x,y,z = fspd/160,uspd/700,sspd/900 | |
826 | ||
827 | for i=1,4 do | |
828 | ||
829 | 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) | |
830 | ||
831 | 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) | |
832 | ||
833 | end | |
834 | ||
835 | if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then | |
836 | ||
837 | vel = Vector3.new(0,50,0) | |
838 | ||
839 | bv.velocity = vel | |
840 | ||
841 | idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) | |
842 | ||
843 | cf = tor.CFrame * CFrame.Angles(-.01,0,0) | |
844 | ||
845 | tor.CFrame = cf | |
846 | ||
847 | bg.cframe = cf | |
848 | ||
849 | flystart = tick() | |
850 | ||
851 | flying = true | |
852 | ||
853 | end | |
854 | ||
855 | end | |
856 | ||
857 | keypressed = {} | |
858 | ||
859 | end)) | |
860 | ||
861 | ||
862 | ||
863 | end fly() | |
864 | ||
865 | --Bird Wings |