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