SHOW:
|
|
- or go back to the newest paste.
1 | --//====================================================\\-- | |
2 | --|| CREATED BY SHACKLUSTER | |
3 | --\\====================================================//-- | |
4 | ||
5 | ||
6 | ||
7 | wait(1) | |
8 | ||
9 | ||
10 | ||
11 | Player = game:GetService("Players").LocalPlayer | |
12 | PlayerGui = Player.PlayerGui | |
13 | Cam = workspace.CurrentCamera | |
14 | Backpack = Player.Backpack | |
15 | Character = Player.Character | |
16 | Humanoid = Character.Humanoid | |
17 | Mouse = Player:GetMouse() | |
18 | RootPart = Character["HumanoidRootPart"] | |
19 | - | Torso = Character["Torso"] |
19 | + | |
20 | - | Head = Character["Head"] |
20 | + | sick.SoundId = "rbxassetid://676779397" |
21 | - | RightArm = Character["Right Arm"] |
21 | + | |
22 | - | LeftArm = Character["Left Arm"] |
22 | + | |
23 | - | RightLeg = Character["Right Leg"] |
23 | + | |
24 | - | LeftLeg = Character["Left Leg"] |
24 | + | |
25 | - | RootJoint = RootPart["RootJoint"] |
25 | + | |
26 | - | Neck = Torso["Neck"] |
26 | + | |
27 | - | RightShoulder = Torso["Right Shoulder"] |
27 | + | |
28 | - | LeftShoulder = Torso["Left Shoulder"] |
28 | + | |
29 | - | RightHip = Torso["Right Hip"] |
29 | + | |
30 | - | LeftHip = Torso["Left Hip"] |
30 | + | |
31 | tor.MeshId = "2574099999" | |
32 | - | sick.SoundId = "rbxassetid://187429740" |
32 | + | tor.OverlayTextureId = "2574100022" |
33 | local tor = Instance.new("SpecialMesh") | |
34 | tor.Scale = Vector3.new(10,10,10) | |
35 | ||
36 | local naeeym2 = Instance.new("BillboardGui",Character) | |
37 | naeeym2.AlwaysOnTop = true | |
38 | naeeym2.Size = UDim2.new(5,35,2,35) | |
39 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
40 | naeeym2.Adornee = Character.Head | |
41 | naeeym2.Name = "Name" | |
42 | --naeeym2.PlayerToHideFrom = Player | |
43 | - | tor.MeshId = "36780113" |
43 | + | |
44 | - | tor.OverlayTextureId = "494636944" |
44 | + | |
45 | tecks2.BackgroundTransparency = 1 | |
46 | tecks2.TextScaled = true | |
47 | tecks2.BorderSizePixel = 0 | |
48 | tecks2.Text = "Booger man" | |
49 | - | tor.BodyPart = "LeftLeg" |
49 | + | |
50 | - | tor.MeshId = "36780079" |
50 | + | |
51 | - | tor.OverlayTextureId = "494636944" |
51 | + | |
52 | tecks2.TextColor3 = Color3.new(0,0,0) | |
53 | tecks2.TextStrokeColor3 = Color3.new(0,0,1) | |
54 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
55 | tecks2.Parent = naeeym2 | |
56 | - | tor.BodyPart = "RightLeg" |
56 | + | |
57 | - | tor.MeshId = "36780195" |
57 | + | |
58 | - | tor.OverlayTextureId = "494636944" |
58 | + | |
59 | VT = Vector3.new | |
60 | RAD = math.rad | |
61 | C3 = Color3.new | |
62 | UD2 = UDim2.new | |
63 | - | tor.BodyPart = "RightArm" |
63 | + | |
64 | - | tor.MeshId = "36780156" |
64 | + | |
65 | - | tor.OverlayTextureId = "494636944" |
65 | + | |
66 | COS = math.cos | |
67 | ACOS = math.acos | |
68 | SIN = math.sin | |
69 | ASIN = math.asin | |
70 | - | tor.BodyPart = "LeftArm" |
70 | + | |
71 | - | tor.MeshId = "36780032" |
71 | + | |
72 | - | tor.OverlayTextureId = "494636944" |
72 | + | |
73 | ||
74 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
75 | - | tor.Scale = Vector3.new(1,1,1) |
75 | + | |
76 | - | tor.MeshType = "FileMesh" |
76 | + | |
77 | - | tor.MeshId = "http://www.roblox.com/asset/?id=181343290" |
77 | + | |
78 | - | tor.TextureId = "rbxassetid://494637850" |
78 | + | |
79 | - | tor.Parent = Head |
79 | + | |
80 | end | |
81 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
82 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
83 | end | |
84 | end | |
85 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
86 | NEWMESH.Scale = SCALE | |
87 | NEWMESH.Parent = PARENT | |
88 | return NEWMESH | |
89 | end | |
90 | ||
91 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
92 | local NEWPART = IT("Part") | |
93 | - | tecks2.Text = "Skelly Da Dank Spooky Skeleton" |
93 | + | |
94 | NEWPART.Reflectance = REFLECTANCE | |
95 | NEWPART.Transparency = TRANSPARENCY | |
96 | NEWPART.CanCollide = false | |
97 | NEWPART.Locked = true | |
98 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
99 | NEWPART.Name = NAME | |
100 | NEWPART.Size = SIZE | |
101 | NEWPART.Position = Torso.Position | |
102 | NEWPART.Material = MATERIAL | |
103 | NEWPART:BreakJoints() | |
104 | NEWPART.Parent = PARENT | |
105 | return NEWPART | |
106 | end | |
107 | ||
108 | ||
109 | --//=================================\\ | |
110 | --|| CUSTOMIZATION | |
111 | --\\=================================// | |
112 | ||
113 | Class_Name = "Template" | |
114 | Weapon_Name = "Add-ons" | |
115 | ||
116 | Custom_Colors = { | |
117 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon. | |
118 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon. | |
119 | ||
120 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities. | |
121 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar. | |
122 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar. | |
123 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar. | |
124 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar. | |
125 | ||
126 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar. | |
127 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar. | |
128 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar. | |
129 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar. | |
130 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities. | |
131 | } | |
132 | ||
133 | ||
134 | Player_Size = 0.8 --Size of the player. | |
135 | Animation_Speed = 3 | |
136 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
137 | ||
138 | local Speed = 16 | |
139 | local Effects2 = {} | |
140 | ||
141 | --//=================================\\ | |
142 | --|| END OF CUSTOMIZATION | |
143 | --\\=================================// | |
144 | ||
145 | local function weldBetween(a, b) | |
146 | local weldd = Instance.new("ManualWeld") | |
147 | weldd.Part0 = a | |
148 | weldd.Part1 = b | |
149 | weldd.C0 = CFrame.new() | |
150 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
151 | weldd.Parent = a | |
152 | return weldd | |
153 | end | |
154 | ||
155 | function createaccessory(attachmentpart,mesh,texture,scale,offset,color) | |
156 | local acs = Instance.new("Part") | |
157 | acs.CanCollide = false | |
158 | acs.Anchored = false | |
159 | acs.Size = Vector3.new(0,0,0) | |
160 | acs.CFrame = attachmentpart.CFrame | |
161 | acs.Parent = Character | |
162 | acs.BrickColor = color | |
163 | local meshs = Instance.new("SpecialMesh") | |
164 | meshs.MeshId = mesh | |
165 | meshs.TextureId = texture | |
166 | meshs.Parent = acs | |
167 | meshs.Scale = scale | |
168 | meshs.Offset = offset | |
169 | weldBetween(attachmentpart,acs) | |
170 | end | |
171 | ||
172 | function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE) | |
173 | if TYPE == "Gem" then | |
174 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
175 | acs.Anchored = false | |
176 | acs.CanCollide = false | |
177 | acs.CFrame = PART.CFrame | |
178 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET) | |
179 | - | Player_Size = 1 --Size of the player. |
179 | + | |
180 | elseif TYPE == "Skull" then | |
181 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
182 | acs.Anchored = false | |
183 | acs.CanCollide = false | |
184 | acs.CFrame = PART.CFrame | |
185 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET) | |
186 | weldBetween(PART,acs) | |
187 | elseif TYPE == "Eye" then | |
188 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
189 | acs.Anchored = false | |
190 | acs.CanCollide = false | |
191 | acs.CFrame = PART.CFrame | |
192 | local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET) | |
193 | weldBetween(PART,acs) | |
194 | end | |
195 | end | |
196 | ||
197 | createaccessory(Head,"http://www.roblox.com/asset/?id=18755442","",VT(1,1,1),VT(0,0,-0.1),BrickColor.new("Really black")) | |
198 | createbodypart("Eye","Pearl",Head,VT(0.2, 0.1, -0.5),VT(2,4,2)) | |
199 | createbodypart("Eye","Pearl",Head,VT(-0.2, 0.1, -0.5),VT(2,4,2)) | |
200 | createaccessory(Torso,"rbxassetid://984742986","rbxassetid://984743351",VT(0.52,0.52,0.52),VT(0,0.5,0.02),BrickColor.new("Really black")) | |
201 | ||
202 | --//=================================\\ | |
203 | --|| USEFUL VALUES | |
204 | --\\=================================// | |
205 | ||
206 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
207 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
208 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
209 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
210 | local CO1 = 0 | |
211 | local CO2 = 0 | |
212 | local CO3 = 0 | |
213 | local CO4 = 0 | |
214 | local CHANGEDEFENSE = 0 | |
215 | local CHANGEDAMAGE = 0 | |
216 | local CHANGEMOVEMENT = 0 | |
217 | local ANIM = "Idle" | |
218 | local ATTACK = false | |
219 | local EQUIPPED = false | |
220 | local HOLD = false | |
221 | local COMBO = 1 | |
222 | local LASTPOINT = nil | |
223 | local BLCF = nil | |
224 | local SCFR = nil | |
225 | local STAGGERHITANIM = false | |
226 | local STAGGERANIM = false | |
227 | local STUNANIM = false | |
228 | local CRITCHANCENUMBER = 0 | |
229 | local IDLENUMBER = 0 | |
230 | local DONUMBER = 0 | |
231 | local HANDIDLE = false | |
232 | local SINE = 0 | |
233 | local CHANGE = 2 / Animation_Speed | |
234 | local WALKINGANIM = false | |
235 | local WALK = 0 | |
236 | local DISABLEJUMPING = false | |
237 | local HASBEENBLOCKED = false | |
238 | local STUNDELAYNUMBER = 0 | |
239 | local MANADELAYNUMBER = 0 | |
240 | local SECONDARYMANADELAYNUMBER = 0 | |
241 | local ROBLOXIDLEANIMATION = IT("Animation") | |
242 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
243 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
244 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
245 | local WEAPONGUI = IT("ScreenGui", nil) | |
246 | WEAPONGUI.Name = "Weapon GUI" | |
247 | local WEAPONTOOL = IT("HopperBin", nil) | |
248 | WEAPONTOOL.Name = Weapon_Name | |
249 | local Weapon = IT("Model") | |
250 | Weapon.Name = Weapon_Name | |
251 | local Effects = IT("Folder", Weapon) | |
252 | Effects.Name = "Effects" | |
253 | local ANIMATOR = Humanoid.Animator | |
254 | local ANIMATE = Character.Animate | |
255 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
256 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
257 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
258 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
259 | local UNANCHOR = true | |
260 | local MAGICPARTICLE = "655109389" | |
261 | ||
262 | --//=================================\\ | |
263 | --\\=================================// | |
264 | ||
265 | --//=================================\\ | |
266 | --|| STATS | |
267 | --\\=================================// | |
268 | ||
269 | if Character:FindFirstChild("Stats") ~= nil then | |
270 | Character:FindFirstChild("Stats").Parent = nil | |
271 | end | |
272 | ||
273 | local Stats = IT("Folder", nil) | |
274 | Stats.Name = "Stats" | |
275 | local ChangeStat = IT("Folder", Stats) | |
276 | ChangeStat.Name = "ChangeStat" | |
277 | local Defense = IT("NumberValue", Stats) | |
278 | Defense.Name = "Defense" | |
279 | Defense.Value = 1 | |
280 | local Movement = IT("NumberValue", Stats) | |
281 | Movement.Name = "Movement" | |
282 | Movement.Value = 1 | |
283 | local Damage = IT("NumberValue", Stats) | |
284 | Damage.Name = "Damage" | |
285 | Damage.Value = 1 | |
286 | local Mana = IT("NumberValue", Stats) | |
287 | Mana.Name = "Mana" | |
288 | Mana.Value = 0 | |
289 | local SecondaryMana = IT("NumberValue", Stats) | |
290 | SecondaryMana.Name = "SecondaryMana" | |
291 | SecondaryMana.Value = 0 | |
292 | local CanCrit = IT("BoolValue", Stats) | |
293 | CanCrit.Name = "CanCrit" | |
294 | CanCrit.Value = false | |
295 | local CritChance = IT("NumberValue", Stats) | |
296 | CritChance.Name = "CritChance" | |
297 | CritChance.Value = 20 | |
298 | local CanPenetrateArmor = IT("BoolValue", Stats) | |
299 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
300 | CanPenetrateArmor.Value = false | |
301 | local AntiTeamKill = IT("BoolValue", Stats) | |
302 | AntiTeamKill.Name = "AntiTeamKill" | |
303 | AntiTeamKill.Value = false | |
304 | local Rooted = IT("BoolValue", Stats) | |
305 | Rooted.Name = "Rooted" | |
306 | Rooted.Value = false | |
307 | local Block = IT("BoolValue", Stats) | |
308 | Block.Name = "Block" | |
309 | Block.Value = false | |
310 | local RecentEnemy = IT("ObjectValue", Stats) | |
311 | RecentEnemy.Name = "RecentEnemy" | |
312 | RecentEnemy.Value = nil | |
313 | local StaggerHit = IT("BoolValue", Stats) | |
314 | StaggerHit.Name = "StaggerHit" | |
315 | StaggerHit.Value = false | |
316 | local Stagger = IT("BoolValue", Stats) | |
317 | Stagger.Name = "Stagger" | |
318 | Stagger.Value = false | |
319 | local Stun = IT("BoolValue", Stats) | |
320 | Stun.Name = "Stun" | |
321 | Stun.Value = false | |
322 | local StunValue = IT("NumberValue", Stats) | |
323 | StunValue.Name = "StunValue" | |
324 | StunValue.Value = 0 | |
325 | ||
326 | ||
327 | --//=================================\\ | |
328 | --\\=================================// | |
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | --//=================================\\ | |
335 | --|| DEBUFFS / BUFFS | |
336 | --\\=================================// | |
337 | ||
338 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat) | |
339 | DEFENSECHANGE1.Name = "ChangeDefense" | |
340 | DEFENSECHANGE1.Value = 0 | |
341 | ||
342 | local MOVEMENTCHANGE1 = IT("NumberValue", nil) | |
343 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
344 | MOVEMENTCHANGE1.Value = 0 | |
345 | ||
346 | --//=================================\\ | |
347 | --\\=================================// | |
348 | ||
349 | ||
350 | ||
351 | ||
352 | ||
353 | --//=================================\\ | |
354 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
355 | --\\=================================// | |
356 | ||
357 | ArtificialHB = Instance.new("BindableEvent", script) | |
358 | ArtificialHB.Name = "ArtificialHB" | |
359 | ||
360 | script:WaitForChild("ArtificialHB") | |
361 | ||
362 | frame = Frame_Speed | |
363 | tf = 0 | |
364 | allowframeloss = false | |
365 | tossremainder = false | |
366 | lastframe = tick() | |
367 | script.ArtificialHB:Fire() | |
368 | ||
369 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
370 | tf = tf + s | |
371 | if tf >= frame then | |
372 | if allowframeloss then | |
373 | script.ArtificialHB:Fire() | |
374 | lastframe = tick() | |
375 | else | |
376 | for i = 1, math.floor(tf / frame) do | |
377 | script.ArtificialHB:Fire() | |
378 | end | |
379 | lastframe = tick() | |
380 | end | |
381 | if tossremainder then | |
382 | tf = 0 | |
383 | else | |
384 | tf = tf - frame * math.floor(tf / frame) | |
385 | end | |
386 | end | |
387 | end) | |
388 | ||
389 | --//=================================\\ | |
390 | --\\=================================// | |
391 | ||
392 | ||
393 | ||
394 | ||
395 | ||
396 | --//=================================\\ | |
397 | --|| SOME FUNCTIONS | |
398 | --\\=================================// | |
399 | ||
400 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
401 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
402 | end | |
403 | ||
404 | function PositiveAngle(NUMBER) | |
405 | if NUMBER >= 0 then | |
406 | NUMBER = 0 | |
407 | end | |
408 | return NUMBER | |
409 | end | |
410 | ||
411 | function NegativeAngle(NUMBER) | |
412 | if NUMBER <= 0 then | |
413 | NUMBER = 0 | |
414 | end | |
415 | return NUMBER | |
416 | end | |
417 | ||
418 | function Swait(NUMBER) | |
419 | if NUMBER == 0 or NUMBER == nil then | |
420 | ArtificialHB.Event:wait() | |
421 | else | |
422 | for i = 1, NUMBER do | |
423 | ArtificialHB.Event:wait() | |
424 | end | |
425 | end | |
426 | end | |
427 | ||
428 | function QuaternionFromCFrame(cf) | |
429 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
430 | local trace = m00 + m11 + m22 | |
431 | if trace > 0 then | |
432 | local s = math.sqrt(1 + trace) | |
433 | local recip = 0.5 / s | |
434 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
435 | else | |
436 | local i = 0 | |
437 | if m11 > m00 then | |
438 | i = 1 | |
439 | end | |
440 | if m22 > (i == 0 and m00 or m11) then | |
441 | i = 2 | |
442 | end | |
443 | if i == 0 then | |
444 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
445 | local recip = 0.5 / s | |
446 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
447 | elseif i == 1 then | |
448 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
449 | local recip = 0.5 / s | |
450 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
451 | elseif i == 2 then | |
452 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
453 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
454 | end | |
455 | end | |
456 | end | |
457 | ||
458 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
459 | local xs, ys, zs = x + x, y + y, z + z | |
460 | local wx, wy, wz = w * xs, w * ys, w * zs | |
461 | local xx = x * xs | |
462 | local xy = x * ys | |
463 | local xz = x * zs | |
464 | local yy = y * ys | |
465 | local yz = y * zs | |
466 | local zz = z * zs | |
467 | 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)) | |
468 | end | |
469 | ||
470 | function QuaternionSlerp(a, b, t) | |
471 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
472 | local startInterp, finishInterp; | |
473 | if cosTheta >= 0.0001 then | |
474 | if (1 - cosTheta) > 0.0001 then | |
475 | local theta = ACOS(cosTheta) | |
476 | local invSinTheta = 1 / SIN(theta) | |
477 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
478 | finishInterp = SIN(t * theta) * invSinTheta | |
479 | else | |
480 | startInterp = 1 - t | |
481 | finishInterp = t | |
482 | end | |
483 | else | |
484 | if (1 + cosTheta) > 0.0001 then | |
485 | local theta = ACOS(-cosTheta) | |
486 | local invSinTheta = 1 / SIN(theta) | |
487 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
488 | finishInterp = SIN(t * theta) * invSinTheta | |
489 | else | |
490 | startInterp = t - 1 | |
491 | finishInterp = t | |
492 | end | |
493 | end | |
494 | 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 | |
495 | end | |
496 | ||
497 | function Clerp(a, b, t) | |
498 | local qa = {QuaternionFromCFrame(a)} | |
499 | local qb = {QuaternionFromCFrame(b)} | |
500 | local ax, ay, az = a.x, a.y, a.z | |
501 | local bx, by, bz = b.x, b.y, b.z | |
502 | local _t = 1 - t | |
503 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
504 | end | |
505 | ||
506 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
507 | local frame = IT("Frame") | |
508 | frame.BackgroundTransparency = TRANSPARENCY | |
509 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
510 | frame.Position = POSITION | |
511 | frame.Size = SIZE | |
512 | frame.BackgroundColor3 = COLOR | |
513 | frame.BorderColor3 = BORDERCOLOR | |
514 | frame.Name = NAME | |
515 | frame.Parent = PARENT | |
516 | return frame | |
517 | end | |
518 | ||
519 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
520 | local label = IT("TextLabel") | |
521 | label.BackgroundTransparency = 1 | |
522 | label.Size = UD2(1, 0, 1, 0) | |
523 | label.Position = UD2(0, 0, 0, 0) | |
524 | label.TextColor3 = C3(255, 255, 255) | |
525 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
526 | label.TextTransparency = TRANSPARENCY | |
527 | label.FontSize = TEXTFONTSIZE | |
528 | label.Font = TEXTFONT | |
529 | label.BorderSizePixel = BORDERSIZEPIXEL | |
530 | label.TextScaled = true | |
531 | label.Text = TEXT | |
532 | label.Name = NAME | |
533 | label.Parent = PARENT | |
534 | return label | |
535 | end | |
536 | ||
537 | function NoOutlines(PART) | |
538 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
539 | end | |
540 | ||
541 | ||
542 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
543 | local NEWWELD = IT(TYPE) | |
544 | NEWWELD.Part0 = PART0 | |
545 | NEWWELD.Part1 = PART1 | |
546 | NEWWELD.C0 = C0 | |
547 | NEWWELD.C1 = C1 | |
548 | NEWWELD.Parent = PARENT | |
549 | return NEWWELD | |
550 | end | |
551 | ||
552 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
553 | local NEWSOUND = nil | |
554 | coroutine.resume(coroutine.create(function() | |
555 | NEWSOUND = IT("Sound", PARENT) | |
556 | NEWSOUND.Volume = VOLUME | |
557 | NEWSOUND.Pitch = PITCH | |
558 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
559 | Swait() | |
560 | NEWSOUND:play() | |
561 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
562 | end)) | |
563 | return NEWSOUND | |
564 | end | |
565 | ||
566 | function CFrameFromTopBack(at, top, back) | |
567 | local right = top:Cross(back) | |
568 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
569 | end | |
570 | ||
571 | function CreateWave(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
572 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
573 | local mesh = IT("SpecialMesh",wave) | |
574 | mesh.MeshType = "FileMesh" | |
575 | mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
576 | mesh.Scale = VT(size,size,size) | |
577 | mesh.Offset = VT(0,0,-size/8) | |
578 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
579 | coroutine.resume(coroutine.create(function(PART) | |
580 | for i = 1, waitt do | |
581 | Swait() | |
582 | mesh.Scale = mesh.Scale + VT(size/5,0,size/5) | |
583 | mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
584 | if doesrotate == true then | |
585 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
586 | end | |
587 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
588 | if wave.Transparency > 0.99 then | |
589 | wave:remove() | |
590 | end | |
591 | end | |
592 | end)) | |
593 | end | |
594 | ||
595 | function CreateSwirl(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
596 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
597 | local mesh = IT("SpecialMesh",wave) | |
598 | mesh.MeshType = "FileMesh" | |
599 | mesh.MeshId = "http://www.roblox.com/asset/?id=1051557" | |
600 | mesh.Scale = VT(size,size,size) | |
601 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
602 | coroutine.resume(coroutine.create(function(PART) | |
603 | for i = 1, waitt do | |
604 | Swait() | |
605 | mesh.Scale = mesh.Scale + VT(size/5,0,size/5) | |
606 | if doesrotate == true then | |
607 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
608 | end | |
609 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
610 | if wave.Transparency > 0.99 then | |
611 | wave:remove() | |
612 | end | |
613 | end | |
614 | end)) | |
615 | end | |
616 | ||
617 | function CreateTornado(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
618 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
619 | local mesh = IT("SpecialMesh",wave) | |
620 | mesh.MeshType = "FileMesh" | |
621 | mesh.MeshId = "http://www.roblox.com/asset/?id=102638417" | |
622 | mesh.Scale = VT(size,size,size) | |
623 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
624 | coroutine.resume(coroutine.create(function(PART) | |
625 | for i = 1, waitt do | |
626 | Swait() | |
627 | mesh.Scale = mesh.Scale + VT(size/5,0,size/5) | |
628 | if doesrotate == true then | |
629 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
630 | end | |
631 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
632 | if wave.Transparency > 0.99 then | |
633 | wave:remove() | |
634 | end | |
635 | end | |
636 | end)) | |
637 | end | |
638 | ||
639 | function CreateRing(inair,size,doesrotate,rotatedirection,waitt,part,offset,spin1,spin2,color) | |
640 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
641 | local mesh = IT("SpecialMesh",wave) | |
642 | mesh.MeshType = "FileMesh" | |
643 | mesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
644 | mesh.Scale = VT(size,size,size) | |
645 | mesh.Offset = VT(0,0,0) | |
646 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
647 | coroutine.resume(coroutine.create(function(PART) | |
648 | for i = 1, waitt do | |
649 | Swait() | |
650 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
651 | if doesrotate == true then | |
652 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(spin2, rotatedirection, spin1) | |
653 | end | |
654 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
655 | if wave.Transparency > 0.99 then | |
656 | wave:remove() | |
657 | end | |
658 | end | |
659 | end)) | |
660 | end | |
661 | ||
662 | function MagicSphere(size,waitt,part,offset,color) | |
663 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(0,0,0)) | |
664 | local mesh = IT("SpecialMesh",wave) | |
665 | mesh.MeshType = "FileMesh" | |
666 | mesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
667 | mesh.Scale = VT(size,size,size) | |
668 | mesh.Offset = VT(0,0,0) | |
669 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(0),RAD(0),RAD(0)) | |
670 | coroutine.resume(coroutine.create(function(PART) | |
671 | for i = 1, waitt do | |
672 | Swait() | |
673 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
674 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
675 | if wave.Transparency > 0.99 then | |
676 | wave:remove() | |
677 | end | |
678 | end | |
679 | end)) | |
680 | end | |
681 | ||
682 | function MagicBlock(size,waitt,part,offset,color) | |
683 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(size,size,size)) | |
684 | local mesh = IT("BlockMesh",wave) | |
685 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(0),RAD(0),RAD(0)) | |
686 | coroutine.resume(coroutine.create(function(PART) | |
687 | for i = 1, waitt do | |
688 | Swait() | |
689 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
690 | wave.CFrame = CF(wave.Position) * ANGLES(RAD(math(-360,360)),RAD(math(-360,360)),RAD(math(-360,360))) | |
691 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
692 | if wave.Transparency > 0.99 then | |
693 | wave:remove() | |
694 | end | |
695 | end | |
696 | end)) | |
697 | end | |
698 | ||
699 | local EyeSizes={ | |
700 | NumberSequenceKeypoint.new(0,1,0), | |
701 | NumberSequenceKeypoint.new(1,0.2,0) | |
702 | } | |
703 | local EyeTrans={ | |
704 | NumberSequenceKeypoint.new(0,0.8,0), | |
705 | NumberSequenceKeypoint.new(1,1,0) | |
706 | } | |
707 | local PE=Instance.new("ParticleEmitter") | |
708 | PE.LightEmission=0 | |
709 | PE.Size=NumberSequence.new(EyeSizes) | |
710 | PE.Transparency=NumberSequence.new(EyeTrans) | |
711 | PE.Lifetime=NumberRange.new(0.35,0.35,0.35) | |
712 | PE.Rotation=NumberRange.new(0,360) | |
713 | PE.Rate=15 | |
714 | PE.Acceleration = Vector3.new(0,75,0) | |
715 | PE.Drag = 5 | |
716 | PE.Enabled = false | |
717 | PE.Speed = NumberRange.new(0,0,0) | |
718 | PE.Texture="http://www.roblox.com/asset/?id=1179557490" | |
719 | PE.ZOffset = 0 | |
720 | PE.Name = "Particles" | |
721 | ||
722 | function CreateParticles(art,text,accel,drag,rate,type,isenabledbydefault) | |
723 | local particle = PE:Clone() | |
724 | particle.Parent = art | |
725 | particle.Acceleration = accel | |
726 | PE.Rate = rate | |
727 | if type == "Fire" then | |
728 | local EyeSizes={ | |
729 | NumberSequenceKeypoint.new(0,1,0.3), | |
730 | NumberSequenceKeypoint.new(1,0.2,0.2) | |
731 | } | |
732 | PE.Size = NumberSequence.new(EyeSizes) | |
733 | elseif type == "Smoke" then | |
734 | local EyeSizes={ | |
735 | NumberSequenceKeypoint.new(0,1,0), | |
736 | NumberSequenceKeypoint.new(1,5,0.5) | |
737 | } | |
738 | PE.Size = NumberSequence.new(EyeSizes) | |
739 | elseif type == "Solid" then | |
740 | local EyeSizes={ | |
741 | NumberSequenceKeypoint.new(0,1,0), | |
742 | NumberSequenceKeypoint.new(1,1,0) | |
743 | } | |
744 | PE.Size = NumberSequence.new(EyeSizes) | |
745 | end | |
746 | PE.Drag = drag | |
747 | particle.Texture = "http://www.roblox.com/asset/?id="..text | |
748 | particle.Enabled = isenabledbydefault | |
749 | return particle | |
750 | end | |
751 | ||
752 | --//=================================\\ | |
753 | --\\=================================// | |
754 | ||
755 | ||
756 | --//=================================\\ | |
757 | --|| WEAPON CREATION | |
758 | --\\=================================// | |
759 | ||
760 | if Player_Size ~= 1 then | |
761 | for _, v in pairs (Weapon:GetChildren()) do | |
762 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
763 | local p1 = v.Part1 | |
764 | v.Part1 = nil | |
765 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
766 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
767 | v.Part1 = p1 | |
768 | elseif v.ClassName == "Part" then | |
769 | for _, b in pairs (v:GetChildren()) do | |
770 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
771 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
772 | end | |
773 | end | |
774 | end | |
775 | end | |
776 | end | |
777 | ||
778 | for _, c in pairs(Weapon:GetChildren()) do | |
779 | if c.ClassName == "Part" then | |
780 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
781 | end | |
782 | end | |
783 | ||
784 | Weapon.Parent = Character | |
785 | ||
786 | Humanoid.Died:connect(function() | |
787 | sick:remove() | |
788 | tecks2.Text = "BRUH WTF" | |
789 | ATTACK = true | |
790 | end) | |
791 | ||
792 | print(Class_Name.." loaded.") | |
793 | ||
794 | --//=================================\\ | |
795 | --\\=================================// | |
796 | ||
797 | ||
798 | ||
799 | ||
800 | ||
801 | --//=================================\\ | |
802 | --|| DAMAGE FUNCTIONS | |
803 | --\\=================================// | |
804 | ||
805 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
806 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
807 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
808 | local BODYGYRO = IT("BodyGyro", STATPART) | |
809 | local BODYPOSITION = IT("BodyPosition", STATPART) | |
810 | BODYPOSITION.P = 2000 | |
811 | BODYPOSITION.D = 100 | |
812 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
813 | if LABELTYPE == "Normal" then | |
814 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
815 | elseif LABELTYPE == "Debuff" then | |
816 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2)) | |
817 | elseif LABELTYPE == "Interruption" then | |
818 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2)) | |
819 | end | |
820 | game:GetService("Debris"):AddItem(STATPART ,5) | |
821 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
822 | BILLBOARDGUI.Adornee = STATPART | |
823 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
824 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
825 | BILLBOARDGUI.AlwaysOnTop = false | |
826 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
827 | TEXTLABEL.BackgroundTransparency = 1 | |
828 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
829 | TEXTLABEL.Text = TEXT | |
830 | TEXTLABEL.Font = "SciFi" | |
831 | TEXTLABEL.FontSize="Size42" | |
832 | TEXTLABEL.TextColor3 = COLOR | |
833 | TEXTLABEL.TextStrokeTransparency = 1 | |
834 | TEXTLABEL.TextScaled = true | |
835 | TEXTLABEL.TextWrapped = true | |
836 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
837 | wait(0.2) | |
838 | for i=1, 5 do | |
839 | wait() | |
840 | THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0) | |
841 | end | |
842 | wait(1.2) | |
843 | for i=1, 5 do | |
844 | wait() | |
845 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
846 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
847 | THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0) | |
848 | end | |
849 | THEPART.Parent = nil | |
850 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
851 | end | |
852 | ||
853 | ||
854 | --//=================================\\ | |
855 | --|| DAMAGING | |
856 | --\\=================================// | |
857 | ||
858 | function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier) | |
859 | if hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then | |
860 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
861 | local dmg = math.random(min,max) | |
862 | if humanoid.Health > 0 then | |
863 | if beserk == true then | |
864 | humanoid.Health = 0 | |
865 | else | |
866 | CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10) | |
867 | hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength | |
868 | if math.random(1,100) < critrate+1 then | |
869 | humanoid.Health = humanoid.Health - dmg*critmultiplier | |
870 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
871 | else | |
872 | humanoid.Health = humanoid.Health - dmg | |
873 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
874 | end | |
875 | local defence = Instance.new("BoolValue",hit.Parent) | |
876 | defence.Name = ("HitBy"..Player.Name) | |
877 | game:GetService("Debris"):AddItem(defence, 0.5) | |
878 | end | |
879 | end | |
880 | end | |
881 | end | |
882 | ||
883 | function AoEDamage(position,radius,min,max,maxstrength,beserk,critrate,critmultiplier,CanBeDodgedByJumping) | |
884 | local dmg = math.random(min,max) | |
885 | for i,v in ipairs(workspace:GetChildren()) do | |
886 | if v:FindFirstChild("HitBy"..Player.Name) == nil then | |
887 | local body = v:GetChildren() | |
888 | for part = 1, #body do | |
889 | if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
890 | if(body[part].Position - position).Magnitude < radius then | |
891 | if v.ClassName == "Model" then | |
892 | if v:FindFirstChild("Humanoid") then | |
893 | if v.Humanoid.Health ~= 0 then | |
894 | if CanBeDodgedByJumping == true then | |
895 | if body[part].Position.Y < position.Y+5 then | |
896 | if math.random(1,100) < critrate+1 then | |
897 | v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier | |
898 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
899 | else | |
900 | v.Humanoid.Health = v.Humanoid.Health - dmg | |
901 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
902 | end | |
903 | local defence = Instance.new("BoolValue",v) | |
904 | defence.Name = ("HitBy"..Player.Name) | |
905 | game:GetService("Debris"):AddItem(defence, 0.5) | |
906 | end | |
907 | else | |
908 | if beserk == true then | |
909 | v.Humanoid.Health = 0 | |
910 | end | |
911 | if math.random(1,100) < critrate+1 then | |
912 | v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier | |
913 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
914 | else | |
915 | v.Humanoid.Health = v.Humanoid.Health - dmg | |
916 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
917 | end | |
918 | local defence = Instance.new("BoolValue",v) | |
919 | defence.Name = ("HitBy"..Player.Name) | |
920 | game:GetService("Debris"):AddItem(defence, 0.5) | |
921 | end | |
922 | end | |
923 | end | |
924 | end | |
925 | body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength | |
926 | end | |
927 | end | |
928 | end | |
929 | if v.ClassName == "Part" then | |
930 | if v.Anchored == false and (v.Position - position).Magnitude < radius then | |
931 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
932 | end | |
933 | end | |
934 | end | |
935 | end | |
936 | end | |
937 | ||
938 | function killnearest(position,range,maxstrength) | |
939 | for i,v in ipairs(workspace:GetChildren()) do | |
940 | local body = v:GetChildren() | |
941 | for part = 1, #body do | |
942 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
943 | if(body[part].Position - position).Magnitude < range then | |
944 | if v.ClassName == "Model" then | |
945 | v:BreakJoints() | |
946 | end | |
947 | --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2}) | |
948 | body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength | |
949 | end | |
950 | end | |
951 | end | |
952 | if v.ClassName == "Part" then | |
953 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
954 | --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2}) | |
955 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
956 | end | |
957 | end | |
958 | end | |
959 | end | |
960 | ||
961 | --//=================================\\ | |
962 | --|| ATTACK FUNCTIONS AND STUFF | |
963 | --\\=================================// | |
964 | ||
965 | function makebone() | |
966 | local bone = IT("Part",Effects) | |
967 | bone.Size = VT(2,2,2) | |
968 | local mesh = IT("SpecialMesh",bone) | |
969 | mesh.MeshId = "rbxassetid://523610338" | |
970 | mesh.Scale = VT(0.02,0.02,0.02) | |
971 | return bone | |
972 | end | |
973 | ||
974 | function rattlebones() | |
975 | ATTACK = true | |
976 | tecks2.Text = "Finna imma rattle ur bones" | |
977 | for i = 1, 15 do | |
978 | local bone = makebone() | |
979 | bone.CFrame = RootPart.CFrame * ANGLES(RAD(math.random(-5,5)),RAD(math.random(-10,10)),RAD(math.random(-30,30))) | |
980 | local bv = Instance.new("BodyVelocity") | |
981 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
982 | bv.velocity = bone.CFrame.lookVector * MRANDOM(50,150) | |
983 | bv.Parent = bone | |
984 | bv.Name = "DASH" | |
985 | bone.CanCollide = false | |
986 | local paw = bone.Touched:Connect(function(hit) | |
987 | dealdamage(hit,35,45,5,false,7,5) | |
988 | end) | |
989 | game:GetService("Debris"):AddItem(bone, 3) | |
990 | Swait() | |
991 | end | |
992 | Swait(20) | |
993 | tecks2.Text = "Bone-Thugga" | |
994 | ATTACK = false | |
995 | end | |
996 | ||
997 | function risingbones() | |
998 | ATTACK = true | |
999 | tecks2.Text = "Finna imma rattle u so hard" | |
1000 | for i = 1, 50 do | |
1001 | for i = 1, 5 do | |
1002 | local bone = makebone() | |
1003 | bone.Anchored = true | |
1004 | bone.CanCollide = false | |
1005 | bone.CFrame = RootPart.CFrame * CF(math.random(-25,25),-6,math.random(-25,25)) * ANGLES(RAD(-135),RAD(0),RAD(math.random(-10,10))) | |
1006 | local paw = bone.Touched:Connect(function(hit) | |
1007 | dealdamage(hit,35,45,5,false,7,5) | |
1008 | end) | |
1009 | coroutine.resume(coroutine.create(function() | |
1010 | for i = 1, 10 do | |
1011 | bone.CFrame = bone.CFrame * CF(0,0,0.5) | |
1012 | Swait() | |
1013 | end | |
1014 | for i = 1, 10 do | |
1015 | bone.Transparency = bone.Transparency + 0.1 | |
1016 | Swait() | |
1017 | end | |
1018 | bone:remove() | |
1019 | end)) | |
1020 | end | |
1021 | Swait() | |
1022 | end | |
1023 | Swait(20) | |
1024 | tecks2.Text = "Bone-Thugga" | |
1025 | ATTACK = false | |
1026 | end | |
1027 | ||
1028 | --//=================================\\ | |
1029 | --|| ASSIGN THINGS TO KEYS | |
1030 | --\\=================================// | |
1031 | ||
1032 | function MouseDown(Mouse) | |
1033 | if ATTACK == false then | |
1034 | end | |
1035 | end | |
1036 | ||
1037 | function MouseUp(Mouse) | |
1038 | HOLD = false | |
1039 | end | |
1040 | ||
1041 | function KeyDown(Key) | |
1042 | if Key == "e" and ATTACK == false then | |
1043 | rattlebones() | |
1044 | end | |
1045 | if Key == "r" and ATTACK == false then | |
1046 | risingbones() | |
1047 | end | |
1048 | end | |
1049 | ||
1050 | function KeyUp(Key) | |
1051 | end | |
1052 | ||
1053 | Mouse.Button1Down:connect(function(NEWKEY) | |
1054 | MouseDown(NEWKEY) | |
1055 | end) | |
1056 | Mouse.Button1Up:connect(function(NEWKEY) | |
1057 | MouseUp(NEWKEY) | |
1058 | end) | |
1059 | Mouse.KeyDown:connect(function(NEWKEY) | |
1060 | KeyDown(NEWKEY) | |
1061 | end) | |
1062 | Mouse.KeyUp:connect(function(NEWKEY) | |
1063 | KeyUp(NEWKEY) | |
1064 | end) | |
1065 | ||
1066 | --//=================================\\ | |
1067 | --\\=================================// | |
1068 | ||
1069 | ||
1070 | function unanchor() | |
1071 | if UNANCHOR == true then | |
1072 | g = Character:GetChildren() | |
1073 | for i = 1, #g do | |
1074 | if g[i].ClassName == "Part" then | |
1075 | g[i].Anchored = false | |
1076 | end | |
1077 | end | |
1078 | end | |
1079 | end | |
1080 | ||
1081 | ||
1082 | --//=================================\\ | |
1083 | --|| WRAP THE WHOLE SCRIPT UP | |
1084 | --\\=================================// | |
1085 | ||
1086 | while true do | |
1087 | Swait() | |
1088 | ||
1089 | if #Effects2>0 then | |
1090 | for e=1,#Effects2 do | |
1091 | if Effects2[e]~=nil then | |
1092 | local Thing=Effects2[e] | |
1093 | if Thing~=nil then | |
1094 | local Part=Thing[1] | |
1095 | local Mode=Thing[2] | |
1096 | local Delay=Thing[3] | |
1097 | local IncX=Thing[4] | |
1098 | local IncY=Thing[5] | |
1099 | local IncZ=Thing[6] | |
1100 | local Part2=Thing[8] | |
1101 | if Thing[1].Transparency<=1 then | |
1102 | if Thing[2]=="Block1" then | |
1103 | Thing[1].CFrame=Thing[1].CFrame | |
1104 | Mesh=Thing[1].Mesh | |
1105 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1106 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1107 | elseif Thing[2]=="Cylinder" then | |
1108 | Mesh=Thing[1].Mesh | |
1109 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1110 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1111 | elseif Thing[2]=="Blood" then | |
1112 | Mesh=Thing[7] | |
1113 | Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0) | |
1114 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1115 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1116 | elseif Thing[2]=="Elec" then | |
1117 | Mesh=Thing[1].Mesh | |
1118 | Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9]) | |
1119 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1120 | elseif Thing[2]=="Disappear" then | |
1121 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1122 | end | |
1123 | else | |
1124 | Part.Parent=nil | |
1125 | table.remove(Effects2,e) | |
1126 | end | |
1127 | end | |
1128 | end | |
1129 | end | |
1130 | end | |
1131 | Humanoid.DisplayDistanceType = "None" | |
1132 | unanchor() | |
1133 | Humanoid.MaxHealth = "inf" | |
1134 | Humanoid.Health = "inf" | |
1135 | Humanoid.WalkSpeed = 26 | |
1136 | q = Character:GetChildren() | |
1137 | for u = 1, #q do | |
1138 | if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then | |
1139 | q[u]:remove() | |
1140 | elseif q[u].ClassName == "Shirt" and q[u].Name ~= "ChaniacClothes1" then | |
1141 | q[u]:Destroy() | |
1142 | elseif q[u].ClassName == "Pants" and q[u].Name ~= "ChaniacClothes2" then | |
1143 | q[u]:Destroy() | |
1144 | elseif q[u].ClassName == "CharacterMesh" and q[u].Name ~= "Bones" then | |
1145 | q[u]:remove() | |
1146 | elseif q[u].ClassName == "ShirtGraphic" then | |
1147 | q[u]:remove() | |
1148 | end | |
1149 | end | |
1150 | end | |
1151 | ||
1152 | --//=================================\\ | |
1153 | --\\=================================// | |
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | ||
1159 | --//====================================================\\-- | |
1160 | --|| END OF SCRIPT | |
1161 | --\\====================================================//-- |