SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | - | --|| CREATED BY SHACKLUSTER |
2 | + | |
3 | - | --\\====================================================//-- |
3 | + | |
4 | ||
5 | ||
6 | Player = game:GetService("Players").LocalPlayer | |
7 | PlayerGui = Player.PlayerGui | |
8 | Cam = workspace.CurrentCamera | |
9 | Backpack = Player.Backpack | |
10 | Character = Player.Character | |
11 | Humanoid = Character.Humanoid | |
12 | Mouse = Player:GetMouse() | |
13 | RootPart = Character["HumanoidRootPart"] | |
14 | Torso = Character["Torso"] | |
15 | Head = Character["Head"] | |
16 | RightArm = Character["Right Arm"] | |
17 | LeftArm = Character["Left Arm"] | |
18 | RightLeg = Character["Right Leg"] | |
19 | LeftLeg = Character["Left Leg"] | |
20 | RootJoint = RootPart["RootJoint"] | |
21 | Neck = Torso["Neck"] | |
22 | RightShoulder = Torso["Right Shoulder"] | |
23 | LeftShoulder = Torso["Left Shoulder"] | |
24 | RightHip = Torso["Right Hip"] | |
25 | LeftHip = Torso["Left Hip"] | |
26 | ||
27 | IT = Instance.new | |
28 | CF = CFrame.new | |
29 | VT = Vector3.new | |
30 | RAD = math.rad | |
31 | C3 = Color3.new | |
32 | UD2 = UDim2.new | |
33 | BRICKC = BrickColor.new | |
34 | ANGLES = CFrame.Angles | |
35 | EULER = CFrame.fromEulerAnglesXYZ | |
36 | COS = math.cos | |
37 | ACOS = math.acos | |
38 | SIN = math.sin | |
39 | ASIN = math.asin | |
40 | ABS = math.abs | |
41 | MRANDOM = math.random | |
42 | FLOOR = math.floor | |
43 | ||
44 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
45 | local NEWMESH = IT(MESH) | |
46 | if MESH == "SpecialMesh" then | |
47 | NEWMESH.MeshType = MESHTYPE | |
48 | if MESHID ~= "nil" and MESHID ~= "" then | |
49 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
50 | end | |
51 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
52 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
53 | end | |
54 | end | |
55 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
56 | NEWMESH.Scale = SCALE | |
57 | NEWMESH.Parent = PARENT | |
58 | return NEWMESH | |
59 | end | |
60 | ||
61 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
62 | local NEWPART = IT("Part") | |
63 | NEWPART.formFactor = FORMFACTOR | |
64 | NEWPART.Reflectance = REFLECTANCE | |
65 | NEWPART.Transparency = TRANSPARENCY | |
66 | NEWPART.CanCollide = false | |
67 | NEWPART.Locked = true | |
68 | NEWPART.Anchored = true | |
69 | if ANCHOR == false then | |
70 | NEWPART.Anchored = false | |
71 | end | |
72 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
73 | NEWPART.Name = NAME | |
74 | NEWPART.Size = SIZE | |
75 | NEWPART.Position = Torso.Position | |
76 | NEWPART.Material = MATERIAL | |
77 | NEWPART:BreakJoints() | |
78 | NEWPART.Parent = PARENT | |
79 | return NEWPART | |
80 | end | |
81 | ||
82 | --//=================================\\ | |
83 | --|| CUSTOMIZATION | |
84 | --\\=================================// | |
85 | ||
86 | Player_Size = 1 --Size of the player. | |
87 | Animation_Speed = 3 | |
88 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
89 | ||
90 | local Speed = 16 | |
91 | local Effects2 = {} | |
92 | ||
93 | --//=================================\\ | |
94 | --|| END OF CUSTOMIZATION | |
95 | --\\=================================// | |
96 | ||
97 | local function weldBetween(a, b) | |
98 | local weldd = Instance.new("ManualWeld") | |
99 | weldd.Part0 = a | |
100 | weldd.Part1 = b | |
101 | weldd.C0 = CFrame.new() | |
102 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
103 | weldd.Parent = a | |
104 | return weldd | |
105 | end | |
106 | ||
107 | --//=================================\\ | |
108 | --|| USEFUL VALUES | |
109 | --\\=================================// | |
110 | ||
111 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
112 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
113 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
114 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
115 | local CHANGEDEFENSE = 0 | |
116 | local CHANGEDAMAGE = 0 | |
117 | local CHANGEMOVEMENT = 0 | |
118 | local ANIM = "Idle" | |
119 | local ATTACK = false | |
120 | local EQUIPPED = false | |
121 | local HOLD = false | |
122 | local COMBO = 1 | |
123 | local Rooted = false | |
124 | local SINE = 0 | |
125 | local KEYHOLD = false | |
126 | local CHANGE = 2 / Animation_Speed | |
127 | local WALKINGANIM = false | |
128 | local WALK = 0 | |
129 | local VALUE1 = false | |
130 | local VALUE2 = false | |
131 | local ROBLOXIDLEANIMATION = IT("Animation") | |
132 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
133 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
134 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
135 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
136 | WEAPONGUI.Name = "Weapon GUI" | |
137 | local Weapon = IT("Model") | |
138 | Weapon.Name = "Adds" | |
139 | local Effects = IT("Folder", Weapon) | |
140 | Effects.Name = "Effects" | |
141 | local ANIMATOR = Humanoid.Animator | |
142 | local ANIMATE = Character.Animate | |
143 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
144 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
145 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
146 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
147 | local UNANCHOR = true | |
148 | ||
149 | local SKILLTEXTCOLOR = C3(0,0,0) | |
150 | ||
151 | local SONGS = {"251074756","203547439","1260890742","462506896","251999524","1110421128"} | |
152 | local SONGPLAYING = false | |
153 | local SELECTEDSONG = 1 | |
154 | ||
155 | --//=================================\\ | |
156 | --\\=================================// | |
157 | ||
158 | ||
159 | --//=================================\\ | |
160 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
161 | --\\=================================// | |
162 | ||
163 | ArtificialHB = Instance.new("BindableEvent", script) | |
164 | ArtificialHB.Name = "ArtificialHB" | |
165 | ||
166 | script:WaitForChild("ArtificialHB") | |
167 | ||
168 | frame = Frame_Speed | |
169 | tf = 0 | |
170 | allowframeloss = false | |
171 | tossremainder = false | |
172 | lastframe = tick() | |
173 | script.ArtificialHB:Fire() | |
174 | ||
175 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
176 | tf = tf + s | |
177 | if tf >= frame then | |
178 | if allowframeloss then | |
179 | script.ArtificialHB:Fire() | |
180 | lastframe = tick() | |
181 | else | |
182 | for i = 1, math.floor(tf / frame) do | |
183 | script.ArtificialHB:Fire() | |
184 | end | |
185 | lastframe = tick() | |
186 | end | |
187 | if tossremainder then | |
188 | tf = 0 | |
189 | else | |
190 | tf = tf - frame * math.floor(tf / frame) | |
191 | end | |
192 | end | |
193 | end) | |
194 | ||
195 | --//=================================\\ | |
196 | --\\=================================// | |
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | --//=================================\\ | |
203 | --|| SOME FUNCTIONS | |
204 | --\\=================================// | |
205 | ||
206 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
207 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
208 | end | |
209 | ||
210 | function PositiveAngle(NUMBER) | |
211 | if NUMBER >= 0 then | |
212 | NUMBER = 0 | |
213 | end | |
214 | return NUMBER | |
215 | end | |
216 | ||
217 | function NegativeAngle(NUMBER) | |
218 | if NUMBER <= 0 then | |
219 | NUMBER = 0 | |
220 | end | |
221 | return NUMBER | |
222 | end | |
223 | ||
224 | function Swait(NUMBER) | |
225 | if NUMBER == 0 or NUMBER == nil then | |
226 | ArtificialHB.Event:wait() | |
227 | else | |
228 | for i = 1, NUMBER do | |
229 | ArtificialHB.Event:wait() | |
230 | end | |
231 | end | |
232 | end | |
233 | ||
234 | function QuaternionFromCFrame(cf) | |
235 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
236 | local trace = m00 + m11 + m22 | |
237 | if trace > 0 then | |
238 | local s = math.sqrt(1 + trace) | |
239 | local recip = 0.5 / s | |
240 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
241 | else | |
242 | local i = 0 | |
243 | if m11 > m00 then | |
244 | i = 1 | |
245 | end | |
246 | if m22 > (i == 0 and m00 or m11) then | |
247 | i = 2 | |
248 | end | |
249 | if i == 0 then | |
250 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
251 | local recip = 0.5 / s | |
252 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
253 | elseif i == 1 then | |
254 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
255 | local recip = 0.5 / s | |
256 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
257 | elseif i == 2 then | |
258 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
259 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
260 | end | |
261 | end | |
262 | end | |
263 | ||
264 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
265 | local xs, ys, zs = x + x, y + y, z + z | |
266 | local wx, wy, wz = w * xs, w * ys, w * zs | |
267 | local xx = x * xs | |
268 | local xy = x * ys | |
269 | local xz = x * zs | |
270 | local yy = y * ys | |
271 | local yz = y * zs | |
272 | local zz = z * zs | |
273 | 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)) | |
274 | end | |
275 | ||
276 | function QuaternionSlerp(a, b, t) | |
277 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
278 | local startInterp, finishInterp; | |
279 | if cosTheta >= 0.0001 then | |
280 | if (1 - cosTheta) > 0.0001 then | |
281 | local theta = ACOS(cosTheta) | |
282 | local invSinTheta = 1 / SIN(theta) | |
283 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
284 | finishInterp = SIN(t * theta) * invSinTheta | |
285 | else | |
286 | startInterp = 1 - t | |
287 | finishInterp = t | |
288 | end | |
289 | else | |
290 | if (1 + cosTheta) > 0.0001 then | |
291 | local theta = ACOS(-cosTheta) | |
292 | local invSinTheta = 1 / SIN(theta) | |
293 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
294 | finishInterp = SIN(t * theta) * invSinTheta | |
295 | else | |
296 | startInterp = t - 1 | |
297 | finishInterp = t | |
298 | end | |
299 | end | |
300 | 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 | |
301 | end | |
302 | ||
303 | function Clerp(a, b, t) | |
304 | local qa = {QuaternionFromCFrame(a)} | |
305 | local qb = {QuaternionFromCFrame(b)} | |
306 | local ax, ay, az = a.x, a.y, a.z | |
307 | local bx, by, bz = b.x, b.y, b.z | |
308 | local _t = 1 - t | |
309 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
310 | end | |
311 | ||
312 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
313 | local frame = IT("Frame") | |
314 | frame.BackgroundTransparency = TRANSPARENCY | |
315 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
316 | frame.Position = POSITION | |
317 | frame.Size = SIZE | |
318 | frame.BackgroundColor3 = COLOR | |
319 | frame.BorderColor3 = BORDERCOLOR | |
320 | frame.Name = NAME | |
321 | frame.Parent = PARENT | |
322 | return frame | |
323 | end | |
324 | ||
325 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
326 | local label = IT("TextLabel") | |
327 | label.BackgroundTransparency = 1 | |
328 | label.Size = UD2(1, 0, 1, 0) | |
329 | label.Position = UD2(0, 0, 0, 0) | |
330 | label.TextColor3 = TEXTCOLOR | |
331 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
332 | label.TextTransparency = TRANSPARENCY | |
333 | label.FontSize = TEXTFONTSIZE | |
334 | label.Font = TEXTFONT | |
335 | label.BorderSizePixel = BORDERSIZEPIXEL | |
336 | label.TextScaled = false | |
337 | label.Text = TEXT | |
338 | label.Name = NAME | |
339 | label.Parent = PARENT | |
340 | return label | |
341 | end | |
342 | ||
343 | function NoOutlines(PART) | |
344 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
345 | end | |
346 | ||
347 | ||
348 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
349 | local NEWWELD = IT(TYPE) | |
350 | NEWWELD.Part0 = PART0 | |
351 | NEWWELD.Part1 = PART1 | |
352 | NEWWELD.C0 = C0 | |
353 | NEWWELD.C1 = C1 | |
354 | NEWWELD.Parent = PARENT | |
355 | return NEWWELD | |
356 | end | |
357 | ||
358 | function CreateSound(ID, PARENT, VOLUME, PITCH, DEBRISTIME) | |
359 | local NEWSOUND = nil | |
360 | coroutine.resume(coroutine.create(function() | |
361 | NEWSOUND = IT("Sound", PARENT) | |
362 | NEWSOUND.Volume = VOLUME | |
363 | NEWSOUND.Pitch = PITCH | |
364 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
365 | Swait() | |
366 | NEWSOUND:play() | |
367 | NEWSOUND.Name = "Audio" | |
368 | if DEBRISTIME ~= nil then | |
369 | game:GetService("Debris"):AddItem(NEWSOUND, DEBRISTIME) | |
370 | end | |
371 | end)) | |
372 | return NEWSOUND | |
373 | end | |
374 | ||
375 | function CFrameFromTopBack(at, top, back) | |
376 | local right = top:Cross(back) | |
377 | 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) | |
378 | end | |
379 | ||
380 | function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW) | |
381 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true) | |
382 | local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0)) | |
383 | wave.CFrame = CFRAME | |
384 | coroutine.resume(coroutine.create(function(PART) | |
385 | for i = 1, WAIT do | |
386 | Swait() | |
387 | mesh.Scale = mesh.Scale + GROW | |
388 | wave.Transparency = wave.Transparency + (1/WAIT) | |
389 | if wave.Transparency > 0.99 then | |
390 | wave:remove() | |
391 | end | |
392 | end | |
393 | end)) | |
394 | end | |
395 | ||
396 | function MagicBlock(SIZE,WAIT,CFRAME,COLOR,GROW) | |
397 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(SIZE,SIZE,SIZE), true) | |
398 | local mesh = IT("BlockMesh",wave) | |
399 | wave.CFrame = CFRAME | |
400 | coroutine.resume(coroutine.create(function(PART) | |
401 | for i = 1, WAIT do | |
402 | Swait() | |
403 | mesh.Scale = mesh.Scale + GROW | |
404 | wave.CFrame = CFRAME * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360))) | |
405 | wave.Transparency = wave.Transparency + (1/WAIT) | |
406 | if wave.Transparency > 0.99 then | |
407 | wave:remove() | |
408 | end | |
409 | end | |
410 | end)) | |
411 | end | |
412 | ||
413 | function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW) | |
414 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true) | |
415 | local mesh = nil | |
416 | if KIND == "Base" then | |
417 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0)) | |
418 | elseif KIND == "Thin" then | |
419 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
420 | elseif KIND == "Round" then | |
421 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
422 | end | |
423 | wave.CFrame = CFRAME | |
424 | coroutine.resume(coroutine.create(function(PART) | |
425 | for i = 1, WAIT do | |
426 | Swait() | |
427 | mesh.Scale = mesh.Scale + GROW/10 | |
428 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
429 | if wave.Transparency > 0.99 then | |
430 | wave:remove() | |
431 | end | |
432 | end | |
433 | end)) | |
434 | end | |
435 | ||
436 | function MakeForm(PART,TYPE) | |
437 | if TYPE == "Cyl" then | |
438 | local MSH = IT("CylinderMesh",PART) | |
439 | elseif TYPE == "Ball" then | |
440 | local MSH = IT("SpecialMesh",PART) | |
441 | MSH.MeshType = "Sphere" | |
442 | elseif TYPE == "Wedge" then | |
443 | local MSH = IT("SpecialMesh",PART) | |
444 | MSH.MeshType = "Wedge" | |
445 | end | |
446 | end | |
447 | ||
448 | function CheckTableForString(Table, String) | |
449 | for i, v in pairs(Table) do | |
450 | if string.find(string.lower(String), string.lower(v)) then | |
451 | return true | |
452 | end | |
453 | end | |
454 | return false | |
455 | end | |
456 | ||
457 | function CheckIntangible(Hit) | |
458 | local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"} | |
459 | if Hit and Hit.Parent then | |
460 | if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then | |
461 | return true | |
462 | end | |
463 | end | |
464 | return false | |
465 | end | |
466 | ||
467 | Debris = game:GetService("Debris") | |
468 | ||
469 | function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit) | |
470 | local Direction = CFrame.new(StartPos, Vec).lookVector | |
471 | local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore}) | |
472 | local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore) | |
473 | if RayHit and CheckIntangible(RayHit) then | |
474 | if DelayIfHit then | |
475 | wait() | |
476 | end | |
477 | RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit) | |
478 | end | |
479 | return RayHit, RayPos, RayNormal | |
480 | end | |
481 | ||
482 | function turnto(position) | |
483 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
484 | end | |
485 | ||
486 | --//=================================\\ | |
487 | --|| WEAPON CREATION | |
488 | --\\=================================// | |
489 | ||
490 | ||
491 | for _, c in pairs(Weapon:GetChildren()) do | |
492 | if c.ClassName == "Part" then | |
493 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
494 | end | |
495 | end | |
496 | ||
497 | local Radio = CreatePart(3, Weapon, "Marble", 0, 0, "Pearl", "RAD-io", VT(1.01,0.2,1.01),false) | |
498 | CreateWeldOrSnapOrMotor("Weld", Radio, Torso, Radio, CF(0, 0, 1) * ANGLES(RAD(0), RAD(180), RAD(45)), CF(0, 0, 0)) | |
499 | local RADIOMESH = CreateMesh("SpecialMesh", Radio, "FileMesh", "212302951", "212303049", VT(10,10,10), VT(0,0,0)) | |
500 | ||
501 | Weapon.Parent = Character | |
502 | ||
503 | Humanoid.Died:connect(function() | |
504 | ATTACK = true | |
505 | end) | |
506 | ||
507 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1 , 2, UD2(0.10, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
508 | local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.60, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
509 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
510 | local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
511 | ||
512 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] sitt", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 1") | |
513 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] most worrying indeed", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 2") | |
514 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Toggle Radio", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 3") | |
515 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Select Song", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 4") | |
516 | ||
517 | local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
518 | local INFOTEXT = CreateLabel(INFOFRAME, "Say 'AddSong:ID' to add a song to the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA") | |
519 | ||
520 | local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.1, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame") | |
521 | local INFOTEXT = CreateLabel(INFOFRAME, "Say 'RemoveSong:Number' to remove a song from the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA") | |
522 | ||
523 | ||
524 | --//=================================\\ | |
525 | --|| ATTACK FUNCTIONS AND STUFF | |
526 | --\\=================================// | |
527 | ||
528 | function onChatted(msg) | |
529 | if msg:sub(1,8) == "AddSong:" then | |
530 | local ID = msg:sub(9) | |
531 | table.insert(SONGS,ID) | |
532 | SELECTEDSONG = #SONGS | |
533 | end | |
534 | if msg:sub(1,11) == "RemoveSong:" then | |
535 | local ID = msg:sub(12) | |
536 | if ID <= #SONGS then | |
537 | table.remove(SONGS,ID) | |
538 | end | |
539 | end | |
540 | end | |
541 | Player.Chatted:connect(onChatted) | |
542 | function sitt() | |
543 | local SITT = CreateSound("1395818498", Torso, 10, 1, 30) | |
544 | ATTACK = true | |
545 | repeat Swait() until SITT.TimePosition > 18.5 | |
546 | VALUE1 = true | |
547 | ATTACK = false | |
548 | end | |
549 | ||
550 | function mostworryingindeed() | |
551 | ATTACK = true | |
552 | VALUE2 = true | |
553 | CreateSound("1112042117", Torso, 10, 1, 6) | |
554 | for i = 1, 35 do | |
555 | Swait() | |
556 | RightArm.Transparency = RightArm.Transparency + 1/35 | |
557 | LeftArm.Transparency = LeftArm.Transparency + 1/35 | |
558 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
559 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
560 | end | |
561 | for i = 1, 150 do | |
562 | Swait() | |
563 | RightArm.Transparency = RightArm.Transparency - 1/100 | |
564 | LeftArm.Transparency = LeftArm.Transparency - 1/100 | |
565 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.2, 1, -0.1) * ANGLES(RAD(155), RAD(-25), RAD(-12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
566 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2, 1, -0.1) * ANGLES(RAD(155), RAD(25), RAD(12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
567 | end | |
568 | RightArm.Transparency = 0 | |
569 | LeftArm.Transparency = 0 | |
570 | local SITT = CreateSound("1395854043", Torso, 10, 1, 6) | |
571 | Swait(2) | |
572 | repeat Swait() until SITT.Playing == false | |
573 | VALUE2 = false | |
574 | ATTACK = false | |
575 | end | |
576 | ||
577 | --//=================================\\ | |
578 | --|| ASSIGN THINGS TO KEYS | |
579 | --\\=================================// | |
580 | ||
581 | function MouseDown(Mouse) | |
582 | if ATTACK == false then | |
583 | end | |
584 | end | |
585 | ||
586 | function MouseUp(Mouse) | |
587 | HOLD = false | |
588 | end | |
589 | ||
590 | function KeyDown(Key) | |
591 | KEYHOLD = true | |
592 | if Key == "z" and ATTACK == false then | |
593 | if VALUE1 == false then | |
594 | sitt() | |
595 | else | |
596 | VALUE1 = false | |
597 | end | |
598 | end | |
599 | ||
600 | if Key == "b" and ATTACK == false then | |
601 | mostworryingindeed() | |
602 | end | |
603 | ||
604 | if Key == "c" and ATTACK == false then | |
605 | if SONGPLAYING == false then | |
606 | SONGPLAYING = true | |
607 | local SONG = CreateSound(SONGS[SELECTEDSONG], Radio, 1, 1, nil) | |
608 | SONG.Looped = true | |
609 | else | |
610 | if Radio:FindFirstChild("Audio") then | |
611 | Radio.Audio:remove() | |
612 | end | |
613 | SONGPLAYING = false | |
614 | end | |
615 | end | |
616 | ||
617 | if Key == "v" and ATTACK == false then | |
618 | SELECTEDSONG = SELECTEDSONG + 1 | |
619 | end | |
620 | end | |
621 | ||
622 | function KeyUp(Key) | |
623 | KEYHOLD = false | |
624 | end | |
625 | ||
626 | Mouse.Button1Down:connect(function(NEWKEY) | |
627 | MouseDown(NEWKEY) | |
628 | end) | |
629 | Mouse.Button1Up:connect(function(NEWKEY) | |
630 | MouseUp(NEWKEY) | |
631 | end) | |
632 | Mouse.KeyDown:connect(function(NEWKEY) | |
633 | KeyDown(NEWKEY) | |
634 | end) | |
635 | Mouse.KeyUp:connect(function(NEWKEY) | |
636 | KeyUp(NEWKEY) | |
637 | end) | |
638 | ||
639 | --//=================================\\ | |
640 | --\\=================================// | |
641 | ||
642 | ||
643 | function unanchor() | |
644 | if UNANCHOR == true then | |
645 | g = Character:GetChildren() | |
646 | for i = 1, #g do | |
647 | if g[i].ClassName == "Part" then | |
648 | g[i].Anchored = false | |
649 | end | |
650 | end | |
651 | end | |
652 | end | |
653 | ||
654 | ||
655 | --//=================================\\ | |
656 | --|| WRAP THE WHOLE SCRIPT UP | |
657 | --\\=================================// | |
658 | ||
659 | Humanoid.Changed:connect(function(Jump) | |
660 | if Jump == "Jump" and (Disable_Jump == true) then | |
661 | Humanoid.Jump = false | |
662 | end | |
663 | end) | |
664 | ||
665 | while true do | |
666 | Swait() | |
667 | ANIMATE.Parent = nil | |
668 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
669 | IDLEANIMATION:Play() | |
670 | SINE = SINE + CHANGE | |
671 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
672 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
673 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
674 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
675 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
676 | if VALUE1 == false then | |
677 | if VALUE2 == false then | |
678 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
679 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
680 | end | |
681 | HipHeight = 3 | |
682 | Rooted = false | |
683 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.35 * COS(SINE / 42)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
684 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
685 | RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
686 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
687 | else | |
688 | if VALUE2 == false then | |
689 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
690 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
691 | end | |
692 | Rooted = true | |
693 | HipHeight = 0 | |
694 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1.5) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
695 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed) | |
696 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
697 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1/ Animation_Speed) | |
698 | end | |
699 | unanchor() | |
700 | Humanoid.MaxHealth = "inf" | |
701 | Humanoid.Health = "inf" | |
702 | if Rooted == false then | |
703 | Disable_Jump = false | |
704 | Humanoid.WalkSpeed = Speed | |
705 | elseif Rooted == true then | |
706 | Disable_Jump = true | |
707 | Humanoid.WalkSpeed = 0 | |
708 | end | |
709 | if SELECTEDSONG > #SONGS then | |
710 | SELECTEDSONG = 1 | |
711 | end | |
712 | if SONGPLAYING == true then | |
713 | local SONG = Radio:FindFirstChild("Audio") | |
714 | if SONG ~= nil then | |
715 | SONG.Playing = true | |
716 | if SONG.SoundId ~= "rbxassetid://"..SONGS[SELECTEDSONG] then | |
717 | SONG.SoundId = "rbxassetid://"..SONGS[SELECTEDSONG] | |
718 | SONG:Play() | |
719 | end | |
720 | RADIOMESH.Scale = VT(3,3,3)+(VT(1,1,1)*SONG.PlaybackLoudness/100) | |
721 | end | |
722 | else | |
723 | RADIOMESH.Scale = VT(3,3,3) | |
724 | end | |
725 | end | |
726 | ||
727 | --//=================================\\ | |
728 | --\\=================================// | |
729 | ||
730 | ||
731 | ||
732 | ||
733 | ||
734 | --//====================================================\\-- | |
735 | --|| END OF SCRIPT | |
736 | --\\====================================================//-- |