SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {} | |
2 | do | |
3 | script.Parent = owner.Character | |
4 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput" | |
5 | local function NewFakeEvent() | |
6 | local Bind = Instance.new("BindableEvent") | |
7 | local Fake;Fake = {Connections = {}, | |
8 | fakeEvent=true; | |
9 | Connect=function(self,Func) | |
10 | Bind.Event:connect(Func) | |
11 | self.Connections[Bind] = true | |
12 | return setmetatable({Connected = true},{ | |
13 | __index = function (self,Index) | |
14 | if Index:lower() == "disconnect" then | |
15 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
16 | end | |
17 | return Fake[Index] | |
18 | end; | |
19 | __tostring = function() return "Connection" end; | |
20 | }) | |
21 | end} | |
22 | Fake.connect = Fake.Connect;return Fake; | |
23 | end | |
24 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
25 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
26 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
27 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
28 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
29 | local function TriggerEvent(self,Event,...) | |
30 | local Trigger = Mouse[Event] | |
31 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
32 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
33 | end | |
34 | end | |
35 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
36 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
37 | if FiredBy.Name ~= owner.Name then return end | |
38 | if Input.MouseEvent then | |
39 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
40 | else | |
41 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
42 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
43 | for _,Action in pairs(ContextActionService.Actions) do | |
44 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
45 | end | |
46 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
47 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
48 | end | |
49 | end) | |
50 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
51 | Event.Parent = NLS([[ | |
52 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse() | |
53 | local Input = function(Input,gameProcessedEvent) | |
54 | if gameProcessedEvent then return end | |
55 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
56 | end | |
57 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
58 | local Hit,Target | |
59 | while wait(1/30) do | |
60 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
61 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
62 | end | |
63 | end | |
64 | ]],owner.Character) | |
65 | end | |
66 | RealGame = game;game = setmetatable({},{ | |
67 | __index = function (self,Index) | |
68 | local Sandbox = function (Thing) | |
69 | if Thing:IsA("Player") then | |
70 | local RealPlayer = Thing | |
71 | return setmetatable({},{ | |
72 | __index = function (self,Index) | |
73 | local Type = type(RealPlayer[Index]) | |
74 | if Type == "function" then | |
75 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
76 | return function (self)return InternalData["Mouse"] end | |
77 | end | |
78 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
79 | end | |
80 | return RealPlayer[Index] | |
81 | end; | |
82 | __tostring = function(self) return RealPlayer.Name end | |
83 | }) | |
84 | end | |
85 | end | |
86 | if RealGame[Index] then | |
87 | local Type = type(RealGame[Index]) | |
88 | if Type == "function" then | |
89 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
90 | return function (self,Service) | |
91 | local FakeServices = { | |
92 | ["players"] = function() | |
93 | return setmetatable({},{ | |
94 | __index = function (self2,Index2) | |
95 | local RealService = RealGame:GetService(Service) | |
96 | local Type2 = type(Index2) | |
97 | if Type2 == "function" then | |
98 | return function (self,...) return RealService[Index2](RealService,...)end | |
99 | else | |
100 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
101 | return RealService[Index2] | |
102 | end | |
103 | end; | |
104 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
105 | }) | |
106 | end; | |
107 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
108 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
109 | ["runservice"] = function() | |
110 | return setmetatable({},{ | |
111 | __index = function(self2,Index2) | |
112 | local RealService = RealGame:GetService(Service) | |
113 | local Type2 = type(Index2) | |
114 | if Type2 == "function" then | |
115 | return function (self,...) return RealService[Index2](RealService,...) end | |
116 | else | |
117 | local RunServices = { | |
118 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; | |
119 | ["renderstepped"] = function() return RealService["Stepped"] end | |
120 | } | |
121 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
122 | return RealService[Index2] | |
123 | end | |
124 | end | |
125 | }) | |
126 | end | |
127 | } | |
128 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
129 | return RealGame:GetService(Service) | |
130 | end | |
131 | end | |
132 | return function (self,...) return RealGame[Index](RealGame,...) end | |
133 | else | |
134 | if game:GetService(Index) then return game:GetService(Index) end | |
135 | return RealGame[Index] | |
136 | end | |
137 | end | |
138 | return nil | |
139 | end | |
140 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob") | |
141 | ||
142 | wait(0.016666666666667) | |
143 | Anim = nil | |
144 | cf = CFrame.new | |
145 | function c3(cz, cx, cc) | |
146 | return Color3.new(cz / 255, cx / 255, cc / 255) | |
147 | end | |
148 | angles = CFrame.Angles | |
149 | Player = game.Players.LocalPlayer | |
150 | Character = Player.Character | |
151 | Humanoid = Character.Humanoid | |
152 | mouse = Player:GetMouse() | |
153 | local LeftArm = Character["Left Arm"] | |
154 | RightArm = Character["Right Arm"] | |
155 | LeftLeg = Character["Left Leg"] | |
156 | RightLeg = Character["Right Leg"] | |
157 | Head = Character.Head | |
158 | Torso = Character.Torso | |
159 | RootPart = Character.HumanoidRootPart | |
160 | RootJoint = RootPart.RootJoint | |
161 | Humanoid.Animator:Destroy() | |
162 | Character:WaitForChild("Animate"):Destroy() | |
163 | NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
164 | RootCF = angles(-1.57, 0, 3.14) | |
165 | LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
166 | LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
167 | RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
168 | RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
169 | RW = Instance.new("Weld") | |
170 | LW = Instance.new("Weld") | |
171 | RH = Torso["Right Hip"] | |
172 | LH = Torso["Left Hip"] | |
173 | Neck = Torso.Neck | |
174 | RSH = Torso["Right Shoulder"] | |
175 | LSH = Torso["Left Shoulder"] | |
176 | RSH.Parent = nil | |
177 | LSH.Parent = nil | |
178 | RW.Name = "Right Shoulder" | |
179 | RW.Part0 = Torso | |
180 | RW.C0 = cf(1.5, 0.5, 0) | |
181 | RW.C1 = cf(0, 0.5, 0) | |
182 | RW.Part1 = RightArm | |
183 | RW.Parent = Torso | |
184 | LW.Name = "Left Shoulder" | |
185 | LW.Part0 = Torso | |
186 | LW.C0 = cf(-1.5, 0.5, 0) | |
187 | LW.C1 = cf(0, 0.5, 0) | |
188 | LW.Part1 = LeftArm | |
189 | LW.Parent = Torso | |
190 | Effects = Instance.new("Folder", Character) | |
191 | Effects.Name = "Effects" | |
192 | Humanoid.WalkSpeed = 16 | |
193 | partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {} | |
194 | AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1 | |
195 | AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1 | |
196 | AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true | |
197 | sine = 0 | |
198 | attackcounter = 1 | |
199 | energyslashcounter = 1 | |
200 | torvel = nil | |
201 | attacking = false | |
202 | hitfloor, posfloor = nil, nil | |
203 | tool = nil | |
204 | - | if script.Parent.ClassName == "HopperBin" then |
204 | + | script.Parent.ClassName == "HopperBin" then |
205 | tool = script.Parent | |
206 | tool.Parent = Player.Backpack | |
207 | else | |
208 | tool = Instance.new("HopperBin", Player.Backpack) | |
209 | tool.Name = "Toy Knife" | |
210 | end | |
211 | hitbox = Instance.new("Part") | |
212 | hitbox.BrickColor = BrickColor.Black() | |
213 | hitbox.Transparency = 1 | |
214 | hitbox.CanCollide = false | |
215 | hitbox.Anchored = false | |
216 | hitbox.Size = Vector3.new(3, 3, 4) | |
217 | meshes = { | |
218 | 3270017, | |
219 | 20329976, | |
220 | 448386996, | |
221 | 1095708, | |
222 | 1033714, | |
223 | 9756362 | |
224 | } | |
225 | sounds = { | |
226 | { | |
227 | 320557413, | |
228 | 320557453, | |
229 | 320557487, | |
230 | 320557518, | |
231 | 320557537, | |
232 | 320557563, | |
233 | 233856146, | |
234 | 233856140 | |
235 | }, | |
236 | { | |
237 | 234365549, | |
238 | 234365573, | |
239 | 231917961, | |
240 | 231917950, | |
241 | 231917856, | |
242 | 231917863, | |
243 | 231917871 | |
244 | }, | |
245 | { | |
246 | 262562442, | |
247 | 231917806, | |
248 | 231917784 | |
249 | }, | |
250 | { | |
251 | 262562442, | |
252 | 233856048, | |
253 | 306247739 | |
254 | } | |
255 | } | |
256 | ArtificialHB = Instance.new("BindableEvent", script) | |
257 | ArtificialHB.Name = "Heartbeat" | |
258 | script:WaitForChild("Heartbeat") | |
259 | frame = 0.025 | |
260 | tf = 0 | |
261 | allowframeloss = true | |
262 | tossremainder = false | |
263 | lastframe = tick() | |
264 | script.Heartbeat:Fire() | |
265 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
266 | tf = tf + s | |
267 | if tf >= frame then | |
268 | if allowframeloss then | |
269 | script.Heartbeat:Fire() | |
270 | lastframe = tick() | |
271 | else | |
272 | for i = 1, math.floor(tf / frame) do | |
273 | script.Heartbeat:Fire() | |
274 | end | |
275 | lastframe = tick() | |
276 | end | |
277 | if tossremainder then | |
278 | tf = 0 | |
279 | else | |
280 | tf = tf - frame * math.floor(tf / frame) | |
281 | end | |
282 | end | |
283 | end) | |
284 | function swait(num) | |
285 | if num == 0 or num == nil then | |
286 | ArtificialHB.Event:wait() | |
287 | else | |
288 | for i = 0, num do | |
289 | ArtificialHB.Event:wait() | |
290 | end | |
291 | end | |
292 | end | |
293 | function thread(f) | |
294 | coroutine.resume(coroutine.create(f)) | |
295 | end | |
296 | function clerp(a, b, t) | |
297 | local qa = { | |
298 | QuaternionFromCFrame(a) | |
299 | } | |
300 | local qb = { | |
301 | QuaternionFromCFrame(b) | |
302 | } | |
303 | local ax, ay, az = a.x, a.y, a.z | |
304 | local bx, by, bz = b.x, b.y, b.z | |
305 | local _t = 1 - t | |
306 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
307 | end | |
308 | function QuaternionFromCFrame(cf) | |
309 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
310 | local trace = m00 + m11 + m22 | |
311 | if trace > 0 then | |
312 | local s = math.sqrt(1 + trace) | |
313 | local recip = 0.5 / s | |
314 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
315 | else | |
316 | local i = 0 | |
317 | if m00 < m11 then | |
318 | i = 1 | |
319 | end | |
320 | if m22 > (i == 0 and m00 or m11) then | |
321 | i = 2 | |
322 | end | |
323 | if i == 0 then | |
324 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
325 | local recip = 0.5 / s | |
326 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
327 | elseif i == 1 then | |
328 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
329 | local recip = 0.5 / s | |
330 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
331 | elseif i == 2 then | |
332 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
333 | local recip = 0.5 / s | |
334 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
335 | end | |
336 | end | |
337 | end | |
338 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
339 | local xs, ys, zs = x + x, y + y, z + z | |
340 | local wx, wy, wz = w * xs, w * ys, w * zs | |
341 | local xx = x * xs | |
342 | local xy = x * ys | |
343 | local xz = x * zs | |
344 | local yy = y * ys | |
345 | local yz = y * zs | |
346 | local zz = z * zs | |
347 | 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)) | |
348 | end | |
349 | function QuaternionSlerp(a, b, t) | |
350 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
351 | local startInterp, finishInterp | |
352 | if cosTheta >= 1.0E-4 then | |
353 | if 1 - cosTheta > 1.0E-4 then | |
354 | local theta = math.acos(cosTheta) | |
355 | local invSinTheta = 1 / math.sin(theta) | |
356 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
357 | finishInterp = math.sin(t * theta) * invSinTheta | |
358 | else | |
359 | startInterp = 1 - t | |
360 | finishInterp = t | |
361 | end | |
362 | elseif 1 + cosTheta > 1.0E-4 then | |
363 | local theta = math.acos(-cosTheta) | |
364 | local invSinTheta = 1 / math.sin(theta) | |
365 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
366 | finishInterp = math.sin(t * theta) * invSinTheta | |
367 | else | |
368 | startInterp = t - 1 | |
369 | finishInterp = t | |
370 | end | |
371 | 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 | |
372 | end | |
373 | function rayCast(Pos, Dir, Max, Ignore) | |
374 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
375 | end | |
376 | function newPart(par, brick, transp, anch, canc, size, name, mat, ref) | |
377 | local p = Instance.new("Part") | |
378 | p.BrickColor = brick | |
379 | p.Transparency = transp | |
380 | p.Material = mat and mat or "SmoothPlastic" | |
381 | p.Reflectance = ref and ref or 0 | |
382 | p.Anchored = anch | |
383 | p.CanCollide = canc | |
384 | p.Size = size | |
385 | p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10 | |
386 | p.Name = name | |
387 | p.CFrame = RootPart.CFrame | |
388 | p.Parent = par | |
389 | return p | |
390 | end | |
391 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
392 | local mesh = Instance.new(Mesh) | |
393 | mesh.Parent = part | |
394 | if Mesh == "SpecialMesh" then | |
395 | mesh.MeshType = meshtype | |
396 | if meshid then | |
397 | mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid | |
398 | end | |
399 | end | |
400 | if offset then | |
401 | mesh.Offset = offset | |
402 | end | |
403 | mesh.Scale = scale | |
404 | return mesh | |
405 | end | |
406 | function weld(parent, part0, part1, c0, c1) | |
407 | local weld = Instance.new("Weld") | |
408 | weld.Parent = parent | |
409 | weld.Part0 = part0 | |
410 | weld.Part1 = part1 | |
411 | weld.C0 = c0 | |
412 | if c1 then | |
413 | weld.C1 = c1 | |
414 | end | |
415 | return weld | |
416 | end | |
417 | function randomangles(r) | |
418 | local random = math.rad((math.random() - 0.5) * 180) | |
419 | local randomangles = CFrame.Angles(random, random, random) | |
420 | if r and r == 0 then | |
421 | return angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
422 | elseif r and r == 1 then | |
423 | return math.rad((math.random() - 0.5) * 180) | |
424 | elseif r and r == 2 then | |
425 | return math.random(-50, 50) | |
426 | else | |
427 | return randomangles | |
428 | end | |
429 | end | |
430 | function round(num) | |
431 | local a, b = math.modf(num) | |
432 | if num % 1 ~= 0 then | |
433 | return math.floor(num) + math.floor(b * 10 + 0.5) / 10 | |
434 | else | |
435 | return math.floor(num) | |
436 | end | |
437 | end | |
438 | function sound(id, par, vol, dur, pit) | |
439 | coroutine.resume(coroutine.create(function() | |
440 | local sou = Instance.new("Sound", par or workspace) | |
441 | sou.Volume = vol | |
442 | sou.Pitch = pit or 1 | |
443 | sou.SoundId = "http://www.roblox.com/asset/?id=" .. id | |
444 | swait() | |
445 | sou:play() | |
446 | wait(dur) | |
447 | sou:Destroy() | |
448 | end)) | |
449 | end | |
450 | function findCloseHumanoid(centre, distance) | |
451 | local tab = {} | |
452 | for _, child in pairs(game.Workspace:GetChildren()) do | |
453 | if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then | |
454 | local vtors = child.Torso | |
455 | local mag = math.abs((vtors.Position - centre).magnitude) | |
456 | if distance >= mag then | |
457 | table.insert(tab, child.Humanoid) | |
458 | end | |
459 | end | |
460 | end | |
461 | return tab | |
462 | end | |
463 | function basicDamage(vhum, damage, colour) | |
464 | if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then | |
465 | return | |
466 | end | |
467 | vhum.Health = vhum.Health - damage | |
468 | local damagepart = Instance.new("Part", Effects) | |
469 | damagepart.Transparency = 1 | |
470 | damagepart.Anchored = true | |
471 | damagepart.CanCollide = false | |
472 | damagepart.Size = Vector3.new(1, 1, 1) | |
473 | damagepart.Name = "DamagePart" | |
474 | damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0) | |
475 | local g = Instance.new("BillboardGui", damagepart) | |
476 | g.Enabled = true | |
477 | g.Adornee = damagepart | |
478 | g.Size = UDim2.new(5, 0, 5, 0) | |
479 | g.ExtentsOffset = Vector3.new(0, 0, 0) | |
480 | g.StudsOffset = Vector3.new(0, 0, 0) | |
481 | local t = Instance.new("TextLabel", g) | |
482 | t.BackgroundTransparency = 1 | |
483 | t.Font = "ArialBold" | |
484 | t.TextSize = 24 | |
485 | t.Text = "-" .. round(damage) | |
486 | if round(damage) % 1 == 0 then | |
487 | t.Text = "-" .. round(damage) .. ".0" | |
488 | end | |
489 | t.Size = UDim2.new(1, 0, 1, 0) | |
490 | t.TextStrokeTransparency = 0 | |
491 | t.TextTransparency = 0 | |
492 | t.TextScaled = true | |
493 | t.TextWrapped = true | |
494 | t.TextXAlignment = "Center" | |
495 | t.TextYAlignment = "Center" | |
496 | t.TextColor3 = colour | |
497 | coroutine.resume(coroutine.create(function() | |
498 | for i = 1, 50 do | |
499 | game:GetService("RunService").Heartbeat:wait() | |
500 | local sinewave = math.sin(i / 500) * 4 | |
501 | damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0)) | |
502 | t.TextTransparency = t.TextTransparency + 0.02 | |
503 | t.TextStrokeTransparency = t.TextTransparency + 0.02 | |
504 | end | |
505 | damagepart:Destroy() | |
506 | end), t) | |
507 | end | |
508 | function magic(type, thing) | |
509 | local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t) | |
510 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
511 | prt.CFrame = cframe | |
512 | local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
513 | game:GetService("Debris"):AddItem(prt, 8) | |
514 | if t == 1 or t == nil then | |
515 | table.insert(partEffects, { | |
516 | prt, | |
517 | "Block1", | |
518 | delay, | |
519 | x3, | |
520 | y3, | |
521 | z3, | |
522 | msh | |
523 | }) | |
524 | elseif t == 2 then | |
525 | table.insert(partEffects, { | |
526 | prt, | |
527 | "Block2", | |
528 | delay, | |
529 | x3, | |
530 | y3, | |
531 | z3, | |
532 | msh | |
533 | }) | |
534 | end | |
535 | end | |
536 | local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
537 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
538 | local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
539 | game:GetService("Debris"):AddItem(prt, 8) | |
540 | table.insert(partEffects, { | |
541 | prt, | |
542 | "Cylinder", | |
543 | delay, | |
544 | x3, | |
545 | y3, | |
546 | z3, | |
547 | msh | |
548 | }) | |
549 | end | |
550 | local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
551 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
552 | local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
553 | game:GetService("Debris"):AddItem(prt, 8) | |
554 | table.insert(partEffects, { | |
555 | prt, | |
556 | "Cylinder", | |
557 | delay, | |
558 | x3, | |
559 | y3, | |
560 | z3, | |
561 | msh | |
562 | }) | |
563 | end | |
564 | local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
565 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
566 | prt.Anchored = true | |
567 | prt.CFrame = cframe | |
568 | local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
569 | game:GetService("Debris"):AddItem(prt, 2) | |
570 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
571 | for i = 0, 1, delay do | |
572 | swait() | |
573 | Part.Transparency = i | |
574 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
575 | end | |
576 | Part:Destroy() | |
577 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
578 | end | |
579 | local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
580 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe) | |
581 | prt.Anchored = true | |
582 | prt.CFrame = cframe | |
583 | local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
584 | game:GetService("Debris"):AddItem(prt, 2) | |
585 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
586 | for i = 0, 1, delay do | |
587 | swait() | |
588 | Part.Transparency = i | |
589 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
590 | end | |
591 | Part:Destroy() | |
592 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
593 | end | |
594 | local par = thing[1] | |
595 | local brick = thing[2] | |
596 | local cframe = thing[3] | |
597 | local x1 = thing[4] | |
598 | local y1 = thing[5] | |
599 | local z1 = thing[6] | |
600 | local x3 = thing[7] | |
601 | local y3 = thing[8] | |
602 | local z3 = thing[9] | |
603 | local delay = thing[10] | |
604 | local t = thing[11] | |
605 | if type == "Block" or type == 1 then | |
606 | magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
607 | elseif type == "Cylinder" or type == 2 then | |
608 | magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
609 | elseif type == "Sphere" or type == 3 then | |
610 | magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
611 | elseif type == "Ring" or type == 4 then | |
612 | magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
613 | elseif type == "Slash" or type == 5 then | |
614 | magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
615 | end | |
616 | end | |
617 | function newFrame(par, bg, transp, size, pos, name) | |
618 | local f = Instance.new("Frame", nil) | |
619 | f.BackgroundColor3 = bg | |
620 | f.BackgroundTransparency = transp | |
621 | f.BorderSizePixel = 0 | |
622 | f.Position = pos | |
623 | f.Size = size | |
624 | f.Name = name | |
625 | f.Parent = par | |
626 | return f | |
627 | end | |
628 | function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name) | |
629 | local l = Instance.new("TextLabel", nil) | |
630 | l.BackgroundTransparency = 1 | |
631 | l.Size = size | |
632 | l.Position = pos | |
633 | l.Text = text | |
634 | l.TextSize = textsize | |
635 | l.TextColor3 = text3 | |
636 | l.TextStrokeColor3 = textstroke3 | |
637 | if scaled then | |
638 | l.TextScaled = scaled | |
639 | else | |
640 | l.TextScaled = true | |
641 | end | |
642 | l.TextStrokeTransparency = 0 | |
643 | l.Name = name | |
644 | l.Parent = par | |
645 | return l | |
646 | end | |
647 | a1t = "Anger" | |
648 | a2t = "Power" | |
649 | a3t = "Hate" | |
650 | a4t = "Determination" | |
651 | backc3 = c3(107, 107, 107) | |
652 | reloc3 = c3(62, 62, 62) | |
653 | g = Instance.new("ScreenGui") | |
654 | f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "") | |
655 | f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "") | |
656 | f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "") | |
657 | f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "") | |
658 | newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
659 | newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
660 | newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
661 | newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
662 | newLabel(f1, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(Z)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
663 | newLabel(f2, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(X)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
664 | newLabel(f3, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(C)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
665 | newLabel(f4, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(V)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
666 | newLabel(f1, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a1t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
667 | newLabel(f2, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a2t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
668 | newLabel(f3, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a3t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
669 | newLabel(f4, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a4t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
670 | g.Parent = Player.PlayerGui | |
671 | Reload = {} | |
672 | Reload[1] = f1.Reload | |
673 | Reload[2] = f2.Reload | |
674 | Reload[3] = f3.Reload | |
675 | Reload[4] = f4.Reload | |
676 | weapon = Instance.new("Model", Character) | |
677 | weapon.Name = "Toy Knife" | |
678 | p0 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
679 | mesh("BlockMesh", p0, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 2.39999986, 6.57500076)) | |
680 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
681 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005)) | |
682 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p1") | |
683 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005)) | |
684 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
685 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105)) | |
686 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p2") | |
687 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105)) | |
688 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
689 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064)) | |
690 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p3") | |
691 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064)) | |
692 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
693 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005)) | |
694 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p4") | |
695 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005)) | |
696 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
697 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083)) | |
698 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p5") | |
699 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083)) | |
700 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Handle") | |
701 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012)) | |
702 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p6") | |
703 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012)) | |
704 | weld(p0, p0, p1, CFrame.new(-0.400014997, -2.90028477, 2.71900272, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
705 | weld(p1, p1, p2, CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
706 | weld(p2, p2, p3, CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
707 | weld(p3, p3, p4, CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
708 | weld(p4, p4, p5, CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
709 | weld(p5, p5, p6, CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(1.48875475, 2.98278475, -0.400014997, 0, 4.37113883E-8, 1, 0, -1, 4.37113883E-8, 1, 0, 0)) | |
710 | handleweld = Instance.new("Weld", RightArm) | |
711 | handleweld.Part1 = RightArm | |
712 | handleweld.Part0 = p6 | |
713 | handlec0 = CFrame.new(0, -0.95, 0) * angles(0, math.pi / 2, math.pi) | |
714 | handleweld.C0 = handlec0 | |
715 | function attackone() | |
716 | attacking = true | |
717 | for i = 0, 1, 0.1 do | |
718 | swait() | |
719 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.4) | |
720 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.4) | |
721 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.4) | |
722 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
723 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
724 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
725 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
726 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
727 | end | |
728 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
729 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
730 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(120), math.rad(0)) | |
731 | delay(0.1, function() | |
732 | table.insert(partEffects, { | |
733 | smp, | |
734 | "Disappear", | |
735 | 0.05 | |
736 | }) | |
737 | end) | |
738 | sound(sounds[1][1], Character.Head, 1, 4, 1.5) | |
739 | local hitb = hitbox.Touched:connect(function(hit) | |
740 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
741 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
742 | return | |
743 | end | |
744 | local str = Instance.new("StringValue", hit.Parent) | |
745 | str.Name = "Hit" .. Player.Name | |
746 | game.Debris:AddItem(str, 0.3) | |
747 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
748 | end | |
749 | end) | |
750 | for i = 0, 1, 0.1 do | |
751 | swait() | |
752 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.4) | |
753 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.4) | |
754 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.4) | |
755 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
756 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
757 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
758 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
759 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
760 | hitbox.Parent = weapon | |
761 | hitbox.Size = Vector3.new(2, 5, 8) | |
762 | if smp then | |
763 | hitbox.CFrame = smp.CFrame | |
764 | else | |
765 | hitbox.Parent = nil | |
766 | end | |
767 | end | |
768 | hitb:disconnect() | |
769 | hitbox.Parent = nil | |
770 | attacking = false | |
771 | end | |
772 | function attacktwo() | |
773 | attacking = true | |
774 | for i = 0, 1, 0.1 do | |
775 | swait() | |
776 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
777 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
778 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
779 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
780 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
781 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
782 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
783 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
784 | end | |
785 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
786 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
787 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(80), math.rad(0)) | |
788 | delay(0.1, function() | |
789 | table.insert(partEffects, { | |
790 | smp, | |
791 | "Disappear", | |
792 | 0.05 | |
793 | }) | |
794 | end) | |
795 | sound(sounds[1][2], Character.Head, 1, 4, 1.5) | |
796 | local hitb = hitbox.Touched:connect(function(hit) | |
797 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
798 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
799 | return | |
800 | end | |
801 | local str = Instance.new("StringValue", hit.Parent) | |
802 | str.Name = "Hit" .. Player.Name | |
803 | game.Debris:AddItem(str, 0.3) | |
804 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
805 | end | |
806 | end) | |
807 | for i = 0, 1, 0.1 do | |
808 | swait() | |
809 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
810 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
811 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
812 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
813 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
814 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
815 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
816 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
817 | hitbox.Parent = weapon | |
818 | hitbox.Size = Vector3.new(2, 5, 8) | |
819 | if smp then | |
820 | hitbox.CFrame = smp.CFrame | |
821 | else | |
822 | hitbox.Parent = nil | |
823 | end | |
824 | end | |
825 | hitb:disconnect() | |
826 | hitbox.Parent = nil | |
827 | attacking = false | |
828 | end | |
829 | function attackthree() | |
830 | attacking = true | |
831 | for i = 0, 1, 0.1 do | |
832 | swait() | |
833 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
834 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.4) | |
835 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 0.4) | |
836 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
837 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
838 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
839 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
840 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
841 | end | |
842 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
843 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
844 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(-70), math.rad(0)) | |
845 | delay(0.1, function() | |
846 | table.insert(partEffects, { | |
847 | smp, | |
848 | "Disappear", | |
849 | 0.05 | |
850 | }) | |
851 | end) | |
852 | sound(sounds[1][3], Character.Head, 1, 4, 1.5) | |
853 | local hitb = hitbox.Touched:connect(function(hit) | |
854 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
855 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
856 | return | |
857 | end | |
858 | local str = Instance.new("StringValue", hit.Parent) | |
859 | str.Name = "Hit" .. Player.Name | |
860 | game.Debris:AddItem(str, 0.3) | |
861 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
862 | end | |
863 | end) | |
864 | for i = 0, 1, 0.1 do | |
865 | swait() | |
866 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
867 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
868 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.8, 0.4) * angles(math.rad(0), math.rad(-40), math.rad(120)), 0.4) | |
869 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
870 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
871 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
872 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
873 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
874 | hitbox.Parent = weapon | |
875 | hitbox.Size = Vector3.new(2, 5, 8) | |
876 | if smp then | |
877 | hitbox.CFrame = smp.CFrame | |
878 | else | |
879 | hitbox.Parent = nil | |
880 | end | |
881 | end | |
882 | hitb:disconnect() | |
883 | hitbox.Parent = nil | |
884 | attacking = false | |
885 | end | |
886 | function rapidslash() | |
887 | attacking = true | |
888 | AttackHas[1] = 0 | |
889 | AttackCan[1] = false | |
890 | for i = 1, 3 do | |
891 | swait() | |
892 | for i = 0, 1, 0.2 do | |
893 | swait() | |
894 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.6) | |
895 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.6) | |
896 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.6) | |
897 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
898 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
899 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
900 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
901 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
902 | end | |
903 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
904 | do | |
905 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
906 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
907 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
908 | delay(0.1, function() | |
909 | table.insert(partEffects, { | |
910 | smp, | |
911 | "Disappear", | |
912 | 0.05 | |
913 | }) | |
914 | end) | |
915 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
916 | basicDamage(v, 6, c3(243, 242, 242)) | |
917 | end | |
918 | for i = 0, 1, 0.2 do | |
919 | swait() | |
920 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.6) | |
921 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.6) | |
922 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.6) | |
923 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
924 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
925 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
926 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
927 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
928 | end | |
929 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
930 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
931 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
932 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
933 | delay(0.1, function() | |
934 | table.insert(partEffects, { | |
935 | smp, | |
936 | "Disappear", | |
937 | 0.05 | |
938 | }) | |
939 | end) | |
940 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
941 | basicDamage(v, 6, c3(243, 242, 242)) | |
942 | end | |
943 | for i = 0, 1, 0.2 do | |
944 | swait() | |
945 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
946 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.6) | |
947 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 1) | |
948 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
949 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
950 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
951 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
952 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
953 | end | |
954 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
955 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
956 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
957 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
958 | delay(0.1, function() | |
959 | table.insert(partEffects, { | |
960 | smp, | |
961 | "Disappear", | |
962 | 0.05 | |
963 | }) | |
964 | end) | |
965 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
966 | basicDamage(v, 6, c3(243, 242, 242)) | |
967 | end | |
968 | for i = 0, 1, 0.2 do | |
969 | swait() | |
970 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
971 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.6) | |
972 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.6) | |
973 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
974 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
975 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
976 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
977 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
978 | end | |
979 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
980 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
981 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
982 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
983 | delay(0.1, function() | |
984 | table.insert(partEffects, { | |
985 | smp, | |
986 | "Disappear", | |
987 | 0.05 | |
988 | }) | |
989 | end) | |
990 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
991 | basicDamage(v, 6, c3(243, 242, 242)) | |
992 | end | |
993 | for i = 0, 1, 0.2 do | |
994 | swait() | |
995 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.6) | |
996 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.6) | |
997 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.6) | |
998 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.6) | |
999 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
1000 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
1001 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
1002 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
1003 | end | |
1004 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
1005 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
1006 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
1007 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
1008 | delay(0.1, function() | |
1009 | table.insert(partEffects, { | |
1010 | smp, | |
1011 | "Disappear", | |
1012 | 0.05 | |
1013 | }) | |
1014 | end) | |
1015 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
1016 | basicDamage(v, 6, c3(243, 242, 242)) | |
1017 | end | |
1018 | end | |
1019 | end | |
1020 | AttackCan[1] = true | |
1021 | attacking = false | |
1022 | end | |
1023 | function powerslash() | |
1024 | attacking = true | |
1025 | AttackCan[2] = false | |
1026 | AttackHas[2] = AttackHas[2] - 0.2 | |
1027 | local orbs = {} | |
1028 | if energyslashcounter == 1 then | |
1029 | energyslashcounter = 2 | |
1030 | sound(367453005, Character.Head, 1, 4, 1) | |
1031 | do | |
1032 | local now = RootPart.CFrame * CFrame.new(0, 0, -10) | |
1033 | local bo = { | |
1034 | BrickColor.new("Bright orange"), | |
1035 | BrickColor.new("Toothpaste") | |
1036 | } | |
1037 | local bon = bo[math.random(1, 2)] | |
1038 | for i = 1, 5 do | |
1039 | local orb = newPart(Effects, bon, 0, true, false, Vector3.new(), "Orange", "SmoothPlastic", RootPart.CFrame * CFrame.new(0, 0, -15)) | |
1040 | local omesh = mesh("SpecialMesh", orb, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5)) | |
1041 | orb.CFrame = now * CFrame.new((math.random() - 0.5) * 20, 0, (math.random() - 0.5) * 20) | |
1042 | table.insert(orbs, orb) | |
1043 | end | |
1044 | for i = 0, 1, 0.05 do | |
1045 | swait() | |
1046 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.15) | |
1047 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(80)), 0.15) | |
1048 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
1049 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1050 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1051 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1052 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
1053 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
1054 | end | |
1055 | for i = 1, #orbs do | |
1056 | do | |
1057 | local orb = orbs[i] | |
1058 | table.insert(partEffects, { | |
1059 | orb, | |
1060 | "Block2", | |
1061 | 0.05, | |
1062 | 10, | |
1063 | 10, | |
1064 | 10, | |
1065 | orb.Mesh | |
1066 | }) | |
1067 | thread(function() | |
1068 | for i = 1, 3 do | |
1069 | swait(5) | |
1070 | for i, v in pairs(findCloseHumanoid(orb.Position, 10)) do | |
1071 | if bon == BrickColor.new("Bright orange") then | |
1072 | if (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude < 2 then | |
1073 | basicDamage(v, 6, BrickColor.new("Bright orange").Color) | |
1074 | end | |
1075 | elseif bon == BrickColor.new("Toothpaste") and (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude > 2 then | |
1076 | basicDamage(v, 6, BrickColor.new("Toothpaste").Color) | |
1077 | end | |
1078 | end | |
1079 | end | |
1080 | end) | |
1081 | end | |
1082 | end | |
1083 | sound(sounds[1][2], Character.Head, 1, 4, 0.8) | |
1084 | for i = 0, 1, 0.1 do | |
1085 | swait() | |
1086 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
1087 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(-5)), 0.4) | |
1088 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
1089 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
1090 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1091 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1092 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
1093 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
1094 | end | |
1095 | end | |
1096 | elseif energyslashcounter == 2 then | |
1097 | energyslashcounter = 3 | |
1098 | sound(306247749, Character.Head, 1, 4, 1) | |
1099 | local gparts = {} | |
1100 | for i = 1, 9 do | |
1101 | local gpart = newPart(Effects, BrickColor.new("Really red"), 0, true, false, Vector3.new(), "Violet", "SmoothPlastic") | |
1102 | local gmesh = mesh("CylinderMesh", gpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(50, 10, 50)) | |
1103 | gpart.CFrame = RootPart.CFrame * CFrame.new(math.random(-20, 20), -3, -15 + math.random(-20, 20)) | |
1104 | table.insert(gparts, gpart) | |
1105 | end | |
1106 | for i = 0, 1, 0.05 do | |
1107 | swait() | |
1108 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
1109 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
1110 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.4) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(15)) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
1111 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1112 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1113 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1114 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
1115 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
1116 | end | |
1117 | for i = 1, #gparts do | |
1118 | local gpart = gparts[i] | |
1119 | table.insert(partEffects, { | |
1120 | gpart, | |
1121 | "Block2", | |
1122 | 0.05, | |
1123 | -1, | |
1124 | 50, | |
1125 | -1, | |
1126 | gpart.Mesh | |
1127 | }) | |
1128 | for i, v in pairs(findCloseHumanoid(gpart.Position, 10)) do | |
1129 | basicDamage(v, 15, BrickColor.new("Dark blue").Color) | |
1130 | local bv = Instance.new("BodyVelocity", v.Parent.Torso) | |
1131 | game.Debris:AddItem(bv, 1) | |
1132 | bv.Velocity = Vector3.new(0, 40, 0) | |
1133 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1134 | end | |
1135 | end | |
1136 | sound(sounds[1][3], Character.Head, 1, 4, 0.8) | |
1137 | for i = 0, 1, 0.1 do | |
1138 | swait() | |
1139 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.4) | |
1140 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(80)), 0.4) | |
1141 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, -0.4) * angles(math.rad(125), math.rad(-40), math.rad(60)), 0.4) | |
1142 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
1143 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1144 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1145 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
1146 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
1147 | end | |
1148 | elseif energyslashcounter == 3 then | |
1149 | energyslashcounter = 1 | |
1150 | for i = 0, 1, 0.05 do | |
1151 | swait() | |
1152 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
1153 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
1154 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
1155 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1156 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1157 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1158 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
1159 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
1160 | end | |
1161 | sound(sounds[2][5], Character.Head, 1, 4, 0.8) | |
1162 | thread(function() | |
1163 | for i = 1, 6 do | |
1164 | swait() | |
1165 | sound(438149153, Character.Head, 1, 4, 0.8) | |
1166 | do | |
1167 | local prt = newPart(Effects, BrickColor.new("Bright yellow"), 0, false, false, Vector3.new(), "Yellow", "SmoothPlastic", RootPart.CFrame) | |
1168 | local mesh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 2.5)) | |
1169 | prt.CFrame = RootPart.CFrame * CFrame.new(math.random(-3, 3), math.random(-1, 1), math.random(-3, 3)) | |
1170 | local bv = Instance.new("BodyVelocity", prt) | |
1171 | bv.Velocity = RootPart.CFrame.lookVector * 150 | |
1172 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1173 | game.Debris:AddItem(bv, 6) | |
1174 | local orlook = RootPart.CFrame.lookVector | |
1175 | thread(function() | |
1176 | while prt do | |
1177 | swait() | |
1178 | local hitpart, pospart = rayCast(prt.Position, orlook, 4, Character) | |
1179 | if hitpart and pospart then | |
1180 | prt:Destroy() | |
1181 | do | |
1182 | local ref = newPart(Effects, BrickColor.Black(), 1, true, false, Vector3.new(), "") | |
1183 | ref.CFrame = CFrame.new(pospart) | |
1184 | sound(142070127, ref, 1, 4, 1) | |
1185 | delay(4, function() | |
1186 | ref:Destroy() | |
1187 | end) | |
1188 | magic("Block", { | |
1189 | Effects, | |
1190 | BrickColor.new("Bright yellow"), | |
1191 | CFrame.new(pospart), | |
1192 | 0.2, | |
1193 | 0.2, | |
1194 | 0.2, | |
1195 | 0.9, | |
1196 | 0.9, | |
1197 | 0.9, | |
1198 | 0.05, | |
1199 | 1 | |
1200 | }) | |
1201 | magic("Block", { | |
1202 | Effects, | |
1203 | BrickColor.new("Bright yellow"), | |
1204 | CFrame.new(pospart), | |
1205 | 0.2, | |
1206 | 0.2, | |
1207 | 0.2, | |
1208 | 0.9, | |
1209 | 0.9, | |
1210 | 0.9, | |
1211 | 0.05, | |
1212 | 1 | |
1213 | }) | |
1214 | if hitpart.Parent:findFirstChild("Humanoid") then | |
1215 | basicDamage(hitpart.Parent.Humanoid, 12, BrickColor.new("Bright yellow").Color) | |
1216 | end | |
1217 | break | |
1218 | end | |
1219 | end | |
1220 | end | |
1221 | end) | |
1222 | end | |
1223 | end | |
1224 | end) | |
1225 | end | |
1226 | attacking = false | |
1227 | AttackCan[2] = true | |
1228 | end | |
1229 | function leftright() | |
1230 | attacking = true | |
1231 | AttackCan[3] = false | |
1232 | for i = 0, 1, 0.1 do | |
1233 | swait() | |
1234 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
1235 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
1236 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
1237 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1238 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1239 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1240 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
1241 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
1242 | end | |
1243 | thread(function() | |
1244 | local laser = newPart(nil, BrickColor.new("Bright red"), 0.5, true, false, Vector3.new(), "Laser", "SmoothPlastic") | |
1245 | local lmsh = mesh("BlockMesh", nil, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5)) | |
1246 | local lasers = {} | |
1247 | local keypoints1, keypoints2, keypoints3, keypoints4, keypoints5, keypoints6 = {}, {}, {}, {}, {}, {} | |
1248 | local radius = 10 | |
1249 | local num = 12 | |
1250 | for i = 1, num do | |
1251 | table.insert(keypoints1, { | |
1252 | RootPart.CFrame.p, | |
1253 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num) * i), 0, math.sin(math.rad(360 / num) * i)) | |
1254 | }) | |
1255 | table.insert(keypoints2, { | |
1256 | RootPart.CFrame.p, | |
1257 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 45 * i) * i), 0, math.sin(math.rad(360 / num + 45 * i) * i)) | |
1258 | }) | |
1259 | table.insert(keypoints3, { | |
1260 | RootPart.CFrame.p, | |
1261 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 90 * i) * i), 0, math.sin(math.rad(360 / num + 90 * i) * i)) | |
1262 | }) | |
1263 | table.insert(keypoints4, { | |
1264 | RootPart.CFrame.p, | |
1265 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 135 * i) * i), 0, math.sin(math.rad(360 / num + 135 * i) * i)) | |
1266 | }) | |
1267 | end | |
1268 | local keypointstotal = { | |
1269 | keypoints1, | |
1270 | keypoints2, | |
1271 | keypoints3, | |
1272 | keypoints4 | |
1273 | } | |
1274 | for ii = 1, #keypointstotal do | |
1275 | swait(5) | |
1276 | do | |
1277 | local currpoint = keypointstotal[ii] | |
1278 | for i = 1, #currpoint do | |
1279 | do | |
1280 | local start = currpoint[i][1] | |
1281 | local look = currpoint[i][2] | |
1282 | local laserc = laser:Clone() | |
1283 | local lmshc = lmsh:Clone() | |
1284 | local hit, pos = rayCast(start, look, 100000, Character) | |
1285 | laserc.CFrame = CFrame.new((start + pos) / 2, pos) * angles(math.rad(90), 0, 0) | |
1286 | local mag = (laserc.Position - pos).magnitude * 2 | |
1287 | lmshc.Scale = Vector3.new(2, mag * 5, 2) | |
1288 | laserc.Parent = Effects | |
1289 | lmshc.Parent = laserc | |
1290 | thread(function() | |
1291 | table.insert(partEffects, { | |
1292 | laserc, | |
1293 | "Block2", | |
1294 | 0.025, | |
1295 | -0.1, | |
1296 | 0, | |
1297 | -0.1, | |
1298 | lmshc | |
1299 | }) | |
1300 | local start = currpoint[i][1] | |
1301 | local look = currpoint[i][2] | |
1302 | look = CFrame.new(start, start + look).lookVector | |
1303 | local hit, pos = rayCast(start, look, 100000, Character) | |
1304 | repeat | |
1305 | swait() | |
1306 | until laserc.Parent == nil | |
1307 | local lpart = newPart(Effects, BrickColor.new("Black"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic") | |
1308 | sound(406913243, Head, 0.6, 4, 1) | |
1309 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, mag * 5, 5)) | |
1310 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
1311 | table.insert(partEffects, { | |
1312 | lpart, | |
1313 | "Block2", | |
1314 | 0.05, | |
1315 | 1, | |
1316 | 0, | |
1317 | 1, | |
1318 | lpartm | |
1319 | }) | |
1320 | local lpart = newPart(Effects, BrickColor.new("Lily white"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic") | |
1321 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(8, mag * 5, 8)) | |
1322 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
1323 | table.insert(partEffects, { | |
1324 | lpart, | |
1325 | "Block2", | |
1326 | 0.05, | |
1327 | 1, | |
1328 | 0, | |
1329 | 1, | |
1330 | lpartm | |
1331 | }) | |
1332 | local hit, pos = rayCast(start, look, 100000, Character) | |
1333 | if hit ~= nil then | |
1334 | if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then | |
1335 | if hit.Parent.Parent:findFirstChild("Humanoid") then | |
1336 | basicDamage(hit.Parent.Parent.Humanoid, 20, BrickColor.new("Bright red").Color) | |
1337 | end | |
1338 | elseif hit.Parent:findFirstChild("Humanoid") then | |
1339 | basicDamage(hit.Parent.Humanoid, 20, BrickColor.new("Bright red").Color) | |
1340 | end | |
1341 | end | |
1342 | end) | |
1343 | end | |
1344 | end | |
1345 | end | |
1346 | end | |
1347 | end) | |
1348 | for i = 0, 1, 0.1 do | |
1349 | swait() | |
1350 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
1351 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
1352 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
1353 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
1354 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1355 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1356 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
1357 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
1358 | end | |
1359 | AttackCan[3] = true | |
1360 | attacking = false | |
1361 | end | |
1362 | function mouse1d() | |
1363 | if tool.Active == false then | |
1364 | return | |
1365 | end | |
1366 | if attacking == false and attackcounter == 1 then | |
1367 | attackcounter = 2 | |
1368 | attackone() | |
1369 | elseif attacking == false and attackcounter == 2 then | |
1370 | attackcounter = 3 | |
1371 | attacktwo() | |
1372 | elseif attacking == false and attackcounter == 3 then | |
1373 | attackcounter = 1 | |
1374 | attackthree() | |
1375 | end | |
1376 | end | |
1377 | function key(k) | |
1378 | if tool.Active == false then | |
1379 | return | |
1380 | end | |
1381 | k = k:lower() | |
1382 | if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then | |
1383 | rapidslash() | |
1384 | elseif attacking == false and k == "x" and AttackHas[2] >= 0.2 then | |
1385 | powerslash() | |
1386 | elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then | |
1387 | leftright() | |
1388 | elseif attacking ~= false or k ~= "v" or AttackHas[4] >= AttackNeeded[4] then | |
1389 | end | |
1390 | end | |
1391 | asdasd = mouse.Button1Down:connect(mouse1d) | |
1392 | asdasdf = mouse.KeyDown:connect(key) | |
1393 | Humanoid.Died:connect(function() | |
1394 | asdasd:disconnect() | |
1395 | asdasdf:disconnect() | |
1396 | end) | |
1397 | thread(function() | |
1398 | while true do | |
1399 | swait() | |
1400 | torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1401 | hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) | |
1402 | sine = sine + 1 | |
1403 | if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then | |
1404 | AttackHas[1] = AttackHas[1] + 0.005 | |
1405 | end | |
1406 | if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then | |
1407 | AttackHas[2] = AttackHas[2] + 0.005 | |
1408 | end | |
1409 | if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then | |
1410 | AttackHas[3] = AttackHas[3] + 0.005 | |
1411 | end | |
1412 | if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then | |
1413 | AttackHas[4] = AttackHas[4] + 0.005 | |
1414 | end | |
1415 | Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4) | |
1416 | Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4) | |
1417 | Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4) | |
1418 | Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4) | |
1419 | if 1 < RootPart.Velocity.y and hitfloor == nil then | |
1420 | if attacking == false then | |
1421 | Anim = "Jump" | |
1422 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1) | |
1423 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
1424 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1425 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
1426 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1427 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
1428 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2) | |
1429 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2) | |
1430 | end | |
1431 | elseif RootPart.Velocity.y < -1 and hitfloor == nil then | |
1432 | if attacking == false then | |
1433 | Anim = "Fall" | |
1434 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2) | |
1435 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
1436 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
1437 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1438 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
1439 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1440 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2) | |
1441 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2) | |
1442 | end | |
1443 | elseif torvel < 1 and hitfloor ~= nil then | |
1444 | if attacking == false then | |
1445 | Anim = "Idle" | |
1446 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(15)), 0.1) | |
1447 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(-15)), 0.1) | |
1448 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
1449 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
1450 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1451 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1452 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1.1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), math.rad(105), math.rad(-5)) * CFrame.Angles(math.rad(-4), 0, math.rad(-5)), 0.2) | |
1453 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), -math.rad(75), math.rad(-2)) * CFrame.Angles(math.rad(-13), 0, 0), 0.2) | |
1454 | end | |
1455 | elseif torvel > 2 and hitfloor ~= nil and attacking == false then | |
1456 | Anim = "Walk" | |
1457 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(0)), 0.1) | |
1458 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(0)), 0.1) | |
1459 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
1460 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
1461 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1462 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1463 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3) | |
1464 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3) | |
1465 | end | |
1466 | if 0 < #partEffects then | |
1467 | for e = 1, #partEffects do | |
1468 | if partEffects[e] ~= nil then | |
1469 | local Thing = partEffects[e] | |
1470 | if Thing ~= nil then | |
1471 | local Part = Thing[1] | |
1472 | local Mode = Thing[2] | |
1473 | local Delay = Thing[3] | |
1474 | local IncX = Thing[4] | |
1475 | local IncY = Thing[5] | |
1476 | local IncZ = Thing[6] | |
1477 | if 1 >= Thing[1].Transparency then | |
1478 | if Thing[2] == "Block1" then | |
1479 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1480 | local Mesh = Thing[1].Mesh | |
1481 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1482 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1483 | elseif Thing[2] == "Block2" then | |
1484 | Thing[1].CFrame = Thing[1].CFrame | |
1485 | local Mesh = Thing[7] | |
1486 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1487 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1488 | elseif Thing[2] == "Cylinder" then | |
1489 | local Mesh = Thing[1].Mesh | |
1490 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1491 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1492 | elseif Thing[2] == "Blood" then | |
1493 | local Mesh = Thing[7] | |
1494 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1495 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1496 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1497 | elseif Thing[2] == "Elec" then | |
1498 | local Mesh = Thing[1].Mesh | |
1499 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1500 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1501 | elseif Thing[2] == "Disappear" then | |
1502 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1503 | elseif Thing[2] == "Shatter" then | |
1504 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1505 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1506 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1507 | Thing[6] = Thing[6] + Thing[5] | |
1508 | end | |
1509 | else | |
1510 | Part:Destroy() | |
1511 | table.remove(partEffects, e) | |
1512 | end | |
1513 | end | |
1514 | end | |
1515 | end | |
1516 | end | |
1517 | end | |
1518 | end) |