SHOW:
|
|
- or go back to the newest paste.
1 | - | Player=game:GetService("Players").LocalPlayer |
1 | + | -- This script has been converted to FE by iPxter |
2 | ||
3 | ||
4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | script.Parent = Player.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent and t.Function then | |
34 | t.Function(...) | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=Player then return end | |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | else | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | - | mouse=Player:GetMouse() |
53 | + | t.Function(t.Name,io.UserInputState,io) |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").determivanoss | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local Mouse = Player:GetMouse() | |
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
85 | end | |
86 | ||
87 | - | Player=game:GetService('Players').LocalPlayer |
87 | + | Player=game:GetService("Players").determivanoss |
88 | Character=Player.Character | |
89 | - | Mouse=Player:GetMouse() |
89 | + | |
90 | Backpack=Player.Backpack | |
91 | Torso=Character.Torso | |
92 | Head=Character.Head | |
93 | Humanoid=Character.Humanoid | |
94 | m=Instance.new('Model',Character) | |
95 | LeftArm=Character["Left Arm"] | |
96 | LeftLeg=Character["Left Leg"] | |
97 | RightArm=Character["Right Arm"] | |
98 | RightLeg=Character["Right Leg"] | |
99 | LS=Torso["Left Shoulder"] | |
100 | LH=Torso["Left Hip"] | |
101 | RS=Torso["Right Shoulder"] | |
102 | RH=Torso["Right Hip"] | |
103 | Face = Head.face | |
104 | Neck=Torso.Neck | |
105 | it=Instance.new | |
106 | attacktype=1 | |
107 | vt=Vector3.new | |
108 | cf=CFrame.new | |
109 | euler=CFrame.fromEulerAnglesXYZ | |
110 | angles=CFrame.Angles | |
111 | cloaked=false | |
112 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
113 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
114 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
115 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
116 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
117 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
118 | RootPart=Character.HumanoidRootPart | |
119 | RootJoint=RootPart.RootJoint | |
120 | RootCF=euler(-1.57,0,3.14) | |
121 | attack = false | |
122 | attackdebounce = false | |
123 | deb=false | |
124 | equipped=true | |
125 | hand=false | |
126 | MMouse=nil | |
127 | combo=0 | |
128 | mana=0 | |
129 | trispeed=.2 | |
130 | attackmode='none' | |
131 | local idle=0 | |
132 | local Anim="Idle" | |
133 | local Effects={} | |
134 | local gun=false | |
135 | local shoot=false | |
136 | player=nil | |
137 | mana=0 | |
138 | ||
139 | --save shoulders | |
140 | RSH, LSH=nil, nil | |
141 | --welds | |
142 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
143 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
144 | LH=Torso["Left Hip"] | |
145 | RH=Torso["Right Hip"] | |
146 | TorsoColor=Torso.BrickColor | |
147 | function NoOutline(Part) | |
148 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
149 | end | |
150 | player=Player | |
151 | ch=Character | |
152 | RSH=ch.Torso["Right Shoulder"] | |
153 | LSH=ch.Torso["Left Shoulder"] | |
154 | -- | |
155 | RSH.Parent=nil | |
156 | LSH.Parent=nil | |
157 | -- | |
158 | RW.Name="Right Shoulder" | |
159 | RW.Part0=ch.Torso | |
160 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
161 | RW.C1=cf(0, 0.5, 0) | |
162 | RW.Part1=ch["Right Arm"] | |
163 | RW.Parent=ch.Torso | |
164 | -- | |
165 | LW.Name="Left Shoulder" | |
166 | LW.Part0=ch.Torso | |
167 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
168 | LW.C1=cf(0, 0.5, 0) | |
169 | LW.Part1=ch["Left Arm"] | |
170 | LW.Parent=ch.Torso | |
171 | ||
172 | Player=game:GetService('Players').determivanoss | |
173 | Character=Player.Character | |
174 | m=Instance.new('Model',Character) | |
175 | ||
176 | ||
177 | local function weldBetween(a, b) | |
178 | local weldd = Instance.new("ManualWeld") | |
179 | weldd.Part0 = a | |
180 | weldd.Part1 = b | |
181 | weldd.C0 = CFrame.new() | |
182 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
183 | weldd.Parent = a | |
184 | return weldd | |
185 | end | |
186 | ||
187 | function swait(num) | |
188 | if num==0 or num==nil then | |
189 | game:service'RunService'.Stepped:wait(0) | |
190 | else | |
191 | for i=0,num do | |
192 | game:service'RunService'.Stepped:wait(0) | |
193 | end | |
194 | end | |
195 | end | |
196 | ||
197 | function nooutline(part) | |
198 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
199 | end | |
200 | ||
201 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
202 | local fp=it("Part") | |
203 | fp.formFactor=formfactor | |
204 | fp.Parent=parent | |
205 | fp.Reflectance=reflectance | |
206 | fp.Transparency=transparency | |
207 | fp.CanCollide=false | |
208 | fp.Locked=true | |
209 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
210 | fp.Name=name | |
211 | fp.Size=size | |
212 | fp.Position=Character.Torso.Position | |
213 | nooutline(fp) | |
214 | fp.Material=material | |
215 | fp:BreakJoints() | |
216 | return fp | |
217 | end | |
218 | ||
219 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
220 | local mesh=it(Mesh) | |
221 | mesh.Parent=part | |
222 | if Mesh=="SpecialMesh" then | |
223 | mesh.MeshType=meshtype | |
224 | mesh.MeshId=meshid | |
225 | end | |
226 | mesh.Offset=offset | |
227 | mesh.Scale=scale | |
228 | return mesh | |
229 | end | |
230 | ||
231 | function weld(parent,part0,part1,c0,c1) | |
232 | local weld=it("Weld") | |
233 | weld.Parent=parent | |
234 | weld.Part0=part0 | |
235 | weld.Part1=part1 | |
236 | weld.C0=c0 | |
237 | weld.C1=c1 | |
238 | return weld | |
239 | end | |
240 | ||
241 | ||
242 | local function CFrameFromTopBack(at, top, back) | |
243 | local right = top:Cross(back) | |
244 | return CFrame.new(at.x, at.y, at.z, | |
245 | right.x, top.x, back.x, | |
246 | right.y, top.y, back.y, | |
247 | right.z, top.z, back.z) | |
248 | end | |
249 | ||
250 | function Triangle(a, b, c) | |
251 | local edg1 = (c-a):Dot((b-a).unit) | |
252 | local edg2 = (a-b):Dot((c-b).unit) | |
253 | local edg3 = (b-c):Dot((a-c).unit) | |
254 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
255 | a, b, c = a, b, c | |
256 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
257 | a, b, c = b, c, a | |
258 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
259 | a, b, c = c, a, b | |
260 | else | |
261 | assert(false, "unreachable") | |
262 | end | |
263 | ||
264 | local len1 = (c-a):Dot((b-a).unit) | |
265 | local len2 = (b-a).magnitude - len1 | |
266 | local width = (a + (b-a).unit*len1 - c).magnitude | |
267 | ||
268 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
269 | ||
270 | local list = {} | |
271 | ||
272 | local TrailColor = ("Dark grey") | |
273 | ||
274 | if len1 > 0.01 then | |
275 | local w1 = Instance.new('WedgePart', m) | |
276 | game:GetService("Debris"):AddItem(w1,5) | |
277 | w1.Material = "SmoothPlastic" | |
278 | w1.FormFactor = 'Custom' | |
279 | w1.BrickColor = BrickColor.new(TrailColor) | |
280 | w1.Transparency = 0 | |
281 | w1.Reflectance = 0 | |
282 | w1.Material = "SmoothPlastic" | |
283 | w1.CanCollide = false | |
284 | NoOutline(w1) | |
285 | local sz = Vector3.new(0.2, width, len1) | |
286 | w1.Size = sz | |
287 | local sp = Instance.new("SpecialMesh",w1) | |
288 | sp.MeshType = "Wedge" | |
289 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
290 | w1:BreakJoints() | |
291 | w1.Anchored = true | |
292 | w1.Parent = workspace | |
293 | w1.Transparency = 0.7 | |
294 | table.insert(Effects,{w1,"Disappear",.01}) | |
295 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
296 | table.insert(list,w1) | |
297 | end | |
298 | ||
299 | if len2 > 0.01 then | |
300 | local w2 = Instance.new('WedgePart', m) | |
301 | game:GetService("Debris"):AddItem(w2,5) | |
302 | w2.Material = "SmoothPlastic" | |
303 | w2.FormFactor = 'Custom' | |
304 | w2.BrickColor = BrickColor.new(TrailColor) | |
305 | w2.Transparency = 0 | |
306 | w2.Reflectance = 0 | |
307 | w2.Material = "SmoothPlastic" | |
308 | w2.CanCollide = false | |
309 | NoOutline(w2) | |
310 | local sz = Vector3.new(0.2, width, len2) | |
311 | w2.Size = sz | |
312 | local sp = Instance.new("SpecialMesh",w2) | |
313 | sp.MeshType = "Wedge" | |
314 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
315 | w2:BreakJoints() | |
316 | w2.Anchored = true | |
317 | w2.Parent = workspace | |
318 | w2.Transparency = 0.7 | |
319 | table.insert(Effects,{w2,"Disappear",.01}) | |
320 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
321 | table.insert(list,w2) | |
322 | end | |
323 | return unpack(list) | |
324 | end | |
325 | ||
326 | ||
327 | so = function(id,par,vol,pit) | |
328 | coroutine.resume(coroutine.create(function() | |
329 | local sou = Instance.new("Sound",par or workspace) | |
330 | sou.Volume=vol | |
331 | sou.Pitch=pit or 1 | |
332 | sou.SoundId=id | |
333 | swait() | |
334 | sou:play() | |
335 | game:GetService("Debris"):AddItem(sou,6) | |
336 | end)) | |
337 | end | |
338 | ||
339 | function clerp(a,b,t) | |
340 | local qa = {QuaternionFromCFrame(a)} | |
341 | local qb = {QuaternionFromCFrame(b)} | |
342 | local ax, ay, az = a.x, a.y, a.z | |
343 | local bx, by, bz = b.x, b.y, b.z | |
344 | local _t = 1-t | |
345 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
346 | end | |
347 | ||
348 | function QuaternionFromCFrame(cf) | |
349 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
350 | local trace = m00 + m11 + m22 | |
351 | if trace > 0 then | |
352 | local s = math.sqrt(1 + trace) | |
353 | local recip = 0.5/s | |
354 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
355 | else | |
356 | local i = 0 | |
357 | if m11 > m00 then | |
358 | i = 1 | |
359 | end | |
360 | if m22 > (i == 0 and m00 or m11) then | |
361 | i = 2 | |
362 | end | |
363 | if i == 0 then | |
364 | - | c.Value=game:service("Players").LocalPlayer |
364 | + | |
365 | local recip = 0.5/s | |
366 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
367 | elseif i == 1 then | |
368 | local s = math.sqrt(m11-m22-m00+1) | |
369 | local recip = 0.5/s | |
370 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
371 | elseif i == 2 then | |
372 | local s = math.sqrt(m22-m00-m11+1) | |
373 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
374 | end | |
375 | end | |
376 | end | |
377 | ||
378 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
379 | local xs, ys, zs = x + x, y + y, z + z | |
380 | local wx, wy, wz = w*xs, w*ys, w*zs | |
381 | local xx = x*xs | |
382 | local xy = x*ys | |
383 | local xz = x*zs | |
384 | local yy = y*ys | |
385 | local yz = y*zs | |
386 | local zz = z*zs | |
387 | 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)) | |
388 | end | |
389 | ||
390 | function QuaternionSlerp(a, b, t) | |
391 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
392 | local startInterp, finishInterp; | |
393 | if cosTheta >= 0.0001 then | |
394 | if (1 - cosTheta) > 0.0001 then | |
395 | local theta = math.acos(cosTheta) | |
396 | local invSinTheta = 1/math.sin(theta) | |
397 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
398 | finishInterp = math.sin(t*theta)*invSinTheta | |
399 | else | |
400 | startInterp = 1-t | |
401 | finishInterp = t | |
402 | end | |
403 | else | |
404 | if (1+cosTheta) > 0.0001 then | |
405 | local theta = math.acos(-cosTheta) | |
406 | local invSinTheta = 1/math.sin(theta) | |
407 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
408 | finishInterp = math.sin(t*theta)*invSinTheta | |
409 | else | |
410 | startInterp = t-1 | |
411 | finishInterp = t | |
412 | end | |
413 | end | |
414 | 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 | |
415 | end | |
416 | ||
417 | --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
418 | ||
419 | ||
420 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
421 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
422 | end | |
423 | ||
424 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
425 | if hit.Parent==nil then | |
426 | return | |
427 | end | |
428 | h=hit.Parent:FindFirstChild("Humanoid") | |
429 | for _,v in pairs(hit.Parent:children()) do | |
430 | if v:IsA("Humanoid") then | |
431 | h=v | |
432 | end | |
433 | end | |
434 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
435 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
436 | end | |
437 | if hit.Parent.className=="Hat" then | |
438 | hit=hit.Parent.Parent:findFirstChild("Head") | |
439 | end | |
440 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
441 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
442 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
443 | return | |
444 | end]] | |
445 | -- hs(hit,1.2) | |
446 | c=Instance.new("ObjectValue") | |
447 | c.Name="creator" | |
448 | c.Value=game:service("Players").determivanoss | |
449 | c.Parent=h | |
450 | game:GetService("Debris"):AddItem(c,.5) | |
451 | Damage=math.random(minim,maxim) | |
452 | -- h:TakeDamage(Damage) | |
453 | blocked=false | |
454 | block=hit.Parent:findFirstChild("Block") | |
455 | if block~=nil then | |
456 | print(block.className) | |
457 | if block.className=="NumberValue" then | |
458 | if block.Value>0 then | |
459 | blocked=true | |
460 | if decreaseblock==nil then | |
461 | block.Value=block.Value-1 | |
462 | end | |
463 | end | |
464 | end | |
465 | if block.className=="IntValue" then | |
466 | if block.Value>0 then | |
467 | blocked=true | |
468 | if decreaseblock~=nil then | |
469 | block.Value=block.Value-1 | |
470 | end | |
471 | end | |
472 | end | |
473 | end | |
474 | if blocked==false then | |
475 | -- h:TakeDamage(Damage) | |
476 | h.Health=h.Health-Damage | |
477 | showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller")) | |
478 | else | |
479 | h.Health=h.Health-(Damage/2) | |
480 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
481 | end | |
482 | if Type=="Knockdown" then | |
483 | hum=hit.Parent.Humanoid | |
484 | hum.PlatformStand=true | |
485 | coroutine.resume(coroutine.create(function(HHumanoid) | |
486 | swait(1) | |
487 | HHumanoid.PlatformStand=false | |
488 | end),hum) | |
489 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
490 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
491 | local bodvol=Instance.new("BodyVelocity") | |
492 | bodvol.velocity=angle*knockback | |
493 | bodvol.P=5000 | |
494 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
495 | bodvol.Parent=hit | |
496 | rl=Instance.new("BodyAngularVelocity") | |
497 | rl.P=3000 | |
498 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
499 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
500 | rl.Parent=hit | |
501 | game:GetService("Debris"):AddItem(bodvol,.5) | |
502 | game:GetService("Debris"):AddItem(rl,.5) | |
503 | elseif Type=="Normal" then | |
504 | vp=Instance.new("BodyVelocity") | |
505 | vp.P=500 | |
506 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
507 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
508 | if KnockbackType==1 then | |
509 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
510 | elseif KnockbackType==2 then | |
511 | vp.velocity=Property.CFrame.lookVector*knockback | |
512 | end | |
513 | if knockback>0 then | |
514 | vp.Parent=hit.Parent.Torso | |
515 | end | |
516 | game:GetService("Debris"):AddItem(vp,.5) | |
517 | elseif Type=="Up" then | |
518 | local bodyVelocity=Instance.new("BodyVelocity") | |
519 | bodyVelocity.velocity=vt(0,60,0) | |
520 | bodyVelocity.P=5000 | |
521 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
522 | bodyVelocity.Parent=hit | |
523 | game:GetService("Debris"):AddItem(bodyVelocity,1) | |
524 | rl=Instance.new("BodyAngularVelocity") | |
525 | rl.P=3000 | |
526 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
527 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
528 | rl.Parent=hit | |
529 | game:GetService("Debris"):AddItem(rl,.5) | |
530 | elseif Type=="Snare" then | |
531 | bp=Instance.new("BodyPosition") | |
532 | bp.P=2000 | |
533 | bp.D=100 | |
534 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
535 | bp.position=hit.Parent.Torso.Position | |
536 | bp.Parent=hit.Parent.Torso | |
537 | game:GetService("Debris"):AddItem(bp,1) | |
538 | elseif Type=="Target" then | |
539 | if Targetting==false then | |
540 | ZTarget=hit.Parent.Torso | |
541 | coroutine.resume(coroutine.create(function(Part) | |
542 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
543 | swait(5) | |
544 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
545 | end),ZTarget) | |
546 | TargHum=ZTarget.Parent:findFirstChild("Humanoid") | |
547 | targetgui=Instance.new("BillboardGui") | |
548 | targetgui.Parent=ZTarget | |
549 | targetgui.Size=UDim2.new(10,100,10,100) | |
550 | targ=Instance.new("ImageLabel") | |
551 | targ.Parent=targetgui | |
552 | targ.BackgroundTransparency=1 | |
553 | targ.Image="rbxassetid://4834067" | |
554 | targ.Size=UDim2.new(1,0,1,0) | |
555 | cam.CameraType="Scriptable" | |
556 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
557 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
558 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
559 | Targetting=true | |
560 | RocketTarget=ZTarget | |
561 | for i=1,Property do | |
562 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
563 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
564 | swait() | |
565 | end | |
566 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
567 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
568 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
569 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
570 | end | |
571 | Targetting=false | |
572 | RocketTarget=nil | |
573 | targetgui.Parent=nil | |
574 | cam.CameraType="Custom" | |
575 | end | |
576 | end | |
577 | debounce=Instance.new("BoolValue") | |
578 | debounce.Name="DebounceHit" | |
579 | debounce.Parent=hit.Parent | |
580 | debounce.Value=true | |
581 | game:GetService("Debris"):AddItem(debounce,Delay) | |
582 | c=Instance.new("ObjectValue") | |
583 | c.Name="creator" | |
584 | c.Value=Player | |
585 | c.Parent=h | |
586 | game:GetService("Debris"):AddItem(c,.5) | |
587 | CRIT=false | |
588 | hitDeb=true | |
589 | AttackPos=6 | |
590 | end | |
591 | end | |
592 | ||
593 | showDamage=function(Char,Dealt,du,Color) | |
594 | m=Instance.new("Model") | |
595 | m.Name=tostring(Dealt) | |
596 | h=Instance.new("Humanoid") | |
597 | h.Health=0 | |
598 | h.MaxHealth=0 | |
599 | h.Parent=m | |
600 | c=Instance.new("Part") | |
601 | c.Transparency=0 | |
602 | c.BrickColor=Color | |
603 | c.Name="Head" | |
604 | c.TopSurface=0 | |
605 | c.BottomSurface=0 | |
606 | c.formFactor="Plate" | |
607 | c.Size=Vector3.new(1,.4,1) | |
608 | ms=Instance.new("CylinderMesh") | |
609 | ms.Scale=Vector3.new(.8,.8,.8) | |
610 | if CRIT==true then | |
611 | ms.Scale=Vector3.new(1,1.25,1) | |
612 | end | |
613 | ms.Parent=c | |
614 | c.Reflectance=0 | |
615 | Instance.new("BodyGyro").Parent=c | |
616 | c.Parent=m | |
617 | if Char:findFirstChild("Head")~=nil then | |
618 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
619 | elseif Char.Parent:findFirstChild("Head")~=nil then | |
620 | c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
621 | end | |
622 | f=Instance.new("BodyPosition") | |
623 | f.P=2000 | |
624 | f.D=100 | |
625 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
626 | f.position=c.Position+Vector3.new(0,3,0) | |
627 | f.Parent=c | |
628 | game:GetService("Debris"):AddItem(m,.5+du) | |
629 | c.CanCollide=false | |
630 | m.Parent=workspace | |
631 | c.CanCollide=false | |
632 | end | |
633 | ||
634 | VestHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(2.01999998, 1.39999998, 1.01999998)) | |
635 | handleweld=weld(m,Character["Torso"],VestHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52587891e-005, 0.300115585, 3.05175781e-005, 0.999999642, 0, 0, 0, 1, 0, 0, 0, 0.999999642)) | |
636 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024)) | |
637 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, 0.200000286, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0)) | |
638 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
639 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012)) | |
640 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000152587891, -0.999994516, -0.200134277, -4.47035475e-008, 0, 0.999999642, 0, 1, 0, -0.999999642, 0, -4.4703544e-008)) | |
641 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
642 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998)) | |
643 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700012207, -1.00999117, 1.52587891e-005, 0.999999046, 0, 0, 0, 1, 0, 0, 0, 0.999999046)) | |
644 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998)) | |
645 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699127197, -1.00999379, 0.000549316406, 0.999997914, 6.38506317e-005, -2.78951497e-015, -6.38804122e-005, 1.00000012, 2.10474918e-015, 2.78942159e-015, 1.39239913e-015, 0.999997854)) | |
646 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
647 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609390259, 0.811340332, -0.0999908447, 3.08029073e-018, -2.69585922e-014, -0.999999642, -0.999999642, -6.39334685e-005, -1.35697087e-018, -6.39334467e-005, 1, -2.6958582e-014)) | |
648 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
649 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
650 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609359741, -0.788131714, -0.0999910831, 3.06354694e-018, -2.34616979e-014, -0.999999642, -0.999999642, -6.39629943e-005, -1.56279636e-018, -6.39629725e-005, 1, -2.34616895e-014)) | |
651 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
652 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
653 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609375, 0.0116882324, -0.0999908447, 3.06355067e-018, -2.34617301e-014, -0.999999642, -0.999999642, -6.39631544e-005, -1.56279822e-018, -6.39631326e-005, 1, -2.34617217e-014)) | |
654 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
655 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
656 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609313965, -0.388046265, -0.0999908447, 3.0635486e-018, -2.34617301e-014, -0.999998927, -0.999998927, -6.39631544e-005, -1.56279719e-018, -6.39630889e-005, 1, -2.34617047e-014)) | |
657 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
658 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
659 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609329224, 0.411483765, -0.0999908447, 3.08028867e-018, -2.69585922e-014, -0.999998927, -0.999998927, -6.39334685e-005, -1.35696984e-018, -6.3933403e-005, 1, -2.69585617e-014)) | |
660 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
661 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
662 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000305175781, -0.800010204, 0.89906311, -4.47035724e-008, 6.26018334e-015, 0.999997854, -8.34552054e-008, 1.00000012, -5.15634779e-015, -0.999997914, -5.35364961e-008, -4.47035653e-008)) | |
663 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
664 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012)) | |
665 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000228881836, -0.99998498, -0.199783325, -4.47038211e-008, -2.85946115e-012, -0.999997854, -6.3955762e-005, 1.00000012, 1.77753083e-015, 0.999997914, 6.39259815e-005, -4.47038175e-008)) | |
666 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
667 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 3.79999971, 0.200000003)) | |
668 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356018066, -0.311279297, -0.609542847, 0.865768671, 0.500441432, 0, -0.5004403, 0.865770638, 3.55271241e-015, 3.55271241e-015, 3.02253882e-015, 0.999997854)) | |
669 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
670 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
671 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000122070313, -0.799995899, 0.900177002, 1.49011559e-008, 0, -0.999995232, 0, 1, 0, 0.999995232, 0, 1.49011559e-008)) | |
672 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
673 | FlagLogo=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FlagLogo",Vector3.new(3, 1.99999988, 0.200000003)) | |
674 | FlagLogoweld=weld(m,VestHandle,FlagLogo,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14234924, -3.41108704, -0.610244751, 0.865850091, 0.500302911, -3.55240239e-015, -0.500302792, 0.865850449, 9.79956736e-019, 3.07633938e-015, 1.77642947e-015, 0.999999642)) | |
675 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036)) | |
676 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356628418, -2.31108093, -0.620269775, 0.865850091, 0.500302911, 7.10581953e-015, -0.500302792, 0.865850449, 9.79956736e-019, 6.15238443e-015, 3.55382075e-015, 0.999999642)) | |
677 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
678 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000036, 0.200000003, 0.400000036)) | |
679 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.354736328, -4.51108551, -0.620117188, 0.865849495, 0.500302911, 1.77640292e-014, -0.500302434, 0.865850449, 9.79956115e-019, 9.22842142e-015, 5.33121097e-015, 0.999998927)) | |
680 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
681 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 1.99999964, 0.200000003)) | |
682 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356216431, -3.41107178, -0.610137939, 0.865848899, 0.500302911, 1.77639292e-014, -0.500302076, 0.865850449, 9.79955495e-019, 1.53807173e-014, 8.88612016e-015, 0.999998212)) | |
683 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
684 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036)) | |
685 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356292725, 1.6887207, -0.619628906, 0.865768075, 0.500441432, 0, -0.500439942, 0.865770638, 3.55270987e-015, 3.55270987e-015, 3.02253882e-015, 0.999997139)) | |
686 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
687 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993)) | |
688 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.589828491, 0.808547974, -0.0999956131, -3.90798369e-014, 8.06646416e-017, -0.999997854, -0.999997914, -6.36497934e-005, 3.90798369e-014, -6.36795739e-005, 1.00000012, 3.58011901e-015)) | |
689 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
690 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024)) | |
691 | Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, -0.399998188, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0)) | |
692 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
693 | handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.200000003, 0.200000003, 1.4000001)) | |
694 | handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.05175781e-005, -1.10011411, -1.52587891e-005, 0.999999404, -4.47034765e-008, 0, -4.47034836e-008, -0.999999285, 0, 0, 0, -1)) | |
695 | mesh("SpecialMesh",handle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=74322546",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5)) | |
696 | local Decal1 = Instance.new("Decal",FlagLogo) | |
697 | Decal1.Texture = "http://www.roblox.com/asset/?id=147337085" | |
698 | Decal1.Face = "Front" | |
699 | local Decal2 = Instance.new("Decal",FlagLogo) | |
700 | Decal2.Texture = "http://www.roblox.com/asset/?id=147337085" | |
701 | Decal2.Face = "Back" | |
702 | Humanoid.WalkSpeed = 50 | |
703 | ||
704 | function ALLAHUAKBAR() | |
705 | attack = true | |
706 | local speak = {"ALLAHUAKBAR"} | |
707 | local colors = {"Red","Red","Red"} -- The only 3 colors, adding more will error. | |
708 | local chat = game:GetService("Chat") | |
709 | chat:Chat(Head,speak[math.random(1,#speak)], colors[math.random(1,3)] ) | |
710 | for i = 0,1,0.05 do | |
711 | swait() | |
712 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3) | |
713 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3) | |
714 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3) | |
715 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3) | |
716 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
717 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
718 | end | |
719 | for i = 0,1,0.05 do | |
720 | swait() | |
721 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3) | |
722 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3) | |
723 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(50)), 0.3) | |
724 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3) | |
725 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
726 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
727 | end | |
728 | for i = 1,20 do | |
729 | --so("http://roblox.com/asset/?id=197815953",workspace,1,1) | |
730 | so("rbxassetid://134854740",Torso,1,1.3) | |
731 | so("rbxassetid://247893371",workspace,1,1) | |
732 | so("rbxassetid://137994058",Torso,1,1) | |
733 | so("rbxassetid://165969964",Torso,1,1) | |
734 | local S = Instance.new("Explosion",workspace) | |
735 | S.Position = Torso.Position | |
736 | S.BlastPressure = 5 | |
737 | S.BlastRadius = 50 | |
738 | S.ExplosionType = 2 | |
739 | end | |
740 | attack = false | |
741 | end | |
742 | ||
743 | mouse.Button1Down:connect(function() | |
744 | ALLAHUAKBAR() | |
745 | end) | |
746 | ||
747 | mouse.KeyDown:connect(function(k) | |
748 | k=k:lower() | |
749 | ||
750 | end) | |
751 | ||
752 | ||
753 | local sine = 0 | |
754 | local change = 1 | |
755 | local val = 0 | |
756 | ||
757 | while true do | |
758 | swait() | |
759 | sine = sine + change | |
760 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
761 | local velderp=RootPart.Velocity.y | |
762 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
763 | if equipped==true or equipped==false then | |
764 | if attack==false then | |
765 | idle=idle+1 | |
766 | else | |
767 | idle=0 | |
768 | end | |
769 | if idle>=500 then | |
770 | if attack==false then | |
771 | --Sheath() | |
772 | end | |
773 | end | |
774 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
775 | Anim="Jump" | |
776 | if attack==false then | |
777 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
778 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
779 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3) | |
780 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3) | |
781 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3) | |
782 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3) | |
783 | end | |
784 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
785 | Anim="Fall" | |
786 | if attack==false then | |
787 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
788 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3) | |
789 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.3) | |
790 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3) | |
791 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
792 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
793 | end | |
794 | elseif torvel<1 and hitfloor~=nil then | |
795 | Anim="Idle" | |
796 | if attack==false then | |
797 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.3) | |
798 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-10)),.3) | |
799 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.3) | |
800 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3) | |
801 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
802 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
803 | end | |
804 | elseif torvel>2 and hitfloor~=nil then | |
805 | Anim="Walk" | |
806 | if attack==false then | |
807 | change=3 | |
808 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
809 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3) | |
810 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50*math.cos(sine/20)), math.rad(0), math.rad(10)), 0.3) | |
811 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50*math.cos(sine/20)), math.rad(0), math.rad(-10)), 0.3) | |
812 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
813 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
814 | end | |
815 | end | |
816 | end | |
817 | if #Effects>0 then | |
818 | --table.insert(Effects,{prt,"Block1",delay}) | |
819 | for e=1,#Effects do | |
820 | if Effects[e]~=nil then | |
821 | --for j=1,#Effects[e] do | |
822 | local Thing=Effects[e] | |
823 | if Thing~=nil then | |
824 | local Part=Thing[1] | |
825 | local Mode=Thing[2] | |
826 | local Delay=Thing[3] | |
827 | local IncX=Thing[4] | |
828 | local IncY=Thing[5] | |
829 | local IncZ=Thing[6] | |
830 | if Thing[1].Transparency<=1 then | |
831 | if Thing[2]=="Block1" then | |
832 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
833 | Mesh=Thing[1].Mesh | |
834 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
835 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
836 | elseif Thing[2]=="Cylinder" then | |
837 | Mesh=Thing[1].Mesh | |
838 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
839 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
840 | elseif Thing[2]=="Blood" then | |
841 | Mesh=Thing[7] | |
842 | Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) | |
843 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
844 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
845 | elseif Thing[2]=="Elec" then | |
846 | Mesh=Thing[1].Mesh | |
847 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
848 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
849 | elseif Thing[2]=="Disappear" then | |
850 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
851 | end | |
852 | else | |
853 | Part.Parent=nil | |
854 | table.remove(Effects,e) | |
855 | end | |
856 | end | |
857 | --end | |
858 | end | |
859 | end | |
860 | end | |
861 | end |