SHOW:
|
|
- or go back to the newest paste.
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 | 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").Rohan_Kishiba |
62 | + | local Player = game:GetService("Players").Banana_Borealis |
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 | --[[KillerDarkness0105's/Codex#6685 Touhou magic script]]-- | |
88 | ||
89 | ||
90 | ||
91 | - | Player=game:GetService("Players").Rohan_Kishiba |
91 | + | Player=game:GetService("Players").Banana_Borealis |
92 | Character=Player.Character | |
93 | PlayerGui=Player.PlayerGui | |
94 | Backpack=Player.Backpack | |
95 | Torso=Character.Torso | |
96 | Head=Character.Head | |
97 | Humanoid=Character.Humanoid | |
98 | LeftArm=Character["Left Arm"] | |
99 | LeftLeg=Character["Left Leg"] | |
100 | RightArm=Character["Right Arm"] | |
101 | RightLeg=Character["Right Leg"] | |
102 | LS=Torso["Left Shoulder"] | |
103 | LH=Torso["Left Hip"] | |
104 | RS=Torso["Right Shoulder"] | |
105 | RH=Torso["Right Hip"] | |
106 | Face = Head.face | |
107 | Neck=Torso.Neck | |
108 | it=Instance.new | |
109 | attacktype=1 | |
110 | attacktype2=1 | |
111 | vt=Vector3.new | |
112 | cf=CFrame.new | |
113 | cn=CFrame.new | |
114 | euler=CFrame.fromEulerAnglesXYZ | |
115 | angles=CFrame.Angles | |
116 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
117 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
118 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
119 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
120 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
121 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
122 | RootPart=Character.HumanoidRootPart | |
123 | RootJoint=RootPart.RootJoint | |
124 | RootCF=euler(-1.57,0,3.14) | |
125 | attack = false | |
126 | attackdebounce = false | |
127 | trispeed=.2 | |
128 | attackmode='none' | |
129 | local idle=0 | |
130 | local Anim="Idle" | |
131 | stance = false | |
132 | local ff = 2 | |
133 | noleg = false | |
134 | evadecooldown = false | |
135 | Humanoid.Animator.Parent = nil | |
136 | equip = false | |
137 | local Effects = {} | |
138 | attackspeed = 0.14 | |
139 | df = false | |
140 | Swing = 1 | |
141 | local sine = 0 | |
142 | local change = 1 | |
143 | local val = 0 | |
144 | magic = false | |
145 | cam = workspace.CurrentCamera | |
146 | deb = game:GetService("Debris") | |
147 | RbxUtility = LoadLibrary("RbxUtility") | |
148 | Create = RbxUtility.Create | |
149 | Humanoid.WalkSpeed = 32 | |
150 | Humanoid.JumpPower = 76 | |
151 | local g ="Institutional white" | |
152 | local r ="Institutional white" | |
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | music = Instance.new("Sound",Torso) -- change to Character for global music --Change to Torso for non-global music. You may wanna leave this at torso tho... | |
160 | music.Volume = 0.5 | |
161 | music.TimePosition = 0 | |
162 | music.Pitch = 1 | |
163 | - | if Player.Name == "Rohan_Kishiba" then |
163 | + | if Player.Name == "Banana_Borealis" then |
164 | music.SoundId = "rbxassetid://188240154"--576413172 --music2 = 2514889110 --music3 = 3255115359 --music4 = 4700829172 -- 541377118 490561591 | |
165 | else | |
166 | music.SoundId = "rbxassetid://803364705"--576413172 --music2 = 1117522463 --music3 = 903651242 --music4 = 611389938 -- 541377118 490561591 | |
167 | end | |
168 | music.Looped = true | |
169 | music:Play() | |
170 | ||
171 | ||
172 | ||
173 | ||
174 | ||
175 | ||
176 | ||
177 | local handee = Instance.new("Part") | |
178 | handee.Parent = Character | |
179 | handee.Size = Vector3.new(.2,.2,.2) | |
180 | handee.Archivable = true | |
181 | handee.Transparency = 1 | |
182 | handee.CanCollide = false | |
183 | handee.BrickColor = BrickColor.new("Cyan") | |
184 | handee.Material = "Neon" | |
185 | local handeeweld = Instance.new("Weld") | |
186 | handeeweld.Parent = handee | |
187 | handeeweld.Part0 = RightArm | |
188 | handeeweld.Part1 = handee | |
189 | handeeweld.C1 = CFrame.new(0, 0.97, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
190 | handeeweld.Part0 = RightArm | |
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | ||
203 | so = function(id,par,vol,pit) | |
204 | coroutine.resume(coroutine.create(function() | |
205 | local sou = Instance.new("Sound",par or workspace) | |
206 | sou.Volume=vol | |
207 | sou.Pitch=pit or 1 | |
208 | sou.SoundId=id | |
209 | swait() | |
210 | sou:play() | |
211 | game:GetService("Debris"):AddItem(sou,8) | |
212 | end)) | |
213 | end | |
214 | ||
215 | --save shoulders | |
216 | RSH, LSH=nil, nil | |
217 | --welds | |
218 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
219 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
220 | LH=Torso["Left Hip"] | |
221 | RH=Torso["Right Hip"] | |
222 | TorsoColor=Torso.BrickColor | |
223 | function NoOutline(Part) | |
224 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
225 | end | |
226 | player=Player | |
227 | ch=Character | |
228 | RSH=ch.Torso["Right Shoulder"] | |
229 | LSH=ch.Torso["Left Shoulder"] | |
230 | -- | |
231 | RSH.Parent=nil | |
232 | LSH.Parent=nil | |
233 | -- | |
234 | RW.Name="Right Shoulder" | |
235 | RW.Part0=ch.Torso | |
236 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
237 | RW.C1=cf(0, 0.5, 0) | |
238 | RW.Part1=ch["Right Arm"] | |
239 | RW.Parent=ch.Torso | |
240 | -- | |
241 | LW.Name="Left Shoulder" | |
242 | LW.Part0=ch.Torso | |
243 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
244 | LW.C1=cf(0, 0.5, 0) | |
245 | LW.Part1=ch["Left Arm"] | |
246 | LW.Parent=ch.Torso | |
247 | ||
248 | ||
249 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
250 | local wld = Instance.new("Weld", wp1) | |
251 | wld.Part0 = wp0 | |
252 | wld.Part1 = wp1 | |
253 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
254 | end | |
255 | ||
256 | ||
257 | newWeld(RootPart, Torso, 0, -1, 0) | |
258 | Torso.Weld.C1 = CFrame.new(0, -1, 0) | |
259 | newWeld(Torso, LeftLeg, -0.5, -1, 0) | |
260 | LeftLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
261 | newWeld(Torso, RightLeg, 0.5, -1, 0) | |
262 | RightLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
263 | ||
264 | - | Player=game:GetService('Players').Rohan_Kishiba |
264 | + | Player=game:GetService('Players').Banana_Borealis |
265 | Character=Player.Character | |
266 | m=Instance.new('Model',Character) | |
267 | ||
268 | ||
269 | local function weldBetween(a, b) | |
270 | local weldd = Instance.new("ManualWeld") | |
271 | weldd.Part0 = a | |
272 | weldd.Part1 = b | |
273 | weldd.C0 = CFrame.new() | |
274 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
275 | weldd.Parent = a | |
276 | return weldd | |
277 | end | |
278 | ||
279 | ArtificialHB = Instance.new("BindableEvent", script) | |
280 | ArtificialHB.Name = "Heartbeat" | |
281 | ||
282 | script:WaitForChild("Heartbeat") | |
283 | ||
284 | frame = 1 / 60 | |
285 | tf = 0 | |
286 | allowframeloss = false | |
287 | tossremainder = false | |
288 | lastframe = tick() | |
289 | script.Heartbeat:Fire() | |
290 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
291 | tf = tf + s | |
292 | if tf >= frame then | |
293 | if allowframeloss then | |
294 | script.Heartbeat:Fire() | |
295 | lastframe = tick() | |
296 | else | |
297 | for i = 1, math.floor(tf / frame) do | |
298 | script.Heartbeat:Fire() | |
299 | end | |
300 | lastframe = tick() | |
301 | end | |
302 | if tossremainder then | |
303 | tf = 0 | |
304 | else | |
305 | tf = tf - frame * math.floor(tf / frame) | |
306 | end | |
307 | end | |
308 | end) | |
309 | ||
310 | function swait(num) | |
311 | if num == 0 or num == nil then | |
312 | ArtificialHB.Event:wait() | |
313 | else | |
314 | for i = 0, num do | |
315 | ArtificialHB.Event:wait() | |
316 | end | |
317 | end | |
318 | end | |
319 | ||
320 | ||
321 | ||
322 | function RemoveOutlines(part) | |
323 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
324 | end | |
325 | ||
326 | ||
327 | part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size) | |
328 | local fp = it("Part") | |
329 | fp.formFactor = formfactor | |
330 | fp.Parent = parent | |
331 | fp.Reflectance = reflectance | |
332 | fp.Transparency = transparency | |
333 | fp.CanCollide = false | |
334 | fp.Locked = true | |
335 | fp.BrickColor = brickcolor | |
336 | fp.Name = name | |
337 | fp.Size = size | |
338 | fp.Position = Torso.Position | |
339 | NoOutline(fp) | |
340 | if fp.BrickColor == BrickColor.new("Dark indigo") then | |
341 | fp.Material = "Neon" | |
342 | else | |
343 | if fp.BrickColor == BrickColor.new("Fossil") then | |
344 | fp.BrickColor = BrickColor.new("Dark indigo") | |
345 | fp.Material = "Neon" | |
346 | else | |
347 | fp.Material = "Neon" | |
348 | end | |
349 | end | |
350 | fp:BreakJoints() | |
351 | return fp | |
352 | end | |
353 | ||
354 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
355 | local mesh = it(Mesh) | |
356 | mesh.Parent = part | |
357 | if Mesh == "SpecialMesh" then | |
358 | mesh.MeshType = meshtype | |
359 | mesh.MeshId = meshid | |
360 | end | |
361 | mesh.Offset = offset | |
362 | mesh.Scale = scale | |
363 | return mesh | |
364 | end | |
365 | ||
366 | weld = function(parent, part0, part1, c0) | |
367 | local weld = it("Weld") | |
368 | weld.Parent = parent | |
369 | weld.Part0 = part0 | |
370 | weld.Part1 = part1 | |
371 | weld.C0 = c0 | |
372 | return weld | |
373 | end | |
374 | ||
375 | F1 = Instance.new("Folder", Character) | |
376 | F1.Name = "Effects Folder" | |
377 | F2 = Instance.new("Folder", F1) | |
378 | F2.Name = "Effects" | |
379 | Triangle = function(a, b, c) | |
380 | end | |
381 | ||
382 | MagicBlock4 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
383 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
384 | prt.Anchored = true | |
385 | prt.CanCollide = false | |
386 | prt.CFrame = cframe | |
387 | prt.Name = "prt" | |
388 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
389 | game:GetService("Debris"):AddItem(prt, 5) | |
390 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3}) | |
391 | end | |
392 | ||
393 | ||
394 | ||
395 | MagicCircle4 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
396 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
397 | prt.Anchored = true | |
398 | prt.CanCollide = false | |
399 | prt.CFrame = cframe | |
400 | prt.Name = "prt" | |
401 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
402 | game:GetService("Debris"):AddItem(prt, 5) | |
403 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
404 | end | |
405 | ||
406 | MagicWave4 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
407 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
408 | prt.Anchored = true | |
409 | prt.CFrame = cframe | |
410 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1)) | |
411 | game:GetService("Debris"):AddItem(prt, 5) | |
412 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
413 | end | |
414 | ||
415 | MagicCylinder4 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
416 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
417 | prt.Anchored = true | |
418 | prt.CFrame = cframe | |
419 | msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
420 | game:GetService("Debris"):AddItem(prt, 5) | |
421 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
422 | end | |
423 | ||
424 | MagicCylinder5 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
425 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
426 | prt.Anchored = true | |
427 | prt.CFrame = cframe | |
428 | msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
429 | game:GetService("Debris"):AddItem(prt, 5) | |
430 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
431 | end | |
432 | ||
433 | MagicBlood4 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
434 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
435 | prt.Anchored = true | |
436 | prt.CFrame = cframe | |
437 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
438 | game:GetService("Debris"):AddItem(prt, 5) | |
439 | table.insert(Effects, {prt, "Blood", delay, x3, y3, z3}) | |
440 | end | |
441 | ||
442 | ElecEffect4 = function(cff, x, y, z) | |
443 | local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1)) | |
444 | prt.Anchored = true | |
445 | prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
446 | prt.CFrame = cf(prt.Position) | |
447 | game:GetService("Debris"):AddItem(prt, 2) | |
448 | xval = math.random() / 2 | |
449 | yval = math.random() / 2 | |
450 | zval = math.random() / 2 | |
451 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval)) | |
452 | Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval} | |
453 | end | |
454 | ||
455 | ||
456 | ||
457 | ||
458 | ||
459 | ||
460 | ||
461 | ||
462 | ||
463 | ||
464 | ||
465 | ||
466 | ||
467 | function SkullEffect(brickcolor,cframe,x1,y1,z1,delay) | |
468 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
469 | prt.Anchored=true | |
470 | prt.CFrame=cframe | |
471 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1)) | |
472 | --http://www.roblox.com/asset/?id=4770560 | |
473 | game:GetService("Debris"):AddItem(prt,2) | |
474 | CF=prt.CFrame | |
475 | coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) | |
476 | for i=0,1,0.2 do | |
477 | wait() | |
478 | Part.CFrame=CF*cf(0,0,-0.4) | |
479 | end | |
480 | for i=0,1,delay do | |
481 | wait() | |
482 | --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5) | |
483 | Mesh.Scale=Mesh.Scale | |
484 | end | |
485 | for i=0,1,0.1 do | |
486 | wait() | |
487 | Part.Transparency=i | |
488 | end | |
489 | Part.Parent=nil | |
490 | end),prt,msh,CF) | |
491 | end | |
492 | ||
493 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
494 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
495 | prt.Anchored=true | |
496 | prt.Material = "Neon" | |
497 | prt.CFrame=cframe | |
498 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
499 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
500 | game:GetService("Debris"):AddItem(prt,5) | |
501 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
502 | for i=0,1,delay do | |
503 | swait() | |
504 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
505 | Part.Transparency=i | |
506 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
507 | end | |
508 | Part.Parent=nil | |
509 | end),prt,msh) | |
510 | end | |
511 | ||
512 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
513 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
514 | prt.Anchored=true | |
515 | prt.Material = "Neon" | |
516 | prt.CFrame=cframe | |
517 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
518 | game:GetService("Debris"):AddItem(prt,5) | |
519 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
520 | local rtype = rottype | |
521 | for i=0,1,delay do | |
522 | swait() | |
523 | if rtype == 1 then | |
524 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
525 | elseif rtype == 2 then | |
526 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
527 | end | |
528 | Part.Transparency=i | |
529 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
530 | end | |
531 | Part.Parent=nil | |
532 | end),prt,msh) | |
533 | end | |
534 | ||
535 | function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
536 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
537 | prt.Anchored=true | |
538 | prt.CFrame=cframe | |
539 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
540 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
541 | game:GetService("Debris"):AddItem(prt,5) | |
542 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
543 | for i=0,1,delay do | |
544 | swait() | |
545 | Part.Transparency=i | |
546 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
547 | end | |
548 | Part.Parent=nil | |
549 | end),prt,msh) | |
550 | end | |
551 | ||
552 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
553 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
554 | prt.Anchored=true | |
555 | prt.Material = "Neon" | |
556 | prt.CFrame=cframe | |
557 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
558 | game:GetService("Debris"):AddItem(prt,5) | |
559 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
560 | local rtype = rottype | |
561 | for i=0,1,delay do | |
562 | swait() | |
563 | if rtype == 1 then | |
564 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
565 | elseif rtype == 2 then | |
566 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
567 | end | |
568 | Part.Transparency=i | |
569 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
570 | end | |
571 | Part.Parent=nil | |
572 | end),prt,msh) | |
573 | end | |
574 | ||
575 | function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
576 | local prt=part(3,Character,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
577 | prt.Anchored=true | |
578 | prt.Material = "Neon" | |
579 | prt.CFrame=cframe | |
580 | local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
581 | local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
582 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
583 | game:GetService("Debris"):AddItem(prt,5) | |
584 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
585 | local rtype = rottype | |
586 | for i=0,1,delay do | |
587 | swait() | |
588 | if rtype == 1 then | |
589 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
590 | elseif rtype == 2 then | |
591 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
592 | end | |
593 | dec.Transparency=i | |
594 | dec2.Transparency=i | |
595 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
596 | end | |
597 | Part.Parent=nil | |
598 | end),prt,msh) | |
599 | end | |
600 | ||
601 | function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
602 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
603 | prt.Anchored=true | |
604 | prt.Material = "Neon" | |
605 | prt.CFrame=cframe | |
606 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
607 | game:GetService("Debris"):AddItem(prt,5) | |
608 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
609 | local rtype = rottype | |
610 | for i=0,1,delay do | |
611 | swait() | |
612 | if rtype == 1 then | |
613 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
614 | elseif rtype == 2 then | |
615 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
616 | end | |
617 | prt.Transparency=i | |
618 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
619 | end | |
620 | Part.Parent=nil | |
621 | end),prt,msh) | |
622 | end | |
623 | ||
624 | function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype) | |
625 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
626 | prt.Anchored=true | |
627 | prt.Material = "Neon" | |
628 | prt.CFrame=cframe | |
629 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1)) | |
630 | game:GetService("Debris"):AddItem(prt,5) | |
631 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
632 | local rtype = rottype | |
633 | for i=0,1,delay do | |
634 | swait() | |
635 | if rtype == 1 then | |
636 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0) | |
637 | elseif rtype == 2 then | |
638 | prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0) | |
639 | end | |
640 | prt.Transparency=i | |
641 | Mesh.Scale=Mesh.Scale+vt(x3,0,z3) | |
642 | end | |
643 | Part.Parent=nil | |
644 | end),prt,msh) | |
645 | end | |
646 | ||
647 | function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype) | |
648 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
649 | prt.Anchored=true | |
650 | prt.Material = "Neon" | |
651 | prt.CFrame=cframe | |
652 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
653 | game:GetService("Debris"):AddItem(prt,5) | |
654 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
655 | local rtype = rottype | |
656 | for i=0,1,delay do | |
657 | swait() | |
658 | if rtype == 1 then | |
659 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
660 | elseif rtype == 2 then | |
661 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
662 | end | |
663 | prt.Transparency=i | |
664 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
665 | end | |
666 | Part.Parent=nil | |
667 | end),prt,msh) | |
668 | end | |
669 | ||
670 | function MagicShockTrailAlt2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
671 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
672 | prt.Anchored=true | |
673 | prt.Material = "Neon" | |
674 | prt.CFrame=cframe | |
675 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
676 | game:GetService("Debris"):AddItem(prt,5) | |
677 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
678 | local rtype = rottype | |
679 | for i=0,1,delay do | |
680 | swait() | |
681 | if rtype == 1 then | |
682 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
683 | elseif rtype == 2 then | |
684 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
685 | end | |
686 | prt.Transparency=i | |
687 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
688 | end | |
689 | Part.Parent=nil | |
690 | end),prt,msh) | |
691 | end | |
692 | ||
693 | function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
694 | local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
695 | prt.Anchored=false | |
696 | prt.CFrame=cframe | |
697 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
698 | local wld=weld(prt,prt,Parent,cframe) | |
699 | game:GetService("Debris"):AddItem(prt,5) | |
700 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
701 | for i=0,1,delay do | |
702 | swait() | |
703 | Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe | |
704 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
705 | Part.Transparency=i | |
706 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
707 | end | |
708 | Part.Parent=nil | |
709 | end),prt,msh,wld) | |
710 | end | |
711 | ||
712 | function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
713 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
714 | prt.Anchored=false | |
715 | prt.CFrame=cframe | |
716 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
717 | local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0)) | |
718 | game:GetService("Debris"):AddItem(prt,5) | |
719 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
720 | for i=0,1,delay do | |
721 | swait() | |
722 | Weld.C0=euler(i*20,0,0) | |
723 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
724 | Part.Transparency=i | |
725 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
726 | end | |
727 | Part.Parent=nil | |
728 | end),prt,msh,wld) | |
729 | end | |
730 | ||
731 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
732 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
733 | prt.Anchored=true | |
734 | prt.CFrame=cframe | |
735 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
736 | game:GetService("Debris"):AddItem(prt,2) | |
737 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
738 | for i=0,1,delay do | |
739 | swait() | |
740 | Part.CFrame=Part.CFrame | |
741 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
742 | local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
743 | prt2.Anchored=true | |
744 | prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
745 | local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
746 | game:GetService("Debris"):AddItem(prt2,2) | |
747 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
748 | for i=0,1,0.1 do | |
749 | swait() | |
750 | Part.CFrame=Part.CFrame*cf(0,0.5,0) | |
751 | end | |
752 | Part.Parent=nil | |
753 | end),prt2,msh2) | |
754 | end | |
755 | for i=0,1,delay*2 do | |
756 | swait() | |
757 | Part.CFrame=Part.CFrame | |
758 | Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i) | |
759 | end | |
760 | Part.Parent=nil | |
761 | end),prt,msh) | |
762 | end | |
763 | ||
764 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
765 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
766 | prt.Anchored=true | |
767 | prt.CFrame=cframe | |
768 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
769 | game:GetService("Debris"):AddItem(prt,2) | |
770 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
771 | for i=0,1,delay do | |
772 | swait() | |
773 | Part.CFrame=Part.CFrame | |
774 | Part.Transparency=i | |
775 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
776 | end | |
777 | Part.Parent=nil | |
778 | end),prt,msh) | |
779 | end | |
780 | ||
781 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
782 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
783 | prt.Anchored=true | |
784 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
785 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
786 | game:GetService("Debris"):AddItem(prt,2) | |
787 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
788 | CF=Part.CFrame | |
789 | Numbb=0 | |
790 | randnumb=math.random()/10 | |
791 | rand1=math.random()/10 | |
792 | for i=0,1,rand1 do | |
793 | swait() | |
794 | CF=CF*cf(0,math.random()/2,0) | |
795 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
796 | Part.CFrame=CF*euler(Numbb,0,0) | |
797 | Part.Transparency=i | |
798 | Numbb=Numbb+randnumb | |
799 | end | |
800 | Part.Parent=nil | |
801 | end),prt,CF,Numbb,randnumb) | |
802 | end | |
803 | ||
804 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
805 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
806 | prt.Anchored=true | |
807 | prt.CFrame=cframe | |
808 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1)) | |
809 | game:GetService("Debris"):AddItem(prt,5) | |
810 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
811 | for i=0,1,delay do | |
812 | swait() | |
813 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
814 | Part.Transparency=i | |
815 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
816 | end | |
817 | Part.Parent=nil | |
818 | end),prt,msh) | |
819 | end | |
820 | ||
821 | function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
822 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
823 | prt.Anchored=true | |
824 | prt.CFrame=cframe | |
825 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
826 | game:GetService("Debris"):AddItem(prt,2) | |
827 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
828 | for i=0,1,delay do | |
829 | swait() | |
830 | Part.CFrame=Part.CFrame*cf(0,y3/2,0) | |
831 | Part.Transparency=i | |
832 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
833 | end | |
834 | Part.Parent=nil | |
835 | end),prt,msh) | |
836 | end | |
837 | ||
838 | function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay) | |
839 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
840 | prt.Anchored=true | |
841 | prt.CFrame=cframe*cf(x,y,z) | |
842 | - | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://62202927",vt(0,0,0),vt(x1,y1,z1)) |
842 | + | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://498938361",vt(0,0,0),vt(x1,y1,z1)) |
843 | game:GetService("Debris"):AddItem(prt,5) | |
844 | coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) | |
845 | local num=math.random() | |
846 | local num2=math.random(-3,2)+math.random() | |
847 | local numm=0 | |
848 | for i=0,1,delay*2 do | |
849 | swait() | |
850 | Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0) | |
851 | Part.Transparency=i | |
852 | numm=numm+0.01 | |
853 | end | |
854 | Part.Parent=nil | |
855 | Mesh.Parent=nil | |
856 | end),prt,msh,x,y,z) | |
857 | end | |
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | ||
864 | ||
865 | New = function(Object, Parent, Name, Data) | |
866 | local Object = Instance.new(Object) | |
867 | for Index, Value in pairs(Data or {}) do | |
868 | Object[Index] = Value | |
869 | end | |
870 | Object.Parent = Parent | |
871 | Object.Name = Name | |
872 | return Object | |
873 | end | |
874 | ||
875 | ||
876 | ||
877 | function clerp(a,b,t) | |
878 | local qa = {QuaternionFromCFrame(a)} | |
879 | local qb = {QuaternionFromCFrame(b)} | |
880 | local ax, ay, az = a.x, a.y, a.z | |
881 | local bx, by, bz = b.x, b.y, b.z | |
882 | local _t = 1-t | |
883 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
884 | end | |
885 | ||
886 | function QuaternionFromCFrame(cf) | |
887 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
888 | local trace = m00 + m11 + m22 | |
889 | if trace > 0 then | |
890 | local s = math.sqrt(1 + trace) | |
891 | local recip = 0.5/s | |
892 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
893 | else | |
894 | local i = 0 | |
895 | if m11 > m00 then | |
896 | i = 1 | |
897 | end | |
898 | if m22 > (i == 0 and m00 or m11) then | |
899 | i = 2 | |
900 | end | |
901 | if i == 0 then | |
902 | local s = math.sqrt(m00-m11-m22+1) | |
903 | local recip = 0.5/s | |
904 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
905 | elseif i == 1 then | |
906 | local s = math.sqrt(m11-m22-m00+1) | |
907 | local recip = 0.5/s | |
908 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
909 | elseif i == 2 then | |
910 | local s = math.sqrt(m22-m00-m11+1) | |
911 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
912 | end | |
913 | end | |
914 | end | |
915 | ||
916 | ||
917 | ||
918 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
919 | local xs, ys, zs = x + x, y + y, z + z | |
920 | local wx, wy, wz = w*xs, w*ys, w*zs | |
921 | local xx = x*xs | |
922 | local xy = x*ys | |
923 | local xz = x*zs | |
924 | local yy = y*ys | |
925 | local yz = y*zs | |
926 | local zz = z*zs | |
927 | 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)) | |
928 | end | |
929 | function QuaternionSlerp(a, b, t) | |
930 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
931 | local startInterp, finishInterp; | |
932 | if cosTheta >= 0.0001 then | |
933 | if (1 - cosTheta) > 0.0001 then | |
934 | local theta = math.acos(cosTheta) | |
935 | local invSinTheta = 1/math.sin(theta) | |
936 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
937 | finishInterp = math.sin(t*theta)*invSinTheta | |
938 | else | |
939 | startInterp = 1-t | |
940 | finishInterp = t | |
941 | end | |
942 | else | |
943 | if (1+cosTheta) > 0.0001 then | |
944 | local theta = math.acos(-cosTheta) | |
945 | local invSinTheta = 1/math.sin(theta) | |
946 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
947 | finishInterp = math.sin(t*theta)*invSinTheta | |
948 | else | |
949 | startInterp = t-1 | |
950 | finishInterp = t | |
951 | end | |
952 | end | |
953 | 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 | |
954 | end | |
955 | ||
956 | function weld5(part0, part1, c0, c1) | |
957 | weeld=Instance.new("Weld", part0) | |
958 | weeld.Part0=part0 | |
959 | weeld.Part1=part1 | |
960 | weeld.C0=c0 | |
961 | weeld.C1=c1 | |
962 | return weeld | |
963 | end | |
964 | ||
965 | --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) | |
966 | ||
967 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
968 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
969 | end | |
970 | ||
971 | ||
972 | ||
973 | ||
974 | ||
975 | ||
976 | ||
977 | ||
978 | ||
979 | ||
980 | function Dmgfunc(player,mindamage,maxdamage,waait) | |
981 | ||
982 | dodamage = coroutine.wrap(function() | |
983 | ||
984 | if player ~= Character and player:FindFirstChild("IsHit") == nil then | |
985 | ||
986 | Max = mindamage + math.random(-mindamage,maxdamage) | |
987 | ||
988 | player.Humanoid.Health = player.Humanoid.Health - Max | |
989 | ||
990 | ||
991 | local thiing = Instance.new("ObjectValue",player) | |
992 | thiing.Name = "IsHit" | |
993 | deb:AddItem(thiing,waait) | |
994 | ||
995 | --for nooby ;) | |
996 | local Damagetext = Instance.new("BillboardGui",player) | |
997 | Damagetext.Size = UDim2.new(0,100,0,40) | |
998 | Damagetext.StudsOffset = Vector3.new(0,3,0) | |
999 | Damagetext.Adornee = player.Head | |
1000 | Damagetext.Name = "TalkingBillBoard" | |
1001 | local Damagelabel = Instance.new("TextLabel",Damagetext) | |
1002 | Damagelabel.BackgroundTransparency = 1 | |
1003 | Damagelabel.BorderSizePixel = 0 | |
1004 | Damagelabel.Text = ""..Max | |
1005 | Damagelabel.Font = "Bodoni" | |
1006 | Damagelabel.FontSize = "Size24" | |
1007 | Damagelabel.TextStrokeTransparency = 0 | |
1008 | Damagelabel.TextColor3 = Color3.new(255,255,255) | |
1009 | Damagelabel.TextStrokeColor3 = Color3.new(0,0,0) | |
1010 | Damagelabel.Size = UDim2.new(1,0,1.5,0) | |
1011 | deb:AddItem(Damagetext,4.5) | |
1012 | for i = 1, 70 do | |
1013 | wait(0.00000000000000000000000001) | |
1014 | Damagelabel.Position = Damagelabel.Position - UDim2.new(0,0,.06,0) | |
1015 | Damagelabel.TextStrokeTransparency = Damagelabel.TextStrokeTransparency +.06 | |
1016 | Damagelabel.TextTransparency = Damagelabel.TextTransparency + .04 | |
1017 | end | |
1018 | Damagetext:Destroy() | |
1019 | end | |
1020 | end) | |
1021 | dodamage(player,mindamage,maxdamage,waait) | |
1022 | ||
1023 | end | |
1024 | ||
1025 | ||
1026 | ||
1027 | ||
1028 | ||
1029 | ||
1030 | ||
1031 | function Bullets(thinggy,size,color,velocity,damage,bounce,collide,rotation) | |
1032 | swait() | |
1033 | local Bullet = Instance.new("Part",Workspace) | |
1034 | Bullet.Locked = true | |
1035 | Bullet.Name = "Bullet" | |
1036 | Bullet.Anchored = bounce | |
1037 | Bullet.CanCollide = collide | |
1038 | Bullet.Transparency = 0.24 | |
1039 | Bullet.Reflectance = 0 | |
1040 | Bullet.BottomSurface = 0 | |
1041 | Bullet.TopSurface = 0 | |
1042 | Bullet.Shape = 0 | |
1043 | Bullet.BrickColor = BrickColor.new(color) | |
1044 | Bullet.Size = Vector3.new(size,size,size) | |
1045 | Bullet.Material = "Neon" | |
1046 | Bullet.Orientation = vt(-90,0,0) | |
1047 | local Bulletthing = Instance.new("SpecialMesh",Bullet) | |
1048 | - | Bulletthing.MeshId = "rbxassetid://62202927" |
1048 | + | Bulletthing.MeshId = "rbxassetid://498938361" |
1049 | local Bulletforce = Instance.new("BodyForce") | |
1050 | Bulletforce.force = Vector3.new(0,Bullet:GetMass()*166.2,0) | |
1051 | Bulletforce.Parent = Bullet | |
1052 | Bullet.CFrame = thinggy.CFrame*CFrame.new(0,0,0) + Vector3.new(math.random(-1,1),math.random(0,0.7),math.random(-1,1)) | |
1053 | local bv = Instance.new("BodyVelocity",Bullet) | |
1054 | bv.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1055 | Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p+Vector3.new(math.random(-7,7),math.random(-2,2),math.random(-6,6))) | |
1056 | bv.velocity = Bullet.CFrame.lookVector*velocity | |
1057 | ||
1058 | so("http://roblox.com/asset/?id=925629856",Bullet,0.4,1) | |
1059 | if bounce == false then | |
1060 | Bullet.Touched:connect(function(hit) | |
1061 | if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "Bullet" and hit.Name ~= "prt" and Bullet.Anchored == false) then | |
1062 | local orbexplode = Instance.new("Sound", Bullet) | |
1063 | orbexplode.Volume = 0.4 | |
1064 | orbexplode.PlayOnRemove = true | |
1065 | orbexplode.SoundId = "http://roblox.com/asset/?id=679798995" | |
1066 | orbexplode.Pitch = 1 | |
1067 | orbexplode:Destroy() | |
1068 | deb:AddItem(orbexplode, 4) | |
1069 | Bullet.Anchored = true | |
1070 | local Explode = Instance.new("Explosion") | |
1071 | Explode.Position = Bullet.Position | |
1072 | Explode.Parent = Workspace | |
1073 | Explode.BlastPressure = 0 | |
1074 | Explode.BlastRadius = Bullet.Size.X *3.6 | |
1075 | Explode.Visible = false | |
1076 | Explode.Hit:connect(function(hit) | |
1077 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1078 | Dmgfunc(hit.Parent,damage,0+damage,.01) | |
1079 | end | |
1080 | end) | |
1081 | Bullet.Mesh.Scale = Vector3.new(0,0,0) | |
1082 | MagicCircle4(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2+size*1.4, 2.2+size*1.4, 2.2+size*1.4, 0.02) | |
1083 | MagicCircle4(BrickColor.new("Light Royal blue"), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02) | |
1084 | end | |
1085 | end) | |
1086 | elseif bounce == true then | |
1087 | Bullet.Touched:connect(function(hit) | |
1088 | if (hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent~= Character) then | |
1089 | Bullet.Anchored = true | |
1090 | local Explode = Instance.new("Explosion") | |
1091 | Explode.Position = Bullet.Position | |
1092 | Explode.Parent = Workspace | |
1093 | Explode.BlastPressure = 0 | |
1094 | Explode.BlastRadius = Bullet.Size.X | |
1095 | Explode.Visible = false | |
1096 | Explode.Hit:connect(function(hit) | |
1097 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1098 | Dmgfunc(hit.Parent,damage,0+damage,.01) | |
1099 | end | |
1100 | end) | |
1101 | Bullet.Mesh.Scale = Vector3.new(.1,.1,.1) | |
1102 | ||
1103 | MagicCircle4(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2+size*1.4, 2.2+size*1.4, 2.2+size*1.4, 0.02) | |
1104 | MagicCircle4(BrickColor.new("Dark Royal blue"), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02) | |
1105 | ||
1106 | ||
1107 | end | |
1108 | end) | |
1109 | end | |
1110 | deb:AddItem(Bullet,5.3) | |
1111 | ||
1112 | return Bullet | |
1113 | end | |
1114 | ||
1115 | ||
1116 | ||
1117 | ||
1118 | function Rotbullet(thinggy,size,color,velocity,damage,bounce,collide) | |
1119 | ||
1120 | rotation = 0 | |
1121 | rotation2 = 0 | |
1122 | ||
1123 | ||
1124 | local Bullet = Instance.new("Part",Workspace) | |
1125 | Bullet.Locked = true | |
1126 | Bullet.Name = "Bullet" | |
1127 | Bullet.Anchored = bounce | |
1128 | Bullet.CanCollide = collide | |
1129 | Bullet.Transparency = 0.24 | |
1130 | Bullet.Reflectance = 0 | |
1131 | Bullet.BottomSurface = 0 | |
1132 | Bullet.TopSurface = 0 | |
1133 | Bullet.Shape = 0 | |
1134 | Bullet.BrickColor = BrickColor.new(color) | |
1135 | Bullet.Size = Vector3.new(size,size,size) | |
1136 | Bullet.Material = "Neon" | |
1137 | local Bulletthing = Instance.new("SpecialMesh",Bullet) | |
1138 | Bulletthing.MeshType = "Sphere" | |
1139 | local Bulletforce = Instance.new("BodyForce") | |
1140 | Bulletforce.force = Vector3.new(0,Bullet:GetMass()*166.2,0) | |
1141 | Bulletforce.Parent = Bullet | |
1142 | Bullet.CFrame = thinggy.CFrame*CFrame.new(0,0,0) + Vector3.new(math.random(-1,1),math.random(0,0.7),math.random(-1,1)) | |
1143 | local bv = Instance.new("BodyVelocity",Bullet) | |
1144 | bv.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1145 | Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p+Vector3.new(math.random(-7,7),math.random(-2,2),math.random(-6,6))) | |
1146 | bv.velocity = Bullet.CFrame.lookVector*velocity | |
1147 | so("http://roblox.com/asset/?id=925629856",Bullet,0.4,1) | |
1148 | if bounce == false then | |
1149 | Bullet.Touched:connect(function(hit) | |
1150 | if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "Bullet" and hit.Name ~= "prt" and Bullet.Anchored == false) then | |
1151 | ||
1152 | ||
1153 | ||
1154 | local orbexplode = Instance.new("Sound", Bullet) | |
1155 | orbexplode.Volume = 0.4 | |
1156 | orbexplode.PlayOnRemove = true | |
1157 | orbexplode.SoundId = "http://roblox.com/asset/?id=573314737" | |
1158 | orbexplode.Pitch = 1 | |
1159 | orbexplode:Destroy() | |
1160 | deb:AddItem(orbexplode, 4) | |
1161 | Bullet.Anchored = true | |
1162 | ||
1163 | local Explode = Instance.new("Explosion") | |
1164 | Explode.Position = Bullet.Position | |
1165 | Explode.Parent = Workspace | |
1166 | Explode.BlastPressure = 0 | |
1167 | Explode.BlastRadius = Bullet.Size.X *3.6 | |
1168 | Explode.Visible = false | |
1169 | ||
1170 | ||
1171 | ||
1172 | Explode.Hit:connect(function(hit) | |
1173 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1174 | Dmgfunc(hit.Parent,damage,0+damage,.01) | |
1175 | end | |
1176 | end) | |
1177 | Bullet.Mesh.Scale = Vector3.new(0,0,0) | |
1178 | MagicCircle4(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2+size*1.4, 2.2+size*1.4, 2.2+size*1.4, 0.02) | |
1179 | MagicCircle4(BrickColor.new("Earth blue"), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02) | |
1180 | ||
1181 | for i = 1,10 do | |
1182 | wait(0) | |
1183 | rotation2 = rotation2 - 25 | |
1184 | local Bullet2 = Instance.new("Part") | |
1185 | Bullet2.Parent = Workspace | |
1186 | Bullet2.Material = "Neon" | |
1187 | Bullet2.BrickColor = BrickColor.new(color) | |
1188 | Bullet2.CanCollide = false | |
1189 | Bullet2.Archivable = true | |
1190 | Bullet2.Anchored = false | |
1191 | Bullet2.Transparency = 0 | |
1192 | Bullet2.Size = vt(size/1.3,size/1.3,size/1.3) | |
1193 | local B2mesh = Instance.new("SpecialMesh",Bullet2) | |
1194 | B2mesh.MeshType = "Sphere" | |
1195 | Bullet2.CFrame = Bullet.CFrame*CFrame.Angles(0,math.rad(rotation2),0)*CFrame.new(0,2,0) | |
1196 | local bv2 = Instance.new("BodyVelocity",Bullet2) | |
1197 | bv2.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1198 | bv2.velocity = Bullet2.CFrame.lookVector*velocity | |
1199 | ||
1200 | ||
1201 | ||
1202 | ||
1203 | ||
1204 | Bullet2.Touched:connect(function(hit) | |
1205 | if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "Bullet" and hit.Name ~= "prt" and Bullet.Anchored == true) then | |
1206 | Bullet2.Anchored = true | |
1207 | local Explode2 = Instance.new("Explosion") | |
1208 | Explode2.Position = Bullet2.Position | |
1209 | Explode2.Parent = Workspace | |
1210 | Explode2.BlastPressure = 0 | |
1211 | Explode2.BlastRadius = Bullet2.Size.X *3.6 | |
1212 | Explode2.Visible = false | |
1213 | ||
1214 | Explode2.Hit:connect(function(hit) | |
1215 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1216 | Dmgfunc(hit.Parent,damage,0+damage,.01) | |
1217 | end | |
1218 | end) | |
1219 | Bullet2.Mesh.Scale = Vector3.new(0,0,0) | |
1220 | MagicCircle4(BrickColor.new(color), Bullet2.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2+size/1.4, 2.2+size/1.4, 2.2+size/1.4, 0.02) | |
1221 | MagicCircle4(BrickColor.new("Pastel Blue"), Bullet2.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02) | |
1222 | end | |
1223 | end) | |
1224 | ||
1225 | ||
1226 | end | |
1227 | end | |
1228 | end) | |
1229 | ||
1230 | elseif bounce == true then | |
1231 | Bullet.Touched:connect(function(hit) | |
1232 | if (hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent~= Character) then | |
1233 | Bullet.Anchored = true | |
1234 | local Explode = Instance.new("Explosion") | |
1235 | Explode.Position = Bullet.Position | |
1236 | Explode.Parent = Workspace | |
1237 | Explode.BlastPressure = 0 | |
1238 | Explode.BlastRadius = Bullet.Size.X | |
1239 | Explode.Visible = false | |
1240 | Explode.Hit:connect(function(hit) | |
1241 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1242 | Dmgfunc(hit.Parent,damage,0+damage,.01) | |
1243 | end | |
1244 | end) | |
1245 | Bullet.Mesh.Scale = Vector3.new(.1,.1,.1) | |
1246 | ||
1247 | MagicCircle4(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2+size*1.4, 2.2+size*1.4, 2.2+size*1.4, 0.02) | |
1248 | MagicCircle4(BrickColor.new("Tr. Blue"), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02) | |
1249 | ||
1250 | ||
1251 | end | |
1252 | end) | |
1253 | end | |
1254 | deb:AddItem(Bullet,3.3) | |
1255 | deb:AddItem(Bullet2,3.3) | |
1256 | ||
1257 | return Bullet | |
1258 | end | |
1259 | ||
1260 | ||
1261 | ||
1262 | ||
1263 | ||
1264 | function Bullets2(size,color,velocity,damage,bounce,collide) | |
1265 | local Bullet = Instance.new("Part",Workspace) | |
1266 | Bullet.Locked = true | |
1267 | Bullet.Name = "Bullet" | |
1268 | Bullet.Anchored = bounce | |
1269 | Bullet.CanCollide = collide | |
1270 | Bullet.Transparency = 0.24 | |
1271 | Bullet.Reflectance = 0 | |
1272 | Bullet.BottomSurface = 0 | |
1273 | Bullet.TopSurface = 0 | |
1274 | Bullet.Shape = 0 | |
1275 | Bullet.BrickColor = BrickColor.new(color) | |
1276 | Bullet.Size = Vector3.new(size,size,size) | |
1277 | Bullet.Material = "Neon" | |
1278 | local Bulletthing = Instance.new("SpecialMesh",Bullet) | |
1279 | Bulletthing.MeshType = "Sphere" | |
1280 | Bullet.CFrame = handee.CFrame*CFrame.new(0,0,0) + Vector3.new(math.random(-180,180),math.random(-1.6,6.6),math.random(-180,180)) | |
1281 | local bv = Instance.new("BodyVelocity",Bullet) | |
1282 | bv.maxForce = Vector3.new(99999,99999,99999) | |
1283 | Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p) | |
1284 | bv.velocity = Bullet.CFrame.lookVector*velocity | |
1285 | so("http://roblox.com/asset/?id=200633327",Bullet,1,1) | |
1286 | spawn = coroutine.wrap(function() | |
1287 | Bullet.Transparency = 0 | |
1288 | Bullet.Mesh.Scale = Vector3.new(3.5,3.5,3.5) | |
1289 | wait() | |
1290 | Bullet.Transparency = .25 | |
1291 | Bullet.Mesh.Scale = Vector3.new(2.5,2.5,2.5) | |
1292 | wait() | |
1293 | Bullet.Transparency = .5 | |
1294 | Bullet.Mesh.Scale = Vector3.new(1.5,1.5,1.5) | |
1295 | wait() | |
1296 | Bullet.Transparency = 0 | |
1297 | Bullet.Mesh.Scale = Vector3.new(1,1,1) | |
1298 | end) | |
1299 | if bounce == false then | |
1300 | Bullet.Touched:connect(function(hit) | |
1301 | if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "Bullet" and Bullet.Anchored == false) then | |
1302 | Bullet.Anchored = true | |
1303 | local Explode = Instance.new("Explosion") | |
1304 | Explode.Position = Bullet.Position | |
1305 | Explode.Parent = Workspace | |
1306 | Explode.BlastPressure = 0 | |
1307 | Explode.BlastRadius = Bullet.Size.X | |
1308 | Explode.Visible = false | |
1309 | Explode.Hit:connect(function(hit) | |
1310 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1311 | Dmgfunc(hit.Parent,damage,0.7,0) | |
1312 | end | |
1313 | end) | |
1314 | Bullet.Mesh.Scale = Vector3.new(.1,.1,.1) | |
1315 | MagicBlock(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 1.7, 1.7, 1.7, 0.04) | |
1316 | MagicBlock(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2, 2.2, 2.2, 0.04) | |
1317 | for i = 0,2.3,0.1 do | |
1318 | swait() | |
1319 | Bullet.Transparency = Bullet.Transparency + 0.02 | |
1320 | Bullet.Mesh.Scale = Bullet.Mesh.Scale + Vector3.new(.3,.3,.3) | |
1321 | end | |
1322 | Bullet:Destroy() | |
1323 | end | |
1324 | end) | |
1325 | elseif bounce == true then | |
1326 | Bullet.Touched:connect(function(hit) | |
1327 | if (hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent~= Character) then | |
1328 | Bullet.Anchored = true | |
1329 | local Explode = Instance.new("Explosion") | |
1330 | Explode.Position = Bullet.Position | |
1331 | Explode.Parent = Workspace | |
1332 | Explode.BlastPressure = 0 | |
1333 | Explode.BlastRadius = Bullet.Size.X | |
1334 | Explode.Visible = false | |
1335 | Explode.Hit:connect(function(hit) | |
1336 | if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then | |
1337 | Dmgfunc(hit.Parent,damage,0.7,0) | |
1338 | end | |
1339 | end) | |
1340 | Bullet.Mesh.Scale = Vector3.new(.1,.1,.1) | |
1341 | MagicBlock(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 1.7, 1.7, 1.7, 0.04) | |
1342 | MagicBlock(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 2.2, 2.2, 2.2, 0.04) | |
1343 | for i = 0,2.3,0.1 do | |
1344 | swait() | |
1345 | Bullet.Transparency = Bullet.Transparency + 0.02 | |
1346 | Bullet.Mesh.Scale = Bullet.Mesh.Scale + Vector3.new(.3,.3,.3) | |
1347 | MagicSphere(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 6.2, 6.2, 6.2, 0.04) | |
1348 | MagicSphere(BrickColor.new(color), Bullet.CFrame * cf(0, 0, 0), 1, 1, 1, 8.2, 8.2, 8.2, 0.04) | |
1349 | end | |
1350 | Bullet:Destroy() | |
1351 | end | |
1352 | end) | |
1353 | end | |
1354 | spawn() | |
1355 | deb:AddItem(Bullet,10) | |
1356 | return Bullet | |
1357 | end | |
1358 | ||
1359 | ||
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | ||
1365 | ||
1366 | local shooting = false | |
1367 | ||
1368 | ||
1369 | ||
1370 | function shoot() | |
1371 | so("http://roblox.com/asset/?id=925333540",Torso,1.1,1) | |
1372 | MagicBlock4(BrickColor.new("Bright blue"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 16.2, 16.2, 16.2, 0.04) | |
1373 | ||
1374 | MagicCircle4(BrickColor.new("Dark indigo"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 19.2, 19.2, 19.2, 0.03) | |
1375 | ||
1376 | MagicWave4(BrickColor.new("Dark indigo"), cf(RootPart.Position) * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 0.5, 0.3, 0.5, 0.04) | |
1377 | ||
1378 | MagicWave4(BrickColor.new("Royal purple"), RootPart.CFrame * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 1, 0.5, 1, 0.05) | |
1379 | attack = true | |
1380 | local thing = Instance.new("BodyGyro",RootPart) | |
1381 | thing.D = 350 | |
1382 | thing.P = 6000 | |
1383 | thing.MaxTorque = vt(100000,math.huge,0) | |
1384 | thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1385 | for i = 0,2,0.16 do | |
1386 | swait() | |
1387 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)), 0.2) | |
1388 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.2) | |
1389 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)),.2) | |
1390 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)),.2) | |
1391 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.73, -1.0, 0) * CFrame.Angles(math.rad(-25), math.rad(-66), math.rad(-25)), 0.1) | |
1392 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.6, -1.0, 0) * CFrame.Angles(math.rad(0), math.rad(-83), math.rad(0)), 0.1) | |
1393 | end | |
1394 | shooting = true | |
1395 | ||
1396 | while shooting == true do | |
1397 | swait(2.5) | |
1398 | thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1399 | Torso.Velocity = RootPart.CFrame.lookVector * -13 | |
1400 | if math.random(1,2) == 1 then | |
1401 | Bullets(handee,math.random(1,2),g,math.random(220,520),5.5,false,false) | |
1402 | MagicBlock(BrickColor.new("Pastel light blue"), RightArm.CFrame * cf(math.random(-100, 100) / 100, -math.random(0, 700) / 100, math.random(-100, 100) / 100), math.random(30, 80) / 100, math.random(30, 80) / 100, math.random(30, 80) / 100, 0.5, 0.5, 0.5, 0.05) | |
1403 | else | |
1404 | Bullets(handee,math.random(1,2),r,math.random(200,520),6.3,false,false) | |
1405 | MagicBlock(BrickColor.new("Dark indigo"), RightArm.CFrame * cf(math.random(-100, 100) / 100, -math.random(0, 700) / 100, math.random(-100, 100) / 100), math.random(30, 80) / 100, math.random(30, 80) / 100, math.random(30, 80) / 100, 0.5, 0.5, 0.5, 0.05) | |
1406 | end | |
1407 | end | |
1408 | ||
1409 | attack = false | |
1410 | thing:Destroy() | |
1411 | end | |
1412 | ||
1413 | ||
1414 | ||
1415 | ||
1416 | local cardmax = 0 | |
1417 | local cardpos = 3 | |
1418 | local carding = false | |
1419 | function SCB() | |
1420 | print('Spell Card Barrage -> Debuff - 3.6 WalkSpeed.') | |
1421 | Humanoid.WalkSpeed = Humanoid.WalkSpeed-3.6 | |
1422 | so("http://roblox.com/asset/?id=925333540",Torso,1.1,1) | |
1423 | MagicBlock4(BrickColor.new("Navy blue"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 16.2, 16.2, 16.2, 0.04) | |
1424 | ||
1425 | MagicCircle4(BrickColor.new("Dark indigo"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 19.2, 19.2, 19.2, 0.03) | |
1426 | ||
1427 | MagicWave4(BrickColor.new("Dark indigo"), cf(RootPart.Position) * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 0.5, 0.3, 0.5, 0.04) | |
1428 | ||
1429 | MagicWave4(BrickColor.new("Deep blue"), RootPart.CFrame * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 1, 0.5, 1, 0.05) | |
1430 | attack = true | |
1431 | ||
1432 | local Card = Instance.new('Part',Character) | |
1433 | Card.Transparency = 0.5 | |
1434 | Card.Color = Color3.fromRGB(0,255,0) | |
1435 | Card.Size = Vector3.new(0.65,0.2,1.2) | |
1436 | Card.Material = "Neon" | |
1437 | Card.CFrame = handee.CFrame + Vector3.new(0,3,0) | |
1438 | CardMesh = Instance.new("BlockMesh",Card) | |
1439 | local gyrothing = Instance.new("BodyGyro",Card) | |
1440 | gyrothing.D = 100 | |
1441 | gyrothing.P = 2000 | |
1442 | gyrothing.MaxTorque = Vector3.new(4000000,4000000,4000000) | |
1443 | gyrothing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1444 | local position = Instance.new("BodyPosition",Card) | |
1445 | position.D = 2350 | |
1446 | position.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1447 | cardmax = cardmax+1 | |
1448 | cardpos = cardpos+1 | |
1449 | ||
1450 | for i = 0,2,0.16 do | |
1451 | swait() | |
1452 | gyrothing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1453 | position.Position = Torso.Position + Vector3.new(10,3,0) | |
1454 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)), 0.2) | |
1455 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.2) | |
1456 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)),.2) | |
1457 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)),.2) | |
1458 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.73, -1.0, 0) * CFrame.Angles(math.rad(-25), math.rad(-66), math.rad(-25)), 0.1) | |
1459 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.6, -1.0, 0) * CFrame.Angles(math.rad(0), math.rad(-83), math.rad(0)), 0.1) | |
1460 | end | |
1461 | ||
1462 | attack = false | |
1463 | ||
1464 | for i = 1,65 do | |
1465 | position.Position = Torso.Position + Vector3.new(10-cardpos,cardpos,0) | |
1466 | --position.Position = Torso.Position + Vector3.new(0,cardpos,0) | |
1467 | swait(2.5) | |
1468 | gyrothing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1469 | if math.random(1,2) == 1 then | |
1470 | Bullets(Card,math.random(0.9,1.1),g,math.random(320,420),6.1,false,false) | |
1471 | else | |
1472 | Bullets(Card,math.random(0.9,1.1),r,math.random(320,420),8.2,false,false) | |
1473 | end | |
1474 | end | |
1475 | ||
1476 | ||
1477 | ||
1478 | Card:Destroy() | |
1479 | cardmax = cardmax-1 | |
1480 | Humanoid.WalkSpeed = Humanoid.WalkSpeed+3.6 | |
1481 | cardpos = cardpos-1 | |
1482 | if Humanoid.WalkSpeed == 32 then | |
1483 | print('WalkSpeed Regained.') | |
1484 | end | |
1485 | end | |
1486 | ||
1487 | ||
1488 | ||
1489 | ||
1490 | function rotball() | |
1491 | ||
1492 | ||
1493 | so("http://roblox.com/asset/?id=925333540",Torso,1.1,1) | |
1494 | MagicBlock4(BrickColor.new("Really blue"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 16.2, 16.2, 16.2, 0.04) | |
1495 | ||
1496 | MagicCircle4(BrickColor.new("Dark indigo"), RootPart.CFrame * cf(0, 0, 0), 1, 1, 1, 19.2, 19.2, 19.2, 0.03) | |
1497 | ||
1498 | MagicWave4(BrickColor.new("Dark indigo"), cf(RootPart.Position) * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 0.5, 0.3, 0.5, 0.04) | |
1499 | ||
1500 | MagicWave4(BrickColor.new("Dark blue"), RootPart.CFrame * cf(0, -1, 0) * euler(0, math.random(-50, 50), 0), 1, 1, 1, 1, 0.5, 1, 0.05) | |
1501 | attack = true | |
1502 | ||
1503 | ||
1504 | ||
1505 | local thing = Instance.new("BodyGyro",RootPart) | |
1506 | thing.D = 350 | |
1507 | thing.P = 6000 | |
1508 | thing.MaxTorque = vt(100000,math.huge,0) | |
1509 | thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1510 | for i = 0,2,0.16 do | |
1511 | swait() | |
1512 | thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1513 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)), 0.2) | |
1514 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-80)),.2) | |
1515 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)),.2) | |
1516 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)),.2) | |
1517 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.73, -1.0, 0) * CFrame.Angles(math.rad(-25), math.rad(-66), math.rad(-25)), 0.1) | |
1518 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.6, -1.0, 0) * CFrame.Angles(math.rad(0), math.rad(-83), math.rad(0)), 0.1) | |
1519 | end | |
1520 | ||
1521 | ||
1522 | local beam = Instance.new("Part", workspace) | |
1523 | beam.BrickColor = BrickColor.new(g) | |
1524 | beam.FormFactor = "Custom" | |
1525 | beam.Material = "Neon" | |
1526 | beam.Transparency = 0.25 | |
1527 | beam.Anchored = true | |
1528 | beam.Locked = false | |
1529 | beam.CanCollide = false | |
1530 | local Z = Instance.new("SpecialMesh",beam) | |
1531 | Z.MeshType = "Sphere" | |
1532 | ||
1533 | local ray = Ray.new(handee.CFrame.p, (mouse.Hit.p - handee.CFrame.p).unit * 700) | |
1534 | local part, position = workspace:FindPartOnRay(ray, player.Character, false, true) | |
1535 | local distance = (handee.CFrame.p - position).magnitude | |
1536 | beam.CFrame = CFrame.new(handee.CFrame.p, position) * CFrame.new(0, 0, -distance / 2) | |
1537 | beam.Size = Vector3.new(1, 1, distance) | |
1538 | ||
1539 | ||
1540 | ||
1541 | for i = 1,6,0.1 do | |
1542 | swait() | |
1543 | thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p) | |
1544 | beam.CFrame = CFrame.new((beam.CFrame.p + position) / 2, beam.CFrame.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0) | |
1545 | beam.Size = Vector3.new(1, 1, distance) | |
1546 | MagicBlock4(BrickColor.new("Medium lilac"), beam.CFrame * cf(0, 0, 0), 1, 1, 1, 16.2, 16.2, 16.2, 0.04) | |
1547 | MagicShockTrailAlt(BrickColor.new("Dark indigo"),beam.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10,10,5,-0.05,-0.05,25,0.005,math.random(1,2)) | |
1548 | if math.random(1,2) == 1 then | |
1549 | beam.BrickColor = BrickColor.new(g) | |
1550 | else | |
1551 | beam.BrickColor = BrickColor.new(r) | |
1552 | end | |
1553 | end | |
1554 | attack = false | |
1555 | thing:Destroy() | |
1556 | beam:Destroy() | |
1557 | ||
1558 | ||
1559 | end | |
1560 | ||
1561 | ||
1562 | ||
1563 | function Ldash() | |
1564 | ||
1565 | ||
1566 | ||
1567 | evadecooldown = true | |
1568 | attack = true | |
1569 | so("http://www.roblox.com/asset/?id=707957812", Torso, 2.5, 1) | |
1570 | ||
1571 | ||
1572 | ||
1573 | ||
1574 | ||
1575 | ||
1576 | --+173.8*i | |
1577 | for i = 0,2,0.064 do | |
1578 | swait() | |
1579 | RootPart.Velocity = RootPart.CFrame.rightVector * -54 | |
1580 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(32)), 0.2) | |
1581 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-9),math.rad(-14)),.2) | |
1582 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(77), math.rad(0), math.rad(70)),.2) | |
1583 | LW.C0 = clerp(LW.C0, CFrame.new(-1.0, 0.5, -0.55) * angles(math.rad(30), math.rad(0), math.rad(70)),.2) | |
1584 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(12)), 0.2) | |
1585 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(8)), 0.2) | |
1586 | end | |
1587 | ||
1588 | attack = false | |
1589 | wait(0.13) | |
1590 | evadecooldown = false | |
1591 | ||
1592 | ||
1593 | end | |
1594 | ||
1595 | ||
1596 | ||
1597 | ||
1598 | ||
1599 | function Rdash() | |
1600 | ||
1601 | ||
1602 | ||
1603 | evadecooldown = true | |
1604 | attack = true | |
1605 | so("http://www.roblox.com/asset/?id=707957812", Torso, 2.5, 1) | |
1606 | ||
1607 | ||
1608 | ||
1609 | ||
1610 | ||
1611 | ||
1612 | --+173.8*i | |
1613 | for i = 0,2,0.064 do | |
1614 | swait() | |
1615 | RootPart.Velocity = RootPart.CFrame.rightVector * 54 | |
1616 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-32)), 0.2) | |
1617 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(9),math.rad(14)),.2) | |
1618 | RW.C0 = clerp(RW.C0, CFrame.new(1.0, 0.5, -0.55) * angles(math.rad(30), math.rad(0), math.rad(-70)),.2) | |
1619 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(77), math.rad(0), math.rad(-70)),.2) | |
1620 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-8)), 0.2) | |
1621 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-12)), 0.2) | |
1622 | end | |
1623 | ||
1624 | attack = false | |
1625 | wait(0.13) | |
1626 | evadecooldown = false | |
1627 | ||
1628 | ||
1629 | end | |
1630 | ||
1631 | ||
1632 | ||
1633 | mouse.Button1Down:connect(function(key) | |
1634 | if attack == false then | |
1635 | shoot() | |
1636 | end | |
1637 | end) | |
1638 | ||
1639 | ||
1640 | ||
1641 | ||
1642 | mouse.Button1Up:connect(function(key) | |
1643 | if shooting == true then | |
1644 | shooting = false | |
1645 | end | |
1646 | end) | |
1647 | ||
1648 | ||
1649 | ||
1650 | mouse.KeyDown:connect(function(key) | |
1651 | if key == 'e' and attack == false and cardmax <= 5 then | |
1652 | SCB() | |
1653 | end | |
1654 | end) | |
1655 | ||
1656 | ||
1657 | ||
1658 | mouse.KeyDown:connect(function(key) | |
1659 | if key == 'f' and attack == false then | |
1660 | Ldash() | |
1661 | end | |
1662 | end) | |
1663 | ||
1664 | ||
1665 | ||
1666 | mouse.KeyDown:connect(function(key) | |
1667 | if key == 'g' and attack == false then | |
1668 | Rdash() | |
1669 | end | |
1670 | end) | |
1671 | ||
1672 | mouse.KeyDown:connect(function(key) | |
1673 | if key == 'r' and attack == false then | |
1674 | rotball() | |
1675 | end | |
1676 | end) | |
1677 | ||
1678 | ||
1679 | ||
1680 | local idk = 0 | |
1681 | ||
1682 | ||
1683 | ||
1684 | local f = 0 | |
1685 | game:GetService("RunService"):BindToRenderStep("W0tT", 0, function() | |
1686 | ||
1687 | ||
1688 | Humanoid.MaxHealth = 250 | |
1689 | f = f+1 | |
1690 | if f >= 7 then | |
1691 | MagicBlock4(BrickColor.new("Dark indigo"), LeftArm.CFrame * cf(0, -1, 0), 1, 1, 1, 0.7, 0.7, 0.7, 0.05) | |
1692 | MagicCircle4(BrickColor.new("Dark indigo"), LeftArm.CFrame * cf(0, -1, 0), 1, 0.1, 1, 6, 0, 6, 0.1) | |
1693 | end | |
1694 | ||
1695 | end) | |
1696 | ||
1697 | Humanoid.Health = 250 | |
1698 | while true do | |
1699 | swait() | |
1700 | sine = sine + change | |
1701 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1702 | local velderp=RootPart.Velocity.y | |
1703 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1704 | if attack==true or attack==false then | |
1705 | if attack==false then | |
1706 | idle=idle+1 | |
1707 | else | |
1708 | idle=0 | |
1709 | end | |
1710 | if idle>=500 then | |
1711 | if attack==false then | |
1712 | end | |
1713 | end | |
1714 | ||
1715 | ||
1716 | ||
1717 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1718 | Anim="Jump" | |
1719 | ||
1720 | ||
1721 | ||
1722 | ||
1723 | ||
1724 | ||
1725 | if attack==false then | |
1726 | change = 1 | |
1727 | ||
1728 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1729 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, -.15) * CFrame.Angles(math.rad(-13), math.rad(0), math.rad(0)), 0.1) | |
1730 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-30+2.05*math.cos(sine/5)),math.rad(0),math.rad(0)),.1) | |
1731 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30+2.05*math.cos(sine/5)), math.rad(0), math.rad(50-2.05*math.cos(sine/5))), 0.1) | |
1732 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30+2.05*math.cos(sine/5)), math.rad(0), math.rad(-50+2.05*math.cos(sine/5))), 0.1) | |
1733 | ||
1734 | end | |
1735 | if attack==false then | |
1736 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-25+3.05*math.cos(sine/5)), math.rad(0), math.rad(0)), 0.1) | |
1737 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.47, -0.7) * CFrame.Angles(math.rad(-12+3.05*math.cos(sine/5)), math.rad(-3), math.rad(0)), 0.1) | |
1738 | end | |
1739 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
1740 | Anim="Fall" | |
1741 | change = 1 | |
1742 | ||
1743 | ||
1744 | if attack==false then | |
1745 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1746 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.1) | |
1747 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(20), math.rad(90)), 0.1) | |
1748 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(-20), math.rad(-90)), 0.1) | |
1749 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.1) | |
1750 | ||
1751 | end | |
1752 | if attack==false or attack == true then | |
1753 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-8), math.rad(3), math.rad(0)), 0.1) | |
1754 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.67, -0.4) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(0)), 0.1) | |
1755 | end | |
1756 | ||
1757 | elseif torvel<1 and hitfloor~=nil then | |
1758 | Anim="Idle" | |
1759 | change = 1.73 | |
1760 | if attack==false and equip == false then | |
1761 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1762 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.10*math.cos(sine/40), -0) * CFrame.Angles(math.rad(0), math.rad(30), math.rad(0)), 0.1) | |
1763 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0+4*math.sin(sine/40)),math.rad(0),math.rad(-30)),0.1) | |
1764 | ||
1765 | ||
1766 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.07*math.sin(sine/40), 0) * angles(math.rad(-3+2*math.cos(sine/40)), math.rad(0+7*math.cos(sine/40)), math.rad(3+3.2*math.cos(sine/40))),0.1) | |
1767 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.07*math.sin(sine/40), 0) * angles(math.rad(-3+2*math.cos(sine/40)), math.rad(0-7*math.cos(sine/40)), math.rad(-3-3.2*math.cos(sine/40))),0.1) | |
1768 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.10*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0), math.rad(2), math.rad(-3)), 0.1) | |
1769 | ||
1770 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.10*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0), math.rad(-2), math.rad(3)), 0.1) | |
1771 | end | |
1772 | ||
1773 | ||
1774 | ||
1775 | ||
1776 | elseif torvel>2 and torvel<4205 and hitfloor~=nil then | |
1777 | Anim="Walk" | |
1778 | change = 1 + Character.Humanoid.WalkSpeed/113 | |
1779 | if attack==false and equip == false then | |
1780 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1781 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.42*math.cos(sine/2.5), -.8) * angles(math.rad(-23), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1782 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-7+20*math.sin(sine/2.5)),math.rad(0),math.rad(0+5*math.sin(sine/5)) + RootPart.RotVelocity.Y / 13),.1) | |
1783 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0+0.34*math.sin(sine/5)) * angles(math.rad(0-80*math.sin(sine/5))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(6+18*math.sin(sine/5))- RootPart.RotVelocity.Y / 34),.15) | |
1784 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0-0.34*math.sin(sine/5))*angles(math.rad(0+80*math.sin(sine/5))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-6+18*math.sin(sine/5))+ RootPart.RotVelocity.Y / -34),.15) | |
1785 | ||
1786 | ||
1787 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.21*math.cos(sine/5)) * CFrame.Angles(math.rad(-5-60*math.sin(sine/5)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.8) | |
1788 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.21*math.cos(sine/5)) * CFrame.Angles(math.rad(-5+60*math.sin(sine/5)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.8) | |
1789 | end | |
1790 | ||
1791 | if attack==true and noleg == false then | |
1792 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0+0.32*math.sin(sine/5)) * CFrame.Angles(math.rad(0-65*math.sin(sine/5)), math.rad(3), math.rad(0)), 0.2) | |
1793 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5), 0-0.32*math.sin(sine/5)) * CFrame.Angles(math.rad(0+65*math.sin(sine/5)), math.rad(-3), math.rad(0)), 0.2) | |
1794 | end | |
1795 | ||
1796 | end | |
1797 | end | |
1798 | ||
1799 | ||
1800 | ||
1801 | if 0 < #Effects then | |
1802 | for e = 1, #Effects do | |
1803 | if Effects[e] ~= nil then | |
1804 | local Thing = Effects[e] | |
1805 | if Thing ~= nil then | |
1806 | local Part = Thing[1] | |
1807 | local Mode = Thing[2] | |
1808 | local Delay = Thing[3] | |
1809 | local IncX = Thing[4] | |
1810 | local IncY = Thing[5] | |
1811 | local IncZ = Thing[6] | |
1812 | if Thing[1].Transparency <= 1 then | |
1813 | if Thing[2] == "Block1" then | |
1814 | Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-80, 80), math.random(-80, 80), math.random(-80, 80)) | |
1815 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1816 | if not Mesh then | |
1817 | Mesh = Instance.new("BlockMesh") | |
1818 | end | |
1819 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1820 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1821 | elseif Thing[2] == "Cylinder" then | |
1822 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1823 | if not Mesh then | |
1824 | Mesh = Instance.new("BlockMesh") | |
1825 | end | |
1826 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1827 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1828 | elseif Thing[2] == "Blood" then | |
1829 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1830 | if not Mesh then | |
1831 | Mesh = Instance.new("BlockMesh") | |
1832 | end | |
1833 | Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0) | |
1834 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1835 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1836 | elseif Thing[2] == "Elec" then | |
1837 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1838 | if not Mesh then | |
1839 | Mesh = Instance.new("BlockMesh") | |
1840 | end | |
1841 | Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9]) | |
1842 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1843 | elseif Thing[2] == "Disappear" then | |
1844 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1845 | end | |
1846 | else | |
1847 | Part.Parent = nil | |
1848 | Part:Destroy() | |
1849 | --game:GetService("Debris"):AddItem(Part, 0) | |
1850 | table.remove(Effects, e) | |
1851 | end | |
1852 | end | |
1853 | end | |
1854 | end | |
1855 | end | |
1856 | ||
1857 | end |