SHOW:
|
|
- or go back to the newest paste.
1 | --[[Nocturna_A._Alteriano_Night.Owl.Inc]]-- | |
2 | ||
3 | CV="White" | |
4 | ||
5 | p = game.Players.LocalPlayer | |
6 | char = p.Character | |
7 | local txt = Instance.new("BillboardGui", char) | |
8 | txt.Adornee = char .Head | |
9 | txt.Name = "_status" | |
10 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
11 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
12 | local text = Instance.new("TextLabel", txt) | |
13 | text.Size = UDim2.new(10, 0, 7, 0) | |
14 | text.FontSize = "Size24" | |
15 | text.TextScaled = true | |
16 | text.TextTransparency = 0 | |
17 | text.BackgroundTransparency = 1 | |
18 | text.TextTransparency = 0 | |
19 | text.TextStrokeTransparency = 1 | |
20 | text.Font = "Arcade" | |
21 | text.TextStrokeColor3 = Color3.new(0,0,255) | |
22 | ||
23 | v=Instance.new("Part") | |
24 | v.Name = "ColorBrick" | |
25 | v.Parent=p.Character | |
26 | v.FormFactor="Symmetric" | |
27 | v.Anchored=true | |
28 | v.CanCollide=false | |
29 | v.BottomSurface="Smooth" | |
30 | v.TopSurface="Smooth" | |
31 | v.Size=Vector3.new(10,5,3) | |
32 | v.Transparency=1 | |
33 | v.CFrame=char.Torso.CFrame | |
34 | v.BrickColor=BrickColor.new(CV) | |
35 | v.Transparency=1 | |
36 | text.TextColor3 = Color3.new(255,255,0) | |
37 | v.Shape="Block" | |
38 | text.Text = "The Mafia Boss"" | |
39 | ||
40 | wait(1 / 60) | |
41 | Effects = { } | |
42 | local Player = game.Players.localPlayer | |
43 | local Character = Player.Character | |
44 | local Humanoid = Character.Humanoid | |
45 | local mouse = Player:GetMouse() | |
46 | local m = Instance.new('Model', Character) | |
47 | m.Name = "WeaponModel" | |
48 | local LeftArm = Character["Left Arm"] | |
49 | local RightArm = Character["Right Arm"] | |
50 | local LeftLeg = Character["Left Leg"] | |
51 | local RightLeg = Character["Right Leg"] | |
52 | local Head = Character.Head | |
53 | local Torso = Character.Torso | |
54 | local cam = game.Workspace.CurrentCamera | |
55 | local RootPart = Character.HumanoidRootPart | |
56 | local RootJoint = RootPart.RootJoint | |
57 | local equipped = false | |
58 | local attack = false | |
59 | local Anim = 'Idle' | |
60 | local idle = 0 | |
61 | local attacktype = 1 | |
62 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
63 | local velocity = RootPart.Velocity.y | |
64 | local sine = 0 | |
65 | local change = 1 | |
66 | local grabbed = false | |
67 | local cn = CFrame.new | |
68 | local mr = math.rad | |
69 | local angles = CFrame.Angles | |
70 | local ud = UDim2.new | |
71 | local c3 = Color3.new | |
72 | ||
73 | Humanoid.Animator.Parent = nil | |
74 | Character.Animate.Parent = nil | |
75 | ||
76 | local newMotor = function(part0, part1, c0, c1) | |
77 | local w = Instance.new('Motor', part0) | |
78 | w.Part0 = part0 | |
79 | w.Part1 = part1 | |
80 | w.C0 = c0 | |
81 | w.C1 = c1 | |
82 | return w | |
83 | end | |
84 | ||
85 | function clerp(a, b, t) | |
86 | return a:lerp(b, t) | |
87 | end | |
88 | ||
89 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
90 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
91 | ||
92 | local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) | |
93 | local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0)) | |
94 | local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0)) | |
95 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0)) | |
96 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
97 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
98 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
99 | Torso.Neck.C0 = CFrame.new(0, 1.5, 0) | |
100 | ||
101 | local rarmc1 = RW.C1 | |
102 | local larmc1 = LW.C1 | |
103 | local rlegc1 = RH.C1 | |
104 | local llegc1 = LH.C1 | |
105 | ||
106 | local resetc1 = false | |
107 | ||
108 | function PlayAnimationFromTable(table, speed, bool) | |
109 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
110 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
111 | RW.C0 = clerp(RW.C0, table[3], speed) | |
112 | LW.C0 = clerp(LW.C0, table[4], speed) | |
113 | RH.C0 = clerp(RH.C0, table[5], speed) | |
114 | LH.C0 = clerp(LH.C0, table[6], speed) | |
115 | if bool == true then | |
116 | if resetc1 == false then | |
117 | resetc1 = true | |
118 | RootJoint.C1 = RootJoint.C1 | |
119 | Torso.Neck.C1 = Torso.Neck.C1 | |
120 | RW.C1 = rarmc1 | |
121 | LW.C1 = larmc1 | |
122 | RH.C1 = rlegc1 | |
123 | LH.C1 = llegc1 | |
124 | end | |
125 | end | |
126 | end | |
127 | ||
128 | --[[Credits to SazErenos for his Artificial Heartbeat]]-- | |
129 | ||
130 | ArtificialHB = Instance.new("BindableEvent", script) | |
131 | ArtificialHB.Name = "Heartbeat" | |
132 | ||
133 | script:WaitForChild("Heartbeat") | |
134 | ||
135 | frame = 1 / 30 | |
136 | tf = 0 | |
137 | allowframeloss = false | |
138 | tossremainder = false | |
139 | lastframe = tick() | |
140 | script.Heartbeat:Fire() | |
141 | ||
142 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
143 | tf = tf + s | |
144 | if tf >= frame then | |
145 | if allowframeloss then | |
146 | script.Heartbeat:Fire() | |
147 | lastframe = tick() | |
148 | else | |
149 | for i = 1, math.floor(tf / frame) do | |
150 | script.Heartbeat:Fire() | |
151 | end | |
152 | lastframe = tick() | |
153 | end | |
154 | if tossremainder then | |
155 | tf = 0 | |
156 | else | |
157 | tf = tf - frame * math.floor(tf / frame) | |
158 | end | |
159 | end | |
160 | end) | |
161 | ||
162 | function swait(num) | |
163 | if num == 0 or num == nil then | |
164 | ArtificialHB.Event:wait() | |
165 | else | |
166 | for i = 0, num do | |
167 | ArtificialHB.Event:wait() | |
168 | end | |
169 | end | |
170 | end | |
171 | ||
172 | local RbxUtility = LoadLibrary("RbxUtility") | |
173 | local Create = RbxUtility.Create | |
174 | ||
175 | function RemoveOutlines(part) | |
176 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
177 | end | |
178 | ||
179 | CFuncs = { | |
180 | ["Part"] = { | |
181 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
182 | local Part = Create("Part"){ | |
183 | Parent = Parent, | |
184 | Reflectance = Reflectance, | |
185 | Transparency = Transparency, | |
186 | CanCollide = false, | |
187 | Locked = true, | |
188 | BrickColor = BrickColor.new(tostring(BColor)), | |
189 | Name = Name, | |
190 | Size = Size, | |
191 | Material = Material, | |
192 | } | |
193 | RemoveOutlines(Part) | |
194 | return Part | |
195 | end; | |
196 | }; | |
197 | ||
198 | ["Mesh"] = { | |
199 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
200 | local Msh = Create(Mesh){ | |
201 | Parent = Part, | |
202 | Offset = OffSet, | |
203 | Scale = Scale, | |
204 | } | |
205 | if Mesh == "SpecialMesh" then | |
206 | Msh.MeshType = MeshType | |
207 | Msh.MeshId = MeshId | |
208 | end | |
209 | return Msh | |
210 | end; | |
211 | }; | |
212 | ||
213 | ["Mesh"] = { | |
214 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
215 | local Msh = Create(Mesh){ | |
216 | Parent = Part, | |
217 | Offset = OffSet, | |
218 | Scale = Scale, | |
219 | } | |
220 | if Mesh == "SpecialMesh" then | |
221 | Msh.MeshType = MeshType | |
222 | Msh.MeshId = MeshId | |
223 | end | |
224 | return Msh | |
225 | end; | |
226 | }; | |
227 | ||
228 | ["Weld"] = { | |
229 | Create = function(Parent, Part0, Part1, C0, C1) | |
230 | local Weld = Create("Weld"){ | |
231 | Parent = Parent, | |
232 | Part0 = Part0, | |
233 | Part1 = Part1, | |
234 | C0 = C0, | |
235 | C1 = C1, | |
236 | } | |
237 | return Weld | |
238 | end; | |
239 | }; | |
240 | ||
241 | ["Sound"] = { | |
242 | Create = function(id, par, vol, pit) | |
243 | coroutine.resume(coroutine.create(function() | |
244 | local S = Create("Sound"){ | |
245 | Volume = vol, | |
246 | Pitch = pit or 1, | |
247 | SoundId = id, | |
248 | Parent = par or workspace, | |
249 | } | |
250 | Instance.new("DistortionSoundEffect", S).Level = 1 | |
251 | wait() | |
252 | S:play() | |
253 | game:GetService("Debris"):AddItem(S, 10) | |
254 | end)) | |
255 | end; | |
256 | }; | |
257 | ||
258 | ["ParticleEmitter"] = { | |
259 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
260 | local fp = Create("ParticleEmitter"){ | |
261 | Parent = Parent, | |
262 | Color = ColorSequence.new(Color1, Color2), | |
263 | LightEmission = LightEmission, | |
264 | Size = Size, | |
265 | Texture = Texture, | |
266 | Transparency = Transparency, | |
267 | ZOffset = ZOffset, | |
268 | Acceleration = Accel, | |
269 | Drag = Drag, | |
270 | LockedToPart = LockedToPart, | |
271 | VelocityInheritance = VelocityInheritance, | |
272 | EmissionDirection = EmissionDirection, | |
273 | Enabled = Enabled, | |
274 | Lifetime = LifeTime, | |
275 | Rate = Rate, | |
276 | Rotation = Rotation, | |
277 | RotSpeed = RotSpeed, | |
278 | Speed = Speed, | |
279 | VelocitySpread = VelocitySpread, | |
280 | } | |
281 | return fp | |
282 | end; | |
283 | }; | |
284 | } | |
285 | ||
286 | function rayCast(Position, Direction, Range, Ignore) | |
287 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
288 | end | |
289 | ||
290 | local function GetNearest(obj, distance) | |
291 | local last, lastx = distance + 1 | |
292 | for i, v in pairs(workspace:GetChildren()) do | |
293 | if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then | |
294 | local t = v.Torso | |
295 | local dist = (t.Position - obj.Position).magnitude | |
296 | if dist <= distance then | |
297 | if dist < last then | |
298 | last = dist | |
299 | lastx = v | |
300 | end | |
301 | end | |
302 | end | |
303 | end | |
304 | return lastx | |
305 | end | |
306 | ||
307 | --[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]-- | |
308 | ||
309 | function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch) | |
310 | for i, v in pairs(hit:GetChildren()) do | |
311 | if v:IsA("Humanoid") and hit.Name ~= Character.Name then | |
312 | local find = v:FindFirstChild("DebounceHit") | |
313 | if not find then | |
314 | if v.Parent:findFirstChild("Head") then | |
315 | local BillG = Create("BillboardGui"){ | |
316 | Parent = v.Parent.Head, | |
317 | Size = UDim2.new(1, 0, 1, 0), | |
318 | Adornee = v.Parent.Head, | |
319 | StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)), | |
320 | } | |
321 | local TL = Create("TextLabel"){ | |
322 | Parent = BillG, | |
323 | Size = UDim2.new(3, 3, 3, 3), | |
324 | BackgroundTransparency = 1, | |
325 | Text = tostring(damage).."-", | |
326 | TextColor3 = Color1.Color, | |
327 | TextStrokeColor3 = Color2.Color, | |
328 | TextStrokeTransparency = 0, | |
329 | TextXAlignment = Enum.TextXAlignment.Center, | |
330 | TextYAlignment = Enum.TextYAlignment.Center, | |
331 | FontSize = Enum.FontSize.Size18, | |
332 | Font = "ArialBold", | |
333 | } | |
334 | coroutine.resume(coroutine.create(function() | |
335 | swait(1) | |
336 | for i = 0, 1, .1 do | |
337 | swait(.1) | |
338 | BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0) | |
339 | end | |
340 | BillG:Destroy() | |
341 | end)) | |
342 | end | |
343 | v.Health = v.Health - damage | |
344 | local bool = Create("BoolValue"){ | |
345 | Parent = v, | |
346 | Name = "DebounceHit", | |
347 | } | |
348 | if HSound ~= nil and HPitch ~= nil then | |
349 | CFuncs["Sound"].Create(HSound, hit, 1, HPitch) | |
350 | end | |
351 | game:GetService("Debris"):AddItem(bool, cooldown) | |
352 | end | |
353 | end | |
354 | end | |
355 | end | |
356 | ||
357 | function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch) | |
358 | for _, c in pairs(workspace:children()) do | |
359 | local hum = c:findFirstChild("Humanoid") | |
360 | if hum ~= nil then | |
361 | local head = c:findFirstChild("Torso") | |
362 | if head ~= nil then | |
363 | local targ = head.Position - Part.Position | |
364 | local mag = targ.magnitude | |
365 | if mag <= magni and c.Name ~= Player.Name then | |
366 | Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch) | |
367 | end | |
368 | end | |
369 | end | |
370 | end | |
371 | end | |
372 | ||
373 | Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Handle", Vector3.new(0.399999946, 0.899999976, 0.400000095)) | |
374 | HandleWeld = CFuncs["Weld"].Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199958801, -0.0500774384, -1.09998882, -1, 0, 0, 0, 0, -1, -0, -1, -0)) | |
375 | FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095)) | |
376 | FakeHandleWeld = CFuncs["Weld"].Create(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199996948, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
377 | Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095)) | |
378 | BarrelWeld = CFuncs["Weld"].Create(m, FakeHandle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.749999046, -1.50000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
379 | Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Medium stone grey", "Part", Vector3.new(0.399999946, 0.299999952, 0.400000095)) | |
380 | PartWeld = CFuncs["Weld"].Create(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.300000191, -0.400000095, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
381 | CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://435840330", Vector3.new(0, 0, 0), Vector3.new(0.00200000009, 0.00200000009, 0.00200000009)) | |
382 | Part.Mesh.TextureId = "rbxassetid://435840335" | |
383 | ||
384 | EffectModel = Instance.new("Model", Character) | |
385 | EffectModel.Name = "Effects" | |
386 | ||
387 | Effects = { | |
388 | ["Block"] = { | |
389 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
390 | local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
391 | prt.Anchored = true | |
392 | prt.CFrame = cframe | |
393 | local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
394 | game:GetService("Debris"):AddItem(prt, 10) | |
395 | if Type == 1 or Type == nil then | |
396 | table.insert(Effects, { | |
397 | prt, | |
398 | "Block1", | |
399 | delay, | |
400 | x3, | |
401 | y3, | |
402 | z3, | |
403 | msh | |
404 | }) | |
405 | elseif Type == 2 then | |
406 | table.insert(Effects, { | |
407 | prt, | |
408 | "Block2", | |
409 | delay, | |
410 | x3, | |
411 | y3, | |
412 | z3, | |
413 | msh | |
414 | }) | |
415 | end | |
416 | end; | |
417 | }; | |
418 | ||
419 | ["Cylinder"] = { | |
420 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
421 | local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2)) | |
422 | prt.Anchored = true | |
423 | prt.CFrame = cframe | |
424 | local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
425 | game:GetService("Debris"):AddItem(prt, 2) | |
426 | Effects[#Effects + 1] = { | |
427 | prt, | |
428 | "Cylinder", | |
429 | delay, | |
430 | x3, | |
431 | y3, | |
432 | z3 | |
433 | } | |
434 | end; | |
435 | }; | |
436 | ||
437 | ["Sphere"] = { | |
438 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
439 | local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
440 | prt.Anchored = true | |
441 | prt.CFrame = cframe | |
442 | local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
443 | game:GetService("Debris"):AddItem(prt, 10) | |
444 | table.insert(Effects, { | |
445 | prt, | |
446 | "Cylinder", | |
447 | delay, | |
448 | x3, | |
449 | y3, | |
450 | z3, | |
451 | msh | |
452 | }) | |
453 | end; | |
454 | }; | |
455 | ||
456 | ["Elec"] = { | |
457 | Create = function(cff, x, y, z) | |
458 | local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1)) | |
459 | prt.Anchored = true | |
460 | prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
461 | prt.CFrame = CFrame.new(prt.Position) | |
462 | game:GetService("Debris"):AddItem(prt, 2) | |
463 | local xval = math.random() / 2 | |
464 | local yval = math.random() / 2 | |
465 | local zval = math.random() / 2 | |
466 | local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval)) | |
467 | table.insert(Effects, { | |
468 | prt, | |
469 | "Elec", | |
470 | 0.1, | |
471 | x, | |
472 | y, | |
473 | z, | |
474 | xval, | |
475 | yval, | |
476 | zval | |
477 | }) | |
478 | end; | |
479 | ||
480 | }; | |
481 | ||
482 | ["Ring"] = { | |
483 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
484 | local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
485 | prt.Anchored = true | |
486 | prt.CFrame = cframe | |
487 | local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
488 | game:GetService("Debris"):AddItem(prt, 10) | |
489 | table.insert(Effects, { | |
490 | prt, | |
491 | "Cylinder", | |
492 | delay, | |
493 | x3, | |
494 | y3, | |
495 | z3, | |
496 | msh | |
497 | }) | |
498 | end; | |
499 | }; | |
500 | ||
501 | ||
502 | ["Wave"] = { | |
503 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
504 | local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
505 | prt.Anchored = true | |
506 | prt.CFrame = cframe | |
507 | local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
508 | game:GetService("Debris"):AddItem(prt, 10) | |
509 | table.insert(Effects, { | |
510 | prt, | |
511 | "Cylinder", | |
512 | delay, | |
513 | x3, | |
514 | y3, | |
515 | z3, | |
516 | msh | |
517 | }) | |
518 | end; | |
519 | }; | |
520 | ||
521 | ["Break"] = { | |
522 | Create = function(brickcolor, cframe, x1, y1, z1) | |
523 | local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
524 | prt.Anchored = true | |
525 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
526 | local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
527 | local num = math.random(10, 50) / 1000 | |
528 | game:GetService("Debris"):AddItem(prt, 10) | |
529 | table.insert(Effects, { | |
530 | prt, | |
531 | "Shatter", | |
532 | num, | |
533 | prt.CFrame, | |
534 | math.random() - math.random(), | |
535 | 0, | |
536 | math.random(50, 100) / 100 | |
537 | }) | |
538 | end; | |
539 | }; | |
540 | } | |
541 | ||
542 | Shoot2 = function(orgpos) | |
543 | local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p) | |
544 | Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1) | |
545 | table.insert(Effects, { | |
546 | MouseLook.lookVector, | |
547 | "Shoot2", | |
548 | 50, | |
549 | orgpos, | |
550 | 5, | |
551 | 7, | |
552 | 0, | |
553 | 1, | |
554 | 2 | |
555 | }) | |
556 | end | |
557 | ||
558 | function attackone() | |
559 | attack = true | |
560 | CFuncs["Sound"].Create("", Torso, .1, 2.8) | |
561 | for i = 0, 1, 0.025 do | |
562 | swait() | |
563 | PlayAnimationFromTable({ | |
564 | CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
565 | CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
566 | CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
567 | CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
568 | CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
569 | CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
570 | }, .3, false) | |
571 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3) | |
572 | end | |
573 | CFuncs["Sound"].Create("", Barrel, .01, .3) | |
574 | CFuncs["Sound"].Create("", Barrel, .01, .9) | |
575 | CFuncs["Sound"].Create("", Barrel, .05, .9) | |
576 | Shoot2(Barrel.Position) | |
577 | for i = 0, 1, 0.15 do | |
578 | swait() | |
579 | RootPart.Velocity = RootPart.CFrame.lookVector * -50 | |
580 | PlayAnimationFromTable({ | |
581 | CFrame.new(-0, -0.281125277, 0.157014638, 1, 0, -0, 0, 0.906307876, -0.422617942, 0, 0.422617942, 0.906307876) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
582 | CFrame.new(0, 1.4999938, 1.05202198e-005, 1, 0, -0, 0, 0.965925813, 0.258818924, -0, -0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
583 | CFrame.new(0.406597674, 0.817824185, -0.957423151, 0.939692974, 0.280165672, -0.196174338, -5.36441803e-007, -0.573575616, -0.819152534, -0.34201926, 0.769751906, -0.538984895) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
584 | CFrame.new(-0.506752789, 0.775180221, -0.974653006, 0.939692974, -0.280165732, 0.196174279, 5.36441803e-007, -0.573575556, -0.819152713, 0.34201926, 0.769752145, -0.538984716) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
585 | CFrame.new(0.566868722, -1.61683154, -0.13679418, 0.954536259, -0.174988821, -0.241328761, 0.172366679, 0.984509468, -0.0321052969, 0.243208498, -0.0109513998, 0.969912171) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
586 | CFrame.new(-0.545306504, -1.37044179, -0.679420352, 0.996202111, 0.0754783303, 0.0434113704, -0.0434117466, 0.862729907, -0.503797948, -0.0754781216, 0.49999994, 0.862729967) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
587 | }, .6, false) | |
588 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3) | |
589 | end | |
590 | for i = 0, 1, 0.15 do | |
591 | swait() | |
592 | RootPart.Velocity = RootPart.CFrame.lookVector * -100 | |
593 | PlayAnimationFromTable({ | |
594 | CFrame.new(-0, -0.795007467, 0.0831707418, 1, 0, -0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
595 | CFrame.new(0, 1.49999774, 1.20103359e-005, 1, 0, -0, 0, 0.965925634, 0.258819878, -0, -0.258819878, 0.965925634) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
596 | CFrame.new(1.70605683, 1.21151328, -0.185158521, 0.893217862, -0.29338178, -0.340718448, -0.340719074, -0.936116338, -0.0871595442, -0.293381065, 0.193941653, -0.936116695) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
597 | CFrame.new(-1.69524968, 1.05172348, -0.252849877, 0.812758088, 0.493294626, 0.309975445, 0.582562625, -0.694268882, -0.422624737, 0.00672781467, 0.524071693, -0.851647615) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
598 | CFrame.new(0.689150453, -1.88461804, -0.0157705098, 0.954536736, -0.174989104, -0.241326213, 0.172367141, 0.984509468, -0.0321044922, 0.243205875, -0.0109517872, 0.969912887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
599 | CFrame.new(-0.536899447, -1.34506011, -0.583059072, 0.99620223, 0.0226762109, 0.0840658173, -0.043412663, 0.966281295, 0.253803402, -0.0754759163, -0.256489068, 0.963595748) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
600 | }, .2, false) | |
601 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3) | |
602 | end | |
603 | for i = 0, 1, 0.05 do | |
604 | swait() | |
605 | RootPart.Velocity = RootPart.CFrame.lookVector * -50 | |
606 | PlayAnimationFromTable({ | |
607 | CFrame.new(-0, -2.09708667, 0.108620644, 1, 0, -0, 0, 0.573575675, -0.819152594, 0, 0.819152594, 0.573575675) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
608 | CFrame.new(0, 1.53697455, -0.422635257, 1, 0, -0, 0, 0.766043842, 0.64278841, -0, -0.64278841, 0.766043842) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
609 | CFrame.new(1.57810855, 0.650130272, 0.33058399, 0.930655897, -0.284022599, -0.230674848, 0.352510452, 0.527023435, 0.773293555, -0.0980618149, -0.800985396, 0.590598404) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
610 | CFrame.new(-1.38994181, 0.87733829, 0.667137444, 0.963715255, 0.08906921, 0.251633942, -0.25866431, 0.0788001418, 0.962747812, 0.0659223944, -0.992903471, 0.0989798903) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
611 | CFrame.new(0.774198592, -1.52057803, -0.607582211, 0.954536974, -0.272207022, -0.121501081, 0.172365844, 0.83655864, -0.520057499, 0.243206039, 0.475471497, 0.845445395) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
612 | CFrame.new(-0.530096769, -1.05517173, -0.660005629, 0.99620223, 0.0226761587, 0.0840661526, -0.0434127897, 0.966280818, 0.253804684, -0.0754762068, -0.256490231, 0.96359539) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
613 | }, .3, false) | |
614 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3) | |
615 | end | |
616 | for i = 0, 1, 0.13 do | |
617 | swait() | |
618 | PlayAnimationFromTable({ | |
619 | CFrame.new(-0, -1.01349139, -0.251608461, 1, 0, 0, 0, 0.707105339, 0.707108378, 0, -0.707108378, 0.707105339) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
620 | CFrame.new(0.0127754211, 1.44207788, 0.0749337673, 1, 0, 0, 0, 0.939691544, -0.342023343, 0, 0.342023343, 0.939691544) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
621 | CFrame.new(1.62296665, 0.191783041, -0.192457974, 0.930656254, -0.329096794, 0.159920022, 0.352511466, 0.923570275, -0.150843769, -0.098055169, 0.196757287, 0.975536823) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
622 | CFrame.new(-0.870643735, 0.71258086, -0.942903101, 0.18127799, -0.372358024, -0.910213113, -0.781424284, 0.507405519, -0.363202393, 0.597088516, 0.777103186, -0.19898814) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
623 | CFrame.new(0.214147568, -1.73508716, -0.0895051956, 0.924306214, 0.282332808, -0.256800473, -0.113861978, 0.846218646, 0.520528436, 0.364271581, -0.451887846, 0.814311981) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
624 | CFrame.new(-0.535767198, -0.599929333, -0.996632636, 0.996202111, 0.0754788443, 0.0434101112, -0.0434126705, 0.862728953, -0.503799856, -0.0754773915, 0.500001788, 0.862729192) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
625 | }, .3, false) | |
626 | end | |
627 | attack = false | |
628 | end | |
629 | ||
630 | --[[Attacks]]-- | |
631 | ||
632 | mouse.Button1Down:connect(function() | |
633 | if attack == false and attacktype == 1 then | |
634 | attackone() | |
635 | end | |
636 | end) | |
637 | ||
638 | mouse.KeyDown:connect(function(k) | |
639 | k = k:lower() | |
640 | if attack == false and k == '' then | |
641 | ||
642 | end | |
643 | end) | |
644 | ||
645 | while true do | |
646 | swait() | |
647 | for i, v in pairs(Character:GetChildren()) do | |
648 | if v:IsA("Part") then | |
649 | v.Material = "SmoothPlastic" | |
650 | elseif v:IsA("Accessory") then | |
651 | v:WaitForChild("Handle").Material = "SmoothPlastic" | |
652 | end | |
653 | end | |
654 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
655 | velocity = RootPart.Velocity.y | |
656 | sine = sine + change | |
657 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
658 | if equipped == true or equipped == false then | |
659 | if RootPart.Velocity.y > 1 and hit == nil then | |
660 | Anim = "Jump" | |
661 | if attack == false then | |
662 | PlayAnimationFromTable({ | |
663 | CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
664 | CFrame.new(0, 1.49221826, -0.044082582, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
665 | CFrame.new(1.66304386, 0.182627335, 0.00782334805, 0.883022726, -0.392632574, 0.257119894, 0.321392894, 0.905103981, 0.2783764, -0.342019886, -0.163176134, 0.925416708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
666 | CFrame.new(-1.66570556, 0.224230319, 0.110721856, 0.903736115, 0.408218145, -0.128915116, -0.34750703, 0.875426054, 0.33595863, 0.25000003, -0.258819014, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
667 | CFrame.new(0.499999166, -1.99999452, 4.76837158e-007, 0.984807849, -5.94328526e-007, -0.173648044, 0.0449439958, 0.965925872, 0.254886925, 0.167730987, -0.258819073, 0.951251388) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
668 | CFrame.new(-0.499999404, -1.51703107, -0.129407585, 0.965925753, 6.6929374e-007, 0.258819193, -0.0669879839, 0.965925813, 0.24999994, -0.24999994, -0.258819163, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
669 | }, .3, false) | |
670 | end | |
671 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
672 | Anim = "Fall" | |
673 | if attack == false then | |
674 | PlayAnimationFromTable({ | |
675 | CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
676 | CFrame.new(0, 1.49221873, -0.0440826714, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
677 | CFrame.new(1.76076102, 0.406842887, 0.0212866664, 0.695482016, -0.670965135, 0.257119834, 0.611573994, 0.74059701, 0.278376371, -0.377202988, -0.0363579579, 0.925416648) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
678 | CFrame.new(-1.68029141, 0.390803367, 0.155905366, 0.70961535, 0.692695498, -0.128914997, -0.625963271, 0.703777075, 0.335958213, 0.323444158, -0.157705069, 0.933012843) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
679 | CFrame.new(0.693307817, -1.96826017, -0.0605875254, 0.986561239, -0.127662987, -0.101976946, 0.137943029, 0.985269904, 0.101069227, 0.0875720233, -0.113777988, 0.989639223) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
680 | CFrame.new(-0.526552737, -1.81498528, -0.152177691, 0.965925574, 0.0449441113, 0.254888207, -0.066988036, 0.994663239, 0.0784704387, -0.250001162, -0.0928710476, 0.963781357) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
681 | }, .3, false) | |
682 | end | |
683 | elseif Torsovelocity < 1 and hit ~= nil then | |
684 | Anim = "Idle" | |
685 | if attack == false then | |
686 | change = 1 | |
687 | PlayAnimationFromTable({ | |
688 | CFrame.new(1.22602091e-006, -0.219458103, 1.46111324e-006, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
689 | CFrame.new(0, 1.49999201, 0, 0.707106233, 0, -0.707107306, 0, 1, 0, 0.707107306, 0, 0.707106233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
690 | CFrame.new(0.571566343, -0.0739164352, -0.639066696, 0.939692855, 0.340718329, -0.0298085809, -0.241844058, 0.600305915, -0.762328327, -0.241844922, 0.723563433, 0.646503866) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
691 | CFrame.new(-0.628383756, -0.12163578, -0.696761668, 0.939692736, -0.342020065, -5.06639481e-007, 0.196173996, 0.538984895, -0.819152653, 0.280166954, 0.769751549, 0.573575616) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
692 | CFrame.new(0.624118924, -1.79798961, 0.0678238794, 0.995454907, -0.0383867361, -0.0871553123, 0.0385330059, 0.999257326, -4.09960694e-006, 0.0870907605, -0.00335427374, 0.996194839) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
693 | CFrame.new(-0.53866595, -1.82180798, 0.00821807235, 0.977763176, 0.0281341001, 0.207816422, -0.0287620034, 0.999586344, -1.4934686e-007, -0.207730502, -0.00597707182, 0.978167892) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
694 | }, .3, false) | |
695 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3) | |
696 | end | |
697 | elseif Torsovelocity > 2 and hit ~= nil then | |
698 | Anim = "Walk" | |
699 | if attack == false then | |
700 | change = 3 | |
701 | PlayAnimationFromTable({ | |
702 | CFrame.new(0, -0.0240751095, -0.146390602, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
703 | CFrame.new(0, 1.49999237, -1.81794167e-006, 1, 0, 0, 0, 0.984807789, -0.173647881, 0, 0.173647881, 0.984807789) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
704 | CFrame.new(0.172261134, 0.427689523, -1.09730911, 0.644483984, 0.748984814, -0.153825179, 0.413525045, -0.510645986, -0.753815472, -0.643146515, 0.422211438, -0.638827145) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
705 | CFrame.new(-1.1922102, 0.363029838, -0.448653877, 0.935289383, -0.110854559, -0.33607316, -0.341521561, -0.531564534, -0.775114357, -0.0927196145, 0.839732468, -0.535025835) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
706 | CFrame.new(.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)), | |
707 | CFrame.new(-.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0)), | |
708 | }, .3, false) | |
709 | FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3) | |
710 | end | |
711 | end | |
712 | end | |
713 | if 0 < #Effects then | |
714 | for e = 1, #Effects do | |
715 | if Effects[e] ~= nil then | |
716 | local Thing = Effects[e] | |
717 | if Thing ~= nil then | |
718 | local Part = Thing[1] | |
719 | local Mode = Thing[2] | |
720 | local Delay = Thing[3] | |
721 | local IncX = Thing[4] | |
722 | local IncY = Thing[5] | |
723 | local IncZ = Thing[6] | |
724 | if Thing[2] == "Shoot" then | |
725 | local Look = Thing[1] | |
726 | local hit, pos = rayCast(Thing[4], Look, 15, Character) | |
727 | local mag = (Thing[4] - pos).magnitude | |
728 | Thing[9] = Thing[9] + 0.5 | |
729 | Thing[5] = Thing[5] + 0.2 | |
730 | Thing[6] = Thing[6] + 0.2 | |
731 | Effects["Cylinder"].Create(BrickColor.new("New Yeller"), CFrame.new((Thing[4] + pos) / 2, pos) * angles(1.57, 0, 0), Thing[9], mag * 5, Thing[9], -0.2, 0, -0.2, 0.1) | |
732 | Thing[4] = Thing[4] + Look * 15 | |
733 | Thing[3] = Thing[3] - 1 | |
734 | if hit ~= nil then | |
735 | Thing[3] = 0 | |
736 | ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new()) | |
737 | ref.Anchored = true | |
738 | ref.CFrame = CFrame.new(pos) | |
739 | Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07) | |
740 | CFuncs["Sound"].Create("", ref, 1, 1.1) | |
741 | game:GetService("Debris"):AddItem(ref, 1) | |
742 | end | |
743 | if Thing[3] <= 0 then | |
744 | table.remove(Effects, e) | |
745 | end | |
746 | end | |
747 | do | |
748 | if Thing[2] == "Shoot2" then | |
749 | local Look = Thing[1] | |
750 | local hit, pos = rayCast(Thing[4], Look, 3, Character) | |
751 | local mag = (Thing[4] - pos).magnitude | |
752 | Thing[9] = Thing[9] + 0.5 | |
753 | Thing[5] = Thing[5] + 0.2 | |
754 | Thing[6] = Thing[6] + 0.2 | |
755 | Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2) | |
756 | Thing[4] = Thing[4] + Look * 3 | |
757 | Thing[3] = Thing[3] + 5 | |
758 | if hit ~= nil then | |
759 | Thing[3] = 0 | |
760 | ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new()) | |
761 | ref.Anchored = true | |
762 | ref.CFrame = CFrame.new(pos) | |
763 | Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01) | |
764 | Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01) | |
765 | Effects["Block"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1) | |
766 | Effects["Wave"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01) | |
767 | CFuncs["Sound"].Create("", ref, 1, .3) | |
768 | CFuncs["Sound"].Create("", ref, 1, .9) | |
769 | CFuncs["Sound"].Create("", ref, 1, .9) | |
770 | local e = Instance.new("Explosion", ref) | |
771 | e.Position = ref.Position | |
772 | e.BlastRadius = 400 | |
773 | e.DestroyJointRadiusPercent = 20 | |
774 | e.Visible = false | |
775 | e.ExplosionType = "CratersAndDebris" | |
776 | game:GetService("Debris"):AddItem(ref, 10) | |
777 | end | |
778 | if Thing[3] <= 0 then | |
779 | table.remove(Effects, e) | |
780 | end | |
781 | end | |
782 | do | |
783 | do | |
784 | if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then | |
785 | if Thing[1].Transparency <= 1 then | |
786 | if Thing[2] == "Block1" then | |
787 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
788 | Mesh = Thing[7] | |
789 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
790 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
791 | else | |
792 | if Thing[2] == "Block2" then | |
793 | Thing[1].CFrame = Thing[1].CFrame | |
794 | Mesh = Thing[7] | |
795 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
796 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
797 | else | |
798 | if Thing[2] == "Block3" then | |
799 | Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9] | |
800 | Mesh = Thing[7] | |
801 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
802 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
803 | else | |
804 | if Thing[2] == "Cylinder" then | |
805 | Mesh = Thing[7] | |
806 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
807 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
808 | else | |
809 | if Thing[2] == "Cylinder2" then | |
810 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0) | |
811 | Mesh = Thing[7] | |
812 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
813 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
814 | else | |
815 | if Thing[2] == "Blood" then | |
816 | Mesh = Thing[7] | |
817 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0) | |
818 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
819 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
820 | else | |
821 | if Thing[2] == "Elec" then | |
822 | Mesh = Thing[10] | |
823 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
824 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
825 | else | |
826 | if Thing[2] == "Disappear" then | |
827 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
828 | end | |
829 | end | |
830 | end | |
831 | end | |
832 | end | |
833 | end | |
834 | end | |
835 | end | |
836 | else | |
837 | Part.Parent = nil | |
838 | table.remove(Effects, e) | |
839 | end | |
840 | end | |
841 | end | |
842 | end | |
843 | end | |
844 | end | |
845 | end | |
846 | end | |
847 | end | |
848 | end | |
849 | ||
850 | local part = game.Players.LocalPlayer.Character | |
851 | local basetemplate = "http://www.roblox.com/asset/?id=" | |
852 | local shirt = 63208006 | |
853 | local pants = 140929022 | |
854 | local h = part:findFirstChild("Shirt") | |
855 | if h ~= nil then | |
856 | h.ShirtTemplate = basetemplate..shirt | |
857 | else | |
858 | local i = Instance.new("Shirt") | |
859 | i.Name = "Shirt" | |
860 | i.ShirtTemplate = basetemplate..shirt | |
861 | i.Parent = part | |
862 | end | |
863 | local p = part:findFirstChild("Pants") | |
864 | if p ~= nil then | |
865 | p.PantsTemplate = basetemplate..pants | |
866 | else | |
867 | local np = Instance.new("Pants") | |
868 | np.PantsTemplate = basetemplate..pants | |
869 | np.Name = "Pants" | |
870 | np.Parent = part | |
871 | end | |
872 | ||
873 | plr = game.Players.LocalPlayer | |
874 | mouse = plr:GetMouse() | |
875 | part = nil | |
876 | bp = nil | |
877 | particles = nil | |
878 | function clerp(a,b,c,d) | |
879 | for i = 0,d,.01 do | |
880 | a.CFrame = CFrame.new(b:lerp(c,i)) | |
881 | wait() | |
882 | end | |
883 | end | |
884 | function slerp(a2,b2,c2,d2) | |
885 | for i2 = 0,d2,.01 do | |
886 | a2.CFrame = CFrame.new(b2:lerp(c2,i2)) | |
887 | wait() | |
888 | end | |
889 | end | |
890 | mouse.KeyDown:connect(function(key) | |
891 | if key == "e" and plr.Character.Parent == workspace then | |
892 | plr.Character.Parent = workspace.Camera | |
893 | plr.Character.Archivable = true | |
894 | Instance.new("ForceField",plr.Character).Visible = false | |
895 | for y,t in pairs(plr.Character:GetChildren()) do | |
896 | if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then | |
897 | t.Transparency = 0 | |
898 | if t.Name == "Head" and t:FindFirstChild("face") then | |
899 | t.face.Transparency = 0 | |
900 | end | |
901 | elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then | |
902 | t.Handle.Transparency = 0 | |
903 | end | |
904 | end | |
905 | elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then | |
906 | plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p) | |
907 | elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then | |
908 | if plr.Character.Torso.Anchored == true then | |
909 | for y,t in pairs(plr.Character:GetChildren()) do | |
910 | if t:IsA("Part") then | |
911 | t.Anchored = false | |
912 | end | |
913 | end | |
914 | else | |
915 | for y,t in pairs(plr.Character:GetChildren()) do | |
916 | if t:IsA("Part") then | |
917 | t.Anchored = true | |
918 | end | |
919 | end | |
920 | end | |
921 | elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then | |
922 | local clone = part:Clone() | |
923 | clone.Parent = workspace | |
924 | clone.Anchored = false | |
925 | clone:ClearAllChildren() | |
926 | clone.CanCollide = true | |
927 | bp.Parent = clone | |
928 | particles.Parent = clone | |
929 | if part.Parent:FindFirstChildOfClass("Humanoid") then | |
930 | part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false | |
931 | end | |
932 | part:Destroy() | |
933 | part = clone | |
934 | elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then | |
935 | plr.Character.Parent = workspace | |
936 | plr.Character.Archivable = false | |
937 | plr.Character:FindFirstChildOfClass("ForceField"):Remove() | |
938 | for y,t in pairs(plr.Character:GetChildren()) do | |
939 | if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then | |
940 | t.Transparency = 0 | |
941 | if t.Name == "Head" and t:FindFirstChild("face") then | |
942 | t.face.Transparency = 0 | |
943 | end | |
944 | elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then | |
945 | t.Handle.Transparency = 0 | |
946 | end | |
947 | end | |
948 | end | |
949 | end) | |
950 | mouse.Button1Down:connect(function() | |
951 | if plr.Character.Parent == workspace.Camera then | |
952 | if mouse ~= nil then | |
953 | if mouse.Target ~= nil then | |
954 | part = mouse.Target | |
955 | bp = Instance.new("BodyPosition",part) | |
956 | bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
957 | bp.Position = part.Position | |
958 | particles = Instance.new("ParticleEmitter",part) | |
959 | particles.Color = ColorSequence.new(Color3.new(0,0,0)) | |
960 | particles.Size = NumberSequence.new(-9) | |
961 | particles.Texture = "rbxassetid://292289455" | |
962 | particles.VelocitySpread = 360 | |
963 | particles.Speed = NumberRange.new(0) | |
964 | particles.RotSpeed = NumberRange.new(0) | |
965 | particles.Rotation = NumberRange.new(0) | |
966 | particles.Rate = 250 | |
967 | particles.Lifetime = NumberRange.new(.2,.4) | |
968 | particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)}) | |
969 | dwn = true | |
970 | end | |
971 | end | |
972 | while dwn == true do | |
973 | wait() | |
974 | bp.Position = mouse.hit.p | |
975 | if part then | |
976 | if part.Parent:FindFirstChildOfClass("Humanoid") then | |
977 | part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true | |
978 | end | |
979 | end | |
980 | end | |
981 | end | |
982 | end) | |
983 | mouse.Button1Up:connect(function() | |
984 | dwn = false | |
985 | if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end | |
986 | if bp then bp:Destroy() end | |
987 | if particles then particles:Destroy() end | |
988 | end) | |
989 | base = Instance.new("ScreenGui",plr.PlayerGui) | |
990 | bbg = Instance.new("BillboardGui",plr.Character.Head) | |
991 | bbg.Size = UDim2.new(0,200,0,50) | |
992 | bbg.StudsOffset = Vector3.new(0,3,0) | |
993 | bbgTl = Instance.new("TextLabel",bbg) | |
994 | bbgTl.BackgroundTransparency = 1 | |
995 | bbgTl.Size = UDim2.new(10,0,1,0) | |
996 | bbgTl.Position = UDim2.new(-4.5,0,0,0) | |
997 | bbgTl.Font = "Code" | |
998 | bbgTl.Text = " " | |
999 | bbgTl.TextSize = 50 | |
1000 | bbgTl.TextStrokeColor3 = Color3.new(1,1,1) | |
1001 | bbgTl.TextColor3 = Color3.new(0,0,0) | |
1002 | bbgTl.TextStrokeTransparency = 0 | |
1003 | bbgTl.TextWrapped = true | |
1004 | plr.Chatted:connect(function(msg) | |
1005 | bbgTl.Text = msg | |
1006 | wait(5) | |
1007 | if bbgTl.Text == msg then | |
1008 | bbgTl.Text = " " | |
1009 | end | |
1010 | end) | |
1011 | touchCounter = 0 | |
1012 | while wait() do | |
1013 | if plr.Character.Parent == workspace.Camera then | |
1014 | local c = plr.Character:Clone() | |
1015 | c:MakeJoints() | |
1016 | for y,t in pairs(c:GetChildren()) do | |
1017 | if t:IsA("Part") then | |
1018 | t.CanCollide = false | |
1019 | t.Anchored = true | |
1020 | t.Transparency = .9 | |
1021 | t.TopSurface = "Smooth" | |
1022 | t.BottomSurface = "Smooth" | |
1023 | t.RightSurface = "Smooth" | |
1024 | t.LeftSurface = "Smooth" | |
1025 | t.FrontSurface = "Smooth" | |
1026 | t.BackSurface = "Smooth" | |
1027 | t.BrickColor = BrickColor.new("Crimson") | |
1028 | if t.Name == "Head" and t:FindFirstChild("face") then | |
1029 | t.face:Remove() | |
1030 | elseif t.Name == "Torso" and t:FindFirstChild("roblox") then | |
1031 | t.roblox:Remove() | |
1032 | elseif t.Name == "HumanoidRootPart" then | |
1033 | t:Remove() | |
1034 | end | |
1035 | else | |
1036 | t:Remove() | |
1037 | end | |
1038 | end | |
1039 | c.Parent = workspace | |
1040 | game.Debris:AddItem(c,.05) | |
1041 | end | |
1042 | end |