SHOW:
|
|
- or go back to the newest paste.
1 | - | ---made by naser2018---- |
1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end ---made by naser2018---- | |
6 | ||
7 | Player=game:GetService("Players").LocalPlayer | |
8 | Character=Player.Character | |
9 | PlayerGui=Player.PlayerGui | |
10 | Backpack=Player.Backpack | |
11 | Torso=Character.Torso | |
12 | Head=Character.Head | |
13 | Humanoid=Character.Humanoid | |
14 | Humanoid.WalkSpeed = 999 | |
15 | m=Instance.new('Model',Character) | |
16 | LeftArm=Character["Left Arm"] | |
17 | LeftLeg=Character["Left Leg"] | |
18 | RightArm=Character["Right Arm"] | |
19 | RightLeg=Character["Right Leg"] | |
20 | LS=Torso["Left Shoulder"] | |
21 | LH=Torso["Left Hip"] | |
22 | RS=Torso["Right Shoulder"] | |
23 | RH=Torso["Right Hip"] | |
24 | Face = Head.face | |
25 | Neck=Torso.Neck | |
26 | it=Instance.new | |
27 | attacktype=1 | |
28 | vt=Vector3.new | |
29 | cf=CFrame.new | |
30 | euler=CFrame.fromEulerAnglesXYZ | |
31 | angles=CFrame.Angles | |
32 | cloaked=false | |
33 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
34 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
35 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
36 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
37 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
38 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
39 | RootPart=Character.HumanoidRootPart | |
40 | RootJoint=RootPart.RootJoint | |
41 | RootCF=euler(-1.57,0,3.14) | |
42 | attack = false | |
43 | attackdebounce = false | |
44 | deb=false | |
45 | equipped=true | |
46 | hand=false | |
47 | MMouse=nil | |
48 | combo=0 | |
49 | mana=0 | |
50 | trispeed=.2 | |
51 | attackmode='none' | |
52 | local idle=0 | |
53 | local Anim="Idle" | |
54 | local Effects={} | |
55 | local gun=false | |
56 | local shoot=false | |
57 | player=nil | |
58 | mana=0 | |
59 | ||
60 | mouse=Player:GetMouse() | |
61 | --save shoulders | |
62 | RSH, LSH=nil, nil | |
63 | --welds | |
64 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
65 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
66 | LH=Torso["Left Hip"] | |
67 | RH=Torso["Right Hip"] | |
68 | TorsoColor=Torso.BrickColor | |
69 | function NoOutline(Part) | |
70 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
71 | end | |
72 | player=Player | |
73 | ch=Character | |
74 | RSH=ch.Torso["Right Shoulder"] | |
75 | LSH=ch.Torso["Left Shoulder"] | |
76 | -- | |
77 | RSH.Parent=nil | |
78 | LSH.Parent=nil | |
79 | -- | |
80 | RW.Name="Right Shoulder" | |
81 | RW.Part0=ch.Torso | |
82 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
83 | RW.C1=cf(0, 0.5, 0) | |
84 | RW.Part1=ch["Right Arm"] | |
85 | RW.Parent=ch.Torso | |
86 | -- | |
87 | LW.Name="Left Shoulder" | |
88 | LW.Part0=ch.Torso | |
89 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
90 | LW.C1=cf(0, 0.5, 0) | |
91 | LW.Part1=ch["Left Arm"] | |
92 | LW.Parent=ch.Torso | |
93 | ||
94 | Player=game:GetService('Players').LocalPlayer | |
95 | Character=Player.Character | |
96 | Mouse=Player:GetMouse() | |
97 | m=Instance.new('Model',Character) | |
98 | ||
99 | ||
100 | local function weldBetween(a, b) | |
101 | local weldd = Instance.new("ManualWeld") | |
102 | weldd.Part0 = a | |
103 | weldd.Part1 = b | |
104 | weldd.C0 = CFrame.new() | |
105 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
106 | weldd.Parent = a | |
107 | return weldd | |
108 | end | |
109 | ||
110 | function swait(num) | |
111 | if num==0 or num==nil then | |
112 | game:service'RunService'.Stepped:wait(0) | |
113 | else | |
114 | for i=0,num do | |
115 | game:service'RunService'.Stepped:wait(0) | |
116 | end | |
117 | end | |
118 | end | |
119 | ||
120 | function nooutline(part) | |
121 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
122 | end | |
123 | ||
124 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
125 | local fp=it("Part") | |
126 | fp.formFactor=formfactor | |
127 | fp.Parent=parent | |
128 | fp.Reflectance=reflectance | |
129 | fp.Transparency=transparency | |
130 | fp.CanCollide=false | |
131 | fp.Locked=true | |
132 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
133 | fp.Name=name | |
134 | fp.Size=size | |
135 | fp.Position=Character.Torso.Position | |
136 | nooutline(fp) | |
137 | fp.Material=material | |
138 | fp:BreakJoints() | |
139 | return fp | |
140 | end | |
141 | ||
142 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
143 | local mesh=it(Mesh) | |
144 | mesh.Parent=part | |
145 | if Mesh=="SpecialMesh" then | |
146 | mesh.MeshType=meshtype | |
147 | mesh.MeshId=meshid | |
148 | end | |
149 | mesh.Offset=offset | |
150 | mesh.Scale=scale | |
151 | return mesh | |
152 | end | |
153 | ||
154 | function weld(parent,part0,part1,c0,c1) | |
155 | local weld=it("Weld") | |
156 | weld.Parent=parent | |
157 | weld.Part0=part0 | |
158 | weld.Part1=part1 | |
159 | weld.C0=c0 | |
160 | weld.C1=c1 | |
161 | return weld | |
162 | end | |
163 | ||
164 | ||
165 | local function CFrameFromTopBack(at, top, back) | |
166 | local right = top:Cross(back) | |
167 | return CFrame.new(at.x, at.y, at.z, | |
168 | right.x, top.x, back.x, | |
169 | right.y, top.y, back.y, | |
170 | right.z, top.z, back.z) | |
171 | end | |
172 | ||
173 | function Triangle(a, b, c) | |
174 | local edg1 = (c-a):Dot((b-a).unit) | |
175 | local edg2 = (a-b):Dot((c-b).unit) | |
176 | local edg3 = (b-c):Dot((a-c).unit) | |
177 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
178 | a, b, c = a, b, c | |
179 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
180 | a, b, c = b, c, a | |
181 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
182 | a, b, c = c, a, b | |
183 | else | |
184 | assert(false, "unreachable") | |
185 | end | |
186 | ||
187 | local len1 = (c-a):Dot((b-a).unit) | |
188 | local len2 = (b-a).magnitude - len1 | |
189 | local width = (a + (b-a).unit*len1 - c).magnitude | |
190 | ||
191 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
192 | ||
193 | local list = {} | |
194 | ||
195 | local TrailColor = ("Dark grey") | |
196 | ||
197 | if len1 > 0.01 then | |
198 | local w1 = Instance.new('WedgePart', m) | |
199 | game:GetService("Debris"):AddItem(w1,5) | |
200 | w1.Material = "SmoothPlastic" | |
201 | w1.FormFactor = 'Custom' | |
202 | w1.BrickColor = BrickColor.new(TrailColor) | |
203 | w1.Transparency = 0 | |
204 | w1.Reflectance = 0 | |
205 | w1.Material = "SmoothPlastic" | |
206 | w1.CanCollide = false | |
207 | NoOutline(w1) | |
208 | local sz = Vector3.new(0.2, width, len1) | |
209 | w1.Size = sz | |
210 | local sp = Instance.new("SpecialMesh",w1) | |
211 | sp.MeshType = "Wedge" | |
212 | sp.Scale = Vector3.new(0,1,2) * sz/w1.Size | |
213 | w1:BreakJoints() | |
214 | w1.Anchored = true | |
215 | w1.Parent = workspace | |
216 | w1.Transparency = 0.7 | |
217 | table.insert(Effects,{w1,"Disappear",.01}) | |
218 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
219 | table.insert(list,w1) | |
220 | end | |
221 | ||
222 | if len2 > 0.01 then | |
223 | local w2 = Instance.new('WedgePart', m) | |
224 | game:GetService("Debris"):AddItem(w2,5) | |
225 | w2.Material = "SmoothPlastic" | |
226 | w2.FormFactor = 'Custom' | |
227 | w2.BrickColor = BrickColor.new(TrailColor) | |
228 | w2.Transparency = 0 | |
229 | w2.Reflectance = 0 | |
230 | w2.Material = "SmoothPlastic" | |
231 | w2.CanCollide = false | |
232 | NoOutline(w2) | |
233 | local sz = Vector3.new(0.2, width, len2) | |
234 | w2.Size = sz | |
235 | local sp = Instance.new("SpecialMesh",w2) | |
236 | sp.MeshType = "Wedge" | |
237 | sp.Scale = Vector3.new(0,1,2) * sz/w2.Size | |
238 | w2:BreakJoints() | |
239 | w2.Anchored = true | |
240 | w2.Parent = workspace | |
241 | w2.Transparency = 0.7 | |
242 | table.insert(Effects,{w2,"Disappear",.01}) | |
243 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
244 | table.insert(list,w2) | |
245 | end | |
246 | return unpack(list) | |
247 | end | |
248 | ||
249 | ||
250 | so = function(id,par,vol,pit) | |
251 | coroutine.resume(coroutine.create(function() | |
252 | local sou = Instance.new("Sound",par or workspace) | |
253 | sou.Volume=vol | |
254 | sou.Pitch=pit or 999 | |
255 | sou.SoundId=id | |
256 | swait() | |
257 | sou:play() | |
258 | game:GetService("Debris"):AddItem(sou,999) | |
259 | end)) | |
260 | end | |
261 | ||
262 | function clerp(a,b,t) | |
263 | local qa = {QuaternionFromCFrame(a)} | |
264 | local qb = {QuaternionFromCFrame(b)} | |
265 | local ax, ay, az = a.x, a.y, a.z | |
266 | local bx, by, bz = b.x, b.y, b.z | |
267 | local _t = 1-t | |
268 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
269 | end | |
270 | ||
271 | function QuaternionFromCFrame(cf) | |
272 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
273 | local trace = m00 + m11 + m22 | |
274 | if trace > 0 then | |
275 | local s = math.sqrt(1 + trace) | |
276 | local recip = 0.5/s | |
277 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
278 | else | |
279 | local i = 0 | |
280 | if m11 > m00 then | |
281 | i = 1 | |
282 | end | |
283 | if m22 > (i == 0 and m00 or m11) then | |
284 | i = 2 | |
285 | end | |
286 | if i == 0 then | |
287 | local s = math.sqrt(m00-m11-m22+1) | |
288 | local recip = 0.5/s | |
289 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
290 | elseif i == 1 then | |
291 | local s = math.sqrt(m11-m22-m00+1) | |
292 | local recip = 0.5/s | |
293 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
294 | elseif i == 2 then | |
295 | local s = math.sqrt(m22-m00-m11+1) | |
296 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
297 | end | |
298 | end | |
299 | end | |
300 | ||
301 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
302 | local xs, ys, zs = x + x, y + y, z + z | |
303 | local wx, wy, wz = w*xs, w*ys, w*zs | |
304 | local xx = x*xs | |
305 | local xy = x*ys | |
306 | local xz = x*zs | |
307 | local yy = y*ys | |
308 | local yz = y*zs | |
309 | local zz = z*zs | |
310 | 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)) | |
311 | end | |
312 | ||
313 | function QuaternionSlerp(a, b, t) | |
314 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
315 | local startInterp, finishInterp; | |
316 | if cosTheta >= 0.0001 then | |
317 | if (1 - cosTheta) > 0.0001 then | |
318 | local theta = math.acos(cosTheta) | |
319 | local invSinTheta = 1/math.sin(theta) | |
320 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
321 | finishInterp = math.sin(t*theta)*invSinTheta | |
322 | else | |
323 | startInterp = 1-t | |
324 | finishInterp = t | |
325 | end | |
326 | else | |
327 | if (1+cosTheta) > 0.0001 then | |
328 | local theta = math.acos(-cosTheta) | |
329 | local invSinTheta = 1/math.sin(theta) | |
330 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
331 | finishInterp = math.sin(t*theta)*invSinTheta | |
332 | else | |
333 | startInterp = t-1 | |
334 | finishInterp = t | |
335 | end | |
336 | end | |
337 | 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 | |
338 | end | |
339 | ||
340 | --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) | |
341 | ||
342 | ||
343 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
344 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
345 | end | |
346 | ||
347 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
348 | if hit.Parent==nil then | |
349 | return | |
350 | end | |
351 | h=hit.Parent:FindFirstChild("Humanoid") | |
352 | for _,v in pairs(hit.Parent:children()) do | |
353 | if v:IsA("Humanoid") then | |
354 | h=v | |
355 | end | |
356 | end | |
357 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
358 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
359 | end | |
360 | if hit.Parent.className=="Hat" then | |
361 | hit=hit.Parent.Parent:findFirstChild("Head") | |
362 | end | |
363 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
364 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
365 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
366 | return | |
367 | end]] | |
368 | -- hs(hit,1.2) | |
369 | c=Instance.new("ObjectValue") | |
370 | c.Name="creator" | |
371 | c.Value=game:service("Players").LocalPlayer | |
372 | c.Parent=h | |
373 | game:GetService("Debris"):AddItem(c,.5) | |
374 | Damage=math.random(minim,maxim) | |
375 | -- h:TakeDamage(Damage) | |
376 | blocked=false | |
377 | block=hit.Parent:findFirstChild("Block") | |
378 | if block~=nil then | |
379 | print(block.className) | |
380 | if block.className=="NumberValue" then | |
381 | if block.Value>0 then | |
382 | blocked=true | |
383 | if decreaseblock==nil then | |
384 | block.Value=block.Value-1 | |
385 | end | |
386 | end | |
387 | end | |
388 | if block.className=="IntValue" then | |
389 | if block.Value>0 then | |
390 | blocked=true | |
391 | if decreaseblock~=nil then | |
392 | block.Value=block.Value-1 | |
393 | end | |
394 | end | |
395 | end | |
396 | end | |
397 | if blocked==false then | |
398 | -- h:TakeDamage(Damage) | |
399 | h.Health=h.Health-Damage | |
400 | showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller")) | |
401 | else | |
402 | h.Health=h.Health-(Damage/2) | |
403 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
404 | end | |
405 | if Type=="Knockdown" then | |
406 | hum=hit.Parent.Humanoid | |
407 | hum.PlatformStand=true | |
408 | coroutine.resume(coroutine.create(function(HHumanoid) | |
409 | swait(1) | |
410 | HHumanoid.PlatformStand=false | |
411 | end),hum) | |
412 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
413 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
414 | local bodvol=Instance.new("BodyVelocity") | |
415 | bodvol.velocity=angle*knockback | |
416 | bodvol.P=5000 | |
417 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
418 | bodvol.Parent=hit | |
419 | rl=Instance.new("BodyAngularVelocity") | |
420 | rl.P=3000 | |
421 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
422 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
423 | rl.Parent=hit | |
424 | game:GetService("Debris"):AddItem(bodvol,.5) | |
425 | game:GetService("Debris"):AddItem(rl,.5) | |
426 | elseif Type=="Normal" then | |
427 | vp=Instance.new("BodyVelocity") | |
428 | vp.P=500 | |
429 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
430 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
431 | if KnockbackType==1 then | |
432 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
433 | elseif KnockbackType==2 then | |
434 | vp.velocity=Property.CFrame.lookVector*knockback | |
435 | end | |
436 | if knockback>0 then | |
437 | vp.Parent=hit.Parent.Torso | |
438 | end | |
439 | game:GetService("Debris"):AddItem(vp,.5) | |
440 | elseif Type=="Up" then | |
441 | local bodyVelocity=Instance.new("BodyVelocity") | |
442 | bodyVelocity.velocity=vt(0,60,0) | |
443 | bodyVelocity.P=5000 | |
444 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
445 | bodyVelocity.Parent=hit | |
446 | game:GetService("Debris"):AddItem(bodyVelocity,2) | |
447 | rl=Instance.new("BodyAngularVelocity") | |
448 | rl.P=3000 | |
449 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
450 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
451 | rl.Parent=hit | |
452 | game:GetService("Debris"):AddItem(rl,.5) | |
453 | elseif Type=="Snare" then | |
454 | bp=Instance.new("BodyPosition") | |
455 | bp.P=2000 | |
456 | bp.D=100 | |
457 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
458 | bp.position=hit.Parent.Torso.Position | |
459 | bp.Parent=hit.Parent.Torso | |
460 | game:GetService("Debris"):AddItem(bp,2) | |
461 | elseif Type=="Target" then | |
462 | if Targetting==false then | |
463 | ZTarget=hit.Parent.Torso | |
464 | coroutine.resume(coroutine.create(function(Part) | |
465 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
466 | swait(5) | |
467 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
468 | end),ZTarget) | |
469 | TargHum=ZTarget.Parent:findFirstChild("Humanoid") | |
470 | targetgui=Instance.new("BillboardGui") | |
471 | targetgui.Parent=ZTarget | |
472 | targetgui.Size=UDim2.new(10,100,10,100) | |
473 | targ=Instance.new("ImageLabel") | |
474 | targ.Parent=targetgui | |
475 | targ.BackgroundTransparency=1 | |
476 | targ.Image="rbxassetid://4834067" | |
477 | targ.Size=UDim2.new(1,0,1,0) | |
478 | cam.CameraType="Scriptable" | |
479 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
480 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
481 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
482 | Targetting=true | |
483 | RocketTarget=ZTarget | |
484 | for i=1,Property do | |
485 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
486 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
487 | swait() | |
488 | end | |
489 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
490 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
491 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
492 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
493 | end | |
494 | Targetting=false | |
495 | RocketTarget=nil | |
496 | targetgui.Parent=nil | |
497 | cam.CameraType="Custom" | |
498 | end | |
499 | end | |
500 | debounce=Instance.new("BoolValue") | |
501 | debounce.Name="DebounceHit" | |
502 | debounce.Parent=hit.Parent | |
503 | debounce.Value=true | |
504 | game:GetService("Debris"):AddItem(debounce,Delay) | |
505 | c=Instance.new("ObjectValue") | |
506 | c.Name="creator" | |
507 | c.Value=Player | |
508 | c.Parent=h | |
509 | game:GetService("Debris"):AddItem(c,.5) | |
510 | CRIT=false | |
511 | hitDeb=true | |
512 | AttackPos=6 | |
513 | end | |
514 | end | |
515 | ||
516 | showDamage=function(Char,Dealt,du,Color) | |
517 | m=Instance.new("Model") | |
518 | m.Name=tostring(Dealt) | |
519 | h=Instance.new("Humanoid") | |
520 | h.Health=0 | |
521 | h.MaxHealth=0 | |
522 | h.Parent=m | |
523 | c=Instance.new("Part") | |
524 | c.Transparency=0 | |
525 | c.BrickColor=Color | |
526 | c.Name="Head" | |
527 | c.TopSurface=0 | |
528 | c.BottomSurface=0 | |
529 | c.formFactor="Plate" | |
530 | c.Size=Vector3.new(1,.4,2) | |
531 | ms=Instance.new("CylinderMesh") | |
532 | ms.Scale=Vector3.new(.8,.8,.8) | |
533 | if CRIT==true then | |
534 | ms.Scale=Vector3.new(1,1.25,2) | |
535 | end | |
536 | ms.Parent=c | |
537 | c.Reflectance=0 | |
538 | Instance.new("BodyGyro").Parent=c | |
539 | c.Parent=m | |
540 | if Char:findFirstChild("Head")~=nil then | |
541 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
542 | elseif Char.Parent:findFirstChild("Head")~=nil then | |
543 | c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
544 | end | |
545 | f=Instance.new("BodyPosition") | |
546 | f.P=2000 | |
547 | f.D=100 | |
548 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
549 | f.position=c.Position+Vector3.new(0,3,0) | |
550 | f.Parent=c | |
551 | game:GetService("Debris"):AddItem(m,.5+du) | |
552 | c.CanCollide=false | |
553 | m.Parent=workspace | |
554 | c.CanCollide=false | |
555 | end | |
556 | ||
557 | HandleA=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","HandleA",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
558 | HandleAweld=weld(m,Character["Right Arm"],HandleA,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.14440918e-005, 0, 0.800000191, -0.999999821, -2.98023188e-008, 0, 0, 0, 1, -2.98023224e-008, 0.999999702, 0)) | |
559 | mesh("SpecialMesh",HandleA,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(1.22000003, 1.11999989, 1.48000002)) | |
560 | MagicPrtA=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Really black","MagicPrtA",Vector3.new(0.400000066, 0.200000003, 0.400000006)) | |
561 | MagicPrtAweld=weld(m,HandleA,MagicPrtA,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.100000858, 3.81469727e-006, 0.999999642, -2.98023064e-008, 2.98023188e-008, 2.98023064e-008, -4.47034836e-008, -0.999999285, 2.98023188e-008, 0.999999404, -2.98023153e-008)) | |
562 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
563 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599983215, -1.0995748, 0.200019836, 0.999999821, -5.43913802e-006, 3.44865896e-008, -3.44864155e-008, 3.01454435e-008, 0.999999344, -5.43913711e-006, -1, 3.01452339e-008)) | |
564 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
565 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
566 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998951, 0, -0.600002289, -2.98023224e-008, 0, 0.999999821, 0, 1, 0, -0.999999821, 0, -2.98023224e-008)) | |
567 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.539999962, 0.539999962, 1.48000002)) | |
568 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 1.20000005, 1)) | |
569 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.600006104, -0.599998951, 0, -0.999999821, 0, -2.98023224e-008, -2.98023188e-008, 0, 0.999999702, 0, 1, 0)) | |
570 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
571 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599983215, -1.29950213, 0.400028229, 0.999999523, -6.69091787e-006, 3.448665e-008, -3.44863018e-008, 3.01455501e-008, 0.999993145, -6.69091651e-006, -0.999999702, 3.0145106e-008)) | |
572 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
573 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.600000024)) | |
574 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599973679, 0.100389957, -2.67028809e-005, -0.999999821, 7.28699251e-006, -2.98029086e-008, -2.98028944e-008, 7.16782753e-013, 0.999999344, 7.28699115e-006, 1, -4.99611745e-013)) | |
575 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
576 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599981308, 0.0995743275, 0.19997406, 0.999999344, 5.36441803e-006, -3.42694264e-008, -4.46758364e-009, 5.93965268e-008, -0.999999225, -5.54323105e-006, 0.999999881, 5.9397351e-008)) | |
577 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
578 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
579 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599973679, -0.100358725, 0.399974823, 0.999999464, -7.28698978e-006, -2.98017078e-008, -2.98017504e-008, -2.82443882e-013, -0.999998987, 7.28699115e-006, 1, -4.99611745e-013)) | |
580 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
581 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
582 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599981308, 0.0995743275, 0.200027466, -0.999999523, -5.43913802e-006, -8.94069458e-008, 5.96046235e-008, 3.01454435e-008, -0.999999225, 5.4391362e-006, -1, -3.01443492e-008)) | |
583 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
584 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
585 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599994659, -1.29949927, 0.399971008, -0.999999821, 6.75052434e-006, -2.98028091e-008, -2.98025888e-008, 1.03027981e-012, 0.99999243, 6.75052297e-006, 1, -8.29105447e-013)) | |
586 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
587 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
588 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599975586, -0.100389719, 0.400028229, -0.999999225, 7.25718564e-006, -8.9407493e-008, 8.9407493e-008, -1.14667997e-012, -0.999998987, -7.21248216e-006, -0.999999583, 5.01831974e-013)) | |
589 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
590 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.799999952, 0.200000003)) | |
591 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599983215, -0.599738359, -0.200023651, -0.999999821, 6.83996359e-006, -2.98027985e-008, -2.98027842e-008, 7.42544481e-013, 0.999999344, 6.83996223e-006, 1, -5.38696854e-013)) | |
592 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
593 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599979401, -1.0995748, 0.199981689, -0.999999642, 5.46872616e-006, -2.51180481e-008, -2.51182009e-008, -3.01454435e-008, 0.999999344, 5.46872525e-006, 0.999999821, 3.01455607e-008)) | |
594 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
595 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.799999952, 0.200000003)) | |
596 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599994659, -0.599813223, 0.199977875, -0.999999821, 4.69404995e-006, -2.98026279e-008, -2.98026137e-008, 5.29311675e-013, 0.999999344, 4.69404904e-006, 1, -3.89419237e-013)) | |
597 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.400000006, 0.220000014, 0.200000003)) | |
598 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599994659, 0.600000381, 0, 2.98012424e-008, -4.69401448e-006, -0.999994099, 0.999996483, -4.54851326e-013, 2.98017682e-008, 2.14393451e-011, -0.999997139, 4.69402175e-006)) | |
599 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
600 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.600000024)) | |
601 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599973679, -1.29961014, -2.67028809e-005, -0.999999821, 7.28699251e-006, -2.98029086e-008, -2.98028944e-008, 7.16782753e-013, 0.999999344, 7.28699115e-006, 1, -4.99611745e-013)) | |
602 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
603 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599990845, -0.0995154381, -3.05175781e-005, -0.999999821, 6.75052434e-006, -2.9802866e-008, -2.98028517e-008, 6.63480122e-013, 0.999999344, 6.75052297e-006, 1, -4.62297626e-013)) | |
604 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
605 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0, -1.20000076, 0.999999642, 0, 0, 0, 1, 0, 0, 0, 0.999999642)) | |
606 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(1.22000003, 1.11999989, 1.48000002)) | |
607 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
608 | Partweld=weld(m,HandleA,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599990845, -1.09951615, -3.05175781e-005, -0.999999821, 6.75052434e-006, -2.9802866e-008, -2.98028517e-008, 6.63480122e-013, 0.999999344, 6.75052297e-006, 1, -4.62297626e-013)) | |
609 | ||
610 | HandleB=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","HandleB",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
611 | HandleBweld=weld(m,Character["Left Arm"],HandleB,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00098991394, 3.05175781e-005, 0.800000191, 0.999999464, 8.36810372e-008, -4.47034836e-008, -5.96046448e-008, 1.96981595e-008, -0.999999702, -8.36810443e-008, 0.999999702, 1.96981613e-008)) | |
612 | mesh("SpecialMesh",HandleB,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(1.22000003, 1.11999989, 1.48000002)) | |
613 | MagicPrtB=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Really black","MagicPrtB",Vector3.new(0.400000066, 0.200000003, 0.400000006)) | |
614 | MagicPrtBweld=weld(m,HandleB,MagicPrtB,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00100708008, -0.100000858, 3.43322754e-005, -0.999999285, 8.94069316e-008, 8.36810301e-008, -8.36810017e-008, 2.50053187e-008, -0.999999285, -7.45057633e-008, -0.999999106, -1.01041664e-008)) | |
615 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
616 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0, -1.20000029, 0.999998927, -1.49011434e-008, 2.75411323e-014, -1.49011434e-008, 0.999999404, 7.10542736e-015, 2.75411323e-014, 7.10542736e-015, 0.999999642)) | |
617 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(1.22000003, 1.11999989, 1.48000002)) | |
618 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
619 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599981308, -1.09957433, 0.199989319, -0.999999285, 5.52832898e-006, -2.51180712e-008, -2.51181635e-008, -3.01454222e-008, 0.999999344, 5.51342691e-006, 0.999999523, 3.01455501e-008)) | |
620 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
621 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 1.20000005, 1)) | |
622 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.600004196, -0.599998713, 0, -0.999999166, -3.55271368e-015, -2.98023508e-008, -2.98022798e-008, 8.8817842e-015, 0.999999702, -1.49011434e-008, 0.999999404, 7.10542736e-015)) | |
623 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.799999952, 0.200000003)) | |
624 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.600004196, -0.599812984, 0.199977875, -0.999999344, 4.69386441e-006, -2.9802635e-008, -2.98025782e-008, 5.54223334e-013, 0.999999344, 4.67896234e-006, 0.999999583, -3.92574862e-013)) | |
625 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
626 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599975586, 0.0995745659, 0.19997406, 0.999998689, 5.24520738e-006, -3.42694086e-008, -4.46761206e-009, 5.93964842e-008, -0.999999225, -5.52832762e-006, 0.999999523, 5.9397351e-008)) | |
627 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
628 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
629 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599988937, -1.29949903, 0.399974823, -0.999999166, 6.76512536e-006, -2.98028446e-008, -2.98025498e-008, 1.02673425e-012, 0.99999243, 6.75022238e-006, 0.999999404, -8.2600593e-013)) | |
630 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
631 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
632 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599973679, -0.100358725, 0.399974823, 0.999998868, -7.40587484e-006, -2.98016953e-008, -2.98017575e-008, -2.93098879e-013, -0.999998987, 7.28666373e-006, 0.999999344, -4.92050845e-013)) | |
633 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
634 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
635 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599992752, -0.0995156765, -3.43322754e-005, -0.999999166, 6.76512536e-006, -2.98029015e-008, -2.98027913e-008, 6.73239242e-013, 0.999999344, 6.75022238e-006, 0.999999404, -4.56523708e-013)) | |
636 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.600000024)) | |
637 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599983215, -1.2996099, -2.67028809e-005, -0.999999106, 7.30156671e-006, -2.98029335e-008, -2.98028553e-008, 7.35411732e-013, 0.999999344, 7.28666373e-006, 0.999999344, -4.92050845e-013)) | |
638 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
639 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599988937, -1.09957433, 0.200023651, 0.999999285, -5.52832898e-006, 3.44866038e-008, -3.44863622e-008, 3.01454222e-008, 0.999999344, -5.51342691e-006, -0.999999523, 3.0145241e-008)) | |
640 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
641 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.400000006, 0.200000003, 0.200000003)) | |
642 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998713, 0, -0.600000381, -2.98022726e-008, 1.77635684e-014, 0.999999821, -1.49011434e-008, 0.999999404, 7.10542736e-015, -0.999999166, -3.55271368e-015, -2.98023508e-008)) | |
643 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.539999962, 0.539999962, 1.48000002)) | |
644 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
645 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599985123, -1.29950166, 0.400032043, 0.999998868, -6.85453233e-006, 3.44866748e-008, -3.44862556e-008, 3.01455572e-008, 0.999993145, -6.83962935e-006, -0.999999106, 3.01451237e-008)) | |
646 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
647 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
648 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599977493, -0.100389481, 0.400024414, -0.999998808, 7.33136903e-006, -8.94075214e-008, 8.94074077e-008, -1.15818466e-012, -0.999998987, -7.28666373e-006, -0.999999046, 5.22248911e-013)) | |
649 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
650 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.799999952, 0.200000003)) | |
651 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599985123, -0.599738121, -0.200023651, -0.999999106, 6.95884e-006, -2.98028127e-008, -2.98027487e-008, 7.47846229e-013, 0.999999344, 6.94393748e-006, 0.999999344, -5.43565193e-013)) | |
652 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
653 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599985123, 0.0995743275, 0.200031281, -0.999998987, -5.30481157e-006, -8.94069601e-008, 5.9604556e-008, 3.01454079e-008, -0.999999225, 5.4985253e-006, -0.999999583, -3.01443599e-008)) | |
654 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
655 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.400000006, 0.220000014, 0.200000003)) | |
656 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.599994421, 0.599998474, -3.81469727e-006, 2.98012459e-008, -4.69401175e-006, -0.999994099, 0.999996006, -1.19209062e-007, 2.98017913e-008, -2.98018108e-008, -0.999996841, 4.69402084e-006)) | |
657 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
658 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Hot pink","Part",Vector3.new(0.220000014, 0.200000003, 0.200000003)) | |
659 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599990845, -1.09951591, -3.43322754e-005, -0.999999166, 6.76512536e-006, -2.98029015e-008, -2.98027913e-008, 6.73239242e-013, 0.999999344, 6.75022238e-006, 0.999999404, -4.56523708e-013)) | |
660 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.600000024)) | |
661 | Partweld=weld(m,HandleB,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599983215, 0.100389719, -2.67028809e-005, -0.999999106, 7.30156671e-006, -2.98029335e-008, -2.98028553e-008, 7.35411732e-013, 0.999999344, 7.28666373e-006, 0.999999344, -4.92050845e-013)) | |
662 | ||
663 | local PE1 = Instance.new("ParticleEmitter",MagicPrtA) | |
664 | PE1.Color = ColorSequence.new(Color3.new (255, 0, 127)) | |
665 | PE1.LightEmission = NumberSequence.new(0.2) | |
666 | PE1.Size = NumberSequence.new(1.1) | |
667 | PE1.Texture = "http://www.roblox.com/asset/?id=258908759" | |
668 | PE1.Lifetime = NumberRange.new(.5) | |
669 | PE1.Rate = 10 | |
670 | PE1.Transparency = NumberSequence.new(0.2) | |
671 | PE1.LightEmission = NumberSequence.new(0.2) | |
672 | PE1.Rotation = NumberRange.new(100) | |
673 | PE1.Speed = NumberRange.new(0) | |
674 | PE1.RotSpeed = NumberRange.new(100) | |
675 | ||
676 | local PE2 = Instance.new("ParticleEmitter",MagicPrtB) | |
677 | PE2.Color = ColorSequence.new(Color3.new (255, 0, 127)) | |
678 | PE2.LightEmission = NumberSequence.new(0.2) | |
679 | PE2.Size = NumberSequence.new(1.1) | |
680 | PE2.Texture = "http://www.roblox.com/asset/?id=258908759" | |
681 | PE2.Lifetime = NumberRange.new(.5) | |
682 | PE2.Rate = 10 | |
683 | PE2.Transparency = NumberSequence.new(0.2) | |
684 | PE2.LightEmission = NumberSequence.new(0.2) | |
685 | PE2.Rotation = NumberRange.new(100) | |
686 | PE2.Speed = NumberRange.new(0) | |
687 | PE2.RotSpeed = NumberRange.new(100) | |
688 | ||
689 | so("http://www.roblox.com/asset/?id=159257147",workspace,1,1) | |
690 | ||
691 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
692 | local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
693 | prt.Anchored=true | |
694 | prt.CFrame=cframe | |
695 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
696 | game:GetService("Debris"):AddItem(prt,2) | |
697 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
698 | for i=0,1,delay do | |
699 | swait() | |
700 | Part.CFrame=Part.CFrame | |
701 | Part.Transparency=i | |
702 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
703 | end | |
704 | Part.Parent=nil | |
705 | end),prt,msh) | |
706 | end | |
707 | --example: MagicCircle(BrickColor.new(""),ExamplePart.CFrame,0,0,0,0,0,0,0.01) | |
708 | ||
709 | MagicCircle(BrickColor.new("Hot pink"),Torso.CFrame,1,1,1,5,5,5,0.01) | |
710 | ||
711 | function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
712 | local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
713 | prt.Anchored=true | |
714 | prt.CFrame=cframe | |
715 | local PE1 = Instance.new("ParticleEmitter",prt) | |
716 | PE1.Color = ColorSequence.new(Color3.new (255, 0, 127)) | |
717 | PE1.LightEmission = NumberSequence.new(0.2) | |
718 | PE1.Size = NumberSequence.new(2) | |
719 | PE1.Texture = "http://www.roblox.com/asset/?id=258908759" | |
720 | PE1.Lifetime = NumberRange.new(5) | |
721 | PE1.Rate = 10 | |
722 | PE1.Transparency = NumberSequence.new(0.2) | |
723 | PE1.LightEmission = NumberSequence.new(0.2) | |
724 | PE1.Speed = NumberRange.new(0) | |
725 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1)) | |
726 | game:GetService("Debris"):AddItem(prt,2) | |
727 | coroutine.resume(coroutine.create(function(Part,Mesh,num) | |
728 | for i=0,1,delay do | |
729 | swait() | |
730 | Part.Transparency=i | |
731 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
732 | end | |
733 | Part.Parent=nil | |
734 | end),prt,msh,(math.random(0,2)+math.random())/5) | |
735 | end | |
736 | --example: MagicRing(BrickColor.new(""),ExamplePart.CFrame,0,0,0,0,0,0,0.01) | |
737 | ||
738 | function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color) | |
739 | local msh1 = it("BlockMesh") | |
740 | msh1.Scale = vt(0.5,0.5,0.5) | |
741 | local S=it("Part") | |
742 | S.Material = "SmoothPlastic" | |
743 | S.Name="Effect" | |
744 | S.formFactor=0 | |
745 | S.Size=vt(x1,y1,z1) | |
746 | S.BrickColor=color | |
747 | S.Reflectance = 0 | |
748 | S.TopSurface=0 | |
749 | S.BottomSurface=0 | |
750 | S.Transparency=0 | |
751 | S.Anchored=true | |
752 | S.CanCollide=false | |
753 | S.CFrame=part.CFrame*cf(x2,y2,z2)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
754 | S.Parent=workspace | |
755 | msh1.Parent = S | |
756 | coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + vt(0.1,0.1,0.1) Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame) | |
757 | end | |
758 | ||
759 | function attackone() | |
760 | attack = true | |
761 | for i = 0,1,0.1 do | |
762 | swait() | |
763 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),.8) | |
764 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(50)),.8) | |
765 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-20)),.8) | |
766 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.5, -.5) * angles(math.rad(70), math.rad(0), math.rad(50)),.8) | |
767 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(100),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
768 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
769 | end | |
770 | for i = 0,1,0.1 do | |
771 | swait() | |
772 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),.8) | |
773 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.8) | |
774 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(70)),.8) | |
775 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)),.8) | |
776 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
777 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
778 | end | |
779 | for i = 0,1,1 do | |
780 | so("http://www.roblox.com/asset/?id=185295584",workspace,1,1) | |
781 | MagicCircle(BrickColor.new("Hot pink"),MagicPrtA.CFrame,0.1,0.1,0.1,0.8,0.8,0.8,0.06) | |
782 | MagicRing(BrickColor.new("Hot pink"),MagicPrtA.CFrame,0.1,0.1,0.1,1,1,1,0.06) | |
783 | MMMAGIC(MagicPrtA,2,2,2,0,0,0,BrickColor.new("Hot pink")) | |
784 | end | |
785 | for i = 0,1,0.2 do | |
786 | swait() | |
787 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),.8) | |
788 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.8) | |
789 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(70)),.8) | |
790 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)),.8) | |
791 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
792 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
793 | end | |
794 | attack = false | |
795 | end | |
796 | ||
797 | function attacktwo() | |
798 | attack = true | |
799 | for i = 0,1,0.1 do | |
800 | swait() | |
801 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),.8) | |
802 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-80)),.8) | |
803 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)),.8) | |
804 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(120), math.rad(0), math.rad(-30)),.8) | |
805 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
806 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
807 | end | |
808 | for i = 0,1,0.1 do | |
809 | swait() | |
810 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),.8) | |
811 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(50)),.8) | |
812 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)),.8) | |
813 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-50)),.8) | |
814 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(100),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
815 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
816 | end | |
817 | for i = 0,1,1 do | |
818 | so("http://www.roblox.com/asset/?id=185295584",workspace,1,1) | |
819 | MagicCircle(BrickColor.new("Hot pink"),MagicPrtB.CFrame,0.1,0.1,0.1,0.8,0.8,0.8,0.06) | |
820 | MagicRing(BrickColor.new("Hot pink"),MagicPrtB.CFrame,0.1,0.1,0.1,1,1,1,0.06) | |
821 | MMMAGIC(MagicPrtB,2,2,2,0,0,0,BrickColor.new("Hot pink")) | |
822 | end | |
823 | for i = 0,1,0.2 do | |
824 | swait() | |
825 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),.8) | |
826 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(50)),.8) | |
827 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)),.8) | |
828 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-50)),.8) | |
829 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(100),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
830 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
831 | end | |
832 | attack = false | |
833 | end | |
834 | ||
835 | function attackthree() | |
836 | attack = true | |
837 | for i = 0,1,0.1 do | |
838 | swait() | |
839 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.8) | |
840 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.8) | |
841 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(20)),.8) | |
842 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-20)),.8) | |
843 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
844 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
845 | end | |
846 | for i = 0,1,0.1 do | |
847 | swait() | |
848 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.8) | |
849 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.8) | |
850 | RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(-70)),.8) | |
851 | LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(70)),.8) | |
852 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
853 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
854 | end | |
855 | for i = 0,1,1 do | |
856 | so("http://www.roblox.com/asset/?id=185302814",workspace,1,1) | |
857 | MagicCircle(BrickColor.new("Hot pink"),Torso.CFrame*cf(0,0,-5),0.5,0.5,0.5,2,2,2,0.06) | |
858 | MagicRing(BrickColor.new("Hot pink"),Torso.CFrame*cf(0,0,-5),0.5,0.5,0.5,2,2,2,0.06) | |
859 | end | |
860 | for i = 0,1,0.2 do | |
861 | swait() | |
862 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.8) | |
863 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.8) | |
864 | RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(-70)),.8) | |
865 | LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(70)),.8) | |
866 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
867 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
868 | end | |
869 | attack = false | |
870 | end | |
871 | ||
872 | mouse.Button1Down:connect(function() | |
873 | if attacktype == 1 then | |
874 | attacktype = 2 | |
875 | attackone() | |
876 | elseif attacktype == 2 then | |
877 | attacktype = 3 | |
878 | attacktwo() | |
879 | elseif attacktype == 3 then | |
880 | attacktype = 1 | |
881 | attackthree() | |
882 | end | |
883 | end) | |
884 | ||
885 | mouse.KeyDown:connect(function(k) | |
886 | k=k:lower() | |
887 | ||
888 | end) | |
889 | ||
890 | ||
891 | local sine = 0 | |
892 | local change = 1 | |
893 | local val = 0 | |
894 | ||
895 | while true do | |
896 | swait() | |
897 | sine = sine + change | |
898 | local torvel=(RootPart.Velocity*Vector3.new(1,0,2)).magnitude | |
899 | local velderp=RootPart.Velocity.y | |
900 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
901 | if equipped==true or equipped==false then | |
902 | if attack==false then | |
903 | idle=idle+1 | |
904 | else | |
905 | idle=0 | |
906 | end | |
907 | if idle>=500 then | |
908 | if attack==false then | |
909 | --Sheath() | |
910 | end | |
911 | end | |
912 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
913 | Anim="Jump" | |
914 | if attack==false then | |
915 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.8) | |
916 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.8) | |
917 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(40)),.8) | |
918 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-40)),.8) | |
919 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
920 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
921 | end | |
922 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
923 | Anim="Fall" | |
924 | if attack==false then | |
925 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.8) | |
926 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.8) | |
927 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(70)),.8) | |
928 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-70)),.8) | |
929 | 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)),.8) | |
930 | 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)),.8) | |
931 | end | |
932 | elseif torvel<1 and hitfloor~=nil then | |
933 | Anim="Idle" | |
934 | if attack==false then | |
935 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),.8) | |
936 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(30)),.8) | |
937 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20)),.8) | |
938 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)),.8) | |
939 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(100),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
940 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.8) | |
941 | end | |
942 | elseif torvel>2 and hitfloor~=nil then | |
943 | Anim="Walk" | |
944 | if attack==false then | |
945 | change=3 | |
946 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.8) | |
947 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.8) | |
948 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-90*math.cos(sine/1)), math.rad(0), math.rad(15)),.8) | |
949 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90*math.cos(sine/1)), math.rad(0), math.rad(-15)),.8) | |
950 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10))*angles(math.rad(-3),math.rad(0),math.rad(0)),.8) | |
951 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(10))*angles(math.rad(-3),math.rad(0),math.rad(0)),.8) | |
952 | end | |
953 | end | |
954 | end | |
955 | if #Effects>0 then | |
956 | --table.insert(Effects,{prt,"Block1",delay}) | |
957 | for e=1,#Effects do | |
958 | if Effects[e]~=nil then | |
959 | --for j=1,#Effects[e] do | |
960 | local Thing=Effects[e] | |
961 | if Thing~=nil then | |
962 | local Part=Thing[1] | |
963 | local Mode=Thing[2] | |
964 | local Delay=Thing[3] | |
965 | local IncX=Thing[4] | |
966 | local IncY=Thing[5] | |
967 | local IncZ=Thing[6] | |
968 | if Thing[1].Transparency<=1 then | |
969 | if Thing[2]=="Block1" then | |
970 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
971 | Mesh=Thing[1].Mesh | |
972 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
973 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
974 | elseif Thing[2]=="Cylinder" then | |
975 | Mesh=Thing[1].Mesh | |
976 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
977 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
978 | elseif Thing[2]=="Blood" then | |
979 | Mesh=Thing[7] | |
980 | Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) | |
981 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
982 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
983 | elseif Thing[2]=="Elec" then | |
984 | Mesh=Thing[1].Mesh | |
985 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
986 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
987 | elseif Thing[2]=="Disappear" then | |
988 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
989 | end | |
990 | else | |
991 | Part.Parent=nil | |
992 | table.remove(Effects,e) | |
993 | end | |
994 | end | |
995 | --end | |
996 | end | |
997 | end | |
998 | end | |
999 | end |