SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | |
2 | Character=Player.Character | |
3 | PlayerGui=Player.PlayerGui | |
4 | Backpack=Player.Backpack | |
5 | Torso=Character.Torso | |
6 | Head=Character.Head | |
7 | Humanoid=Character.Humanoid | |
8 | LeftArm=Character["Left Arm"] | |
9 | LeftLeg=Character["Left Leg"] | |
10 | RightArm=Character["Right Arm"] | |
11 | RightLeg=Character["Right Leg"] | |
12 | LS=Torso["Left Shoulder"] | |
13 | LH=Torso["Left Hip"] | |
14 | RS=Torso["Right Shoulder"] | |
15 | RH=Torso["Right Hip"] | |
16 | Neck=Torso.Neck | |
17 | it=Instance.new | |
18 | vt=Vector3.new | |
19 | cf=CFrame.new | |
20 | euler=CFrame.fromEulerAnglesXYZ | |
21 | angles=CFrame.Angles | |
22 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
23 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
24 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
25 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
26 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
27 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
28 | RootPart=Character.HumanoidRootPart | |
29 | RootJoint=RootPart.RootJoint | |
30 | RootCF=euler(-1.57,0,3.14) | |
31 | attack = false | |
32 | attackdebounce = false | |
33 | MMouse=nil | |
34 | combo=0 | |
35 | mana=0 | |
36 | local idle=0 | |
37 | local Anim="Idle" | |
38 | local Effects={} | |
39 | --player | |
40 | player=nil | |
41 | --save shoulders | |
42 | RSH, LSH=nil, nil | |
43 | --welds | |
44 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
45 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
46 | LH=Torso["Left Hip"] | |
47 | RH=Torso["Right Hip"] | |
48 | Charge=0 | |
49 | TorsoColor=Torso.BrickColor | |
50 | ||
51 | function swait(num) | |
52 | if num==0 or num==nil then | |
53 | game:service'RunService'.RenderStepped:wait() | |
54 | else | |
55 | for i=0,num do | |
56 | game:service'RunService'.RenderStepped:wait() | |
57 | end | |
58 | end | |
59 | end | |
60 | ||
61 | if Character:findFirstChild("Aero Board",true) ~= nil then | |
62 | Character:findFirstChild("Aero Board",true).Parent = nil | |
63 | end | |
64 | if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then | |
65 | Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil | |
66 | end | |
67 | ||
68 | ||
69 | function NoOutline(Part) | |
70 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
71 | end | |
72 | ||
73 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
74 | local fp=it("Part") | |
75 | fp.formFactor=formfactor | |
76 | fp.Parent=parent | |
77 | fp.Reflectance=reflectance | |
78 | fp.Transparency=transparency | |
79 | fp.CanCollide=false | |
80 | fp.Locked=true | |
81 | fp.BrickColor=brickcolor | |
82 | fp.Name=name | |
83 | fp.Size=size | |
84 | fp.Position=Torso.Position | |
85 | NoOutline(fp) | |
86 | fp.Material="SmoothPlastic" | |
87 | fp:BreakJoints() | |
88 | return fp | |
89 | end | |
90 | ||
91 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
92 | local mesh=it(Mesh) | |
93 | mesh.Parent=part | |
94 | if Mesh=="SpecialMesh" then | |
95 | mesh.MeshType=meshtype | |
96 | mesh.MeshId=meshid | |
97 | end | |
98 | mesh.Offset=offset | |
99 | mesh.Scale=scale | |
100 | return mesh | |
101 | end | |
102 | ||
103 | function weld(parent,part0,part1,c0) | |
104 | local weld=it("Weld") | |
105 | weld.Parent=parent | |
106 | weld.Part0=part0 | |
107 | weld.Part1=part1 | |
108 | weld.C0=c0 | |
109 | return weld | |
110 | end | |
111 | ||
112 | local Color1=Torso.BrickColor | |
113 | ||
114 | local fengui=it("GuiMain") | |
115 | fengui.Parent=Player.PlayerGui | |
116 | fengui.Name="WeaponGUI" | |
117 | local fenframe=it("Frame") | |
118 | fenframe.Parent=fengui | |
119 | fenframe.BackgroundColor3=Color3.new(255,255,255) | |
120 | fenframe.BackgroundTransparency=1 | |
121 | fenframe.BorderColor3=Color3.new(17,17,17) | |
122 | fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0) | |
123 | fenframe.Position=UDim2.new(0.4,0,0.1,0) | |
124 | local fenbarmana1=it("TextLabel") | |
125 | fenbarmana1.Parent=fenframe | |
126 | fenbarmana1.Text=" " | |
127 | fenbarmana1.BackgroundTransparency=0 | |
128 | fenbarmana1.BackgroundColor3=Color3.new(0,0,0) | |
129 | fenbarmana1.SizeConstraint="RelativeXY" | |
130 | fenbarmana1.TextXAlignment="Center" | |
131 | fenbarmana1.TextYAlignment="Center" | |
132 | fenbarmana1.Position=UDim2.new(0,0,0,0) | |
133 | fenbarmana1.Size=UDim2.new(4,0,0.2,0) | |
134 | local fenbarmana2=it("TextLabel") | |
135 | fenbarmana2.Parent=fenframe | |
136 | fenbarmana2.Text=" " | |
137 | fenbarmana2.BackgroundTransparency=0 | |
138 | fenbarmana2.BackgroundColor3=Torso.Color | |
139 | fenbarmana2.SizeConstraint="RelativeXY" | |
140 | fenbarmana2.TextXAlignment="Center" | |
141 | fenbarmana2.TextYAlignment="Center" | |
142 | fenbarmana2.Position=UDim2.new(0,0,0,0) | |
143 | fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0) | |
144 | local fenbarmana3=it("TextLabel") | |
145 | fenbarmana3.Parent=fenframe | |
146 | fenbarmana3.Text=" " | |
147 | fenbarmana3.BackgroundTransparency=0 | |
148 | fenbarmana3.BackgroundColor3=Color3.new(Col1,Col2,Col3) | |
149 | fenbarmana3.SizeConstraint="RelativeXY" | |
150 | fenbarmana3.TextXAlignment="Center" | |
151 | fenbarmana3.TextYAlignment="Center" | |
152 | fenbarmana3.Position=UDim2.new(0,0,0,0) | |
153 | fenbarmana3.Size=UDim2.new(0,0,0.2,0) | |
154 | local fenbarmana4=it("TextLabel") | |
155 | fenbarmana4.Parent=fenframe | |
156 | fenbarmana4.Text="Energy("..mana..")" | |
157 | fenbarmana4.BackgroundTransparency=1 | |
158 | fenbarmana4.BackgroundColor3=Color3.new(0,0,0) | |
159 | fenbarmana4.SizeConstraint="RelativeXY" | |
160 | fenbarmana4.TextXAlignment="Center" | |
161 | fenbarmana4.TextYAlignment="Center" | |
162 | fenbarmana4.Position=UDim2.new(0,0,-0.3,0) | |
163 | fenbarmana4.Size=UDim2.new(4,0,0.2,0) | |
164 | fenbarmana4.FontSize="Size9" | |
165 | fenbarmana4.TextStrokeTransparency=0 | |
166 | fenbarmana4.TextColor=BrickColor.new("White") | |
167 | ||
168 | local modelzorz=Instance.new("Model") | |
169 | modelzorz.Parent=Character | |
170 | modelzorz.Name="Aero Board" | |
171 | ||
172 | local handle=part(3,modelzorz,0,0,BrickColor.new("Black"),"Handle1",vt()) | |
173 | local hprt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Handle2",vt()) | |
174 | local hprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Handle3",vt()) | |
175 | local prt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part1",vt()) | |
176 | local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part2",vt()) | |
177 | local prt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt()) | |
178 | local prt4=part(3,modelzorz,0,0,TorsoColor,"Part4",vt()) | |
179 | local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part5",vt()) | |
180 | local prt6=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part6",vt()) | |
181 | local prt7=part(3,modelzorz,0,0,TorsoColor,"Part7",vt()) | |
182 | local prt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part8",vt()) | |
183 | local prt9=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part9",vt()) | |
184 | local prt10=part(3,modelzorz,0,0,TorsoColor,"Part10",vt()) | |
185 | local prt11=part(3,modelzorz,0,0,TorsoColor,"Part11",vt()) | |
186 | local prt12=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part12",vt()) | |
187 | local prt13=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part13",vt()) | |
188 | local prt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part14",vt()) | |
189 | local prt15=part(3,modelzorz,0,0,TorsoColor,"Part15",vt()) | |
190 | local prt16=part(3,modelzorz,0,0,TorsoColor,"Part16",vt()) | |
191 | local prt17=part(3,modelzorz,0,0,TorsoColor,"Part17",vt()) | |
192 | local prt18=part(3,modelzorz,0,0,TorsoColor,"Part18",vt()) | |
193 | local prt19=part(3,modelzorz,0,0,TorsoColor,"Part19",vt()) | |
194 | local prt20=part(3,modelzorz,0,0,TorsoColor,"Part20",vt()) | |
195 | local prt21=part(3,modelzorz,0,0,TorsoColor,"Part21",vt()) | |
196 | local prt22=part(3,modelzorz,0,0,BrickColor.new("White"),"Part22",vt()) | |
197 | local prt23=part(3,modelzorz,0,0,BrickColor.new("White"),"Part23",vt()) | |
198 | local prt24=part(3,modelzorz,0,0,TorsoColor,"Part24",vt()) | |
199 | local prt25=part(3,modelzorz,0,0,TorsoColor,"Part25",vt()) | |
200 | ||
201 | local hmsh=mesh("BlockMesh",handle,"","",vt(0,0,0),vt(1,1,5)) | |
202 | local hmsh2=mesh("BlockMesh",hprt2,"","",vt(0,0,0),vt(1,1,2)) | |
203 | local hmsh3=mesh("BlockMesh",hprt3,"","",vt(0,0,0),vt(1,1,2)) | |
204 | local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(2,30,12)) | |
205 | local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(5,1.99,5)) | |
206 | local msh3=mesh("SpecialMesh",prt3,"Wedge","",vt(0,0,0),vt(2,3,2.3)) | |
207 | local msh4=mesh("SpecialMesh",prt4,"Wedge","",vt(0,0,0),vt(2.1,1.5,1.15)) | |
208 | local msh5=mesh("CylinderMesh",prt5,"","",vt(0,0,0),vt(5,1.99,5)) | |
209 | local msh6=mesh("SpecialMesh",prt6,"Wedge","",vt(0,0,0),vt(2,3,2.3)) | |
210 | local msh7=mesh("SpecialMesh",prt7,"Wedge","",vt(0,0,0),vt(2.1,1.5,1.15)) | |
211 | local msh8=mesh("SpecialMesh",prt8,"Torso","",vt(0,0,0),vt(6,1,1.98)) | |
212 | local msh9=mesh("SpecialMesh",prt9,"Torso","",vt(0,0,0),vt(6,1,1.98)) | |
213 | local msh10=mesh("SpecialMesh",prt10,"Wedge","",vt(0,0,0),vt(2,1,8)) | |
214 | local msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(2,1,8)) | |
215 | local msh12=mesh("SpecialMesh",prt12,"Torso","",vt(0,0,0),vt(10,3,2.05)) | |
216 | local msh13=mesh("SpecialMesh",prt13,"Torso","",vt(0,0,0),vt(10,3,2.05)) | |
217 | local msh14=mesh("BlockMesh",prt14,"","",vt(0,0,0),vt(10,10,2.05)) | |
218 | local msh15=mesh("SpecialMesh",prt15,"Torso","",vt(0,0,0),vt(8,2,2.1)) | |
219 | local msh16=mesh("SpecialMesh",prt16,"Torso","",vt(0,0,0),vt(8,2,2.1)) | |
220 | local msh17=mesh("BlockMesh",prt17,"","",vt(0,0,0),vt(8,.5,2.1)) | |
221 | local msh18=mesh("BlockMesh",prt18,"","",vt(0,0,0),vt(8,.5,2.1)) | |
222 | local msh19=mesh("BlockMesh",prt19,"","",vt(0,0,0),vt(2.1,5,6)) | |
223 | local msh20=mesh("SpecialMesh",prt20,"Wedge","",vt(0,0,0),vt(2.1,3,2)) | |
224 | local msh21=mesh("SpecialMesh",prt21,"Wedge","",vt(0,0,0),vt(2.1,3,2)) | |
225 | local msh22=mesh("SpecialMesh",prt22,"Sphere","",vt(0,0,0),vt(1,6,5)) | |
226 | local msh23=mesh("SpecialMesh",prt23,"Sphere","",vt(0,0,0),vt(1,8,5)) | |
227 | local msh24=mesh("BlockMesh",prt24,"","",vt(0,0,0),vt(2.1,16,5)) | |
228 | local msh25=mesh("SpecialMesh",prt25,"Torso","",vt(0,0,0),vt(5,5,2.1)) | |
229 | ||
230 | local hwld=weld(handle,handle,Torso,euler(1,1.57,0)*cf(-1,-1,-1)) | |
231 | --local hwld=weld(handle,handle,RightArm,euler(0,0,0)*cf(0,1,0)) | |
232 | --local hwld=weld(handle,handle,Torso,euler(0,0,-1.57)*cf(1,2.5,0)) | |
233 | local hwld2=weld(hprt2,hprt2,handle,euler(0,1.57,0)*cf(.2,0,.4)) | |
234 | local hwld3=weld(hprt3,hprt3,handle,euler(0,1.57,0)*cf(.2,0,-.4)) | |
235 | local wld1=weld(prt1,prt1,handle,euler(0,0,0)*cf(.5,1,0)) | |
236 | local wld2=weld(prt2,prt2,prt1,euler(0,0,1.57)*cf(0,-2.5,1.2)) | |
237 | local wld3=weld(prt3,prt3,prt2,euler(0,0,1.57)*cf(-.5,0,.23)) | |
238 | local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,0,-0.1)) | |
239 | local wld5=weld(prt5,prt5,prt1,euler(0,0,1.57)*cf(0,-2.5,-1.2)) | |
240 | local wld6=weld(prt6,prt6,prt5,euler(0,3.14,1.57)*cf(-.5,0,-.23)) | |
241 | local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(0,0,-0.1)) | |
242 | local wld8=weld(prt8,prt8,prt1,euler(1.57,0,1.57)*cf(0,-1.4,1.3)) | |
243 | local wld9=weld(prt9,prt9,prt1,euler(-1.57,0,1.57)*cf(0,-1.4,-1.3)) | |
244 | local wld10=weld(prt10,prt10,prt1,euler(1.57,0,0)*cf(0,-.1,1.3)) | |
245 | local wld11=weld(prt11,prt11,prt1,euler(1.57,3.14,0)*cf(0,-.1,-1.3)) | |
246 | local wld12=weld(prt12,prt12,prt1,euler(1.57,0,1.57)*cf(0,3,1.3)) | |
247 | local wld13=weld(prt13,prt13,prt1,euler(-1.57,0,1.57)*cf(0,3,-1.3)) | |
248 | local wld14=weld(prt14,prt14,prt1,euler(1.57,0,1.57)*cf(0,3,0)) | |
249 | local wld15=weld(prt15,prt15,prt12,euler(0,0,0)*cf(0,.2,0)) | |
250 | local wld16=weld(prt16,prt16,prt13,euler(0,0,0)*cf(0,.2,0)) | |
251 | local wld17=weld(prt17,prt17,prt12,euler(0,0,0)*cf(0,.6,0)) | |
252 | local wld18=weld(prt18,prt18,prt13,euler(0,0,0)*cf(0,.6,0)) | |
253 | local wld19=weld(prt19,prt19,prt1,euler(0,0,0)*cf(0,-2,0)) | |
254 | local wld20=weld(prt20,prt20,prt1,euler(3.14,0,0)*cf(0,-1.2,.4)) | |
255 | local wld21=weld(prt21,prt21,prt1,euler(0,0,3.14)*cf(0,-1.2,-.4)) | |
256 | local wld22=weld(prt22,prt22,prt1,euler(0,0,0)*cf(.2,-.5,0)) | |
257 | local wld23=weld(prt23,prt23,prt1,euler(0,0,0)*cf(.2,1.7,0)) | |
258 | local wld24=weld(prt24,prt24,prt1,euler(0,0,0)*cf(0,2.39,0)) | |
259 | local wld25=weld(prt25,prt25,prt1,euler(0,1.57,0)*cf(0,.29,0)) | |
260 | ||
261 | local bprt1=part(3,modelzorz,0,1,TorsoColor,"Boomerang1",vt()) | |
262 | local bmsh1=mesh("CylinderMesh",bprt1,"","",vt(0,0,0),vt(40,1,40)) | |
263 | local bwld1=weld(bprt1,bprt1,prt1,euler(0,0,1.57)*cf(0,.5,0)) | |
264 | eul=0 | |
265 | for i=1,4 do | |
266 | local bprt2=part(3,modelzorz,0,1,TorsoColor,"Boomerang2",vt()) | |
267 | local bmsh2=mesh("BlockMesh",bprt2,"","",vt(0,0,0),vt(45,1,10)) | |
268 | local bwld2=weld(bprt2,bprt2,bprt1,euler(0,eul,0)*cf(0,0,0)) | |
269 | eul=eul+0.785 | |
270 | end | |
271 | ||
272 | local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1)) | |
273 | hitbox.Anchored=false | |
274 | ||
275 | if (script.Parent.className~="HopperBin") then | |
276 | Tool=Instance.new("HopperBin") | |
277 | Tool.Parent=Backpack | |
278 | Tool.Name="Aero Board" | |
279 | script.Parent=Tool | |
280 | end | |
281 | Bin=script.Parent | |
282 | ||
283 | local bodvel=Instance.new("BodyVelocity") | |
284 | local bg=Instance.new("BodyGyro") | |
285 | ||
286 | so = function(id,par,vol,pit) | |
287 | coroutine.resume(coroutine.create(function() | |
288 | local sou = Instance.new("Sound",par or workspace) | |
289 | sou.Volume=vol | |
290 | sou.Pitch=pit or 1 | |
291 | sou.SoundId=id | |
292 | swait() | |
293 | sou:play() | |
294 | game:GetService("Debris"):AddItem(sou,6) | |
295 | end)) | |
296 | end | |
297 | ||
298 | function clerp(a,b,t) | |
299 | local qa = {QuaternionFromCFrame(a)} | |
300 | local qb = {QuaternionFromCFrame(b)} | |
301 | local ax, ay, az = a.x, a.y, a.z | |
302 | local bx, by, bz = b.x, b.y, b.z | |
303 | local _t = 1-t | |
304 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
305 | end | |
306 | ||
307 | function QuaternionFromCFrame(cf) | |
308 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
309 | local trace = m00 + m11 + m22 | |
310 | if trace > 0 then | |
311 | local s = math.sqrt(1 + trace) | |
312 | local recip = 0.5/s | |
313 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
314 | else | |
315 | local i = 0 | |
316 | if m11 > m00 then | |
317 | i = 1 | |
318 | end | |
319 | if m22 > (i == 0 and m00 or m11) then | |
320 | i = 2 | |
321 | end | |
322 | if i == 0 then | |
323 | local s = math.sqrt(m00-m11-m22+1) | |
324 | local recip = 0.5/s | |
325 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
326 | elseif i == 1 then | |
327 | local s = math.sqrt(m11-m22-m00+1) | |
328 | local recip = 0.5/s | |
329 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
330 | elseif i == 2 then | |
331 | local s = math.sqrt(m22-m00-m11+1) | |
332 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
333 | end | |
334 | end | |
335 | end | |
336 | ||
337 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
338 | local xs, ys, zs = x + x, y + y, z + z | |
339 | local wx, wy, wz = w*xs, w*ys, w*zs | |
340 | local xx = x*xs | |
341 | local xy = x*ys | |
342 | local xz = x*zs | |
343 | local yy = y*ys | |
344 | local yz = y*zs | |
345 | local zz = z*zs | |
346 | 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)) | |
347 | end | |
348 | ||
349 | function QuaternionSlerp(a, b, t) | |
350 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
351 | local startInterp, finishInterp; | |
352 | if cosTheta >= 0.0001 then | |
353 | if (1 - cosTheta) > 0.0001 then | |
354 | local theta = math.acos(cosTheta) | |
355 | local invSinTheta = 1/math.sin(theta) | |
356 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
357 | finishInterp = math.sin(t*theta)*invSinTheta | |
358 | else | |
359 | startInterp = 1-t | |
360 | finishInterp = t | |
361 | end | |
362 | else | |
363 | if (1+cosTheta) > 0.0001 then | |
364 | local theta = math.acos(-cosTheta) | |
365 | local invSinTheta = 1/math.sin(theta) | |
366 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
367 | finishInterp = math.sin(t*theta)*invSinTheta | |
368 | else | |
369 | startInterp = t-1 | |
370 | finishInterp = t | |
371 | end | |
372 | end | |
373 | 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 | |
374 | end | |
375 | ||
376 | function hideanim() | |
377 | equipped=false | |
378 | for i=0,1,0.1 do | |
379 | swait() | |
380 | hwld.C0=clerp(hwld.C0,euler(1.57,-1.57,3.5)*cf(.6,.4,1),.3) | |
381 | Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.8),.3) | |
382 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3) | |
383 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.3,0,-0.1),.3) | |
384 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
385 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.3) | |
386 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
387 | end | |
388 | hwld.Part1=Torso | |
389 | hwld.C0=euler(1,1.57,0)*cf(-1,-1,-1) | |
390 | for i=0,1,0.1 do | |
391 | swait() | |
392 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4) | |
393 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4) | |
394 | Torso.Neck.C1=clerp(Torso.Neck.C1,necko2*euler(0,0,0),.4) | |
395 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4) | |
396 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.4) | |
397 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4) | |
398 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4) | |
399 | RH.C0=clerp(RH.C0,RHC0,.3) | |
400 | RH.C1=clerp(RH.C1,RHC1,.3) | |
401 | LH.C0=clerp(LH.C0,LHC0,.3) | |
402 | LH.C1=clerp(LH.C1,LHC1,.3) | |
403 | end | |
404 | end | |
405 | ||
406 | function equipanim() | |
407 | equipped=true | |
408 | for i=0,1,0.1 do | |
409 | swait() | |
410 | Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.8),.3) | |
411 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3) | |
412 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.3,0,-0.1),.3) | |
413 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
414 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.3) | |
415 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
416 | end | |
417 | hwld.Part1=RightArm | |
418 | hwld.C0=euler(1.57,-1.57,3.5)*cf(.6,.4,1) | |
419 | so("http://roblox.com/asset/?id=161006212",prt1,1,.6) | |
420 | for i=0,1,0.1 do | |
421 | swait() | |
422 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
423 | Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-.3),.3) | |
424 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.3),.3) | |
425 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.3,0,-.3),.3) | |
426 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
427 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.3) | |
428 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
429 | end | |
430 | end | |
431 | ||
432 | function attackone() | |
433 | attack=true | |
434 | so("http://roblox.com/asset/?id=2101137",prt1,1,1.4) | |
435 | for i=0,1,0.1 do | |
436 | swait() | |
437 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
438 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,.8),.3) | |
439 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.8),.3) | |
440 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(2,0,.5),.3) | |
441 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
442 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-.8),.3) | |
443 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
444 | end | |
445 | Torso.Velocity=RootPart.CFrame.lookVector*100 | |
446 | so("http://roblox.com/asset/?id=161006195",prt1,1,.6) | |
447 | so("http://roblox.com/asset/?id=2248511",prt1,1,1.4) | |
448 | MagicCircle(TorsoColor,prt1.CFrame,1,1,1,5,5,5,.05) | |
449 | hitbox.Parent=modelzorz | |
450 | hitbox.Size=vt(2,7,4) | |
451 | hitbox.Transparency=1 | |
452 | hitbox.CFrame=prt1.CFrame | |
453 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(1,5),"Normal",RootPart,.5,1) end) | |
454 | num=0 | |
455 | for i=0,1,0.1 do | |
456 | swait() | |
457 | hitbox.CFrame=prt1.CFrame | |
458 | if num>=3 then | |
459 | MagicWave(TorsoColor,prt1.CFrame*cf(0,1,0)*euler(3.14,0,0),1,1,1,.5,1,.5,.1) | |
460 | num=0 | |
461 | end | |
462 | num=num+1 | |
463 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.2)*euler(.2,0,0),.3) | |
464 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3) | |
465 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1,0,.5),.3) | |
466 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
467 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.8),.3) | |
468 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
469 | RH.C0=clerp(RH.C0,cf(.5,-1,1)*euler(0,1.57,0)*euler(0,-1.2,0),.3) | |
470 | LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(0,-1.2,0),.3) | |
471 | end | |
472 | con1:disconnect() | |
473 | hitbox.Parent=nil | |
474 | swait(10) | |
475 | attack=false | |
476 | end | |
477 | ||
478 | function attacktwo() | |
479 | attack=true | |
480 | so("http://roblox.com/asset/?id=147722227",prt1,1,.6) | |
481 | for i=0,1,0.1 do | |
482 | swait() | |
483 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.2)*euler(.2,0,0),.3) | |
484 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3) | |
485 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,-.8)*euler(0,1.57,0),.3) | |
486 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
487 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.3) | |
488 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
489 | end | |
490 | so("http://www.roblox.com/asset/?id=153092348",prt1,1,1.2) | |
491 | Torso.Velocity=RootPart.CFrame.lookVector*50 | |
492 | hitbox.Parent=modelzorz | |
493 | hitbox.Size=vt(2,7,4) | |
494 | hitbox.Transparency=1 | |
495 | hitbox.CFrame=prt1.CFrame | |
496 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(1,5),"Normal",RootPart,1,1) end) | |
497 | for i=0,1,0.1 do | |
498 | swait() | |
499 | Torso.Velocity=RootPart.CFrame.lookVector*50 | |
500 | MagicCircle(TorsoColor,prt1.CFrame*cf(0,3,0),1,1,1,5,5,5,.1) | |
501 | hitbox.CFrame=prt1.CFrame | |
502 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3) | |
503 | --RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.8),.3) | |
504 | RootJoint.C0=RootCF*euler(0,0,1.2-6.28*i) | |
505 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1)*euler(0,1.57,0),.3) | |
506 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
507 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1),.3) | |
508 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
509 | end | |
510 | for i=0,1,0.1 do | |
511 | swait() | |
512 | hitbox.CFrame=prt1.CFrame | |
513 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1),.3) | |
514 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3) | |
515 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,1)*euler(0,1.57,0),.3) | |
516 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
517 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-1),.3) | |
518 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
519 | end | |
520 | con1:disconnect() | |
521 | hitbox.Parent=nil | |
522 | swait(5) | |
523 | attack=false | |
524 | end | |
525 | ||
526 | function attackthree() | |
527 | attack=true | |
528 | so("http://roblox.com/asset/?id=147722227",prt1,1,.6) | |
529 | for i=0,1,0.1 do | |
530 | swait() | |
531 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
532 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(.2,0,0),.3) | |
533 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3) | |
534 | RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.57,0,-.6),.3) | |
535 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
536 | LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.57,0,.8),.3) | |
537 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
538 | RH.C0=clerp(RH.C0,cf(.5,-1,.5)*euler(0,1.57,0)*euler(0,-1,0),.3) | |
539 | LH.C0=clerp(LH.C0,cf(-.5,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,0),.3) | |
540 | end | |
541 | so("http://roblox.com/asset/?id=161006212",prt1,1,.5) | |
542 | vel=Instance.new("BodyVelocity") | |
543 | vel.Parent=RootPart | |
544 | vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*2 | |
545 | vel.velocity=RootPart.CFrame.lookVector*70 | |
546 | gairo=Instance.new("BodyGyro") | |
547 | gairo.Parent=RootPart | |
548 | gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge | |
549 | gairo.P=20e+003 | |
550 | gairo.cframe=RootPart.CFrame | |
551 | hitbox.Parent=modelzorz | |
552 | hitbox.Size=vt(2,7,4) | |
553 | hitbox.Transparency=1 | |
554 | hitbox.CFrame=prt1.CFrame | |
555 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(30,40),"Knockdown2",RootPart,.5,2) end) | |
556 | num=0 | |
557 | for i=0,2,0.1 do | |
558 | swait() | |
559 | hitbox.CFrame=prt1.CFrame | |
560 | if num>=3 then | |
561 | MagicWave(TorsoColor,prt1.CFrame*euler(0,0,-1.57),1,1,1,.8,.7,.8,.1) | |
562 | num=0 | |
563 | end | |
564 | num=num+1 | |
565 | end | |
566 | vel.Parent=nil | |
567 | gairo.Parent=nil | |
568 | con1:disconnect() | |
569 | hitbox.Parent=nil | |
570 | swait(10) | |
571 | attack=false | |
572 | end | |
573 | ||
574 | function OverDrive() | |
575 | attack=true | |
576 | for i=0,1,0.1 do | |
577 | swait() | |
578 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
579 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.6)*euler(.2,0,-.5),.3) | |
580 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,.5),.4) | |
581 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,.6)*euler(0,1,0),.4) | |
582 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.4) | |
583 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.8),.4) | |
584 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4) | |
585 | RH.C0=clerp(RH.C0,cf(1,-1,-.2)*euler(0,1.57,0)*euler(-.1,.5,-.6),.3) | |
586 | LH.C0=clerp(LH.C0,cf(-1.1,-.4,-.1)*euler(0,-1.57,0)*euler(.1,.5,-.2),.3) | |
587 | end | |
588 | Humanoid.WalkSpeed=5 | |
589 | for i=1,2 do | |
590 | so("http://roblox.com/asset/?id=2101137",RootPart,1,1.2) | |
591 | num=0 | |
592 | for i=0,4,0.1 do | |
593 | swait() | |
594 | hit,pos=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,50,Character) | |
595 | if hit~=nil then | |
596 | if num>=10 then | |
597 | MagicWave(TorsoColor,cf(pos),1,1,1,.6,.2,.6,.05) | |
598 | num=0 | |
599 | end | |
600 | num=num+1 | |
601 | end | |
602 | end | |
603 | MagicBlock(TorsoColor,cf(prt1.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,6,6,6,.1,2) | |
604 | so("http://roblox.com/asset/?id=2248511",prt1,1,2) | |
605 | mana=mana-5 | |
606 | end | |
607 | swait(5) | |
608 | so("http://roblox.com/asset/?id=161006093",prt1,1,1) | |
609 | so("http://roblox.com/asset/?id=169380505",prt1,1,1) | |
610 | vel=Instance.new("BodyVelocity") | |
611 | vel.Parent=RootPart | |
612 | vel.maxForce=Vector3.new(4e+005,4e+005,4e+005)*2 | |
613 | vel.velocity=RootPart.CFrame.lookVector*50 | |
614 | hitbox.Parent=modelzorz | |
615 | hitbox.Size=vt(2,7,4) | |
616 | hitbox.Transparency=1 | |
617 | hitbox.CFrame=prt1.CFrame | |
618 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(1,5),"OrbBlast",RootPart,1,1,1) end) | |
619 | for i=0,1,0.1 do | |
620 | swait() | |
621 | if num>=5 then | |
622 | MagicWave(TorsoColor,prt1.CFrame*cf(0,1,0)*euler(3.14,0,0),1,1,1,.5,1,.5,.1) | |
623 | num=0 | |
624 | end | |
625 | num=num+1 | |
626 | hitbox.CFrame=prt1.CFrame | |
627 | vel.velocity=RootPart.CFrame.lookVector*50 | |
628 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.2)*euler(.2,0,0),.3) | |
629 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3) | |
630 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.2),.3) | |
631 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
632 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.8),.3) | |
633 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
634 | RH.C0=clerp(RH.C0,cf(.5,-1,1)*euler(0,1.57,0)*euler(0,-1.2,0),.3) | |
635 | LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(0,-1.2,0),.3) | |
636 | end | |
637 | for i=1,7,0.1 do | |
638 | swait() | |
639 | hitbox.CFrame=prt1.CFrame | |
640 | if num>=5 then | |
641 | MagicWave(TorsoColor,prt1.CFrame*cf(0,1,0)*euler(3.14,0,0),1,1,1,.5,1,.5,.1) | |
642 | num=0 | |
643 | end | |
644 | num=num+1 | |
645 | vel.velocity=RootPart.CFrame.lookVector*50 | |
646 | end | |
647 | con1:disconnect() | |
648 | hitbox.Parent=nil | |
649 | Humanoid.WalkSpeed=0 | |
650 | for i=0,1,0.02 do | |
651 | swait() | |
652 | vel.velocity=RootPart.CFrame.lookVector*(50-50*i) | |
653 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.6)*euler(.2,0,.5),.2) | |
654 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-.5)*euler(.2,0,0),.2) | |
655 | RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1,0,-.4)*euler(0,.5,0),.2) | |
656 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
657 | LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(.5,0,.8),.2) | |
658 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
659 | RH.C0=clerp(RH.C0,cf(1.1,-.4,-.1)*euler(0,1.57,0)*euler(-.1,-.5,.2),.2) | |
660 | LH.C0=clerp(LH.C0,cf(-1,-.8,-.2)*euler(0,-1.57,0)*euler(-.1,-.5,.4),.2) | |
661 | end | |
662 | vel.Parent=nil | |
663 | Humanoid.WalkSpeed=16 | |
664 | attack=false | |
665 | end | |
666 | ||
667 | function Boomerang() | |
668 | attack=true | |
669 | mana=mana-20 | |
670 | Humanoid.WalkSpeed=5 | |
671 | so("http://roblox.com/asset/?id=10209296",prt1,1,1.2) | |
672 | so("http://roblox.com/asset/?id=2101144",prt1,1,1) | |
673 | for _,c in pairs(modelzorz:children()) do | |
674 | if c.Name=="Boomerang1" or c.Name=="Boomerang2" then | |
675 | coroutine.resume(coroutine.create(function(Part) | |
676 | for i=1,.2,-0.1 do | |
677 | swait() | |
678 | Part.Transparency=i | |
679 | end | |
680 | end),c) | |
681 | end | |
682 | end | |
683 | for i=0,1,0.1 do | |
684 | swait() | |
685 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
686 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.6)*euler(.2,0,-.5),.3) | |
687 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,.5),.3) | |
688 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,1)*euler(0,1.5,0),.3) | |
689 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
690 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.6),.3) | |
691 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
692 | RH.C0=clerp(RH.C0,cf(1,-1,-.2)*euler(0,1.57,0)*euler(-.1,.5,-.6),.3) | |
693 | LH.C0=clerp(LH.C0,cf(-1.1,-.4,-.1)*euler(0,-1.57,0)*euler(.1,.5,-.2),.3) | |
694 | end | |
695 | hitbox.Parent=modelzorz | |
696 | hitbox.Size=vt(1,10,10) | |
697 | hitbox.Transparency=1 | |
698 | hitbox.CFrame=prt1.CFrame | |
699 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(30,40),"Knockdown2",prt1,.5,2) end) | |
700 | so("http://roblox.com/asset/?id=10209640",prt1,1,.6) | |
701 | for i=0,1,0.03 do | |
702 | so("rbxasset://sounds\\swordslash.wav",prt1,1,1.5) | |
703 | swait() | |
704 | hitbox.CFrame=prt1.CFrame | |
705 | --hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
706 | hwld.C0=euler(3.14+6.28*i,3.14,0)*cf(0,1+40*i,0) | |
707 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,1),.3) | |
708 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-1),.3) | |
709 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1)*euler(0,1.5,0),.3) | |
710 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
711 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.6),.3) | |
712 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
713 | RH.C0=clerp(RH.C0,cf(.5,-1,.5)*euler(0,1.57,0)*euler(0,-1,0),.3) | |
714 | LH.C0=clerp(LH.C0,cf(-.5,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,0),.3) | |
715 | end | |
716 | for i=0,1,0.03 do | |
717 | so("rbxasset://sounds\\swordslash.wav",prt1,1,1.5) | |
718 | swait() | |
719 | hitbox.CFrame=prt1.CFrame | |
720 | hwld.C0=euler(3.14+6.28+6.28*i,3.14,0)*cf(0,1+40-40*i,0) | |
721 | end | |
722 | con1:disconnect() | |
723 | hitbox.Parent=nil | |
724 | for _,c in pairs(modelzorz:children()) do | |
725 | if c.Name=="Boomerang1" or c.Name=="Boomerang2" then | |
726 | coroutine.resume(coroutine.create(function(Part) | |
727 | for i=.2,1,0.1 do | |
728 | swait() | |
729 | Part.Transparency=i | |
730 | end | |
731 | end),c) | |
732 | end | |
733 | end | |
734 | for i=0,1,0.05 do | |
735 | swait() | |
736 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.2) | |
737 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,-1),.2) | |
738 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1)*euler(.2,0,0),.2) | |
739 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,1)*euler(0,.5,0),.2) | |
740 | RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
741 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1),.2) | |
742 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
743 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3) | |
744 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3) | |
745 | end | |
746 | swait(10) | |
747 | Humanoid.WalkSpeed=16 | |
748 | attack=false | |
749 | end | |
750 | ||
751 | function EnergyBlades() | |
752 | attack=true | |
753 | for i=0,1,0.1 do | |
754 | swait() | |
755 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
756 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1),.3) | |
757 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3) | |
758 | RW.C0=clerp(RW.C0,cf(1.3,1,-.2)*euler(3.14,0,-.3)*euler(0,-.5,0),.3) | |
759 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
760 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.3) | |
761 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
762 | end | |
763 | Humanoid.WalkSpeed=0 | |
764 | for i=0,1,0.15 do | |
765 | swait() | |
766 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
767 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1),.3) | |
768 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3) | |
769 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.14,0,0)*euler(0,-.5,0),.3) | |
770 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
771 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.5),.3) | |
772 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
773 | end | |
774 | MagicCircle(TorsoColor,prt1.CFrame*cf(0,-4.5,0),1,1,1,5,.5,5,.05) | |
775 | so("http://roblox.com/asset/?id=169445602",prt1,1,.8) | |
776 | mana=mana-20 | |
777 | for i=100,300,50 do | |
778 | local sord=part(3,modelzorz,0,0.5,TorsoColor,"Sord",vt(1,1,5)) | |
779 | local smsh=mesh("SpecialMesh",sord,"FileMesh","rbxasset://fonts/sword.mesh",vt(0,0,0),vt(1,1,1)) | |
780 | sord.Anchored=true | |
781 | newCF=cf(math.random(-600,600)/100,math.random(500,1000)/100,math.random(-600,600)/100) | |
782 | sord.CFrame=cf(RootPart.Position)*newCF | |
783 | sord.CFrame=cf(sord.Position,MMouse.Hit.p)*euler(3.14,0,0) | |
784 | MagicCircle(TorsoColor,sord.CFrame,5,5,10,1,1,3,.05) | |
785 | so("http://roblox.com/asset/?id=2101144",sord,.6,.7) | |
786 | game:GetService("Debris"):AddItem(sord,10) | |
787 | local hitt=false | |
788 | con=sord.Touched:connect(function(hit) | |
789 | if hitt==true then return end | |
790 | hitt=true | |
791 | --if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
792 | if hit.Name~="Sord" then | |
793 | sord.Parent=nil | |
794 | print("hit") | |
795 | local ref=part(3,workspace,0,1,hit.BrickColor,"Effect",vt()) | |
796 | ref.Anchored=true | |
797 | ref.CFrame=cf(sord.Position) | |
798 | so("http://roblox.com/asset/?id=161006093",ref,1,1) | |
799 | so("http://roblox.com/asset/?id=10209303",ref,1,1) | |
800 | MagicCircle(TorsoColor,cf(ref.Position),1,1,1,2,2,2,.01) | |
801 | for i=0,10 do | |
802 | MagicBlock(TorsoColor,cf(ref.Position),1,1,1,1,1,1,.05,3) | |
803 | end | |
804 | game:GetService("Debris"):AddItem(ref,1) | |
805 | MagniDamage(ref,15,10,20,math.random(10,30),"Knockdown2") | |
806 | end | |
807 | debounce=Instance.new("BoolValue") | |
808 | debounce.Name="DebounceHit" | |
809 | debounce.Parent=hit.Parent | |
810 | debounce.Value=true | |
811 | game:GetService("Debris"):AddItem(debounce,.5) | |
812 | end) | |
813 | coroutine.resume(coroutine.create(function(Part,Cframe,numb) | |
814 | while Part.Parent~=nil do | |
815 | swait() | |
816 | numb=numb-1 | |
817 | if numb<=0 then | |
818 | Part.CFrame=Part.CFrame*cf(0,0,2) | |
819 | local prt=Part:clone() | |
820 | prt.Size=vt() | |
821 | prt.Parent=workspace | |
822 | prt.CFrame=Part.CFrame | |
823 | table.insert(Effects,{prt,"Disappear",.1}) | |
824 | else | |
825 | Part.CFrame=cf(RootPart.Position)*Cframe | |
826 | Part.CFrame=cf(Part.Position,MMouse.Hit.p)*euler(3.14,0,0) | |
827 | end | |
828 | end | |
829 | end),sord,newCF,i) | |
830 | end | |
831 | ||
832 | swait(100) | |
833 | Humanoid.WalkSpeed=16 | |
834 | attack=false | |
835 | end | |
836 | ||
837 | function MagniDamage(Part,magni,mindam,maxdam,knock,Type) | |
838 | for _,c in pairs(workspace:children()) do | |
839 | local hum=c:findFirstChild("Humanoid") | |
840 | if hum~=nil then | |
841 | local head=c:findFirstChild("Torso") | |
842 | if head~=nil then | |
843 | local targ=head.Position-Part.Position | |
844 | local mag=targ.magnitude | |
845 | if mag<=magni and c.Name~=Player.Name then | |
846 | Damagefunc(head,mindam,maxdam,knock,Type,Part,.2,1,3,1) | |
847 | end | |
848 | end | |
849 | end | |
850 | end | |
851 | end | |
852 | ||
853 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
854 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
855 | end | |
856 | ||
857 | local Point=Torso.CFrame*cf(0,Torso.Size.Y,0) | |
858 | LastPoint=Point | |
859 | function effect(Color,Ref,LP,P1,returnn) | |
860 | local effectsmsh=Instance.new("CylinderMesh") | |
861 | effectsmsh.Scale=Vector3.new(0.2,1,0.2) | |
862 | effectsmsh.Name="Mesh" | |
863 | local effectsg=Instance.new("Part") | |
864 | effectsg.formFactor=3 | |
865 | effectsg.CanCollide=false | |
866 | effectsg.Name="Eff" | |
867 | effectsg.Locked=true | |
868 | effectsg.Anchored=true | |
869 | effectsg.Size=Vector3.new(0.5,1,0.5) | |
870 | effectsg.Parent=workspace | |
871 | effectsmsh.Parent=effectsg | |
872 | effectsg.BrickColor=Color1 | |
873 | effectsg.Reflectance=Ref | |
874 | local point1=P1 | |
875 | local mg=(LP.p - point1.p).magnitude | |
876 | effectsg.Size=Vector3.new(0.5,mg,0.5) | |
877 | effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0) | |
878 | effectsmsh.Scale=Vector3.new(0.4,1,0.4) | |
879 | game:GetService("Debris"):AddItem(effectsg,2) | |
880 | if returnn then return effectsg end | |
881 | if not returnn then | |
882 | table.insert(Effects,{effectsg,"Cylinder",0.05,0.01,0,0.01,effectsmsh}) | |
883 | end | |
884 | end | |
885 | ||
886 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type) | |
887 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt()) | |
888 | prt.Anchored=true | |
889 | prt.CFrame=cframe | |
890 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
891 | game:GetService("Debris"):AddItem(prt,5) | |
892 | if Type==1 or Type==nil then | |
893 | table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh}) | |
894 | elseif Type==2 then | |
895 | table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh}) | |
896 | elseif Type==3 then | |
897 | table.insert(Effects,{prt,"Block3",delay,x3,y3,z3,msh,vt(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)}) | |
898 | end | |
899 | end | |
900 | ||
901 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
902 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt()) | |
903 | prt.Anchored=true | |
904 | prt.CFrame=cframe | |
905 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
906 | game:GetService("Debris"):AddItem(prt,2) | |
907 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh}) | |
908 | end | |
909 | ||
910 | function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
911 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt()) | |
912 | prt.Anchored=true | |
913 | prt.CFrame=cframe | |
914 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
915 | game:GetService("Debris"):AddItem(prt,5) | |
916 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh}) | |
917 | end | |
918 | ||
919 | function Lightning(p0,p1,tym,ofs,col,th,tra,last) | |
920 | --[[p0=pos1 | |
921 | p1=pos2 | |
922 | tym=times | |
923 | ofs=offset | |
924 | col=color | |
925 | th=size | |
926 | tra=transparency | |
927 | last=lastingtime]] | |
928 | local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs} | |
929 | for i=1,tym do | |
930 | local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col) | |
931 | li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
932 | local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz | |
933 | if tym == i then | |
934 | local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2) | |
935 | li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2) | |
936 | else | |
937 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2) | |
938 | end | |
939 | curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last) | |
940 | end | |
941 | end | |
942 | ||
943 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
944 | if hit.Parent==nil then | |
945 | return | |
946 | end | |
947 | h=hit.Parent:FindFirstChild("Humanoid") | |
948 | for _,v in pairs(hit.Parent:children()) do | |
949 | if v:IsA("Humanoid") then | |
950 | h=v | |
951 | end | |
952 | end | |
953 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
954 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
955 | end | |
956 | if hit.Parent.className=="Hat" then | |
957 | hit=hit.Parent.Parent:findFirstChild("Head") | |
958 | end | |
959 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
960 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
961 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
962 | return | |
963 | end]] | |
964 | -- hs(hit,1.2) | |
965 | c=Instance.new("ObjectValue") | |
966 | c.Name="creator" | |
967 | c.Value=game:service("Players").LocalPlayer | |
968 | c.Parent=h | |
969 | game:GetService("Debris"):AddItem(c,.5) | |
970 | Damage=math.random(minim,maxim) | |
971 | -- h:TakeDamage(Damage) | |
972 | blocked=false | |
973 | block=hit.Parent:findFirstChild("Block") | |
974 | if block~=nil then | |
975 | print(block.className) | |
976 | if block.className=="NumberValue" then | |
977 | if block.Value>0 then | |
978 | blocked=true | |
979 | if decreaseblock~=nil then | |
980 | block.Value=block.Value-decreaseblock | |
981 | end | |
982 | end | |
983 | end | |
984 | if block.className=="IntValue" then | |
985 | if block.Value>0 then | |
986 | blocked=true | |
987 | if decreaseblock~=nil then | |
988 | block.Value=block.Value-decreaseblock | |
989 | end | |
990 | end | |
991 | end | |
992 | end | |
993 | if blocked==false then | |
994 | -- h:TakeDamage(Damage) | |
995 | h.Health=h.Health-Damage | |
996 | showDamage(hit.Parent,Damage,.5,BrickColor:Red()) | |
997 | else | |
998 | h.Health=h.Health-(Damage/2) | |
999 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
1000 | end | |
1001 | if Type=="Knockdown" then | |
1002 | hum=hit.Parent.Humanoid | |
1003 | hum.PlatformStand=true | |
1004 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1005 | swait(1) | |
1006 | HHumanoid.PlatformStand=false | |
1007 | end),hum) | |
1008 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
1009 | --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
1010 | local bodvol=Instance.new("BodyVelocity") | |
1011 | bodvol.velocity=angle*knockback | |
1012 | bodvol.P=5000 | |
1013 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1014 | bodvol.Parent=hit | |
1015 | rl=Instance.new("BodyAngularVelocity") | |
1016 | rl.P=3000 | |
1017 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1018 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
1019 | rl.Parent=hit | |
1020 | game:GetService("Debris"):AddItem(bodvol,.5) | |
1021 | game:GetService("Debris"):AddItem(rl,.5) | |
1022 | elseif Type=="Knockdown2" then | |
1023 | hum=hit.Parent.Humanoid | |
1024 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
1025 | --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
1026 | local bodvol=Instance.new("BodyVelocity") | |
1027 | bodvol.velocity=angle*knockback | |
1028 | bodvol.P=5000 | |
1029 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1030 | bodvol.Parent=hit | |
1031 | game:GetService("Debris"):AddItem(bodvol,.5) | |
1032 | --game:GetService("Debris"):AddItem(rl,.5) | |
1033 | elseif Type=="Normal" then | |
1034 | vp=Instance.new("BodyVelocity") | |
1035 | vp.P=500 | |
1036 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
1037 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
1038 | if KnockbackType==1 then | |
1039 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
1040 | elseif KnockbackType==2 then | |
1041 | vp.velocity=Property.CFrame.lookVector*knockback | |
1042 | end | |
1043 | if knockback>0 then | |
1044 | vp.Parent=hit.Parent.Torso | |
1045 | end | |
1046 | game:GetService("Debris"):AddItem(vp,.5) | |
1047 | elseif Type=="Up" then | |
1048 | local bodyVelocity=Instance.new("BodyVelocity") | |
1049 | bodyVelocity.velocity=vt(0,30,0) | |
1050 | bodyVelocity.P=5000 | |
1051 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1052 | bodyVelocity.Parent=hit | |
1053 | game:GetService("Debris"):AddItem(bodyVelocity,1) | |
1054 | rl=Instance.new("BodyAngularVelocity") | |
1055 | rl.P=3000 | |
1056 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1057 | rl.angularvelocity=Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2)) | |
1058 | rl.Parent=hit | |
1059 | game:GetService("Debris"):AddItem(rl,.5) | |
1060 | elseif Type=="OrbBlast" then | |
1061 | if mana>=15 then | |
1062 | mana=mana-15 | |
1063 | so("http://roblox.com/asset/?id=161006093",hit,1,1) | |
1064 | so("http://roblox.com/asset/?id=10209303",hit,1,1) | |
1065 | MagicCircle(TorsoColor,cf(hit.Position),1,1,1,2,2,2,.01) | |
1066 | coroutine.resume(coroutine.create(function(Part) | |
1067 | for i=0,30 do | |
1068 | swait() | |
1069 | MagicBlock(TorsoColor,cf(Part.Position),1,1,1,1,1,1,.05,3) | |
1070 | end | |
1071 | end),hit) | |
1072 | local ref=part(3,workspace,0,1,hit.BrickColor,"Effect",vt()) | |
1073 | ref.Anchored=true | |
1074 | ref.CFrame=cf(hit.Position)*cf(math.random(-10,10)/100,-.1,math.random(-10,10)/100) | |
1075 | game:GetService("Debris"):AddItem(ref,1) | |
1076 | MagniDamage(ref,15,20,30,math.random(20,40),"Knockdown2") | |
1077 | end | |
1078 | elseif Type=="Snare" then | |
1079 | bp=Instance.new("BodyPosition") | |
1080 | bp.P=2000 | |
1081 | bp.D=100 | |
1082 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1083 | bp.position=hit.Parent.Torso.Position | |
1084 | bp.Parent=hit.Parent.Torso | |
1085 | game:GetService("Debris"):AddItem(bp,1) | |
1086 | end | |
1087 | debounce=Instance.new("BoolValue") | |
1088 | debounce.Name="DebounceHit" | |
1089 | debounce.Parent=hit.Parent | |
1090 | debounce.Value=true | |
1091 | game:GetService("Debris"):AddItem(debounce,Delay) | |
1092 | c=Instance.new("ObjectValue") | |
1093 | c.Name="creator" | |
1094 | c.Value=Player | |
1095 | c.Parent=h | |
1096 | game:GetService("Debris"):AddItem(c,.5) | |
1097 | CRIT=false | |
1098 | end | |
1099 | end | |
1100 | ||
1101 | showDamage=function(Char,Dealt,du,Color) | |
1102 | m=Instance.new("Model") | |
1103 | m.Name=tostring(math.floor(Dealt)) | |
1104 | h=Instance.new("Humanoid") | |
1105 | h.Health=0 | |
1106 | h.MaxHealth=0 | |
1107 | h.Parent=m | |
1108 | c=Instance.new("Part") | |
1109 | c.Transparency=0 | |
1110 | c.BrickColor=Color | |
1111 | c.Name="Head" | |
1112 | c.TopSurface=0 | |
1113 | c.BottomSurface=0 | |
1114 | c.formFactor="Plate" | |
1115 | c.Size=Vector3.new(1,.4,1) | |
1116 | ms=Instance.new("CylinderMesh") | |
1117 | ms.Scale=Vector3.new(.8,.8,.8) | |
1118 | if CRIT==true then | |
1119 | ms.Scale=Vector3.new(1,1.25,1) | |
1120 | end | |
1121 | ms.Parent=c | |
1122 | c.Reflectance=0 | |
1123 | Instance.new("BodyGyro").Parent=c | |
1124 | c.Parent=m | |
1125 | if Char:findFirstChild("Head")~=nil then | |
1126 | c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1127 | elseif Char.Parent:findFirstChild("Head")~=nil then | |
1128 | c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1129 | end | |
1130 | f=Instance.new("BodyPosition") | |
1131 | f.P=2000 | |
1132 | f.D=100 | |
1133 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1134 | f.position=c.Position+Vector3.new(0,3,0) | |
1135 | f.Parent=c | |
1136 | game:GetService("Debris"):AddItem(m,.5+du) | |
1137 | c.CanCollide=false | |
1138 | m.Parent=workspace | |
1139 | c.CanCollide=false | |
1140 | end | |
1141 | ||
1142 | combo=0 | |
1143 | function ob1d(mouse) | |
1144 | if attack==true or equipped==false then return end | |
1145 | hold=true | |
1146 | if combo==0 then | |
1147 | combo=1 | |
1148 | attackone() | |
1149 | elseif combo==1 then | |
1150 | combo=2 | |
1151 | attackthree() | |
1152 | elseif combo==2 then | |
1153 | combo=0 | |
1154 | attacktwo() | |
1155 | end | |
1156 | coroutine.resume(coroutine.create(function() | |
1157 | for i=1,50 do | |
1158 | if attack==false then | |
1159 | swait() | |
1160 | end | |
1161 | end | |
1162 | if attack==false then | |
1163 | combo=0 | |
1164 | end | |
1165 | end)) | |
1166 | end | |
1167 | ||
1168 | function ob1u(mouse) | |
1169 | hold = false | |
1170 | end | |
1171 | ||
1172 | buttonhold = false | |
1173 | ||
1174 | eul=0 | |
1175 | size=0 | |
1176 | holdz=false | |
1177 | equipped=false | |
1178 | function key(key) | |
1179 | if attack==true then return end | |
1180 | if key=="f" then | |
1181 | attack=true | |
1182 | if equipped==false then | |
1183 | equipped=true | |
1184 | RSH=ch.Torso["Right Shoulder"] | |
1185 | LSH=ch.Torso["Left Shoulder"] | |
1186 | -- | |
1187 | RSH.Parent=nil | |
1188 | LSH.Parent=nil | |
1189 | -- | |
1190 | RW.Name="Right Shoulder" | |
1191 | RW.Part0=ch.Torso | |
1192 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
1193 | RW.C1=cf(0, 0.5, 0) | |
1194 | RW.Part1=ch["Right Arm"] | |
1195 | RW.Parent=ch.Torso | |
1196 | -- | |
1197 | LW.Name="Left Shoulder" | |
1198 | LW.Part0=ch.Torso | |
1199 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
1200 | LW.C1=cf(0, 0.5, 0) | |
1201 | LW.Part1=ch["Left Arm"] | |
1202 | LW.Parent=ch.Torso | |
1203 | -- | |
1204 | equipanim() | |
1205 | else | |
1206 | equipped=false | |
1207 | hideanim() | |
1208 | swait(0) | |
1209 | RW.Parent=nil | |
1210 | LW.Parent=nil | |
1211 | RSH.Parent=player.Character.Torso | |
1212 | LSH.Parent=player.Character.Torso | |
1213 | end | |
1214 | attack=false | |
1215 | end | |
1216 | if equipped==false then return end | |
1217 | if key=="z" and mana>=10 then | |
1218 | OverDrive() | |
1219 | end | |
1220 | if key=="x" and mana>=20 then | |
1221 | Boomerang() | |
1222 | end | |
1223 | if key=="c" and mana>=20 then | |
1224 | EnergyBlades() | |
1225 | end | |
1226 | if key=="h" then | |
1227 | mana=100 | |
1228 | end | |
1229 | if key=="e" then | |
1230 | idle=500 | |
1231 | end | |
1232 | coroutine.resume(coroutine.create(function() | |
1233 | for i=1,50 do | |
1234 | if attack==false then | |
1235 | swait() | |
1236 | end | |
1237 | end | |
1238 | if attack==false then | |
1239 | combo=0 | |
1240 | end | |
1241 | end)) | |
1242 | combo=0 | |
1243 | end | |
1244 | ||
1245 | function key2(key) | |
1246 | end | |
1247 | ||
1248 | function s(mouse) | |
1249 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
1250 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
1251 | mouse.KeyDown:connect(key) | |
1252 | mouse.KeyUp:connect(key2) | |
1253 | ||
1254 | player=Player | |
1255 | ch=Character | |
1256 | MMouse=mouse | |
1257 | end | |
1258 | ||
1259 | function ds(mouse) | |
1260 | end | |
1261 | ||
1262 | Bin.Selected:connect(s) | |
1263 | Bin.Deselected:connect(ds) | |
1264 | print("Cyber Stratosphere loaded.") | |
1265 | ||
1266 | local mananum=0 | |
1267 | local handidle=false | |
1268 | local donum=0 | |
1269 | while true do | |
1270 | swait() | |
1271 | if donum>=.5 then | |
1272 | handidle=true | |
1273 | elseif donum<=0 then | |
1274 | handidle=false | |
1275 | end | |
1276 | if handidle==false then | |
1277 | donum=donum+0.003 | |
1278 | else | |
1279 | donum=donum-0.003 | |
1280 | end | |
1281 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1282 | local velderp=RootPart.Velocity.y | |
1283 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1284 | if equipped==true then | |
1285 | if Anim=="Idle" and attack==false then | |
1286 | idle=idle+1 | |
1287 | else | |
1288 | idle=0 | |
1289 | end | |
1290 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1291 | Anim="Jump" | |
1292 | if attack==false then | |
1293 | Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2) | |
1294 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2) | |
1295 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2) | |
1296 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.2,0,-.5),.2) | |
1297 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
1298 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.2) | |
1299 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2) | |
1300 | RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2) | |
1301 | LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2) | |
1302 | end | |
1303 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
1304 | Anim="Fall" | |
1305 | if attack==false then | |
1306 | Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.1) | |
1307 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.1) | |
1308 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.1) | |
1309 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,.3),.1) | |
1310 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1) | |
1311 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.1) | |
1312 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1) | |
1313 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2) | |
1314 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2) | |
1315 | end | |
1316 | elseif torvel<1 and hitfloor~=nil then | |
1317 | Anim="Idle" | |
1318 | if idle>=300 then | |
1319 | if attack==false then | |
1320 | --hwld.C0=clerp(hwld.C0,euler(0,3.14,1.4)*euler(-.5,0,0)*cf(-1.2,.4,-.8),.1) | |
1321 | hwld.C0=clerp(hwld.C0,euler(-.3,2.8,1.4)*cf(-1.5,0,0.7),.1) | |
1322 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.1) | |
1323 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.1) | |
1324 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.3)*euler(.5,0,0),.1) | |
1325 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1) | |
1326 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.1) | |
1327 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1) | |
1328 | end | |
1329 | else | |
1330 | if attack==false then | |
1331 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
1332 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.3),.3) | |
1333 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.3),.3) | |
1334 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.3-(donum/3),0,-.3-(donum/5)),.3) | |
1335 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1336 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2+(donum/5)),.3) | |
1337 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1338 | RH.C0=clerp(RH.C0,RHC0,.3) | |
1339 | LH.C0=clerp(LH.C0,LHC0,.3) | |
1340 | end | |
1341 | end | |
1342 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
1343 | Anim="Walk" | |
1344 | if attack==false then | |
1345 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
1346 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3) | |
1347 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.2,0,.5),.3) | |
1348 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.2,0,-.5),.3) | |
1349 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1350 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.3) | |
1351 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1352 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.3) | |
1353 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.3) | |
1354 | end | |
1355 | elseif torvel>=22 and hitfloor~=nil then | |
1356 | Anim="Run" | |
1357 | if attack==false then | |
1358 | hwld.C0=clerp(hwld.C0,euler(3.14,3.14,0)*cf(0,1,0),.3) | |
1359 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3) | |
1360 | RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.2,0,.5),.3) | |
1361 | RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.2,0,-.5),.3) | |
1362 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1363 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.3) | |
1364 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1365 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.3) | |
1366 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.3) | |
1367 | end | |
1368 | end | |
1369 | end | |
1370 | if #Effects>0 then | |
1371 | --table.insert(Effects,{prt,"Block1",delay}) | |
1372 | for e=1,#Effects do | |
1373 | if Effects[e]~=nil then | |
1374 | --for j=1,#Effects[e] do | |
1375 | local Thing=Effects[e] | |
1376 | if Thing~=nil then | |
1377 | local Part=Thing[1] | |
1378 | local Mode=Thing[2] | |
1379 | local Delay=Thing[3] | |
1380 | local IncX=Thing[4] | |
1381 | local IncY=Thing[5] | |
1382 | local IncZ=Thing[6] | |
1383 | if Thing[1].Transparency<=1 then | |
1384 | if Thing[2]=="Block1" then | |
1385 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1386 | Mesh=Thing[7] | |
1387 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1388 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1389 | elseif Thing[2]=="Block2" then | |
1390 | Thing[1].CFrame=Thing[1].CFrame | |
1391 | Mesh=Thing[7] | |
1392 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1393 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1394 | elseif Thing[2]=="Block3" then | |
1395 | Thing[1].CFrame=Thing[1].CFrame*cf(Thing[8])*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1396 | Mesh=Thing[7] | |
1397 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1398 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1399 | elseif Thing[2]=="Cylinder" then | |
1400 | Mesh=Thing[7] | |
1401 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1402 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1403 | elseif Thing[2]=="Blood" then | |
1404 | Mesh=Thing[7] | |
1405 | Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) | |
1406 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1407 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1408 | elseif Thing[2]=="Elec" then | |
1409 | Mesh=Thing[7] | |
1410 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
1411 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1412 | elseif Thing[2]=="Disappear" then | |
1413 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1414 | end | |
1415 | else | |
1416 | Part.Parent=nil | |
1417 | table.remove(Effects,e) | |
1418 | end | |
1419 | end | |
1420 | --end | |
1421 | end | |
1422 | end | |
1423 | end | |
1424 | if mana>=100 then | |
1425 | mana=100 | |
1426 | else | |
1427 | if mananum<=15 then | |
1428 | mananum=mananum+1 | |
1429 | else | |
1430 | mananum=0 | |
1431 | mana=mana+1 | |
1432 | end | |
1433 | end | |
1434 | fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true) | |
1435 | fenbarmana4.Text="Energy("..mana..")" | |
1436 | end |