SHOW:
|
|
- or go back to the newest paste.
1 | --[[ | |
2 | Soul Warden Made by Fenrier. | |
3 | Made as an upcoming buyable class on Black Magic. | |
4 | Soul Warden would have been more interesting if BodyPosition wasn't so seriously glitchy as heck :V | |
5 | ]] | |
6 | - | Player = game:GetService("Players").basstracker1970 |
6 | + | Player = game:GetService("Players").TameDoNotClick |
7 | Character = Player.Character | |
8 | PlayerGui = Player.PlayerGui | |
9 | Backpack = Player.Backpack | |
10 | Torso = Character.Torso | |
11 | Head = Character.Head | |
12 | Humanoid = Character.Humanoid | |
13 | LeftArm = Character["Left Arm"] | |
14 | LeftLeg = Character["Left Leg"] | |
15 | RightArm = Character["Right Arm"] | |
16 | RightLeg = Character["Right Leg"] | |
17 | LS = Torso["Left Shoulder"] | |
18 | LH = Torso["Left Hip"] | |
19 | RS = Torso["Right Shoulder"] | |
20 | RH = Torso["Right Hip"] | |
21 | Neck = Torso.Neck | |
22 | it=Instance.new | |
23 | vt=Vector3.new | |
24 | cf=CFrame.new | |
25 | euler=CFrame.fromEulerAnglesXYZ | |
26 | angles=CFrame.Angles | |
27 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
28 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
29 | neckoav=cf(0, -2.25, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
30 | neckoav2=cf(0, 1.125, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
31 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
32 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
33 | RootPart=Character.HumanoidRootPart | |
34 | RootJoint=RootPart.RootJoint | |
35 | RootCF=euler(-1.57,0,3.14) | |
36 | attack = false | |
37 | shadowattack=false | |
38 | attackdebounce = false | |
39 | MMouse=nil | |
40 | combo=0 | |
41 | AvatarMode="Follow" | |
42 | lifestolen=false | |
43 | LifeStolenTorso=nil | |
44 | local LastPoint=nil | |
45 | local LastPoint2=nil | |
46 | local LastPoint3=nil | |
47 | local Point=LastPoint | |
48 | local Point2=LastPoint2 | |
49 | local Point3=LastPoint3 | |
50 | local rLastPoint=nil | |
51 | local rLastPoint2=nil | |
52 | local rLastPoint3=nil | |
53 | local rPoint=rLastPoint | |
54 | local rPoint2=rLastPoint2 | |
55 | local rPoint3=rLastPoint3 | |
56 | local avLastPoint=nil | |
57 | local avLastPoint2=nil | |
58 | local avLastPoint3=nil | |
59 | local avPoint=avLastPoint | |
60 | local avPoint2=avLastPoint2 | |
61 | local avPoint3=avLastPoint3 | |
62 | local TargetTorso=nil | |
63 | local shadowcon=nil | |
64 | --player | |
65 | player = nil | |
66 | --save shoulders | |
67 | RSH, LSH = nil, nil | |
68 | --welds | |
69 | RW, LW = Instance.new("Weld"), Instance.new("Weld") | |
70 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
71 | LH=Torso["Left Hip"] | |
72 | RH=Torso["Right Hip"] | |
73 | ||
74 | if Character:findFirstChild("Warden Claws",true) ~= nil then | |
75 | Character:findFirstChild("Warden Claws",true).Parent = nil | |
76 | end | |
77 | if Character:findFirstChild("Avatar",true) ~= nil then | |
78 | Character:findFirstChild("Avatar",true).Parent = nil | |
79 | end | |
80 | ||
81 | ||
82 | function NoOutline(Part) | |
83 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
84 | end | |
85 | ||
86 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
87 | local fp = it("Part") | |
88 | fp.formFactor = formfactor | |
89 | fp.Parent = parent | |
90 | fp.Reflectance = reflectance | |
91 | fp.Transparency = transparency | |
92 | fp.CanCollide = false | |
93 | fp.Locked=true | |
94 | fp.BrickColor = brickcolor | |
95 | fp.Name = name | |
96 | fp.Size = size | |
97 | fp.Position = Torso.Position+vt(0,50,0) | |
98 | NoOutline(fp) | |
99 | fp.Material="SmoothPlastic" | |
100 | fp:BreakJoints() | |
101 | return fp | |
102 | end | |
103 | ||
104 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
105 | local mesh = it(Mesh) | |
106 | mesh.Parent = part | |
107 | if Mesh=="SpecialMesh" then | |
108 | mesh.MeshType = meshtype | |
109 | mesh.MeshId = meshid | |
110 | end | |
111 | mesh.Offset=offset | |
112 | mesh.Scale=scale | |
113 | return mesh | |
114 | end | |
115 | ||
116 | function weld(parent,part0,part1,c0) | |
117 | local weld = it("Weld") | |
118 | weld.Parent = parent | |
119 | weld.Part0 = part0 | |
120 | weld.Part1 = part1 | |
121 | weld.C0 = c0 | |
122 | return weld | |
123 | end | |
124 | ||
125 | local modelzorz = Instance.new("Model") | |
126 | modelzorz.Parent = Character | |
127 | modelzorz.Name = "Warden Claws" | |
128 | ||
129 | local prt1=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part1",vt(1,1,1)) | |
130 | local prt2=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part2",vt(1,1,1)) | |
131 | local prt3=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(1,1,1)) | |
132 | local prt4=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part4",vt(1,1,1)) | |
133 | local prt5=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part5",vt(1,1,1)) | |
134 | local prt6=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part6",vt(1,1,1)) | |
135 | local prt7=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part7",vt(1,1,1)) | |
136 | local prt8=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part8",vt(1,1,1)) | |
137 | local prt9=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part9",vt(1,1,1)) | |
138 | local prt10=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part10",vt(1,1,1)) | |
139 | local prt11=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part11",vt(1,1,1)) | |
140 | local prt12=part(1,modelzorz,0,0,BrickColor.new("Really black"),"Part12",vt(1,1,1)) | |
141 | ||
142 | local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
143 | local msh2=mesh("SpecialMesh",prt2,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
144 | local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
145 | local msh4=mesh("SpecialMesh",prt4,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
146 | local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
147 | local msh6=mesh("SpecialMesh",prt6,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
148 | local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
149 | local msh8=mesh("SpecialMesh",prt8,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
150 | local msh9=mesh("BlockMesh",prt9,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
151 | local msh10=mesh("SpecialMesh",prt10,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
152 | local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(0.2,1,0.1)) | |
153 | local msh12=mesh("SpecialMesh",prt12,"Wedge","",vt(0,0,0),vt(0.1,0.2,0.2)) | |
154 | ||
155 | local wld1=weld(prt1,prt1,LeftArm,euler(0,0,0)*cf(0.41,1,0.4)) | |
156 | local wld2=weld(prt2,prt2,prt1,euler(0,1.57,3.14)*cf(0,0.715,0)) | |
157 | local wld3=weld(prt3,prt3,LeftArm,euler(0,0,0)*cf(0.41,1,0)) | |
158 | local wld4=weld(prt4,prt4,prt3,euler(0,1.57,3.14)*cf(0,0.715,0)) | |
159 | local wld5=weld(prt5,prt5,LeftArm,euler(0,0,0)*cf(0.41,1,-0.4)) | |
160 | local wld6=weld(prt6,prt6,prt5,euler(0,1.57,3.14)*cf(0,0.715,0)) | |
161 | local wld7=weld(prt7,prt7,RightArm,euler(0,0,0)*cf(-0.41,1,0.4)) | |
162 | local wld8=weld(prt8,prt8,prt7,euler(0,-1.57,3.14)*cf(0,0.715,0)) | |
163 | local wld9=weld(prt9,prt9,RightArm,euler(0,0,0)*cf(-0.41,1,0)) | |
164 | local wld10=weld(prt10,prt10,prt9,euler(0,-1.57,3.14)*cf(0,0.715,0)) | |
165 | local wld11=weld(prt11,prt11,RightArm,euler(0,0,0)*cf(-0.41,1,-0.4)) | |
166 | local wld12=weld(prt12,prt12,prt11,euler(0,-1.57,3.14)*cf(0,0.715,0)) | |
167 | ||
168 | local Avatar=Instance.new("Model") | |
169 | Avatar.Parent=modelzorz | |
170 | Avatar.Name="Shadow" | |
171 | ||
172 | local aroot=part(1,Avatar,0,1,BrickColor.new("Black"),"RootPart2",vt(1,1,1)) | |
173 | local aprt1=part(1,Avatar,0,1,BrickColor.new("Black"),"Torso",vt(1,1,1)) | |
174 | local aprt2=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Head",vt(1,1,1)) | |
175 | local aprt3=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Left Arm",vt(1,1,1)) | |
176 | local aprt4=part(1,Avatar,0,1,BrickColor.new("Black"),"Right Arm",vt(1,1,1)) | |
177 | local aprt5=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw1",vt(1,1,1)) | |
178 | local aprt6=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw1.1",vt(1,1,1)) | |
179 | local aprt7=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw2",vt(1,1,1)) | |
180 | local aprt8=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw2.1",vt(1,1,1)) | |
181 | local aprt9=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw3",vt(1,1,1)) | |
182 | local aprt10=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Claw3.1",vt(1,1,1)) | |
183 | local aprt11=part(1,Avatar,0,1,BrickColor.new("Black"),"Left Arm Hit",vt(1,1,1)) | |
184 | ||
185 | local arootmsh=mesh("BlockMesh",aroot,"","",vt(0,0,0),vt(2,2,1)) | |
186 | local amsh1=mesh("BlockMesh",aprt1,"","",vt(0,0,0),vt(4,4,2)) | |
187 | local amsh2=mesh("SpecialMesh",aprt2,"Head","",vt(0,0,0),vt(2.5,2,2.5)) | |
188 | local amsh3=mesh("BlockMesh",aprt3,"","",vt(0,0,0),vt(2,4,2)) | |
189 | local amsh4=mesh("BlockMesh",aprt4,"","",vt(0,0,0),vt(2,4,2)) | |
190 | local amsh5=mesh("BlockMesh",aprt5,"","",vt(0,0,0),vt(0.3,1.5,0.1)) | |
191 | local amsh6=mesh("SpecialMesh",aprt6,"Wedge","",vt(0,0,0),vt(0.1,0.3,0.3)) | |
192 | local amsh7=mesh("BlockMesh",aprt7,"","",vt(0,0,0),vt(0.3,1.5,0.1)) | |
193 | local amsh8=mesh("SpecialMesh",aprt8,"Wedge","",vt(0,0,0),vt(0.1,0.3,0.3)) | |
194 | local amsh9=mesh("BlockMesh",aprt9,"","",vt(0,0,0),vt(0.3,1.5,0.1)) | |
195 | local amsh10=mesh("SpecialMesh",aprt10,"Wedge","",vt(0,0,0),vt(0.1,0.3,0.3)) | |
196 | local amsh11=mesh("BlockMesh",aprt11,"","",vt(0,0,0),vt(1,1,1)) | |
197 | Avatar:BreakJoints() | |
198 | ||
199 | local arwld=weld(aroot,aroot,RootPart,euler(0,0,0)*cf(0,0,0)) | |
200 | local awld1=weld(aprt1,aprt1,aroot,euler(0,0,0)*cf(0,-3,-2)) | |
201 | local awld2=weld(aprt2,aprt2,aprt1,neckoav) | |
202 | awld2.C1=neckoav2 | |
203 | local awld3=weld(aprt3,aprt1,aprt3,cf(3,1,0)*euler(0,0,0)) | |
204 | awld3.C1=cf(0,1,0) | |
205 | local awld4=weld(aprt4,aprt1,aprt4,cf(-3,1,0)*euler(0,0,0)) | |
206 | awld4.C1=cf(0,1,0) | |
207 | local awld5=weld(aprt5,aprt5,aprt3,euler(0,0,0)*cf(-0.8,2.5,-0.6)) | |
208 | local awld6=weld(aprt6,aprt6,aprt5,euler(0,-1.57,3.14)*cf(0,1.05,0)) | |
209 | local awld7=weld(aprt7,aprt7,aprt3,euler(0,0,0)*cf(-0.8,2.5,0)) | |
210 | local awld8=weld(aprt8,aprt8,aprt7,euler(0,-1.57,3.14)*cf(0,1.05,0)) | |
211 | local awld9=weld(aprt9,aprt9,aprt3,euler(0,0,0)*cf(-0.8,2.5,0.6)) | |
212 | local awld10=weld(aprt10,aprt10,aprt9,euler(0,-1.57,3.14)*cf(0,1.05,0)) | |
213 | local awld11=weld(aprt11,aprt11,aprt4,euler(1.57,0,0)*cf(0,2,0)) | |
214 | ||
215 | numb=-1.8 | |
216 | numb2=0.8 | |
217 | for i=1,5 do | |
218 | local aprt12=part(1,Avatar,0,numb2,BrickColor.new("Black"),"Left Arm Fade",vt(1,1,1)) | |
219 | local amsh12=mesh("BlockMesh",aprt12,"","",vt(0,0,0),vt(2,1,2)) | |
220 | local awld12=weld(aprt12,aprt12,aprt4,cf(0,numb,0)) | |
221 | numb=numb+1.2 | |
222 | numb2=numb2+0.05 | |
223 | end | |
224 | ||
225 | local aprt14=part(1,Avatar,0,0.5,BrickColor.new("Black"),"Torso Fade1",vt(1,1,1)) | |
226 | local amsh14=mesh("BlockMesh",aprt14,"","",vt(0,0,0),vt(4,2,2)) | |
227 | local awld14=weld(aprt14,aprt14,aprt1,cf(0,-1.2,0)) | |
228 | numb=0.2 | |
229 | numb2=0.8 | |
230 | for i=1,5 do | |
231 | local aprt13=part(1,Avatar,0,numb2,BrickColor.new("Black"),"Torso Fade2",vt(1,1,1)) | |
232 | local amsh13=mesh("BlockMesh",aprt13,"","",vt(0,0,0),vt(4,0.5,2)) | |
233 | local awld13=weld(aprt13,aprt13,aprt1,cf(0,numb,0)) | |
234 | numb=numb+0.5 | |
235 | numb2=numb2+0.05 | |
236 | end | |
237 | ||
238 | coroutine.resume(coroutine.create(function() | |
239 | wait(1) | |
240 | for i=0,1,0.1 do | |
241 | wait() | |
242 | awld2.C0=neckoav*euler(-0.5*i,0,0) | |
243 | awld3.C0=cf(3,1,0)*euler(-0.5*i,0,0) | |
244 | awld3.C1=cf(0,1,0)*euler(0,0,-0.7*i) | |
245 | awld4.C0=cf(-3,1,0)*euler(-0.5*i,0,0) | |
246 | awld4.C1=cf(0,1,0)*euler(0,0,0.7*i) | |
247 | end | |
248 | end)) | |
249 | ||
250 | shadowfollowing=false | |
251 | shadowgyro="TrueAim" | |
252 | aroot.CFrame=Torso.CFrame | |
253 | BodPos=Instance.new("BodyPosition") | |
254 | BodPos.P=50000 | |
255 | BodPos.D=1000 | |
256 | BodPos.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
257 | BodPos.position=Torso.Position | |
258 | BodPos.Parent=aroot | |
259 | BodPos.Parent=nil | |
260 | BodGy = it("BodyGyro") | |
261 | BodGy.maxTorque = vt(math.huge,math.huge,math.huge) | |
262 | BodGy.P = 20e+003 | |
263 | BodGy.Parent=aroot | |
264 | BodGy.cframe=Torso.CFrame | |
265 | BodGy.Parent=nil | |
266 | coroutine.resume(coroutine.create(function(BodyyPosition,BodyGyro) | |
267 | while true do | |
268 | wait() | |
269 | Avatar.Parent=modelzorz | |
270 | --awld1.C0=euler(0,0,0)*cf(0,-3,-2) | |
271 | if AvatarMode=="Follow" then | |
272 | BodyyPosition.P=50000 | |
273 | BodyyPosition.D=1000 | |
274 | BodyyPosition.position=RootPart.Position | |
275 | BodyGyro.cframe=Torso.CFrame | |
276 | --[[elseif AvatarMode=="Aim" then | |
277 | BodPos.P=1000 | |
278 | BodPos.D=100 | |
279 | coroutine.resume(coroutine.create(function(Gairo) | |
280 | while AvatarMode=="Aim" do | |
281 | wait() | |
282 | if TargetTorso.Parent==nil then | |
283 | AvatarMode="Follow" | |
284 | end | |
285 | if shadowgyro=="TrueAim" then | |
286 | Gairo.cframe=cf(aroot.Position,TargetTorso.Position) | |
287 | elseif shadowgyro=="YAim" then | |
288 | Gairo.cframe=cf(aroot.Position,TargetTorso.Position) | |
289 | end | |
290 | end | |
291 | end),BodyGyro) | |
292 | shadowdebounce=false | |
293 | if math.random(1,2)==1 then | |
294 | shadowfollowing=true | |
295 | BodyPosition.position=TargetTorso.Position | |
296 | shadowgyro="TrueAim" | |
297 | shadowcon=aroot.Touched:connect(function(hit) | |
298 | shadowattack=true | |
299 | if hit==TargetTorso then | |
300 | if shadowdebounce==false then | |
301 | shadowdebounce=true | |
302 | shadowgyro="YAim" | |
303 | shadowfollowing=false | |
304 | so("http://www.roblox.com/asset/?id=28144425",aprt3,1,1) | |
305 | avLastPoint=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/7,0) | |
306 | avLastPoint2=aprt8.CFrame*CFrame.new(0,aprt8.Size.Y/7,0) | |
307 | avLastPoint3=aprt10.CFrame*CFrame.new(0,aprt10.Size.Y/7,0) | |
308 | avcon1=aprt6.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
309 | avcon2=aprt8.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
310 | avcon3=aprt10.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
311 | for i=0,1,0.1 do | |
312 | wait() | |
313 | awld1.C0=euler(0,-1*i,0)*cf(0,-3,-2) | |
314 | awld3.C0=cf(3-2*i,1,-0.5*i)*euler(-0.5+2.5*i,0,0) | |
315 | awld3.C1=cf(0,1,0)*euler(0,1*i,-0.7+1.4*i) | |
316 | AvatarClawEffect() | |
317 | end | |
318 | avcon1:disconnect() | |
319 | avcon2:disconnect() | |
320 | avcon3:disconnect() | |
321 | wait(0.5) | |
322 | for i=0,1,0.1 do | |
323 | wait() | |
324 | awld1.C0=euler(0,-1+1*i,0)*cf(0,-3,-2) | |
325 | awld3.C0=cf(1+2*i,1,-0.5+0.5*i)*euler(2-2.5*i,0,0) | |
326 | awld3.C1=cf(0,1,0)*euler(0,1-1*i,0.7-1.4*i) | |
327 | end | |
328 | end | |
329 | end | |
330 | shadowattack=false | |
331 | end) | |
332 | coroutine.resume(coroutine.create(function(Connect) | |
333 | while shadowgyro=="TrueAim" do | |
334 | wait() | |
335 | end | |
336 | print("DISCONNECT") | |
337 | Connect:disconnect() | |
338 | end),shadowcon) | |
339 | coroutine.resume(coroutine.create(function() | |
340 | wait(5) | |
341 | aroot.CFrame=TargetTorso.CFrame | |
342 | end)) | |
343 | while shadowfollowing==true do | |
344 | wait() | |
345 | BodyPosition.position=TargetTorso.Position | |
346 | end | |
347 | else | |
348 | shadowgyro="TrueAim" | |
349 | shadowattack=true | |
350 | for i=0,1,0.1 do | |
351 | wait() | |
352 | local pos5 = Vector3.new(TargetTorso.Position.X,aprt11.Position.Y,TargetTorso.Position.Z) | |
353 | offset=(aprt11.Position.y-TargetTorso.Position.Y)/60 | |
354 | mag=(aprt11.Position-TargetTorso.Position).magnitude/80 | |
355 | offset=offset/mag | |
356 | print(offset) | |
357 | awld1.C0=euler(0,1.57*i,0)*cf(0,-3,-2) | |
358 | awld4.C0=cf(-3,1,0)*euler(-0.5+0.5*i,0,(-1.57+offset)*i) | |
359 | awld4.C1=cf(0,1,0)*euler(0,0,0.7-0.7*i) | |
360 | end | |
361 | wait(0.3) | |
362 | shoottrail(aprt11,0) | |
363 | for i=1,6 do | |
364 | wait(0.1) | |
365 | shoottrail(aprt11,10) | |
366 | end | |
367 | for i=0,1,0.1 do | |
368 | wait() | |
369 | awld1.C0=euler(0,1.57-1.57*i,0)*cf(0,-3,-2) | |
370 | awld4.C0=cf(-3,1,0)*euler(-0.5*i,0,(-1.57+offset)+(1.57-offset)*i) | |
371 | awld4.C1=cf(0,1,0)*euler(0,0,0.7*i) | |
372 | end | |
373 | shadowattack=false | |
374 | end | |
375 | wait(2)]] | |
376 | else | |
377 | BodyyPosition.P=50000 | |
378 | BodyyPosition.D=1000 | |
379 | end | |
380 | end | |
381 | end),BodPos,BodGy) | |
382 | ||
383 | if (script.Parent.className ~= "HopperBin") then | |
384 | Tool = Instance.new("HopperBin") | |
385 | Tool.Parent = Backpack | |
386 | Tool.Name = "Warden Claws" | |
387 | script.Parent = Tool | |
388 | end | |
389 | Bin = script.Parent | |
390 | ||
391 | local Bg = it("BodyGyro") | |
392 | Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge | |
393 | Bg.P = 20e+003 | |
394 | Bg.Parent = nil | |
395 | ||
396 | so = function(id,par,vol,pit) | |
397 | coroutine.resume(coroutine.create(function() | |
398 | local sou = Instance.new("Sound",par or workspace) | |
399 | sou.Volume=vol | |
400 | sou.Pitch=pit or 1 | |
401 | sou.SoundId=id | |
402 | wait() | |
403 | sou:play() | |
404 | wait(6) | |
405 | sou:Remove() | |
406 | end)) | |
407 | end | |
408 | ||
409 | function hideanim() | |
410 | equipped=false | |
411 | Torso.Neck.C0=necko | |
412 | RootJoint.C0=RootCF | |
413 | end | |
414 | ||
415 | function equipanim() | |
416 | equipped=true | |
417 | Torso.Neck.C0=necko*euler(0.2,0,0) | |
418 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.57,-0.2) | |
419 | LW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
420 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
421 | RW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
422 | end | |
423 | ||
424 | function attackone() | |
425 | attack=true | |
426 | for i=0,1,0.1 do | |
427 | wait() | |
428 | RootJoint.C0=RootCF*euler(0,0,0.8*i) | |
429 | Torso.Neck.C0=necko*euler(0.2,0,-0.8*i) | |
430 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.57,-0.2+0.2*i) | |
431 | LW.C1=cf(0,0.5,0)*euler(-0.2-1.37*i,0,0) | |
432 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2-0.2*i) | |
433 | RW.C1=cf(0,0.5,0)*euler(-0.2-0.2*i,0,0) | |
434 | end | |
435 | LastPoint=prt2.CFrame*CFrame.new(0,prt2.Size.Y/7,0) | |
436 | LastPoint2=prt4.CFrame*CFrame.new(0,prt4.Size.Y/7,0) | |
437 | LastPoint3=prt6.CFrame*CFrame.new(0,prt6.Size.Y/7,0) | |
438 | --so("http://www.roblox.com/asset/?id=28144425",prt4,1,1.5) | |
439 | con1=prt4.Touched:connect(function(hit) Damagefunc(hit,10,20,nil,"Snare") end) | |
440 | so("http://www.roblox.com/Asset?ID=92597369",prt4,1,1) | |
441 | for i=0,1,0.2 do | |
442 | wait() | |
443 | RootJoint.C0=RootCF*euler(0,0,0.8-2*i) | |
444 | Torso.Neck.C0=necko*euler(0.2,0,-0.8+2*i) | |
445 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.57-0.2*i,0) | |
446 | LW.C1=cf(0,0.5,0)*euler(-1.57,0,0) | |
447 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0) | |
448 | RW.C1=cf(0,0.5,0)*euler(-0.4,0,0) | |
449 | LeftClawEffect() | |
450 | end | |
451 | for i=0,1,0.2 do | |
452 | wait() | |
453 | RootJoint.C0=RootCF*euler(0,0,-1.2-0.3*i) | |
454 | Torso.Neck.C0=necko*euler(0.2,0,1.2+0.3*i) | |
455 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.37-0.17*i,0) | |
456 | LW.C1=cf(0,0.5,0)*euler(-1.57,0,0) | |
457 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0) | |
458 | RW.C1=cf(0,0.5,0)*euler(-0.4,0,0) | |
459 | LeftClawEffect() | |
460 | end | |
461 | con1:disconnect() | |
462 | attack=false | |
463 | end | |
464 | ||
465 | function attacktwo() | |
466 | attack=true | |
467 | rLastPoint=prt8.CFrame*CFrame.new(0,prt8.Size.Y/7,0) | |
468 | rLastPoint2=prt10.CFrame*CFrame.new(0,prt10.Size.Y/7,0) | |
469 | rLastPoint3=prt12.CFrame*CFrame.new(0,prt12.Size.Y/7,0) | |
470 | con1=prt10.Touched:connect(function(hit) Damagefunc(hit,5,30,nil,"Snare") end) | |
471 | so("http://www.roblox.com/Asset?ID=92597369",prt10,1,0.8) | |
472 | for i=0,1,0.2 do | |
473 | wait() | |
474 | RootJoint.C0=RootCF*euler(0,0,-1.5+2*i) | |
475 | Torso.Neck.C0=necko*euler(0.2,0,1.5-2*i) | |
476 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.2,0) | |
477 | LW.C1=cf(0,0.5,0)*euler(-1.57,0,0) | |
478 | RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(0,-1.57-1*i,-2*i) | |
479 | RW.C1=cf(0,0.5,0)*euler(-0.4+1*i,0,0) | |
480 | RightClawEffect() | |
481 | end | |
482 | con1:disconnect() | |
483 | attack=false | |
484 | end | |
485 | ||
486 | function attackthree() | |
487 | attack=true | |
488 | for i=0,1,0.2 do | |
489 | wait() | |
490 | RootJoint.C0=RootCF*euler(0,0,0.5-0.5*i) | |
491 | Torso.Neck.C0=necko*euler(0.2,0,-0.5+0.5*i) | |
492 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.2+0.37*i,0) | |
493 | LW.C1=cf(0,0.5,0)*euler(-1.57,0,0) | |
494 | RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(0,-2.57+1*i,-2+2*i) | |
495 | RW.C1=cf(0,0.5,0)*euler(0.6-2.17*i,0,3.14*i) | |
496 | end | |
497 | LastPoint=prt2.CFrame*CFrame.new(0,prt2.Size.Y/7,0) | |
498 | LastPoint2=prt4.CFrame*CFrame.new(0,prt4.Size.Y/7,0) | |
499 | LastPoint3=prt6.CFrame*CFrame.new(0,prt6.Size.Y/7,0) | |
500 | rLastPoint=prt8.CFrame*CFrame.new(0,prt8.Size.Y/7,0) | |
501 | rLastPoint2=prt10.CFrame*CFrame.new(0,prt10.Size.Y/7,0) | |
502 | rLastPoint3=prt12.CFrame*CFrame.new(0,prt12.Size.Y/7,0) | |
503 | con1=prt4.Touched:connect(function(hit) Damagefunc(hit,5,10,nil,"Snare") end) | |
504 | con2=prt10.Touched:connect(function(hit) Damagefunc(hit,5,10,nil,"Snare") end) | |
505 | for i=1,2 do | |
506 | so("http://www.roblox.com/Asset?ID=92597369",Torso,1,1.1) | |
507 | for i=0,1,0.3 do | |
508 | wait() | |
509 | RootJoint.C0=RootCF*euler(0,0,-3.14*i) | |
510 | LeftClawEffect() | |
511 | RightClawEffect() | |
512 | end | |
513 | so("http://www.roblox.com/Asset?ID=92597369",Torso,1,1.2) | |
514 | for i=0,1,0.3 do | |
515 | wait() | |
516 | RootJoint.C0=RootCF*euler(0,0,-3.14-3.14*i) | |
517 | LeftClawEffect() | |
518 | RightClawEffect() | |
519 | end | |
520 | end | |
521 | con1:disconnect() | |
522 | con2:disconnect() | |
523 | RootJoint.C0=RootCF*euler(0,0,0) | |
524 | attack=false | |
525 | end | |
526 | ||
527 | function LifeSteal() | |
528 | attack=true | |
529 | lifestolen=false | |
530 | for i=0,1,0.1 do | |
531 | wait() | |
532 | RootJoint.C0=RootCF*euler(0,0,1*i) | |
533 | Torso.Neck.C0=necko*euler(0.2,0,-1*i) | |
534 | LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0,1.57-3.14*i,-0.2+0.2*i) | |
535 | LW.C1=cf(0,0.5,0)*euler(-0.2-1*i,0,0.2*i) | |
536 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
537 | RW.C1=cf(0,0.5,0)*euler(-0.2-1*i,0,0) | |
538 | end | |
539 | wait(0.1) | |
540 | con1=prt4.Touched:connect(function(hit) Damagefunc(hit,20,30,0,"LifeSteal",nil) end) | |
541 | LastPoint=prt2.CFrame*CFrame.new(0,prt2.Size.Y/7,0) | |
542 | LastPoint2=prt4.CFrame*CFrame.new(0,prt4.Size.Y/7,0) | |
543 | LastPoint3=prt6.CFrame*CFrame.new(0,prt6.Size.Y/7,0) | |
544 | so("http://www.roblox.com/Asset?ID=92597369",prt4,1,1.2) | |
545 | for i=0,1,0.2 do | |
546 | wait() | |
547 | RootJoint.C0=RootCF*cf(0,-5*i,0)*euler(0,0,1-2.57*i) | |
548 | Torso.Neck.C0=necko*euler(0.2,0,-1+2.57*i) | |
549 | LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(0,-1.57,0) | |
550 | LW.C1=cf(0,0.5,0)*euler(-1.2-0.37*i,-3.14*i,0.2-0.2*i) | |
551 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
552 | RW.C1=cf(0,0.5,0)*euler(-1.2,0,0) | |
553 | LeftClawEffect() | |
554 | end | |
555 | con1:disconnect() | |
556 | wait(1) | |
557 | if lifestolen==false then | |
558 | for i=0,1,0.1 do | |
559 | wait() | |
560 | RootJoint.C0=RootCF*cf(0,-5+5*i,0)*euler(0,0,-1.57+1.57*i) | |
561 | Torso.Neck.C0=necko*euler(0.2,0,1.57-1.57*i) | |
562 | LW.C0=cf(-1.5,0.5,0)*euler(0,-1.57+3.14*i,-0.2*i) | |
563 | LW.C1=cf(0,0.5,0)*euler(-1.57+1.37*i,-3.14+3.14*i,0) | |
564 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
565 | RW.C1=cf(0,0.5,0)*euler(-1.2+1*i,0,0) | |
566 | end | |
567 | else | |
568 | for i=0,1,0.2 do | |
569 | wait() | |
570 | RootJoint.C0=RootCF*cf(0,-5+5*i,0)*euler(0,0,-1.57+2.57*i) | |
571 | Torso.Neck.C0=necko*euler(0.2,0,1.57-2.57*i) | |
572 | LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0,-1.57,0) | |
573 | LW.C1=cf(0,0.5,0)*euler(-1.57,-3.14+2.57*i,0) | |
574 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
575 | RW.C1=cf(0,0.5,0)*euler(-1.2,0,0) | |
576 | LeftClawEffectRed() | |
577 | end | |
578 | wait(0.5) | |
579 | for i=0,1,0.1 do | |
580 | wait() | |
581 | RootJoint.C0=RootCF*euler(0,0,1-1*i) | |
582 | Torso.Neck.C0=necko*euler(0.2,0,-1+1*i) | |
583 | LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(0,-1.57+3.14*i,-0.2*i) | |
584 | LW.C1=cf(0,0.5,0)*euler(-1.2+1*i,-0.57+0.57*i,0.2-0.2*i) | |
585 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
586 | RW.C1=cf(0,0.5,0)*euler(-1.2+1*i,0,0) | |
587 | end | |
588 | end | |
589 | RootJoint.C0=RootCF | |
590 | Torso.Neck.C0=necko*euler(0.2,0,0) | |
591 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.57,-0.2) | |
592 | LW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
593 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
594 | RW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
595 | attack=false | |
596 | end | |
597 | ||
598 | function ChangeAvatarMode(Mode) | |
599 | attack=true | |
600 | for i=0,1,0.1 do | |
601 | wait() | |
602 | Torso.Neck.C0=necko*euler(0.2-0.8*i,0,0) | |
603 | LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(3*i,1.57-1.57*i,-0.2+0.8*i) | |
604 | LW.C1=cf(0,0.5,0)*euler(-0.2+0.2*i,0,0) | |
605 | RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(3*i,-1.57+1.57*i,0.2-0.8*i) | |
606 | RW.C1=cf(0,0.5,0)*euler(-0.2+0.2*i,0,0) | |
607 | end | |
608 | MagicCircle(BrickColor.new("Black"),prt4.CFrame,1,1,1,0.5,0.5,0.5,0.05) | |
609 | MagicCircle(BrickColor.new("Black"),prt10.CFrame,1,1,1,0.5,0.5,0.5,0.05) | |
610 | AvatarMode=Mode | |
611 | wait(0.5) | |
612 | for i=0,1,0.1 do | |
613 | wait() | |
614 | Torso.Neck.C0=necko*euler(-0.6+0.8*i,0,0) | |
615 | LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(3-3*i,1.57*i,0.6-0.8*i) | |
616 | LW.C1=cf(0,0.5,0)*euler(-0.2*i,0,0) | |
617 | RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(3-3*i,-1.57*i,-0.6+0.8*i) | |
618 | RW.C1=cf(0,0.5,0)*euler(-0.2*i,0,0) | |
619 | end | |
620 | attack=false | |
621 | end | |
622 | ||
623 | function ShadowSlash() | |
624 | shadowattack=true | |
625 | so("http://www.roblox.com/asset/?id=28144425",aprt3,1,1) | |
626 | avLastPoint=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/7,0) | |
627 | avLastPoint2=aprt8.CFrame*CFrame.new(0,aprt8.Size.Y/7,0) | |
628 | avLastPoint3=aprt10.CFrame*CFrame.new(0,aprt10.Size.Y/7,0) | |
629 | avcon1=aprt6.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
630 | avcon2=aprt8.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
631 | avcon3=aprt10.Touched:connect(function(hit) Damagefunc(hit,20,40,math.random(50,80),"Knockdown",aprt1) end) | |
632 | for i=0,1,0.1 do | |
633 | wait() | |
634 | awld1.C0=euler(0,-1*i,0)*cf(0,-3,-2) | |
635 | awld3.C0=cf(3-2*i,1,-0.5*i)*euler(-0.5+2.5*i,0,0) | |
636 | awld3.C1=cf(0,1,0)*euler(0,1*i,-0.7+1.4*i) | |
637 | AvatarClawEffect() | |
638 | end | |
639 | avcon1:disconnect() | |
640 | avcon2:disconnect() | |
641 | avcon3:disconnect() | |
642 | wait(0.5) | |
643 | for i=0,1,0.1 do | |
644 | wait() | |
645 | awld1.C0=euler(0,-1+1*i,0)*cf(0,-3,-2) | |
646 | awld3.C0=cf(1+2*i,1,-0.5+0.5*i)*euler(2-2.5*i,0,0) | |
647 | awld3.C1=cf(0,1,0)*euler(0,1-1*i,0.7-1.4*i) | |
648 | end | |
649 | shadowattack=false | |
650 | end | |
651 | ||
652 | function ShadowDash() | |
653 | shadowattack=true | |
654 | for i=0,1,0.1 do | |
655 | wait() | |
656 | awld1.C0=euler(0,-1*i,0)*cf(0,-3,-2) | |
657 | awld3.C0=cf(3,1,0)*euler(-0.5+0.5*i,0,0) | |
658 | awld3.C1=cf(0,1,0)*euler(0,2.5*i,-0.7+0.5*i) | |
659 | end | |
660 | so("http://www.roblox.com/asset/?id=28144425",aprt3,1,0.9) | |
661 | avLastPoint=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/7,0) | |
662 | avLastPoint2=aprt8.CFrame*CFrame.new(0,aprt8.Size.Y/7,0) | |
663 | avLastPoint3=aprt10.CFrame*CFrame.new(0,aprt10.Size.Y/7,0) | |
664 | avcon1=aprt6.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(50,80),"Snare",aprt1) end) | |
665 | avcon2=aprt8.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(50,80),"Snare",aprt1) end) | |
666 | avcon3=aprt10.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(50,80),"Snare",aprt1) end) | |
667 | for i=0,1,0.1 do | |
668 | wait() | |
669 | awld1.C0=euler(0,-1-0.6*i,0)*cf(0,-3+1*i,-2+6*i) | |
670 | awld3.C0=cf(3,1,0)*euler(0,0,0) | |
671 | awld3.C1=cf(0,1,0)*euler(0.5*i,2.5+0.5*i,-0.2-1.5*i) | |
672 | AvatarClawEffect() | |
673 | end | |
674 | avcon1:disconnect() | |
675 | avcon2:disconnect() | |
676 | avcon3:disconnect() | |
677 | wait(0.2) | |
678 | for i=0,1,0.1 do | |
679 | wait() | |
680 | awld1.C0=euler(0,-1.6+1.6*i,0)*cf(0,-2-1*i,-2+6-6*i) | |
681 | awld3.C0=cf(3,1,0)*euler(-0.5*i,0,0) | |
682 | awld3.C1=cf(0,1,0)*euler(0.5-0.5*i,3-3*i,-1.7+1*i) | |
683 | end | |
684 | shadowattack=false | |
685 | end | |
686 | ||
687 | function ShadowExplode() | |
688 | shadowattack=true | |
689 | for i=0,1,0.1 do | |
690 | wait() | |
691 | awld3.C0=cf(3,1,-0.5*i)*euler(-0.5+1.7*i,0,0) | |
692 | awld3.C1=cf(0,1,0)*euler(0,0,-0.7+1.4*i) | |
693 | awld4.C0=cf(-3,1,-0.5*i)*euler(-0.5+1.7*i,0,0) | |
694 | awld4.C1=cf(0,1,0)*euler(0,0,0.7-1.4*i) | |
695 | end | |
696 | local boom=part(3,workspace,0,0,BrickColor.new("Black"),"Effect",vt(0.5,0.5,0.5)) | |
697 | boom.Anchored=true | |
698 | boom.CFrame=aprt1.CFrame*cf(0,0,-4) | |
699 | so("http://roblox.com/asset/?id=10209624",boom,0.1,.75) | |
700 | so("http://www.roblox.com/asset/?id=2101137",boom,1,0.3) | |
701 | --s.SoundId="http://www.roblox.com/asset/?id=3264793" | |
702 | game:GetService("Debris"):AddItem(boom,10) | |
703 | coroutine.resume(coroutine.create(function() | |
704 | for i=0,1,0.01 do | |
705 | wait() | |
706 | awld3.C0=cf(3,1+0.5*i,-0.5+0.5*i)*euler(1.5,0,0) | |
707 | awld3.C1=cf(0,1,0)*euler(0,0,0.7-2.27*i) | |
708 | awld4.C0=cf(-3,1+0.5*i,-0.5+0.5*i)*euler(1.5,0,0) | |
709 | awld4.C1=cf(0,1,0)*euler(0,0,-0.7+2.27*i) | |
710 | end | |
711 | end)) | |
712 | numb=0.01 | |
713 | for i=1,100 do | |
714 | wait() | |
715 | MagicCircle(BrickColor.new("Black"),boom.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,5,0),1,1,1,0.02,0.5,0.02,0.05) | |
716 | MagicBlock(BrickColor.new("Black"),boom.CFrame,1,1,1,numb,numb,numb) | |
717 | numb=numb+0.01 | |
718 | end | |
719 | so("http://www.roblox.com/asset/?id=3264793",boom,0.5,0.5) | |
720 | so("http://roblox.com/asset/?id=144844438",boom,1,1) | |
721 | so("http://www.roblox.com/asset/?id=2974249",boom,1,0.7) | |
722 | shadowattack=false | |
723 | end | |
724 | ||
725 | function ShadowShoot() | |
726 | shadowattack=true | |
727 | for i=0,1,0.1 do | |
728 | wait() | |
729 | local pos5 = Vector3.new(MMouse.Hit.p.x,aroot.Position.Y,MMouse.Hit.p.z) | |
730 | offset=(aroot.Position.y-MMouse.Hit.p.y)/60 | |
731 | mag=(aroot.Position-MMouse.Hit.p).magnitude/80 | |
732 | offset=offset/mag | |
733 | awld1.C0=euler(0,1.57*i,0)*cf(0,-3,-2) | |
734 | awld4.C0=cf(-3,1,0)*euler(-0.5+0.5*i,0,(-1.57+offset)*i) | |
735 | awld4.C1=cf(0,1,0)*euler(0,0,0.7-0.7*i) | |
736 | end | |
737 | wait(0.1) | |
738 | shoottrail(aprt11,0) | |
739 | for i=0,1,0.1 do | |
740 | wait() | |
741 | awld1.C0=euler(0,1.57-1.57*i,0)*cf(0,-3,-2) | |
742 | awld4.C0=cf(-3,1,0)*euler(-0.5*i,0,(-1.57+offset)+(1.57-offset)*i) | |
743 | awld4.C1=cf(0,1,0)*euler(0,0,0.7*i) | |
744 | end | |
745 | shadowattack=false | |
746 | end | |
747 | ||
748 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
749 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
750 | end | |
751 | ||
752 | function effect(Color,Ref,LP,P1,returnn) | |
753 | local effectsmsh = Instance.new("BlockMesh") | |
754 | effectsmsh.Scale = Vector3.new(0.2,1,0.2) | |
755 | effectsmsh.Name = "Mesh" | |
756 | local effectsg = Instance.new("Part") | |
757 | effectsg.formFactor = 3 | |
758 | effectsg.CanCollide = false | |
759 | effectsg.Name = "Eff" | |
760 | effectsg.Locked = true | |
761 | effectsg.Anchored = true | |
762 | effectsg.Size = Vector3.new(0.5,1,0.5) | |
763 | effectsg.Parent = workspace | |
764 | effectsmsh.Parent = effectsg | |
765 | effectsg.BrickColor = BrickColor.new(Color) | |
766 | effectsg.Reflectance = Ref | |
767 | local point1 = P1 | |
768 | local mg = (LP.p - point1.p).magnitude | |
769 | effectsg.Size = Vector3.new(0.5,mg,0.5) | |
770 | effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0) | |
771 | effectsmsh.Scale = Vector3.new(0.2,1,0.2) | |
772 | game:GetService("Debris"):AddItem(effectsg,2) | |
773 | if returnn then return effectsg end | |
774 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
775 | if not returnn then | |
776 | for i = 0 , 1 , 0.1 do | |
777 | wait() | |
778 | Part.Transparency = 1*i | |
779 | Mesh.Scale = Vector3.new(0.2-0.2*i,1,0.2-0.2*i) | |
780 | end | |
781 | wait() | |
782 | Part.Parent = nil | |
783 | end | |
784 | end),effectsg,effectsmsh) | |
785 | end | |
786 | ||
787 | function LeftClawEffect() | |
788 | local Point=prt2.CFrame*CFrame.new(0,prt2.Size.Y/7,0) | |
789 | effect("Black",0.5,LastPoint,Point) | |
790 | LastPoint=Point | |
791 | local Point2=prt4.CFrame*CFrame.new(0,prt4.Size.Y/7,0) | |
792 | effect("Black",0.5,LastPoint2,Point2) | |
793 | LastPoint2=Point2 | |
794 | local Point3=prt6.CFrame*CFrame.new(0,prt6.Size.Y/7,0) | |
795 | effect("Black",0.5,LastPoint3,Point3) | |
796 | LastPoint3=Point3 | |
797 | end | |
798 | ||
799 | function LeftClawEffectRed() | |
800 | local Point=prt2.CFrame*CFrame.new(0,prt2.Size.Y/7,0) | |
801 | effect("Bright red",0.5,LastPoint,Point) | |
802 | LastPoint=Point | |
803 | local Point2=prt4.CFrame*CFrame.new(0,prt4.Size.Y/7,0) | |
804 | effect("Bright red",0.5,LastPoint2,Point2) | |
805 | LastPoint2=Point2 | |
806 | local Point3=prt6.CFrame*CFrame.new(0,prt6.Size.Y/7,0) | |
807 | effect("Bright red",0.5,LastPoint3,Point3) | |
808 | LastPoint3=Point3 | |
809 | end | |
810 | ||
811 | function RightClawEffect() | |
812 | local rPoint=prt8.CFrame*CFrame.new(0,prt8.Size.Y/7,0) | |
813 | effect("Black",0.5,rLastPoint,rPoint) | |
814 | rLastPoint=rPoint | |
815 | local rPoint2=prt10.CFrame*CFrame.new(0,prt10.Size.Y/7,0) | |
816 | effect("Black",0.5,rLastPoint2,rPoint2) | |
817 | rLastPoint2=rPoint2 | |
818 | local rPoint3=prt12.CFrame*CFrame.new(0,prt12.Size.Y/7,0) | |
819 | effect("Black",0.5,rLastPoint3,rPoint3) | |
820 | rLastPoint3=rPoint3 | |
821 | end | |
822 | ||
823 | function AvatarClawEffect() | |
824 | local avPoint=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/7,0) | |
825 | effect("Black",0.5,avLastPoint,avPoint) | |
826 | avLastPoint=avPoint | |
827 | local avPoint2=aprt8.CFrame*CFrame.new(0,aprt8.Size.Y/7,0) | |
828 | effect("Black",0.5,avLastPoint2,avPoint2) | |
829 | avLastPoint2=avPoint2 | |
830 | local avPoint3=aprt10.CFrame*CFrame.new(0,aprt10.Size.Y/7,0) | |
831 | effect("Black",0.5,avLastPoint3,avPoint3) | |
832 | avLastPoint3=avPoint3 | |
833 | MagicBlock(BrickColor.new("Black"),aprt6.CFrame,3,3,3,-0.5,-0.5,-0.5) | |
834 | MagicBlock(BrickColor.new("Black"),aprt8.CFrame,3,3,3,-0.5,-0.5,-0.5) | |
835 | MagicBlock(BrickColor.new("Black"),aprt10.CFrame,3,3,3,-0.5,-0.5,-0.5) | |
836 | end | |
837 | ||
838 | function ElecEffect(cff,x,y,z) | |
839 | local prt=part(3,workspace,0,0,BrickColor.new("White"),"Part",vt(1,1,1)) | |
840 | prt.Anchored=true | |
841 | xval=math.random() | |
842 | yval=math.random() | |
843 | zval=math.random() | |
844 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval)) | |
845 | coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal) | |
846 | Part.CFrame=Frame*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z)) | |
847 | for i=1,8 do | |
848 | wait() | |
849 | xvaal=xvaal-0.1 | |
850 | yvaal=yvaal-0.1 | |
851 | zvaal=zvaal-0.1 | |
852 | Mesh.Scale=vt(xvaal,yvaal,zvaal) | |
853 | Part.Transparency=Part.Transparency+0.09 | |
854 | end | |
855 | Part.Parent=nil | |
856 | end),prt,msh,cff,xval,yval,zval) | |
857 | end | |
858 | ||
859 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3) | |
860 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
861 | prt.Anchored=true | |
862 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
863 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
864 | game:GetService("Debris"):AddItem(prt,2) | |
865 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
866 | for i=0,1,0.1 do | |
867 | wait() | |
868 | Part.CFrame=Part.CFrame | |
869 | Part.Transparency=i | |
870 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
871 | end | |
872 | Part.Parent=nil | |
873 | end),prt,msh) | |
874 | end | |
875 | ||
876 | function MagicBlock2(brickcolor,cframe,x1,y1,z1,x3,y3,z3) | |
877 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
878 | prt.Anchored=true | |
879 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
880 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
881 | game:GetService("Debris"):AddItem(prt,2) | |
882 | CF=prt.CFrame | |
883 | num=math.random(5,20) | |
884 | coroutine.resume(coroutine.create(function(Part,Mesh,CF2,Num) | |
885 | for i=0,1.05,0.05 do | |
886 | wait() | |
887 | Part.CFrame=CF2*cf(0,i*Num,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
888 | Part.Transparency=i | |
889 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
890 | end | |
891 | Part.Parent=nil | |
892 | end),prt,msh,CF,num) | |
893 | end | |
894 | ||
895 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
896 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
897 | prt.Anchored=true | |
898 | prt.CFrame=cframe | |
899 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
900 | game:GetService("Debris"):AddItem(prt,2) | |
901 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
902 | for i=0,1,delay do | |
903 | wait() | |
904 | Part.CFrame=Part.CFrame | |
905 | Part.Transparency=i | |
906 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
907 | end | |
908 | Part.Parent=nil | |
909 | end),prt,msh) | |
910 | end | |
911 | ||
912 | function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3) | |
913 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
914 | prt.Anchored=true | |
915 | prt.CFrame=cframe*euler(x2,y2,z2) | |
916 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1)) | |
917 | game:GetService("Debris"):AddItem(prt,2) | |
918 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
919 | for i=0,1,0.03 do | |
920 | wait() | |
921 | Part.CFrame=Part.CFrame | |
922 | Part.Transparency=i | |
923 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
924 | end | |
925 | Part.Parent=nil | |
926 | end),prt,msh) | |
927 | end | |
928 | ||
929 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
930 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
931 | prt.Anchored=true | |
932 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
933 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
934 | game:GetService("Debris"):AddItem(prt,2) | |
935 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
936 | CF=Part.CFrame | |
937 | Numbb=0 | |
938 | randnumb=math.random()-math.random() | |
939 | rand1=math.random()/5 | |
940 | for i=0,1,rand1 do | |
941 | wait() | |
942 | CF=CF*cf(0,1,0) | |
943 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
944 | Part.CFrame=CF*euler(Numbb,0,0) | |
945 | Part.Transparency=i | |
946 | Numbb=Numbb+randnumb | |
947 | end | |
948 | Part.Parent=nil | |
949 | end),prt,CF,Numbb,randnumb) | |
950 | end | |
951 | ||
952 | function MagicFreeze(brickcolor,cframe,x1,y1,z1,x3,y3,z3) | |
953 | local prt=part(3,workspace,0.4,0.3,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
954 | prt.Anchored=true | |
955 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
956 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(x1,y1,z1)) | |
957 | game:GetService("Debris"):AddItem(prt,2) | |
958 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
959 | for i=0,1,0.1 do | |
960 | Part.CFrame=Part.CFrame*cf(0,0.3,0) | |
961 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
962 | end | |
963 | wait(5) | |
964 | Part.Parent=nil | |
965 | end),prt,msh) | |
966 | end | |
967 | ||
968 | function MagicFire(brickcolor,cframe,x1,y1,z1) | |
969 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
970 | prt.Anchored=true | |
971 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
972 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
973 | game:GetService("Debris"):AddItem(prt,2) | |
974 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
975 | for i=0,1,0.1 do | |
976 | wait() | |
977 | Part.CFrame=cf(Part.Position+vt(0,0.5,0))*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
978 | Part.Transparency=i | |
979 | Mesh.Scale=Mesh.Scale+vt(0.1,0.1,0.1) | |
980 | end | |
981 | Part.Parent=nil | |
982 | end),prt,msh) | |
983 | end | |
984 | ||
985 | function LifeStealEffect(brickcolor,cframe,x1,y1,z1) | |
986 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
987 | prt.Anchored=false | |
988 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
989 | game:GetService("Debris"):AddItem(prt,4) | |
990 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
991 | bp=Instance.new("BodyPosition") | |
992 | bp.P=2000 | |
993 | bp.D=100 | |
994 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
995 | bp.position=prt.Position+vt(math.random(-5,5),math.random(0,5),math.random(-5,5)) | |
996 | bp.Parent=prt | |
997 | coroutine.resume(coroutine.create(function(Part) | |
998 | wait(1.5) | |
999 | MagicCircle(BrickColor.new("Bright red"),Part.CFrame,2,2,2,0.2,0.2,0.2,0.05) | |
1000 | Part.Transparency=1 | |
1001 | local pprt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1002 | local mmsh=mesh("SpecialMesh",pprt,"Sphere","",vt(0,0,0),vt(1,1,1)) | |
1003 | pprt.Anchored=true | |
1004 | cnM = ((Torso.Position + Part.Position) / 2).Magnitude | |
1005 | pprt.Size=Vector3.new(1,1,cnM) | |
1006 | pprt.CFrame=cf(Torso.Position,Part.Position)*cf(0,0,-cnM/2) | |
1007 | game:GetService("Debris"):AddItem(pprt,2) | |
1008 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1009 | for i=0,1,0.05 do | |
1010 | wait() | |
1011 | Part.Transparency=1*i | |
1012 | Mesh.Scale=vt(0.5-0.5*i,0.5-0.5*i,1) | |
1013 | end | |
1014 | Part.Parent=nil | |
1015 | end),pprt,mmsh) | |
1016 | end),prt) | |
1017 | --[[coroutine.resume(coroutine.create(function(Part,Mesh) | |
1018 | for i=0,1,0.1 do | |
1019 | wait() | |
1020 | Part.CFrame=Part.CFrame | |
1021 | Part.Transparency=i | |
1022 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1023 | end | |
1024 | Part.Parent=nil | |
1025 | end),prt,msh)]] | |
1026 | end | |
1027 | ||
1028 | range=300 | |
1029 | rangepower=5 | |
1030 | function shoottrail(baseprt,spread) | |
1031 | so("http://www.roblox.com/asset/?id=2767090",baseprt,2,1) | |
1032 | coroutine.resume(coroutine.create(function(v) | |
1033 | local spreadvector = (vt(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (baseprt.Position).magnitude/100 | |
1034 | local dir = aprt11.CFrame.lookVector+spreadvector | |
1035 | local hit,pos = rayCast(baseprt.Position,dir,10,workspace) | |
1036 | local rangepos = range | |
1037 | local function drawtrail(From,To) | |
1038 | local effectsmsh = Instance.new("CylinderMesh") | |
1039 | effectsmsh.Scale = Vector3.new(1,1,1) | |
1040 | effectsmsh.Name = "Mesh" | |
1041 | local effectsg = Instance.new("Part") | |
1042 | effectsg.Transparency = 1 | |
1043 | effectsg.formFactor = 3 | |
1044 | effectsg.CanCollide = false | |
1045 | effectsg.Name = "Eff" | |
1046 | effectsg.Locked = true | |
1047 | effectsg.Anchored = true | |
1048 | effectsg.Size = Vector3.new(0.2,0.2,0.2) | |
1049 | effectsg.Parent = Avatar | |
1050 | effectsmsh.Parent = effectsg | |
1051 | game:GetService("Debris"):AddItem(effectsg,0.2) | |
1052 | local LP = From | |
1053 | local point1 = To | |
1054 | local mg = (LP - point1).magnitude | |
1055 | effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0) | |
1056 | local prt=part(3,Avatar,0,0,BrickColor.new("Black"),"Effect",vt(0.5,0.5,0.5)) | |
1057 | prt.Anchored=true | |
1058 | prt.CFrame=effectsg.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1059 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(2,2,2)) | |
1060 | game:GetService("Debris"):AddItem(prt,2) | |
1061 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1062 | for i=0,1,0.1 do | |
1063 | wait() | |
1064 | Part.CFrame=Part.CFrame | |
1065 | Part.Transparency=i | |
1066 | Mesh.Scale=Mesh.Scale+vt(-0.5,-0.5,-0.5) | |
1067 | end | |
1068 | Part.Parent=nil | |
1069 | end),prt,msh) | |
1070 | end | |
1071 | local newpos = baseprt.Position | |
1072 | local inc = rangepower | |
1073 | repeat | |
1074 | wait() wait() | |
1075 | rangepos = rangepos - 10 | |
1076 | dir = dir | |
1077 | hit,pos = rayCast(newpos,dir,inc,Avatar) | |
1078 | drawtrail(newpos,pos) | |
1079 | newpos = newpos + (dir * inc) | |
1080 | if inc >= 20 then | |
1081 | inc = inc - 10 | |
1082 | end | |
1083 | if hit ~= nil then | |
1084 | rangepos = 0 | |
1085 | end | |
1086 | until rangepos <= 0 | |
1087 | if hit ~= nil then | |
1088 | MagicCircle(BrickColor.new("Black"),CFrame.new(pos),1,1,1,0.5,0.5,0.5,0.05) | |
1089 | if hit.Parent:FindFirstChild("Humanoid") ~= nil then | |
1090 | hum = hit.Parent.Humanoid | |
1091 | tTorso=hit.Parent.Torso | |
1092 | Damagefunc(hit,10,20,math.random(50,80),"Snare",aprt1) | |
1093 | so("http://www.roblox.com/asset/?id=4678959",hit.Parent.Torso,2,1) | |
1094 | --ADmg(hum,hit) | |
1095 | elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then | |
1096 | hum = hit.Parent.Parent.Humanoid | |
1097 | tTorso=hit.Parent.Parent.Torso | |
1098 | Damagefunc(hit.Parent,10,20,math.random(50,80),"Snare",aprt1) | |
1099 | so("http://www.roblox.com/asset/?id=4678959",hit.Parent.Parent.Torso,2,1) | |
1100 | --ADmg(hum,hit) | |
1101 | end | |
1102 | end | |
1103 | end)) | |
1104 | end | |
1105 | ||
1106 | so = function(id,par,vol,pit) | |
1107 | coroutine.resume(coroutine.create(function() | |
1108 | local sou = Instance.new("Sound",par or workspace) | |
1109 | sou.Volume=vol | |
1110 | sou.Pitch=pit or 1 | |
1111 | sou.SoundId=id | |
1112 | wait() | |
1113 | sou:play() | |
1114 | game:GetService("Debris"):AddItem(sou,6) | |
1115 | end)) | |
1116 | end | |
1117 | ||
1118 | function findNearestTorso(pos) | |
1119 | local list = game:service("Workspace"):children() | |
1120 | local torso = nil | |
1121 | local dist = 50 | |
1122 | local temp = nil | |
1123 | local human = nil | |
1124 | local temp2 = nil | |
1125 | for x = 1, #list do | |
1126 | temp2 = list[x] | |
1127 | if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then | |
1128 | temp = temp2:findFirstChild("Torso") | |
1129 | human = temp2:findFirstChild("Humanoid") | |
1130 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
1131 | if (temp.Position - pos).magnitude < dist then | |
1132 | torso = temp | |
1133 | dist = (temp.Position - pos).magnitude | |
1134 | end | |
1135 | end | |
1136 | end | |
1137 | end | |
1138 | return torso | |
1139 | end | |
1140 | ||
1141 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property) | |
1142 | if hit.Parent==nil then | |
1143 | return | |
1144 | end | |
1145 | CPlayer=Bin | |
1146 | h=hit.Parent:FindFirstChild("Humanoid") | |
1147 | for _,v in pairs(hit.Parent:children()) do | |
1148 | if v:IsA("Humanoid") then | |
1149 | h=v | |
1150 | end | |
1151 | end | |
1152 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
1153 | if attackdebounce == false then | |
1154 | attackdebounce = true | |
1155 | coroutine.resume(coroutine.create(function() | |
1156 | wait(0.2) | |
1157 | attackdebounce = false | |
1158 | end)) | |
1159 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
1160 | return | |
1161 | end]] | |
1162 | -- hs(hit,1.2) | |
1163 | c=Instance.new("ObjectValue") | |
1164 | c.Name="creator" | |
1165 | c.Value=game:service("Players").LocalPlayer | |
1166 | c.Parent=h | |
1167 | game:GetService("Debris"):AddItem(c,.5) | |
1168 | Damage=math.random(minim,maxim) | |
1169 | -- h:TakeDamage(Damage) | |
1170 | blocked=false | |
1171 | block=hit.Parent:findFirstChild("Block") | |
1172 | if block~=nil then | |
1173 | print("herp") | |
1174 | if block.Value>0 then | |
1175 | blocked=true | |
1176 | block.Value=block.Value-1 | |
1177 | print(block.Value) | |
1178 | end | |
1179 | end | |
1180 | if blocked==false then | |
1181 | -- h:TakeDamage(Damage) | |
1182 | h.Health=h.Health-Damage | |
1183 | showDamage(hit.Parent,Damage,.5,BrickColor:Red()) | |
1184 | else | |
1185 | h.Health=h.Health-Damage/2 | |
1186 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
1187 | end | |
1188 | if Type=="Knockdown" then | |
1189 | hum=hit.Parent.Humanoid | |
1190 | hum.PlatformStand=true | |
1191 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1192 | wait(1) | |
1193 | HHumanoid.PlatformStand=false | |
1194 | end),hum) | |
1195 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
1196 | print(angle) | |
1197 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
1198 | local bodvol=Instance.new("BodyVelocity") | |
1199 | bodvol.velocity=angle*knockback | |
1200 | bodvol.P=5000 | |
1201 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1202 | bodvol.Parent=hit | |
1203 | rl=Instance.new("BodyAngularVelocity") | |
1204 | rl.P=3000 | |
1205 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
1206 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
1207 | rl.Parent=hit | |
1208 | game:GetService("Debris"):AddItem(bodvol,.5) | |
1209 | game:GetService("Debris"):AddItem(rl,.5) | |
1210 | elseif Type=="Normal" then | |
1211 | vp=Instance.new("BodyVelocity") | |
1212 | vp.P=500 | |
1213 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
1214 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
1215 | vp.velocity=RootPart.CFrame.lookVector*knockback+RootPart.Velocity/1.05 | |
1216 | if knockback>0 then | |
1217 | vp.Parent=hit.Parent.Torso | |
1218 | end | |
1219 | game:GetService("Debris"):AddItem(vp,.5) | |
1220 | elseif Type=="Up" then | |
1221 | local bodyVelocity=Instance.new("BodyVelocity") | |
1222 | bodyVelocity.velocity=vt(0,40,0) | |
1223 | bodyVelocity.P=5000 | |
1224 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1225 | bodyVelocity.Parent=hit | |
1226 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
1227 | print(angle) | |
1228 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
1229 | local bodvol=Instance.new("BodyVelocity") | |
1230 | bodvol.velocity=angle*knockback | |
1231 | bodvol.P=5000 | |
1232 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1233 | bodvol.Parent=hit | |
1234 | game:GetService("Debris"):AddItem(bodvol,.8) | |
1235 | game:GetService("Debris"):AddItem(bodyVelocity,.8) | |
1236 | elseif Type=="Snare" then | |
1237 | bp=Instance.new("BodyPosition") | |
1238 | bp.P=2000 | |
1239 | bp.D=100 | |
1240 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1241 | bp.position=hit.Parent.Torso.Position | |
1242 | bp.Parent=hit.Parent.Torso | |
1243 | coroutine.resume(coroutine.create(function(Part,BodPoss) | |
1244 | while BodPoss.Parent~=nil do | |
1245 | wait(0.1) | |
1246 | MagicBlock(BrickColor.new("Black"),Part.CFrame,3,3,3,-0.2,-0.2,-0.2) | |
1247 | end | |
1248 | end),hit.Parent.Torso,bp) | |
1249 | game:GetService("Debris"):AddItem(bp,2) | |
1250 | elseif Type=="LifeSteal" then | |
1251 | if lifestolen==false then | |
1252 | lifestolen=true | |
1253 | LifeStolenTorso=hit.Parent.Torso | |
1254 | for i=1,5 do | |
1255 | LifeStealEffect(BrickColor.new("Bright red"),hit.Parent.Torso.CFrame,1,1,1) | |
1256 | end | |
1257 | coroutine.resume(coroutine.create(function(Dam) | |
1258 | wait(1.5) | |
1259 | Heal=Dam | |
1260 | Humanoid.Health=Humanoid.Health+Heal | |
1261 | showDamage(Torso.Parent,Heal,.5,BrickColor.new("Medium green")) | |
1262 | end),Damage) | |
1263 | end | |
1264 | end | |
1265 | c=Instance.new("ObjectValue") | |
1266 | c.Name="creator" | |
1267 | c.Value=Player | |
1268 | c.Parent=h | |
1269 | game:GetService("Debris"):AddItem(c,.5) | |
1270 | CRIT=false | |
1271 | hitDeb=true | |
1272 | AttackPos=6 | |
1273 | end | |
1274 | end | |
1275 | end | |
1276 | ||
1277 | showDamage=function(Char,Dealt,du,Color) | |
1278 | m=Instance.new("Model") | |
1279 | m.Name=tostring(Dealt) | |
1280 | h=Instance.new("Humanoid") | |
1281 | h.Health=0 | |
1282 | h.MaxHealth=0 | |
1283 | h.Parent=m | |
1284 | c=Instance.new("Part") | |
1285 | c.Transparency=0 | |
1286 | c.BrickColor=Color | |
1287 | c.Name="Head" | |
1288 | c.TopSurface=0 | |
1289 | c.BottomSurface=0 | |
1290 | c.formFactor="Plate" | |
1291 | c.Size=Vector3.new(1,.4,1) | |
1292 | ms=Instance.new("CylinderMesh") | |
1293 | ms.Scale=Vector3.new(.8,.8,.8) | |
1294 | if CRIT==true then | |
1295 | ms.Scale=Vector3.new(1,1.25,1) | |
1296 | end | |
1297 | ms.Parent=c | |
1298 | c.Reflectance=0 | |
1299 | Instance.new("BodyGyro").Parent=c | |
1300 | c.Parent=m | |
1301 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
1302 | f=Instance.new("BodyPosition") | |
1303 | f.P=2000 | |
1304 | f.D=100 | |
1305 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
1306 | f.position=c.Position+Vector3.new(0,3,0) | |
1307 | f.Parent=c | |
1308 | game:GetService("Debris"):AddItem(m,.5+du) | |
1309 | c.CanCollide=false | |
1310 | m.Parent=workspace | |
1311 | c.CanCollide=false | |
1312 | end | |
1313 | ||
1314 | combo=0 | |
1315 | function ob1d(mouse) | |
1316 | if attack==true then return end | |
1317 | hold=true | |
1318 | if combo==0 then | |
1319 | combo=1 | |
1320 | attackone() | |
1321 | elseif combo==1 then | |
1322 | combo=2 | |
1323 | attacktwo() | |
1324 | elseif combo==2 then | |
1325 | combo=3 | |
1326 | attackthree() | |
1327 | elseif combo==3 then | |
1328 | combo=0 | |
1329 | end | |
1330 | coroutine.resume(coroutine.create(function() | |
1331 | wait(1) | |
1332 | if attack==false then | |
1333 | combo=0 | |
1334 | RootJoint.C0=RootCF | |
1335 | Torso.Neck.C0=necko*euler(0.2,0,0) | |
1336 | LW.C0=cf(-1.5,0.5,0)*euler(0,1.57,-0.2) | |
1337 | LW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
1338 | RW.C0=cf(1.5,0.5,0)*euler(0,-1.57,0.2) | |
1339 | RW.C1=cf(0,0.5,0)*euler(-0.2,0,0) | |
1340 | end | |
1341 | end)) | |
1342 | end | |
1343 | ||
1344 | function ob1u(mouse) | |
1345 | hold = false | |
1346 | end | |
1347 | ||
1348 | buttonhold = false | |
1349 | ||
1350 | eul=0 | |
1351 | function key(key) | |
1352 | if shadowattack==false then | |
1353 | if key=="z" then | |
1354 | ShadowSlash() | |
1355 | end | |
1356 | if key=="x" then | |
1357 | ShadowShoot() | |
1358 | end | |
1359 | if key=="c" then | |
1360 | ShadowDash() | |
1361 | end | |
1362 | if key=="v" then | |
1363 | ShadowExplode() | |
1364 | end | |
1365 | end | |
1366 | if attack==true then return end | |
1367 | if key=="f" then | |
1368 | LifeSteal() | |
1369 | end | |
1370 | if key=="q" then | |
1371 | ---ChangeAvatarMode("Follow") | |
1372 | end | |
1373 | if key=="e" then | |
1374 | ---ChangeAvatarMode("Stay") | |
1375 | end | |
1376 | if key=="r" then | |
1377 | ---if MMouse.Target~=nil and MMouse.Target.Parent:findFirstChild("Humanoid")~=nil and MMouse.Target.Parent:findFirstChild("Torso")~=nil ---then | |
1378 | ---TargetTorso=MMouse.Target.Parent.Torso | |
1379 | ---ChangeAvatarMode("Aim") | |
1380 | ---end | |
1381 | end | |
1382 | end | |
1383 | ||
1384 | function key2(key) | |
1385 | ||
1386 | end | |
1387 | ||
1388 | function s(mouse) | |
1389 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
1390 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
1391 | mouse.KeyDown:connect(key) | |
1392 | mouse.KeyUp:connect(key2) | |
1393 | unsheathed = true | |
1394 | player = Player | |
1395 | ch = Character | |
1396 | MMouse = mouse | |
1397 | RSH = ch.Torso["Right Shoulder"] | |
1398 | LSH = ch.Torso["Left Shoulder"] | |
1399 | -- | |
1400 | RSH.Parent = nil | |
1401 | LSH.Parent = nil | |
1402 | -- | |
1403 | RW.Part0 = ch.Torso | |
1404 | RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
1405 | RW.C1 = CFrame.new(0, 0.5, 0) | |
1406 | RW.Part1 = ch["Right Arm"] | |
1407 | RW.Parent = ch.Torso | |
1408 | --_G.R = RW | |
1409 | -- | |
1410 | LW.Part0 = ch.Torso | |
1411 | LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
1412 | LW.C1 = CFrame.new(0, 0.5, 0) | |
1413 | LW.Part1 = ch["Left Arm"] | |
1414 | LW.Parent = ch.Torso | |
1415 | --_G.L = LW | |
1416 | -- | |
1417 | equipanim() | |
1418 | end | |
1419 | ||
1420 | function ds(mouse) | |
1421 | hideanim() | |
1422 | wait(0) | |
1423 | RW.Parent = nil | |
1424 | LW.Parent = nil | |
1425 | RSH.Parent = player.Character.Torso | |
1426 | LSH.Parent = player.Character.Torso | |
1427 | end | |
1428 | ||
1429 | Bin.Selected:connect(s) | |
1430 | Bin.Deselected:connect(ds) | |
1431 | print("Warden Claws loaded.") | |
1432 | ||
1433 | --[[ | |
1434 | Copyrighted (C) Fenrier 2014 | |
1435 | ]] |