SHOW:
|
|
- or go back to the newest paste.
| 1 | --[[ | |
| 2 | Fenrier's Armor | |
| 3 | ]] | |
| 4 | script.Name="FenArmor" | |
| 5 | --[[b=script:Clone() | |
| 6 | b.Parent=game:GetService("Lighting")
| |
| 7 | c=game:GetService("Lighting"):children()
| |
| 8 | for i=1,#c do | |
| 9 | print(c[i]) | |
| 10 | end]] | |
| 11 | - | person = "PabloRV" |
| 11 | + | person = "alexnegoi" |
| 12 | plyr = game:getService("Players")[person]
| |
| 13 | mode = 1 | |
| 14 | script.Parent = nil | |
| 15 | ||
| 16 | pcall(function() | |
| 17 | script.DSource.Value = "--Failure" | |
| 18 | end) | |
| 19 | ||
| 20 | mod = Instance.new("Model")
| |
| 21 | mod.Parent = plyr.Character | |
| 22 | mod.Name = "BlackAngelSuit" | |
| 23 | ||
| 24 | function updateLooks() | |
| 25 | for i,v in pairs(plyr.Character:getChildren()) do | |
| 26 | if v:IsA("Part") then
| |
| 27 | v.Reflectance = 0.1 | |
| 28 | v.TopSurface = "Smooth" | |
| 29 | v.BottomSurface = "Smooth" | |
| 30 | v.LeftSurface = "Smooth" | |
| 31 | v.RightSurface = "Smooth" | |
| 32 | v.BrickColor = BrickColor.new("Black")
| |
| 33 | elseif v:IsA("Hat") then
| |
| 34 | v:Remove() | |
| 35 | elseif v:IsA("Shirt") then
| |
| 36 | v:Remove() | |
| 37 | elseif v:IsA("Pants") then
| |
| 38 | v:Remove() | |
| 39 | end | |
| 40 | end | |
| 41 | pcall(function() | |
| 42 | plyr.Character.Torso.roblox:Remove() | |
| 43 | plyr.Character["Shirt Graphic"]:Remove() | |
| 44 | end) | |
| 45 | end | |
| 46 | ||
| 47 | pcall(function() | |
| 48 | plyr.Character.Head.face:Remove() | |
| 49 | end) | |
| 50 | ||
| 51 | ---- | |
| 52 | ||
| 53 | w1 = Instance.new("Part")
| |
| 54 | w1.Parent = mod | |
| 55 | w1.CanCollide = false | |
| 56 | w1.Locked = true | |
| 57 | w1.CanCollide = false | |
| 58 | w1.Size = Vector3.new(1, 1, 1) | |
| 59 | w1.formFactor = "Symmetric" | |
| 60 | w1.BrickColor = BrickColor.new("Black")
| |
| 61 | w1.TopSurface = "Smooth" | |
| 62 | w1.BottomSurface = "Smooth" | |
| 63 | ||
| 64 | m = Instance.new("SpecialMesh")
| |
| 65 | m.MeshType = "Brick" | |
| 66 | m.Parent = w1 | |
| 67 | m.Scale = Vector3.new(1, 2, 0.2) | |
| 68 | ||
| 69 | local Weld1 = Instance.new("Weld")
| |
| 70 | Weld1.Parent = w1 | |
| 71 | Weld1.Part0 = w1 | |
| 72 | Weld1.Part1 = plyr.Character.Torso | |
| 73 | Weld1.C0 = CFrame.new(0.7,0.2,-0.6)*CFrame.Angles(0,0,0.4) | |
| 74 | ||
| 75 | ---- | |
| 76 | ||
| 77 | w2 = Instance.new("Part")
| |
| 78 | w2.Parent = mod | |
| 79 | w2.CanCollide = false | |
| 80 | w2.Locked = true | |
| 81 | w2.CanCollide = false | |
| 82 | w2.Size = Vector3.new(1, 1, 1) | |
| 83 | w2.formFactor = "Symmetric" | |
| 84 | w2.BrickColor = BrickColor.new("Black")
| |
| 85 | w2.TopSurface = "Smooth" | |
| 86 | w2.BottomSurface = "Smooth" | |
| 87 | ||
| 88 | m = Instance.new("SpecialMesh")
| |
| 89 | m.MeshType = "Brick" | |
| 90 | m.Parent = w2 | |
| 91 | m.Scale = Vector3.new(1, 2, 0.2) | |
| 92 | ||
| 93 | local Weld = Instance.new("Weld")
| |
| 94 | Weld.Parent = w2 | |
| 95 | Weld.Part0 = w2 | |
| 96 | Weld.Part1 = w1 | |
| 97 | Weld.C0 = CFrame.new(0.2,1.6,0)*CFrame.Angles(0,0,-0.4) | |
| 98 | ||
| 99 | ---- | |
| 100 | ||
| 101 | w21 = Instance.new("Part")
| |
| 102 | w21.Parent = mod | |
| 103 | w21.CanCollide = false | |
| 104 | w21.Locked = true | |
| 105 | w21.CanCollide = false | |
| 106 | w21.Size = Vector3.new(1, 1, 1) | |
| 107 | w21.formFactor = "Symmetric" | |
| 108 | w21.BrickColor = BrickColor.new("Black")
| |
| 109 | w21.TopSurface = "Smooth" | |
| 110 | w21.BottomSurface = "Smooth" | |
| 111 | ||
| 112 | m = Instance.new("SpecialMesh")
| |
| 113 | m.MeshType = "Brick" | |
| 114 | m.Parent = w21 | |
| 115 | m.Scale = Vector3.new(1, 2, 0.2) | |
| 116 | ||
| 117 | local Weld2 = Instance.new("Weld")
| |
| 118 | Weld2.Parent = w21 | |
| 119 | Weld2.Part0 = w21 | |
| 120 | Weld2.Part1 = plyr.Character.Torso | |
| 121 | Weld2.C0 = CFrame.new(-0.7,0.2,-0.6)*CFrame.Angles(0,0,-0.4) | |
| 122 | ||
| 123 | ---- | |
| 124 | ||
| 125 | w22 = Instance.new("Part")
| |
| 126 | w22.Parent = mod | |
| 127 | w22.CanCollide = false | |
| 128 | w22.Locked = true | |
| 129 | w22.CanCollide = false | |
| 130 | w22.Size = Vector3.new(1, 1, 1) | |
| 131 | w22.formFactor = "Symmetric" | |
| 132 | w22.BrickColor = BrickColor.new("Black")
| |
| 133 | w22.TopSurface = "Smooth" | |
| 134 | w22.BottomSurface = "Smooth" | |
| 135 | ||
| 136 | m = Instance.new("SpecialMesh")
| |
| 137 | m.MeshType = "Brick" | |
| 138 | m.Parent = w22 | |
| 139 | m.Scale = Vector3.new(1, 2, 0.2) | |
| 140 | ||
| 141 | local Weld = Instance.new("Weld")
| |
| 142 | Weld.Parent = w22 | |
| 143 | Weld.Part0 = w22 | |
| 144 | Weld.Part1 = w21 | |
| 145 | Weld.C0 = CFrame.new(-0.2,1.6,0)*CFrame.Angles(0,0,0.4) | |
| 146 | ||
| 147 | ---- | |
| 148 | ||
| 149 | e1 = Instance.new("Part")
| |
| 150 | e1.Parent = mod | |
| 151 | e1.CanCollide = false | |
| 152 | e1.Locked = true | |
| 153 | e1.CanCollide = false | |
| 154 | e1.Size = Vector3.new(1, 1, 1) | |
| 155 | e1.formFactor = "Symmetric" | |
| 156 | e1.BrickColor = BrickColor.new("Really red")
| |
| 157 | e1.TopSurface = "Smooth" | |
| 158 | e1.BottomSurface = "Smooth" | |
| 159 | ||
| 160 | m = Instance.new("BlockMesh")
| |
| 161 | m.Parent = e1 | |
| 162 | m.Scale = Vector3.new(0.2, 0.2, 0.2) | |
| 163 | ||
| 164 | local Weld = Instance.new("Weld")
| |
| 165 | Weld.Parent = e1 | |
| 166 | Weld.Part0 = e1 | |
| 167 | Weld.Part1 = plyr.Character.Head | |
| 168 | Weld.C0 = CFrame.new(0.2,-0.2,0.5)*CFrame.Angles(0,0,0.15) | |
| 169 | ||
| 170 | ---- | |
| 171 | ||
| 172 | e2 = Instance.new("Part")
| |
| 173 | e2.Parent = mod | |
| 174 | e2.CanCollide = false | |
| 175 | e2.Locked = true | |
| 176 | e2.CanCollide = false | |
| 177 | e2.Size = Vector3.new(1, 1, 1) | |
| 178 | e2.formFactor = "Symmetric" | |
| 179 | e2.BrickColor = BrickColor.new("Really red")
| |
| 180 | e2.TopSurface = "Smooth" | |
| 181 | e2.BottomSurface = "Smooth" | |
| 182 | ||
| 183 | m = Instance.new("BlockMesh")
| |
| 184 | m.Parent = e2 | |
| 185 | m.Scale = Vector3.new(0.2, 0.2, 0.2) | |
| 186 | ||
| 187 | local Weld = Instance.new("Weld")
| |
| 188 | Weld.Parent = e2 | |
| 189 | Weld.Part0 = e2 | |
| 190 | Weld.Part1 = plyr.Character.Head | |
| 191 | Weld.C0 = CFrame.new(-0.2, -0.2, 0.5)*CFrame.Angles(0,0,-0.15) | |
| 192 | ||
| 193 | ---- | |
| 194 | ||
| 195 | j1 = Instance.new("Part")
| |
| 196 | j1.Parent = mod | |
| 197 | j1.CanCollide = false | |
| 198 | j1.Locked = true | |
| 199 | j1.CanCollide = false | |
| 200 | j1.Size = Vector3.new(1, 1, 1) | |
| 201 | j1.formFactor = "Symmetric" | |
| 202 | j1.BrickColor = BrickColor.new("Really red")
| |
| 203 | j1.TopSurface = "Smooth" | |
| 204 | j1.BottomSurface = "Smooth" | |
| 205 | j1.Transparency = 1 | |
| 206 | ||
| 207 | m = Instance.new("BlockMesh")
| |
| 208 | m.Parent = j1 | |
| 209 | m.Scale = Vector3.new(1.1, 1.1, 1.1) | |
| 210 | ||
| 211 | local Weldj = Instance.new("Weld")
| |
| 212 | Weldj.Parent = j1 | |
| 213 | Weldj.Part0 = j1 | |
| 214 | Weldj.Part1 = plyr.Character.Torso | |
| 215 | Weldj.C0 = CFrame.new(-1.3,-0.6,0)*CFrame.Angles(0,0,0) | |
| 216 | ||
| 217 | ---- | |
| 218 | ||
| 219 | j2 = Instance.new("Part")
| |
| 220 | j2.Parent = mod | |
| 221 | j2.CanCollide = false | |
| 222 | j2.Locked = true | |
| 223 | j2.CanCollide = false | |
| 224 | j2.Size = Vector3.new(1, 1, 1) | |
| 225 | j2.formFactor = "Symmetric" | |
| 226 | j2.BrickColor = BrickColor.new("Really red")
| |
| 227 | j2.TopSurface = "Smooth" | |
| 228 | j2.BottomSurface = "Smooth" | |
| 229 | j2.Transparency = 1 | |
| 230 | ||
| 231 | m = Instance.new("BlockMesh")
| |
| 232 | m.Parent = j2 | |
| 233 | m.Scale = Vector3.new(1.1, 1.1, 1.1) | |
| 234 | ||
| 235 | local Weldj = Instance.new("Weld")
| |
| 236 | Weldj.Parent = j2 | |
| 237 | Weldj.Part0 = j2 | |
| 238 | Weldj.Part1 = plyr.Character.Torso | |
| 239 | Weldj.C0 = CFrame.new(1.3,-0.6,0)*CFrame.Angles(0,0,0) | |
| 240 | ||
| 241 | ||
| 242 | ||
| 243 | plyr.Character["Right Arm"].Transparency = 0 | |
| 244 | plyr.Character["Left Arm"].Transparency = 0 | |
| 245 | ||
| 246 | ||
| 247 | -------------------------------------------------------------- | |
| 248 | ||
| 249 | ||
| 250 | ||
| 251 | rs = plyr.Character.Torso:FindFirstChild("Right Shoulder")
| |
| 252 | ls = plyr.Character.Torso:FindFirstChild("Left Shoulder")
| |
| 253 | ||
| 254 | ||
| 255 | ||
| 256 | hb = Instance.new("HopperBin")
| |
| 257 | hb.Parent = plyr.Backpack | |
| 258 | hb.Name = "Dark Angel" | |
| 259 | ||
| 260 | debounce = false | |
| 261 | debun = false | |
| 262 | ||
| 263 | function Select(mouse) | |
| 264 | ||
| 265 | function onKeyDown(key) | |
| 266 | key:lower() | |
| 267 | if string.byte(key) == 113 then | |
| 268 | mode = 1 | |
| 269 | print("Mode: Explosion")
| |
| 270 | elseif string.byte(key) == 101 then | |
| 271 | mode = 2 | |
| 272 | print("Mode: Teleport")
| |
| 273 | elseif string.byte(key) == 114 then | |
| 274 | mode = 3 | |
| 275 | print("Mode: GodMode")
| |
| 276 | elseif string.byte(key) == 102 then | |
| 277 | mode = 4 | |
| 278 | print("Mode: Firebolt")
| |
| 279 | elseif string.byte(key) == 116 then | |
| 280 | mode = 5 | |
| 281 | print("Mode: LAZERZ")
| |
| 282 | end | |
| 283 | end | |
| 284 | mouse.KeyDown:connect(onKeyDown) | |
| 285 | ||
| 286 | function onButton1Down(click) | |
| 287 | if debounce == false then | |
| 288 | ||
| 289 | --Explosion Mode-------------------------- | |
| 290 | ||
| 291 | if mode == 1 then | |
| 292 | debounce = true | |
| 293 | rs.Parent = nil | |
| 294 | Weldrs = Instance.new("Weld")
| |
| 295 | Weldrs.Parent = plyr.Character["Right Arm"] | |
| 296 | Weldrs.Part0 = plyr.Character["Right Arm"] | |
| 297 | Weldrs.Part1 = j1 | |
| 298 | Weldrs.Name = "Weldrs" | |
| 299 | Weldrs.C0 = CFrame.new(-0.2,0.6,0)*CFrame.Angles(0,0,0) | |
| 300 | for i = 1,15 do | |
| 301 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0, 0, 0.15) | |
| 302 | wait() | |
| 303 | end | |
| 304 | ||
| 305 | ||
| 306 | print("1")
| |
| 307 | ||
| 308 | f1 = Instance.new("Part")
| |
| 309 | f1.Parent = mod | |
| 310 | f1.CanCollide = false | |
| 311 | f1.Locked = true | |
| 312 | f1.CanCollide = false | |
| 313 | f1.Size = Vector3.new(1, 1, 1) | |
| 314 | f1.formFactor = "Symmetric" | |
| 315 | f1.BrickColor = BrickColor.new("Bright red")
| |
| 316 | f1.TopSurface = "Smooth" | |
| 317 | f1.BottomSurface = "Smooth" | |
| 318 | f1.Transparency = 0.6 | |
| 319 | ||
| 320 | m1 = Instance.new("SpecialMesh")
| |
| 321 | m1.MeshType = "Sphere" | |
| 322 | m1.Parent = f1 | |
| 323 | m1.Scale = Vector3.new(0, 0, 0) | |
| 324 | ||
| 325 | local Weld = Instance.new("Weld")
| |
| 326 | Weld.Parent = f1 | |
| 327 | Weld.Part0 = f1 | |
| 328 | Weld.Part1 = plyr.Character["Right Arm"] | |
| 329 | Weld.C0 = CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0) | |
| 330 | ||
| 331 | f2 = Instance.new("Part")
| |
| 332 | f2.Parent = mod | |
| 333 | f2.CanCollide = false | |
| 334 | f2.Locked = true | |
| 335 | f2.CanCollide = false | |
| 336 | f2.Size = Vector3.new(1, 1, 1) | |
| 337 | f2.formFactor = "Symmetric" | |
| 338 | f2.BrickColor = BrickColor.new("Bright red")
| |
| 339 | f2.TopSurface = "Smooth" | |
| 340 | f2.BottomSurface = "Smooth" | |
| 341 | f2.Transparency = 0 | |
| 342 | ||
| 343 | m2 = Instance.new("SpecialMesh")
| |
| 344 | m2.MeshType = "Sphere" | |
| 345 | m2.Parent = f2 | |
| 346 | m2.Scale = Vector3.new(0, 0, 0) | |
| 347 | ||
| 348 | local Weld = Instance.new("Weld")
| |
| 349 | Weld.Parent = f2 | |
| 350 | Weld.Part0 = f2 | |
| 351 | Weld.Part1 = f1 | |
| 352 | Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) | |
| 353 | ||
| 354 | for i = 1,10 do | |
| 355 | m1.Scale = m1.Scale + Vector3.new(0.1,0.1,0.1) | |
| 356 | wait() | |
| 357 | end | |
| 358 | wait() | |
| 359 | for i = 1,5 do | |
| 360 | for q = 1,10 do | |
| 361 | m2.Scale = m2.Scale + Vector3.new(0.1,0.1,0.1) | |
| 362 | f2.Transparency = f2.Transparency + 0.1 | |
| 363 | wait() | |
| 364 | end | |
| 365 | for m = 1,10 do | |
| 366 | m2.Scale = m2.Scale - Vector3.new(0.1,0.1,0.1) | |
| 367 | f2.Transparency = f2.Transparency - 0.1 | |
| 368 | wait() | |
| 369 | end | |
| 370 | end | |
| 371 | wait() | |
| 372 | for i = 1,10 do | |
| 373 | m1.Scale = m1.Scale - Vector3.new(0.1,0.1,0.1) | |
| 374 | wait() | |
| 375 | end | |
| 376 | f1:Remove() | |
| 377 | f2:Remove() | |
| 378 | ff = Instance.new("ForceField")
| |
| 379 | ff.Parent = plyr.Character | |
| 380 | e = Instance.new("Explosion")
| |
| 381 | e.Parent = workspace | |
| 382 | e.BlastRadius = 15 | |
| 383 | e.BlastPressure = 3999999 | |
| 384 | e.Position = plyr.Character.Torso.Position | |
| 385 | wait(0.1) | |
| 386 | pcall(function() | |
| 387 | e:Remove() | |
| 388 | end) | |
| 389 | wait() | |
| 390 | ff:Remove() | |
| 391 | wait(0.5) | |
| 392 | for i = 1,15 do | |
| 393 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0, 0, -0.15) | |
| 394 | wait() | |
| 395 | end | |
| 396 | if rs ~= nil then | |
| 397 | rs.Parent = plyr.Character.Torso | |
| 398 | wcer = plyr.Character["Right Arm"]:findFirstChild("Weldrs")
| |
| 399 | if wcer ~= nil then | |
| 400 | wcer:Remove() | |
| 401 | end | |
| 402 | end | |
| 403 | debounce = false | |
| 404 | ||
| 405 | --Teleport Mode--------------------------- | |
| 406 | ||
| 407 | elseif mode == 2 then | |
| 408 | debounce = true | |
| 409 | ||
| 410 | ||
| 411 | mp = mouse.Hit.p | |
| 412 | ||
| 413 | t1 = Instance.new("Part")
| |
| 414 | t1.Parent = mod | |
| 415 | t1.CanCollide = false | |
| 416 | t1.Locked = true | |
| 417 | t1.CanCollide = false | |
| 418 | t1.Size = Vector3.new(1, 1, 1) | |
| 419 | t1.formFactor = "Symmetric" | |
| 420 | t1.BrickColor = BrickColor.new("Bright red")
| |
| 421 | t1.TopSurface = "Smooth" | |
| 422 | t1.BottomSurface = "Smooth" | |
| 423 | t1.Transparency = 0.6 | |
| 424 | ||
| 425 | me1 = Instance.new("SpecialMesh")
| |
| 426 | me1.MeshType = "Sphere" | |
| 427 | me1.Parent = t1 | |
| 428 | me1.Scale = Vector3.new(0, 0, 0) | |
| 429 | ||
| 430 | local Weld = Instance.new("Weld")
| |
| 431 | Weld.Parent = t1 | |
| 432 | Weld.Part0 = t1 | |
| 433 | Weld.Part1 = plyr.Character.Torso | |
| 434 | Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) | |
| 435 | ||
| 436 | t2 = Instance.new("Part")
| |
| 437 | t2.Parent = mod | |
| 438 | t2.CanCollide = false | |
| 439 | t2.Locked = true | |
| 440 | t2.CanCollide = false | |
| 441 | t2.Size = Vector3.new(1, 1, 1) | |
| 442 | t2.formFactor = "Symmetric" | |
| 443 | t2.BrickColor = BrickColor.new("Bright red")
| |
| 444 | t2.TopSurface = "Smooth" | |
| 445 | t2.BottomSurface = "Smooth" | |
| 446 | t2.Transparency = 0 | |
| 447 | ||
| 448 | me2 = Instance.new("SpecialMesh")
| |
| 449 | me2.MeshType = "Sphere" | |
| 450 | me2.Parent = t2 | |
| 451 | me2.Scale = Vector3.new(0, 0, 0) | |
| 452 | ||
| 453 | local Weld = Instance.new("Weld")
| |
| 454 | Weld.Parent = t2 | |
| 455 | Weld.Part0 = t2 | |
| 456 | Weld.Part1 = t1 | |
| 457 | Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) | |
| 458 | ||
| 459 | for i = 1,10 do | |
| 460 | me1.Scale = me1.Scale + Vector3.new(1,1,1) | |
| 461 | wait() | |
| 462 | end | |
| 463 | for d = 1,5 do | |
| 464 | for q = 1,10 do | |
| 465 | me2.Scale = me2.Scale + Vector3.new(1,1,1) | |
| 466 | t2.Transparency = t2.Transparency + 0.1 | |
| 467 | wait() | |
| 468 | end | |
| 469 | t1.Transparency = t1.Transparency - 0.1 | |
| 470 | for q = 1,10 do | |
| 471 | me2.Scale = me2.Scale - Vector3.new(1,1,1) | |
| 472 | t2.Transparency = t2.Transparency - 0.1 | |
| 473 | wait() | |
| 474 | end | |
| 475 | wait() | |
| 476 | end | |
| 477 | for i = 1,4 do | |
| 478 | me1.Scale = me1.Scale - Vector3.new(1,1,1) | |
| 479 | wait() | |
| 480 | end | |
| 481 | plyr.Character:MoveTo(mp) | |
| 482 | for i = 1,6 do | |
| 483 | me1.Scale = me1.Scale - Vector3.new(1,1,1) | |
| 484 | wait() | |
| 485 | end | |
| 486 | ||
| 487 | t1:Remove() | |
| 488 | t2:Remove() | |
| 489 | ||
| 490 | debounce = false | |
| 491 | ||
| 492 | --GodMode------------------------------- | |
| 493 | ||
| 494 | elseif mode == 3 then | |
| 495 | if debun == false then debun = true | |
| 496 | print("GodeMode NOW")
| |
| 497 | debounce = true | |
| 498 | rs.Parent = nil | |
| 499 | ls.Parent = nil | |
| 500 | Weldrs = Instance.new("Weld")
| |
| 501 | Weldrs.Parent = plyr.Character["Right Arm"] | |
| 502 | Weldrs.Part0 = plyr.Character["Right Arm"] | |
| 503 | Weldrs.Part1 = j1 | |
| 504 | Weldrs.Name = "Weldrs" | |
| 505 | Weldrs.C0 = CFrame.new(-0.2,0.6,0)*CFrame.Angles(0,0,0) | |
| 506 | Weldls = Instance.new("Weld")
| |
| 507 | Weldls.Parent = plyr.Character["Left Arm"] | |
| 508 | Weldls.Part0 = plyr.Character["Left Arm"] | |
| 509 | Weldls.Part1 = j2 | |
| 510 | Weldls.Name = "Weldls" | |
| 511 | Weldls.C0 = CFrame.new(0.2,0.6,0)*CFrame.Angles(0,0,0) | |
| 512 | ||
| 513 | ||
| 514 | f1 = Instance.new("Part")
| |
| 515 | f1.Parent = mod | |
| 516 | f1.CanCollide = false | |
| 517 | f1.Locked = true | |
| 518 | f1.CanCollide = false | |
| 519 | f1.Size = Vector3.new(1, 1, 1) | |
| 520 | f1.formFactor = "Symmetric" | |
| 521 | f1.BrickColor = BrickColor.new("Bright red")
| |
| 522 | f1.TopSurface = "Smooth" | |
| 523 | f1.BottomSurface = "Smooth" | |
| 524 | f1.Transparency = 1 | |
| 525 | ||
| 526 | m1 = Instance.new("SpecialMesh")
| |
| 527 | m1.MeshType = "Sphere" | |
| 528 | m1.Parent = f1 | |
| 529 | m1.Scale = Vector3.new(0, 0, 0) | |
| 530 | ||
| 531 | local Weld = Instance.new("Weld")
| |
| 532 | Weld.Parent = f1 | |
| 533 | Weld.Part0 = f1 | |
| 534 | Weld.Part1 = plyr.Character["Right Arm"] | |
| 535 | Weld.C0 = CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0) | |
| 536 | ||
| 537 | f2 = Instance.new("Part")
| |
| 538 | f2.Parent = mod | |
| 539 | f2.CanCollide = false | |
| 540 | f2.Locked = true | |
| 541 | f2.CanCollide = false | |
| 542 | f2.Size = Vector3.new(1, 1, 1) | |
| 543 | f2.formFactor = "Symmetric" | |
| 544 | f2.BrickColor = BrickColor.new("Bright red")
| |
| 545 | f2.TopSurface = "Smooth" | |
| 546 | f2.BottomSurface = "Smooth" | |
| 547 | f2.Transparency = 1 | |
| 548 | ||
| 549 | m1 = Instance.new("SpecialMesh")
| |
| 550 | m1.MeshType = "Sphere" | |
| 551 | m1.Parent = f2 | |
| 552 | m1.Scale = Vector3.new(0, 0, 0) | |
| 553 | ||
| 554 | local Weld = Instance.new("Weld")
| |
| 555 | Weld.Parent = f2 | |
| 556 | Weld.Part0 = f2 | |
| 557 | Weld.Part1 = plyr.Character["Left Arm"] | |
| 558 | Weld.C0 = CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0) | |
| 559 | ||
| 560 | f = Instance.new("Fire")
| |
| 561 | f.Parent = f1 | |
| 562 | f.Size = 0 | |
| 563 | f.Heat = 0 | |
| 564 | fn = Instance.new("Fire")
| |
| 565 | fn.Parent = f2 | |
| 566 | fn.Size = 0 | |
| 567 | fn.Heat = 0 | |
| 568 | ||
| 569 | for i = 1,18 do | |
| 570 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0, 0, 0.15) | |
| 571 | Weldls.C1 = Weldls.C1*CFrame.fromEulerAnglesXYZ(0, 0, -0.15) | |
| 572 | wait() | |
| 573 | end | |
| 574 | ||
| 575 | wait(2) | |
| 576 | ||
| 577 | fi = Instance.new("Fire")
| |
| 578 | fi.Parent = plyr.Character.Torso | |
| 579 | fi.Size = 8 | |
| 580 | fi.Heat = 10 | |
| 581 | plyr.Character.Humanoid.WalkSpeed = 30 | |
| 582 | ||
| 583 | --Arms going down | |
| 584 | for i = 1,18 do | |
| 585 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0, 0, -0.15) | |
| 586 | Weldls.C1 = Weldls.C1*CFrame.fromEulerAnglesXYZ(0, 0, 0.15) | |
| 587 | wait() | |
| 588 | end | |
| 589 | ||
| 590 | f1:Remove() | |
| 591 | f2:Remove() | |
| 592 | ||
| 593 | ||
| 594 | if rs ~= nil then | |
| 595 | rs.Parent = plyr.Character.Torso | |
| 596 | end | |
| 597 | if ls ~= nil then | |
| 598 | ls.Parent = plyr.Character.Torso | |
| 599 | end | |
| 600 | wcer = plyr.Character["Right Arm"]:findFirstChild("Weldrs")
| |
| 601 | if wcer ~= nil then | |
| 602 | wcer:Remove() | |
| 603 | end | |
| 604 | wcel = plyr.Character["Left Arm"]:findFirstChild("Weldls")
| |
| 605 | if wcer ~= nil then | |
| 606 | wcel:Remove() | |
| 607 | end | |
| 608 | ||
| 609 | debounce = false | |
| 610 | ||
| 611 | wait(8) | |
| 612 | ||
| 613 | fi:Remove() | |
| 614 | plyr.Character.Humanoid.WalkSpeed = 16 | |
| 615 | ||
| 616 | debun = false | |
| 617 | end | |
| 618 | ||
| 619 | --FireBolt------------------------------------------------- | |
| 620 | ||
| 621 | elseif mode == 4 then | |
| 622 | debounce = true | |
| 623 | pos = mouse.hit.p | |
| 624 | rs.Parent = nil | |
| 625 | Weldrs = Instance.new("Weld")
| |
| 626 | Weldrs.Parent = plyr.Character["Right Arm"] | |
| 627 | Weldrs.Part0 = plyr.Character["Right Arm"] | |
| 628 | Weldrs.Part1 = j1 | |
| 629 | Weldrs.Name = "Weldrs" | |
| 630 | Weldrs.C0 = CFrame.new(-0.2,0.6,0)*CFrame.Angles(0,0,0) | |
| 631 | for i = 1,15 do | |
| 632 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0.105, 0, 0) | |
| 633 | wait() | |
| 634 | end | |
| 635 | ||
| 636 | wait() | |
| 637 | ||
| 638 | p = Instance.new("Part")
| |
| 639 | p.Parent = mod | |
| 640 | p.CanCollide = false | |
| 641 | p.Locked = true | |
| 642 | p.Anchored = true | |
| 643 | p.CanCollide = false | |
| 644 | p.Size = Vector3.new(1, 1, 1) | |
| 645 | p.formFactor = "Symmetric" | |
| 646 | p.BrickColor = BrickColor.new("Bright red")
| |
| 647 | p.TopSurface = "Smooth" | |
| 648 | p.BottomSurface = "Smooth" | |
| 649 | p.Transparency = 1 | |
| 650 | p.Position = plyr.Character["Right Arm"].Position + Vector3.new(0,1.5,0) | |
| 651 | p.CFrame = CFrame.new(p.Position, pos) | |
| 652 | ||
| 653 | dabnut = false | |
| 654 | ||
| 655 | function onTouch(hit) | |
| 656 | humiz = hit.Parent:findFirstChild("Humanoid")
| |
| 657 | if humiz ~= nil and hit.Parent.Name ~= person then | |
| 658 | pcall(function() | |
| 659 | hit.Parent:BreakJoints() | |
| 660 | if hit.Parent.Torso:findFirstChild("Fiarz1") == nil then
| |
| 661 | f = Instance.new("Fire")
| |
| 662 | f.Parent = hit.Parent.Torso | |
| 663 | f.Size = 6 | |
| 664 | f.Heat = 5 | |
| 665 | f.Name = "Fiarz1" | |
| 666 | end | |
| 667 | end) | |
| 668 | end | |
| 669 | end | |
| 670 | p.Touched:connect(onTouch) | |
| 671 | ||
| 672 | f = Instance.new("Fire")
| |
| 673 | f.Parent = p | |
| 674 | f.Size = 0 | |
| 675 | f.Heat = 0 | |
| 676 | ||
| 677 | for i = 0, 1, 0.03 do | |
| 678 | p.CFrame = CFrame.new( (p.Position * (1 - i)) + (pos * i)) | |
| 679 | wait() | |
| 680 | end | |
| 681 | game:getService("Debris"):AddItem(p,0.1)
| |
| 682 | for i = 1,15 do | |
| 683 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(-0.105, 0, 0) | |
| 684 | wait() | |
| 685 | end | |
| 686 | if rs ~= nil then | |
| 687 | rs.Parent = plyr.Character.Torso | |
| 688 | wcer = plyr.Character["Right Arm"]:findFirstChild("Weldrs")
| |
| 689 | if wcer ~= nil then | |
| 690 | wcer:Remove() | |
| 691 | end | |
| 692 | end | |
| 693 | debounce = false | |
| 694 | ||
| 695 | ||
| 696 | ||
| 697 | ||
| 698 | --Lazorz mode-------------------------- | |
| 699 | ||
| 700 | elseif mode == 5 then | |
| 701 | debounce = true | |
| 702 | rs.Parent = nil | |
| 703 | Weldrs = Instance.new("Weld")
| |
| 704 | Weldrs.Parent = plyr.Character["Right Arm"] | |
| 705 | Weldrs.Part0 = plyr.Character["Right Arm"] | |
| 706 | Weldrs.Part1 = j1 | |
| 707 | Weldrs.Name = "Weldrs" | |
| 708 | Weldrs.C0 = CFrame.new(-0.2,0.6,0)*CFrame.Angles(0,0,0) | |
| 709 | for i = 1,15 do | |
| 710 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(0.105, 0, 0) | |
| 711 | wait() | |
| 712 | end | |
| 713 | ||
| 714 | f1 = Instance.new("Part")
| |
| 715 | f1.Parent = mod | |
| 716 | f1.CanCollide = false | |
| 717 | f1.Locked = true | |
| 718 | f1.CanCollide = false | |
| 719 | f1.Size = Vector3.new(1, 1, 1) | |
| 720 | f1.formFactor = "Symmetric" | |
| 721 | f1.BrickColor = BrickColor.new("Bright red")
| |
| 722 | f1.TopSurface = "Smooth" | |
| 723 | f1.BottomSurface = "Smooth" | |
| 724 | f1.Transparency = 0 | |
| 725 | ||
| 726 | m1 = Instance.new("SpecialMesh")
| |
| 727 | m1.MeshType = "Sphere" | |
| 728 | m1.Parent = f1 | |
| 729 | m1.Scale = Vector3.new(0, 0, 0) | |
| 730 | ||
| 731 | local Weld = Instance.new("Weld")
| |
| 732 | Weld.Parent = f1 | |
| 733 | Weld.Part0 = f1 | |
| 734 | Weld.Part1 = plyr.Character["Right Arm"] | |
| 735 | Weld.C0 = CFrame.new(0,1,0)*CFrame.Angles(0,0,0) | |
| 736 | ||
| 737 | f2 = Instance.new("Part")
| |
| 738 | f2.Parent = mod | |
| 739 | f2.CanCollide = false | |
| 740 | f2.Locked = true | |
| 741 | f2.CanCollide = false | |
| 742 | f2.Size = Vector3.new(1, 1, 1) | |
| 743 | f2.formFactor = "Symmetric" | |
| 744 | f2.BrickColor = BrickColor.new("Bright red")
| |
| 745 | f2.TopSurface = "Smooth" | |
| 746 | f2.BottomSurface = "Smooth" | |
| 747 | f2.Transparency = 1 | |
| 748 | ||
| 749 | m2 = Instance.new("SpecialMesh")
| |
| 750 | m2.MeshType = "Sphere" | |
| 751 | m2.Parent = f2 | |
| 752 | m2.Scale = Vector3.new(0, 0, 0) | |
| 753 | ||
| 754 | local Weld = Instance.new("Weld")
| |
| 755 | Weld.Parent = f2 | |
| 756 | Weld.Part0 = f2 | |
| 757 | Weld.Part1 = f1 | |
| 758 | Weld.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) | |
| 759 | ||
| 760 | ||
| 761 | f3 = Instance.new("Part")
| |
| 762 | f3.Parent = mod | |
| 763 | f3.CanCollide = false | |
| 764 | f3.Locked = true | |
| 765 | f3.CanCollide = false | |
| 766 | f3.Size = Vector3.new(1, 1, 1) | |
| 767 | f3.formFactor = "Symmetric" | |
| 768 | f3.BrickColor = BrickColor.new("Bright red")
| |
| 769 | f3.TopSurface = "Smooth" | |
| 770 | f3.BottomSurface = "Smooth" | |
| 771 | f3.Transparency = 1 | |
| 772 | ||
| 773 | m3 = Instance.new("SpecialMesh")
| |
| 774 | m3.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
| 775 | m3.Parent = f3 | |
| 776 | m3.Scale = Vector3.new(0, 0, 0) | |
| 777 | ||
| 778 | local Weld = Instance.new("Weld")
| |
| 779 | Weld.Parent = f3 | |
| 780 | Weld.Part0 = f3 | |
| 781 | Weld.Part1 = plyr.Character["Right Arm"] | |
| 782 | Weld.C0 = CFrame.new(0,-1.2,0.1)*CFrame.Angles(math.pi,0,0) | |
| 783 | ||
| 784 | ||
| 785 | for i = 1,10 do | |
| 786 | m2.Scale = m2.Scale + Vector3.new(0.1,0.1,0.1) | |
| 787 | f2.Transparency = f2.Transparency - 0.05 | |
| 788 | wait() | |
| 789 | end | |
| 790 | ||
| 791 | for ind = 1,4 do | |
| 792 | for i = 1,20 do | |
| 793 | m1.Scale = m1.Scale + Vector3.new(0.05,0.05,0.05) | |
| 794 | f1.Transparency = f1.Transparency + 0.05 | |
| 795 | wait() | |
| 796 | end | |
| 797 | m1.Scale = Vector3.new(0,0,0) | |
| 798 | f1.Transparency = 0 | |
| 799 | end | |
| 800 | ||
| 801 | for i = 1,20 do | |
| 802 | m3.Scale = m3.Scale + Vector3.new(0.035,0.035,0.035) | |
| 803 | f3.Transparency = f3.Transparency - 0.03 | |
| 804 | wait() | |
| 805 | end | |
| 806 | ||
| 807 | mp = mouse.Hit.p | |
| 808 | ||
| 809 | p = Instance.new("Part")
| |
| 810 | p.Parent = mod | |
| 811 | p.Locked = true | |
| 812 | p.Transparency = 0.4 | |
| 813 | p.CanCollide = false | |
| 814 | p.BrickColor = BrickColor.new("Bright red")
| |
| 815 | p.Anchored = true | |
| 816 | p.Size = Vector3.new(1,(f2.Position-mp).magnitude,1) | |
| 817 | p.CFrame = CFrame.new((f2.Position+mp)/2,f2.Position)*CFrame.Angles(math.pi/2,0,0) | |
| 818 | mp1 = Instance.new("CylinderMesh")
| |
| 819 | mp1.Parent = p | |
| 820 | mp1.Scale = Vector3.new(1,1,1) | |
| 821 | p3 = Instance.new("Part")
| |
| 822 | p3.Parent = mod | |
| 823 | p3.Locked = true | |
| 824 | p3.Transparency = 0.4 | |
| 825 | p3.CanCollide = false | |
| 826 | p3.BrickColor = BrickColor.new("Bright red")
| |
| 827 | p3.Anchored = true | |
| 828 | p3.Size = Vector3.new(1,(f2.Position-mp).magnitude,1) | |
| 829 | p3.CFrame = CFrame.new((f2.Position+mp)/2,f2.Position)*CFrame.Angles(math.pi/2,0,0) | |
| 830 | mp2 = Instance.new("CylinderMesh")
| |
| 831 | mp2.Parent = p3 | |
| 832 | mp2.Scale = Vector3.new(0.8,1,0.8) | |
| 833 | ||
| 834 | mt = mouse.Target | |
| 835 | print(mt) | |
| 836 | ||
| 837 | pcall(function() | |
| 838 | mt.Parent.Humanoid:TakeDamage(80) | |
| 839 | end) | |
| 840 | pcall(function() | |
| 841 | mt.Parent.Parent.Humanoid:TakeDamage(80) | |
| 842 | end) | |
| 843 | ||
| 844 | wait(0.5) | |
| 845 | ||
| 846 | for i = 1,20 do | |
| 847 | p.Transparency = p.Transparency - 0.05 | |
| 848 | p3.Transparency = p.Transparency - 0.05 | |
| 849 | mp1.Scale = mp1.Scale - Vector3.new(0.05,0,0.05) | |
| 850 | mp2.Scale = mp1.Scale - Vector3.new(0.05,0,0.05) | |
| 851 | wait() | |
| 852 | end | |
| 853 | ||
| 854 | p:Remove() | |
| 855 | p3:Remove() | |
| 856 | ||
| 857 | for i = 1,10 do | |
| 858 | m2.Scale = m2.Scale - Vector3.new(0.1,0.1,0.1) | |
| 859 | f2.Transparency = f2.Transparency + 0.05 | |
| 860 | m3.Scale = m3.Scale - Vector3.new(0.07,0.07,0.07) | |
| 861 | f3.Transparency = f3.Transparency + 0.06 | |
| 862 | wait() | |
| 863 | end | |
| 864 | ||
| 865 | ||
| 866 | f1:Remove() | |
| 867 | f2:Remove() | |
| 868 | f3:Remove() | |
| 869 | ||
| 870 | ||
| 871 | for i = 1,15 do | |
| 872 | Weldrs.C1 = Weldrs.C1*CFrame.fromEulerAnglesXYZ(-0.105, 0, 0) | |
| 873 | wait() | |
| 874 | end | |
| 875 | ||
| 876 | if rs ~= nil then | |
| 877 | rs.Parent = plyr.Character.Torso | |
| 878 | wcer = plyr.Character["Right Arm"]:findFirstChild("Weldrs")
| |
| 879 | if wcer ~= nil then | |
| 880 | wcer:Remove() | |
| 881 | end | |
| 882 | end | |
| 883 | debounce = false | |
| 884 | ||
| 885 | ||
| 886 | ------------------------------------------------------- | |
| 887 | ||
| 888 | ||
| 889 | end | |
| 890 | end | |
| 891 | end | |
| 892 | mouse.Button1Down:connect(function() onButton1Down(mouse) end) | |
| 893 | end | |
| 894 | hb.Selected:connect(Select) | |
| 895 | ||
| 896 | ||
| 897 | ||
| 898 | ||
| 899 | ||
| 900 | -------------------------------------------------------------- | |
| 901 | ||
| 902 | ||
| 903 | ||
| 904 | ||
| 905 | ||
| 906 | while true do | |
| 907 | updateLooks() | |
| 908 | for i = 1,17 do | |
| 909 | Weld1.C1 = Weld1.C1*CFrame.fromEulerAnglesXYZ(0, 0, -0.03) | |
| 910 | Weld2.C1 = Weld2.C1*CFrame.fromEulerAnglesXYZ(0, 0, 0.03) | |
| 911 | wait() | |
| 912 | end | |
| 913 | wait(0.6) | |
| 914 | for i = 1,17 do | |
| 915 | Weld1.C1 = Weld1.C1*CFrame.fromEulerAnglesXYZ(0, 0, 0.03) | |
| 916 | Weld2.C1 = Weld2.C1*CFrame.fromEulerAnglesXYZ(0, 0, -0.03) | |
| 917 | wait() | |
| 918 | end | |
| 919 | wait(0.6) | |
| 920 | end | |
| 921 | ||
| 922 | ||
| 923 | local player = game:service("Players").LocalPlayer
| |
| 924 | local mouse = player:GetMouse() | |
| 925 | local cam = workspace.CurrentCamera | |
| 926 | local char = player.Character | |
| 927 | local Torsoz = char:findFirstChild("Torso")
| |
| 928 | local RA = char:findFirstChild("Right Arm")
| |
| 929 | local LA = char:findFirstChild("Left Arm")
| |
| 930 | local RL = char:findFirstChild("Right Leg")
| |
| 931 | local LL = char:findFirstChild("Left Leg")
| |
| 932 | local H = char:findFirstChild("Head")
| |
| 933 | local Hu = char:findFirstChild("Humanoid")
| |
| 934 | local RS = Torsoz:findFirstChild("Right Shoulder")
| |
| 935 | local LS = Torsoz:findFirstChild("Left Shoulder")
| |
| 936 | local RH = Torsoz:findFirstChild("Right Hip")
| |
| 937 | local LH = Torsoz:findFirstChild("Left Hip")
| |
| 938 | local N = Torsoz:findFirstChild("Neck")
| |
| 939 | local NV = Vector3.new(0,0,0) | |
| 940 | local FOV = 70 | |
| 941 | local Shift, Space, Sitting = false,false,false | |
| 942 | local GravPoint = 0 | |
| 943 | local Diving = false | |
| 944 | local DivingCooldown = 0 | |
| 945 | local DivingDir = NV | |
| 946 | local DivingCF = CFrame.new(0,0,0) | |
| 947 | local DivingBG, DivingBV | |
| 948 | local HWallRunning = false | |
| 949 | local HWRGravDrop = false | |
| 950 | local HWRLastPart | |
| 951 | local HWRCooldown = 0 | |
| 952 | local HWRDir | |
| 953 | local VWallRunning = false | |
| 954 | local VWRLastPart | |
| 955 | local VWRCooldown = 0 | |
| 956 | local VWRLeft,VWRRight = false,false | |
| 957 | local Sliding = false | |
| 958 | local SlideCooldown = 0 | |
| 959 | local Standing = true | |
| 960 | local Action = "Standing" | |
| 961 | local animplus = true | |
| 962 | local animspeed = 0 | |
| 963 | local animangle = 0.01 | |
| 964 | local Joint1, Joint2, Joint3, Joint4, Joint5 | |
| 965 | ||
| 966 | for i, v in pairs(char:children()) do | |
| 967 | if (v.className == "LocalScript" and v.Name == "ParkourSkrip") or v.className == "NumberValue" or v.className == "BoolValue" or v.className == "Model" or v.Name == "Animate" then | |
| 968 | v:remove() | |
| 969 | end | |
| 970 | end | |
| 971 | ||
| 972 | local loadids = {112474909, 112474911, 112474909}
| |
| 973 | ||
| 974 | local stamina = 100 | |
| 975 | local maxstamina = 100 | |
| 976 | local defsprint = 28 | |
| 977 | local sprint = defsprint | |
| 978 | ||
| 979 | local pause = Instance.new("BoolValue", char)
| |
| 980 | pause.Name = "Pause" | |
| 981 | pause.Value = false | |
| 982 | local flow = Instance.new("NumberValue", char)
| |
| 983 | flow.Name = "Flow" | |
| 984 | flow.Value = 0 | |
| 985 | local flowcooldown = 0 | |
| 986 | ||
| 987 | local m = Instance.new("Model", char)
| |
| 988 | m.Name = "FlowChainPartz" | |
| 989 | ||
| 990 | local P = Instance.new("Part")
| |
| 991 | P.Name = "TrailPart" | |
| 992 | P.formFactor = "Custom" | |
| 993 | P.Size = Vector3.new(0.2,0.2,0.2) | |
| 994 | P.Locked = true | |
| 995 | P.Anchored = true | |
| 996 | P.CanCollide = false | |
| 997 | P.TopSurface = 0 | |
| 998 | P.BottomSurface = 0 | |
| 999 | ||
| 1000 | script.Name = "ParkourSkrip" | |
| 1001 | ||
| 1002 | local hue = 0 | |
| 1003 | ||
| 1004 | function HSV(H,S,V) | |
| 1005 | H = H % 360 | |
| 1006 | local C = V * S | |
| 1007 | local H2 = H/60 | |
| 1008 | local X = C * (1 - math.abs((H2 %2) -1)) | |
| 1009 | local color = Color3.new(0,0,0) | |
| 1010 | if H2 <= 0 then | |
| 1011 | color = Color3.new(C,0,0) | |
| 1012 | elseif 0 <= H2 and H2 <= 1 then | |
| 1013 | color = Color3.new(C,X,0) | |
| 1014 | elseif 1 <= H2 and H2 <= 2 then | |
| 1015 | color = Color3.new(X,C,0) | |
| 1016 | elseif 2 <= H2 and H2 <= 3 then | |
| 1017 | color = Color3.new(0,C,X) | |
| 1018 | elseif 3 <= H2 and H2 <= 4 then | |
| 1019 | color = Color3.new(0,X,C) | |
| 1020 | elseif 4 <= H2 and H2 <= 5 then | |
| 1021 | color = Color3.new(X,0,C) | |
| 1022 | elseif 5 <= H2 and H2 <= 6 then | |
| 1023 | color = Color3.new(C,0,X) | |
| 1024 | end | |
| 1025 | local m = V - C | |
| 1026 | return Color3.new(color.r + m, color.g + m, color.b + m) | |
| 1027 | end | |
| 1028 | ||
| 1029 | function GetWeld(weld) | |
| 1030 | if weld:findFirstChild("XAngle") == nil then
| |
| 1031 | local a = Instance.new("NumberValue", weld)
| |
| 1032 | a.Name = "XAngle" | |
| 1033 | end | |
| 1034 | if weld:findFirstChild("YAngle") == nil then
| |
| 1035 | local a = Instance.new("NumberValue", weld)
| |
| 1036 | a.Name = "YAngle" | |
| 1037 | end | |
| 1038 | if weld:findFirstChild("ZAngle") == nil then
| |
| 1039 | local a = Instance.new("NumberValue", weld)
| |
| 1040 | a.Name = "ZAngle" | |
| 1041 | end | |
| 1042 | return weld.C0.p, Vector3.new(weld.XAngle.Value, weld.YAngle.Value, weld.ZAngle.Value) | |
| 1043 | end | |
| 1044 | ||
| 1045 | function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle) | |
| 1046 | if weld:findFirstChild("XAngle") == nil then
| |
| 1047 | local a = Instance.new("NumberValue", weld)
| |
| 1048 | a.Name = "XAngle" | |
| 1049 | end | |
| 1050 | if weld:findFirstChild("YAngle") == nil then
| |
| 1051 | local a = Instance.new("NumberValue", weld)
| |
| 1052 | a.Name = "YAngle" | |
| 1053 | end | |
| 1054 | if weld:findFirstChild("ZAngle") == nil then
| |
| 1055 | local a = Instance.new("NumberValue", weld)
| |
| 1056 | a.Name = "ZAngle" | |
| 1057 | end | |
| 1058 | ||
| 1059 | local tox,toy,toz = 0,0,0 | |
| 1060 | if origangle.x > nextangle.x then | |
| 1061 | tox = -math.abs(origangle.x - nextangle.x) /loops*i | |
| 1062 | else | |
| 1063 | tox = math.abs(origangle.x - nextangle.x) /loops*i | |
| 1064 | end | |
| 1065 | if origangle.y > nextangle.y then | |
| 1066 | toy = -math.abs(origangle.y - nextangle.y) /loops*i | |
| 1067 | else | |
| 1068 | toy = math.abs(origangle.y - nextangle.y) /loops*i | |
| 1069 | end | |
| 1070 | if origangle.z > nextangle.z then | |
| 1071 | toz = -math.abs(origangle.z - nextangle.z) /loops*i | |
| 1072 | else | |
| 1073 | toz = math.abs(origangle.z - nextangle.z) /loops*i | |
| 1074 | end | |
| 1075 | ||
| 1076 | local tox2,toy2,toz2 = 0,0,0 | |
| 1077 | if origpos.x > nextpos.x then | |
| 1078 | tox2 = -math.abs(origpos.x - nextpos.x) /loops*i | |
| 1079 | else | |
| 1080 | tox2 = math.abs(origpos.x - nextpos.x) /loops*i | |
| 1081 | end | |
| 1082 | if origpos.y > nextpos.y then | |
| 1083 | toy2 = -math.abs(origpos.y - nextpos.y) /loops*i | |
| 1084 | else | |
| 1085 | toy2 = math.abs(origpos.y - nextpos.y) /loops*i | |
| 1086 | end | |
| 1087 | if origpos.z > nextpos.z then | |
| 1088 | toz2 = -math.abs(origpos.z - nextpos.z) /loops*i | |
| 1089 | else | |
| 1090 | toz2 = math.abs(origpos.z - nextpos.z) /loops*i | |
| 1091 | end | |
| 1092 | ||
| 1093 | weld.XAngle.Value = origangle.x + tox | |
| 1094 | weld.YAngle.Value = origangle.y + toy | |
| 1095 | weld.ZAngle.Value = origangle.z + toz | |
| 1096 | weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz) | |
| 1097 | end | |
| 1098 | ||
| 1099 | function LoadTextures() | |
| 1100 | local pls = game:service("ContentProvider")
| |
| 1101 | for i, v in pairs(loadids) do | |
| 1102 | pls:Preload("http://www.roblox.com/asset/?id="..v)
| |
| 1103 | wait(0.04) | |
| 1104 | end | |
| 1105 | end | |
| 1106 | LoadTextures() | |
| 1107 | ||
| 1108 | function CreateGui() | |
| 1109 | for i, v in pairs(player.PlayerGui:children()) do | |
| 1110 | if v.className == "ScreenGui" and v.Name == "staminaGui" then | |
| 1111 | v:remove() | |
| 1112 | end | |
| 1113 | end | |
| 1114 | local g = Instance.new("ScreenGui", player.PlayerGui)
| |
| 1115 | g.Name = "staminaGui" | |
| 1116 | ||
| 1117 | local c = Instance.new("Frame", g)
| |
| 1118 | c.Visible = false | |
| 1119 | c.Size = UDim2.new(0,86,0,320) | |
| 1120 | c.BackgroundTransparency = 1 | |
| 1121 | c.Position = UDim2.new(1,-96,0.5,-160) | |
| 1122 | c.Name = "Container" | |
| 1123 | ||
| 1124 | local t = Instance.new("TextLabel", c)
| |
| 1125 | t.Size = UDim2.new(0,0,-0.1,0) | |
| 1126 | t.Position = UDim2.new(0.3,0,0.5,0) | |
| 1127 | t.TextXAlignment = "Right" | |
| 1128 | t.Font = "ArialBold" | |
| 1129 | t.TextTransparency = 0.1 | |
| 1130 | t.TextColor3 = Color3.new(0,0.6,0.8) | |
| 1131 | t.TextStrokeColor3 = Color3.new(0,0.2,0.8) | |
| 1132 | t.TextStrokeTransparency = 0.3 | |
| 1133 | t.FontSize = 6 | |
| 1134 | t.BackgroundTransparency = 1 | |
| 1135 | local t2 = t:Clone() | |
| 1136 | t2.Parent = c | |
| 1137 | t2.Size = UDim2.new(0,0,0.1,0) | |
| 1138 | local l = t:Clone() | |
| 1139 | l.Parent = c | |
| 1140 | l.Size = UDim2.new(0,0,0,0) | |
| 1141 | l.Text = "-----" | |
| 1142 | ||
| 1143 | local f1 = Instance.new("Frame", c)
| |
| 1144 | f1.Name = "Backing" | |
| 1145 | f1.ClipsDescendants = true | |
| 1146 | f1.Size = UDim2.new(1,0,0,0) | |
| 1147 | f1.BackgroundColor3 = Color3.new(0.8,0,0) | |
| 1148 | f1.BackgroundTransparency = 1 | |
| 1149 | local f1img = Instance.new("ImageLabel", f1)
| |
| 1150 | f1img.BackgroundTransparency = 1 | |
| 1151 | f1img.Image = "http://www.roblox.com/asset/?id=112474909" | |
| 1152 | f1img.Size = UDim2.new(1,0,0,c.Size.Y.Offset) | |
| 1153 | ||
| 1154 | local f2 = Instance.new("Frame", c)
| |
| 1155 | f2.Name = "Overlay" | |
| 1156 | f2.ClipsDescendants = true | |
| 1157 | f2.Size = UDim2.new(1,0,1,0) | |
| 1158 | f2.BackgroundColor3 = Color3.new(0,0,0.8) | |
| 1159 | f2.BackgroundTransparency = 1 | |
| 1160 | local f2img = Instance.new("ImageLabel", f2)
| |
| 1161 | f2img.BackgroundTransparency = 1 | |
| 1162 | f2img.Image = "http://www.roblox.com/asset/?id=112474911" | |
| 1163 | f2img.Size = UDim2.new(1,0,0,c.Size.Y.Offset) | |
| 1164 | ||
| 1165 | function Calculate() | |
| 1166 | local ysize = c.Size.Y.Offset | |
| 1167 | local per = (stamina/maxstamina) * c.Size.Y.Offset | |
| 1168 | local rem = (-(stamina/maxstamina-1)) * c.Size.Y.Offset | |
| 1169 | f1.Size = UDim2.new(1,0,0,rem) | |
| 1170 | f2.Size = UDim2.new(1,0,0,per) | |
| 1171 | f2.Position = UDim2.new(0,0,0,rem) | |
| 1172 | f2img.Position = UDim2.new(0,0,0,-rem) | |
| 1173 | t.Text = math.floor(stamina) | |
| 1174 | t2.Text = maxstamina | |
| 1175 | end | |
| 1176 | Calculate() | |
| 1177 | ||
| 1178 | wait(0.01) | |
| 1179 | c.Visible = true | |
| 1180 | end | |
| 1181 | CreateGui() | |
| 1182 | ||
| 1183 | player.CharacterAdded:connect(function() | |
| 1184 | char = player.Character | |
| 1185 | Torsoz = char:findFirstChild("Torso")
| |
| 1186 | RA = char:findFirstChild("Right Arm")
| |
| 1187 | LA = char:findFirstChild("Left Arm")
| |
| 1188 | RL = char:findFirstChild("Right Leg")
| |
| 1189 | LL = char:findFirstChild("Left Leg")
| |
| 1190 | H = char:findFirstChild("Head")
| |
| 1191 | Hu = char:findFirstChild("Humanoid")
| |
| 1192 | RS = Torsoz:findFirstChild("Right Shoulder")
| |
| 1193 | LS = Torsoz:findFirstChild("Left Shoulder")
| |
| 1194 | RH = Torsoz:findFirstChild("Right Hip")
| |
| 1195 | LH = Torsoz:findFirstChild("Left Hip")
| |
| 1196 | N = Torsoz:findFirstChild("Neck")
| |
| 1197 | stamina = maxstamina | |
| 1198 | CreateGui() | |
| 1199 | end) | |
| 1200 | ||
| 1201 | function RAY(pos, dir, startpos, endpos, distleft, collidedlist) | |
| 1202 | collidedlist = collidedlist or {char}
| |
| 1203 | startpos = startpos or pos | |
| 1204 | distleft = distleft or dir.unit * dir.magnitude | |
| 1205 | endpos = endpos or pos + distleft | |
| 1206 | local ray = Ray.new(pos, distleft) | |
| 1207 | local hitz,enz = workspace:FindPartOnRayWithIgnoreList(ray, collidedlist) | |
| 1208 | --[[ | |
| 1209 | local p = P:Clone() | |
| 1210 | p.Parent = char | |
| 1211 | p.Size = Vector3.new(0.4,0.4,0.4) | |
| 1212 | p.BrickColor = BrickColor.new("Lime green")
| |
| 1213 | p.CanCollide = false | |
| 1214 | p.CFrame = CFrame.new(enz) | |
| 1215 | p.Transparency = 0.3 | |
| 1216 | ]] | |
| 1217 | if hitz ~= nil then | |
| 1218 | if hitz.CanCollide == false then | |
| 1219 | table.insert(collidedlist, hitz) | |
| 1220 | local newpos = enz | |
| 1221 | local newdistleft = distleft - (dir.unit * (pos - newpos).magnitude) | |
| 1222 | if newdistleft ~= NV then | |
| 1223 | return RAY(newpos-(dir*0.01), dir, startpos, endpos, newdistleft+(dir*0.01), collidedlist) | |
| 1224 | end | |
| 1225 | end | |
| 1226 | end | |
| 1227 | ||
| 1228 | return hitz, enz, ray | |
| 1229 | end | |
| 1230 | ||
| 1231 | function Sit() | |
| 1232 | Standing = false | |
| 1233 | local hitz,enz = RAY(Torsoz.Position, Vector3.new(0,-4.1,0)) | |
| 1234 | local tordir = Vector3.new(Torsoz.CFrame.lookVector.x,0,Torsoz.CFrame.lookVector.z) | |
| 1235 | if (hitz ~= nil and hitz.CanCollide == true) then | |
| 1236 | local cf = CFrame.new(enz+Vector3.new(0,1.28,0), enz+Vector3.new(0,1.28,0)+tordir) * CFrame.Angles(math.pi/6,0,0) | |
| 1237 | local hitz2,enz2 = RAY(enz+Vector3.new(0,2.25,0), tordir*-2.2) | |
| 1238 | Hu.PlatformStand = true | |
| 1239 | Torsoz.CFrame = cf | |
| 1240 | local bp = Instance.new("BodyPosition", Torsoz)
| |
| 1241 | bp.Name = "StaminaBodyObject" | |
| 1242 | bp.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1243 | bp.D = 100 | |
| 1244 | bp.position = cf.p | |
| 1245 | local bg = Instance.new("BodyGyro", Torsoz)
| |
| 1246 | bg.Name = "StaminaBodyObject" | |
| 1247 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
| 1248 | bg.cframe = cf | |
| 1249 | bg.D = 100 | |
| 1250 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.34,-1,0.2), Vector3.new((math.pi/2)-(math.pi/6),0,math.pi/8)) | |
| 1251 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.34,-1,0.2), Vector3.new((math.pi/2)-(math.pi/6),0,-math.pi/8)) | |
| 1252 | ||
| 1253 | if hitz2 ~= nil and hitz2.CanCollide == true then | |
| 1254 | Joint3.C0 = CFrame.new(0.9,0.4,-0.45) * CFrame.Angles(0,math.pi/2.13,0) * CFrame.Angles(math.pi/2.3,0,0) | |
| 1255 | Joint4.C0 = CFrame.new(-0.9,0.4,-0.4) * CFrame.Angles(0,-math.pi/2.05,0) * CFrame.Angles(math.pi/2.3,0,0) | |
| 1256 | Joint5.C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.pi/8.8,0,0) | |
| 1257 | else | |
| 1258 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.4,0.4,0.1), Vector3.new(-(math.pi/6)-(math.pi/10),0,math.pi/9)) | |
| 1259 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.4,0.4,0.1), Vector3.new(-(math.pi/6)-(math.pi/10),0,-math.pi/9)) | |
| 1260 | SetWeld(Joint5,1,1, NV,NV, Vector3.new(0,1,0), Vector3.new(-math.pi/12,0,0)) | |
| 1261 | end | |
| 1262 | ||
| 1263 | Sitting = true | |
| 1264 | Action = "Sitting" | |
| 1265 | end | |
| 1266 | end | |
| 1267 | ||
| 1268 | ||
| 1269 | function Stand() | |
| 1270 | Hu.PlatformStand = false | |
| 1271 | if Sitting == true then | |
| 1272 | local tordir = Torsoz.Position + (Torsoz.CFrame.lookVector*10000) | |
| 1273 | local cf = CFrame.new(Torsoz.Position + Vector3.new(0,1.8,0), Vector3.new(tordir.x,Torsoz.Position.y,tordir.z)) | |
| 1274 | Torsoz.CFrame = cf | |
| 1275 | end | |
| 1276 | for i, v in pairs(Torsoz:children()) do | |
| 1277 | if v.Name == "StaminaBodyObject" then | |
| 1278 | v:remove() | |
| 1279 | end | |
| 1280 | end | |
| 1281 | RH.Part0 = nil | |
| 1282 | LH.Part0 = nil | |
| 1283 | RS.Part0 = nil | |
| 1284 | LS.Part0 = nil | |
| 1285 | Joint1.Part0 = Torsoz | |
| 1286 | Joint1.Part1 = RL | |
| 1287 | Joint1.C0 = CFrame.new(0.5,-1,0) | |
| 1288 | Joint1.C1 = CFrame.new(0,1,0) | |
| 1289 | Joint2.Part0 = Torsoz | |
| 1290 | Joint2.Part1 = LL | |
| 1291 | Joint2.C0 = CFrame.new(-0.5,-1,0) | |
| 1292 | Joint2.C1 = CFrame.new(0,1,0) | |
| 1293 | Joint3.Part0 = Torsoz | |
| 1294 | Joint3.Part1 = RA | |
| 1295 | Joint3.C0 = CFrame.new(1.5,0.5,0) | |
| 1296 | Joint3.C1 = CFrame.new(0,0.5,0) | |
| 1297 | Joint4.Part0 = Torsoz | |
| 1298 | Joint4.Part1 = LA | |
| 1299 | Joint4.C0 = CFrame.new(-1.5,0.5,0) | |
| 1300 | Joint4.C1 = CFrame.new(0,0.5,0) | |
| 1301 | Joint5.Part0 = Torsoz | |
| 1302 | Joint5.Part1 = H | |
| 1303 | Joint5.C0 = CFrame.new(0,1,0) | |
| 1304 | Joint5.C1 = CFrame.new(0,-0.5,0) | |
| 1305 | Sitting = false | |
| 1306 | Diving = false | |
| 1307 | Standing = true | |
| 1308 | Action = "Standing" | |
| 1309 | end | |
| 1310 | ||
| 1311 | --------------------------------------- Dive ---------------------------------- | |
| 1312 | ||
| 1313 | function Dive() | |
| 1314 | stamina = stamina - 10 | |
| 1315 | flow.Value = flow.Value + 10 | |
| 1316 | if flow.Value > 100 then | |
| 1317 | flow.Value = 100 | |
| 1318 | end | |
| 1319 | Standing = false | |
| 1320 | local dir = Vector3.new(Torsoz.CFrame.lookVector.x,0,Torsoz.CFrame.lookVector.z) | |
| 1321 | GravPoint = 18 | |
| 1322 | DivingDir = dir | |
| 1323 | local cf = CFrame.new(Torsoz.Position, dir+Vector3.new(0,Torsoz.Position.y,0)) | |
| 1324 | DivingCF = cf | |
| 1325 | DivingDir = dir | |
| 1326 | Hu.PlatformStand = true | |
| 1327 | local bv = Instance.new("BodyVelocity", Torsoz)
| |
| 1328 | bv.Name = "StaminaBodyObject" | |
| 1329 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1330 | bv.velocity = Vector3.new(DivingDir.x*24,GravPoint,DivingDir.z*24) | |
| 1331 | DivingBV = bv | |
| 1332 | local bg = Instance.new("BodyGyro", Torsoz)
| |
| 1333 | bg.Name = "StaminaBodyObject" | |
| 1334 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
| 1335 | bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+bv.velocity) * CFrame.Angles(-math.pi/2,0,0) | |
| 1336 | bg.D = 100 | |
| 1337 | DivingBG = bg | |
| 1338 | ||
| 1339 | local joint = Joint3 | |
| 1340 | joint.C1 = CFrame.new(0,0.5,0) | |
| 1341 | local joint2 = Joint4 | |
| 1342 | joint2.C1 = CFrame.new(0,0.5,0) | |
| 1343 | local joint3 = Joint1 | |
| 1344 | joint3.C1 = CFrame.new(0,1,0) | |
| 1345 | local joint4 = Joint2 | |
| 1346 | joint4.C1 = CFrame.new(0,1,0) | |
| 1347 | ||
| 1348 | local joint5 = Joint5 | |
| 1349 | ||
| 1350 | Diving = true | |
| 1351 | Action = "Diving" | |
| 1352 | ||
| 1353 | for i = 1, 8 do | |
| 1354 | SetWeld(joint,i,8, Vector3.new(1.5,0.5,0), NV, Vector3.new(1.45,0.5,0.1), Vector3.new(-0.2,-math.pi/9,math.pi/13)) | |
| 1355 | SetWeld(joint2,i,8, Vector3.new(-1.5,0.5,0), NV, Vector3.new(-1.45,0.5,0.1), Vector3.new(-0.2,math.pi/9,-math.pi/13)) | |
| 1356 | SetWeld(joint3,i,8, Vector3.new(0.5,-1,0), NV, Vector3.new(0.5,-1,0.03), Vector3.new(-0.2,-math.pi/10,math.pi/14)) | |
| 1357 | SetWeld(joint4,i,8, Vector3.new(-0.5,-1,0), NV, Vector3.new(-0.5,-1,0.03), Vector3.new(-0.2,math.pi/10,-math.pi/14)) | |
| 1358 | SetWeld(joint5,i,8, Vector3.new(0,1,0), NV, Vector3.new(0,1,0), Vector3.new(0.45,0,0)) | |
| 1359 | wait(0.025) | |
| 1360 | end | |
| 1361 | ||
| 1362 | local counter = 0 | |
| 1363 | while Diving == true do | |
| 1364 | counter = counter + 1 | |
| 1365 | bg.Parent = Torsoz | |
| 1366 | local hitz, enz = RAY(Torsoz.Position, bv.velocity.unit*4.6) | |
| 1367 | if hitz ~= nil and hitz.CanCollide == true then | |
| 1368 | local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-4,0)) | |
| 1369 | if hitz2 ~= nil then | |
| 1370 | Diving = "Rolling" | |
| 1371 | Action = "DiveRolling" | |
| 1372 | else | |
| 1373 | Torsoz.CFrame = Torsoz.CFrame * CFrame.new(0,-0.3,0) | |
| 1374 | Torsoz.Velocity = NV | |
| 1375 | flow.Value = 0 | |
| 1376 | break | |
| 1377 | end | |
| 1378 | end | |
| 1379 | if counter > 190 then | |
| 1380 | break | |
| 1381 | end | |
| 1382 | wait(0.02) | |
| 1383 | end | |
| 1384 | ||
| 1385 | bv.velocity = (dir*20) + Vector3.new(0,-0.5,0) | |
| 1386 | ||
| 1387 | local bgcf = bg.cframe | |
| 1388 | local haslanded = false | |
| 1389 | local count = 0 | |
| 1390 | ||
| 1391 | while haslanded == false do | |
| 1392 | bg.cframe = bgcf * CFrame.Angles(-0.3*count,0,0) | |
| 1393 | local hitz, enz = RAY(Torsoz.Position, ((Torsoz.CFrame*CFrame.new(0,-1,0)).p - Torsoz.CFrame.p).unit*1.6) | |
| 1394 | if hitz ~= nil and hitz.CanCollide == true then | |
| 1395 | haslanded = true | |
| 1396 | end | |
| 1397 | local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-3.8,0)) | |
| 1398 | if hitz2 == nil then | |
| 1399 | Torsoz.Velocity = NV | |
| 1400 | break | |
| 1401 | elseif haslanded == true then | |
| 1402 | local bp = Instance.new("BodyPosition", Torsoz)
| |
| 1403 | bp.Name = "StaminaJumpFix" | |
| 1404 | bp.maxForce = Vector3.new(0,1/0,0) | |
| 1405 | bp.P = 7000 | |
| 1406 | bp.position = enz2 + Vector3.new(0,2.8,0) | |
| 1407 | game:service("Debris"):AddItem(bp, 0.3)
| |
| 1408 | else | |
| 1409 | bv.velocity = (dir*20) + Vector3.new(0,-(Torsoz.Position - enz2).magnitude*3,0) | |
| 1410 | ||
| 1411 | end | |
| 1412 | count = count + 1 | |
| 1413 | if count <= 6 then | |
| 1414 | local i = count | |
| 1415 | local j1,j1a = GetWeld(joint) | |
| 1416 | local j2,j2a = GetWeld(joint2) | |
| 1417 | local j3,j3a = GetWeld(joint3) | |
| 1418 | local j4,j4a = GetWeld(joint4) | |
| 1419 | local j5,j5a = GetWeld(joint5) | |
| 1420 | SetWeld(joint,i,6, j1,j1a, Vector3.new(1.35,0.5,-0.2), Vector3.new(math.pi/2.6,0,-math.pi/5.8)) | |
| 1421 | SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.35,0.5,-0.2), Vector3.new(math.pi/2.6,0,math.pi/5.8)) | |
| 1422 | SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.51,0.4,-0.6), Vector3.new(-0.1,0,0.05)) | |
| 1423 | SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.51,0.4,-0.6), Vector3.new(-0.1,0,-0.05)) | |
| 1424 | SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,1,0), Vector3.new(-0.4,0,0)) | |
| 1425 | elseif count >= 50 then | |
| 1426 | break | |
| 1427 | end | |
| 1428 | wait(0.02) | |
| 1429 | end | |
| 1430 | ||
| 1431 | Torsoz.Velocity = NV | |
| 1432 | ||
| 1433 | Stand() | |
| 1434 | DivingCooldown = 9 | |
| 1435 | end | |
| 1436 | ||
| 1437 | function FindSurface(part, position) | |
| 1438 | local obj = part.CFrame:pointToObjectSpace(position) | |
| 1439 | local siz = part.Size/2 | |
| 1440 | for i,v in pairs(Enum.NormalId:GetEnumItems()) do | |
| 1441 | local vec = Vector3.FromNormalId(v) | |
| 1442 | local wvec = part.CFrame:vectorToWorldSpace(vec) | |
| 1443 | local vz = (obj)/(siz*vec) | |
| 1444 | if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then | |
| 1445 | return wvec,vec | |
| 1446 | end | |
| 1447 | end | |
| 1448 | if part.className == "WedgePart" then | |
| 1449 | return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707) | |
| 1450 | end | |
| 1451 | end | |
| 1452 | ||
| 1453 | function HWallRun(part, pos, side) | |
| 1454 | if (part.className == "Part" and part.Shape == Enum.PartType.Block) or part.className ~= "Part" then | |
| 1455 | flow.Value = flow.Value + 9 | |
| 1456 | Standing = false | |
| 1457 | HWallRunning = true | |
| 1458 | Action = "HWallRunning" | |
| 1459 | GravPoint = 10 | |
| 1460 | HWRLastPart = part | |
| 1461 | local dir, dirc = FindSurface(part, pos) | |
| 1462 | towall = -dir | |
| 1463 | dir = (CFrame.new(NV, dir) * CFrame.Angles(0,side,0)).lookVector | |
| 1464 | ||
| 1465 | local bv = Instance.new("BodyVelocity", Torsoz)
| |
| 1466 | bv.Name = "StaminaBodyObject" | |
| 1467 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1468 | bv.P = 9000 | |
| 1469 | bv.velocity = (dir*(sprint-0.5)) + Vector3.new(0,GravPoint,0) | |
| 1470 | local bg = Instance.new("BodyGyro", Torsoz)
| |
| 1471 | bg.Name = "StaminaBodyObject" | |
| 1472 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
| 1473 | bg.cframe = CFrame.new(Torsoz.Position+(towall*-2), Torsoz.Position) * CFrame.Angles(0,-side,-side/4.2) | |
| 1474 | bg.D = 100 | |
| 1475 | ||
| 1476 | local sid = Instance.new("Snap")
| |
| 1477 | ||
| 1478 | local joint1 = Joint3 | |
| 1479 | if side == -math.pi/2 then | |
| 1480 | SetWeld(joint1,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(math.pi/1.3,0.1,math.pi/2.5)) | |
| 1481 | else | |
| 1482 | sid = joint1 | |
| 1483 | SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.6,0), Vector3.new(-math.pi/12,0,math.pi/7)) | |
| 1484 | end | |
| 1485 | local j1c0 = joint1.C0 | |
| 1486 | ||
| 1487 | local joint2 = Joint4 | |
| 1488 | if side == math.pi/2 then | |
| 1489 | SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(math.pi/1.3,-0.1,-math.pi/2.5)) | |
| 1490 | else | |
| 1491 | sid = joint2 | |
| 1492 | SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.6,0), Vector3.new(-math.pi/12,0,-math.pi/7)) | |
| 1493 | end | |
| 1494 | local j2c0 = joint2.C0 | |
| 1495 | ||
| 1496 | local joint3 = Joint1 | |
| 1497 | joint3.C1 = CFrame.new(0,1,0) | |
| 1498 | if side == -math.pi/2 then | |
| 1499 | SetWeld(joint3,1,1, NV,NV, Vector3.new(0.5,-0.38,-0.3), Vector3.new(0,math.pi/2,0.14)) | |
| 1500 | else | |
| 1501 | SetWeld(joint3,1,1, NV,NV, Vector3.new(0.5,-0.8,-0.2), Vector3.new(0,math.pi/2,0.2)) | |
| 1502 | end | |
| 1503 | ||
| 1504 | local joint4 = Joint2 | |
| 1505 | joint4.C1 = CFrame.new(0,1,0) | |
| 1506 | if side == -math.pi/2 then | |
| 1507 | SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.5,-0.8,-0.2), Vector3.new(0,0,0.2)) | |
| 1508 | else | |
| 1509 | SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.5,-0.38,-0.3), Vector3.new(0,0,0.14)) | |
| 1510 | end | |
| 1511 | ||
| 1512 | local joint5 = Joint5 | |
| 1513 | SetWeld(joint5,1,1,NV,NV,Vector3.new(0,0.9,0),Vector3.new(0,0,side/7)) | |
| 1514 | ||
| 1515 | Torsoz.CFrame = CFrame.new(pos+(towall*-2), pos) * CFrame.Angles(0,-side,-side/2.2) | |
| 1516 | bg.cframe = CFrame.new(pos+(towall*-2), pos) * CFrame.Angles(0,-side,-side/2.2) | |
| 1517 | ||
| 1518 | local aniangle = 0 | |
| 1519 | local aniplus = true | |
| 1520 | local aniangle2 = 0 | |
| 1521 | local aniplus2 = true | |
| 1522 | ||
| 1523 | local prevpart = part | |
| 1524 | HWRLastPart = part | |
| 1525 | while HWallRunning == true do | |
| 1526 | ||
| 1527 | if aniangle > math.pi then | |
| 1528 | aniplus = false | |
| 1529 | elseif aniangle < -math.pi then | |
| 1530 | aniplus = true | |
| 1531 | end | |
| 1532 | if aniplus == true then | |
| 1533 | aniangle = aniangle + 0.95 | |
| 1534 | elseif aniplus == false then | |
| 1535 | aniangle = aniangle - 0.95 | |
| 1536 | end | |
| 1537 | ||
| 1538 | if aniangle2 > math.pi then | |
| 1539 | aniplus2 = false | |
| 1540 | elseif aniangle2 < -math.pi then | |
| 1541 | aniplus2 = true | |
| 1542 | end | |
| 1543 | if aniplus2 == true then | |
| 1544 | aniangle2 = aniangle2 + 0.23 | |
| 1545 | elseif aniplus2 == false then | |
| 1546 | aniangle2 = aniangle2 - 0.23 | |
| 1547 | end | |
| 1548 | ||
| 1549 | Hu.PlatformStand = true | |
| 1550 | local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-3,0)) | |
| 1551 | local hitz2, enz2 = RAY(Torsoz.Position, towall*3.4) | |
| 1552 | ||
| 1553 | --- if player ends wall run on ground | |
| 1554 | if hitz ~= nil and hitz.CanCollide == true then | |
| 1555 | bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,0) | |
| 1556 | local offset = (bg.cframe.p.y+enz2.y) - bg.cframe.p.y | |
| 1557 | Torsoz.CFrame = CFrame.new(Vector3.new(bg.cframe.p.x,offset,bg.cframe.p.z), enz2) * CFrame.Angles(0,-side,0) | |
| 1558 | Torsoz.Velocity = NV | |
| 1559 | break | |
| 1560 | end | |
| 1561 | ||
| 1562 | ---- if new wall found -------- | |
| 1563 | if hitz2 ~= nil and hitz2.CanCollide == true then | |
| 1564 | if hitz2 ~= prevpart then | |
| 1565 | local direct = CFrame.new(Torsoz.Position, Torsoz.Position+dir) * CFrame.Angles(0,side,0) | |
| 1566 | local hitz3, enz3 = RAY(Torsoz.Position, (direct * CFrame.Angles(0,-side/2.3,0)).lookVector*4) | |
| 1567 | if hitz3 ~= nil then | |
| 1568 | Torsoz.CFrame = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side*1.1,-side/2.2) | |
| 1569 | bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side*1.1,-side/2.2) | |
| 1570 | dir, dirc = FindSurface(hitz2, enz2) | |
| 1571 | towall = -dir | |
| 1572 | dir = (CFrame.new(NV, dir) * CFrame.Angles(0,side,0)).lookVector | |
| 1573 | prevpart = hitz2 | |
| 1574 | HWRLastPart = hitz2 | |
| 1575 | else | |
| 1576 | ---- if player fails to find new wall to run on | |
| 1577 | Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1578 | bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1579 | Torsoz.Velocity = NV | |
| 1580 | HWRCooldown = 8 | |
| 1581 | break | |
| 1582 | end | |
| 1583 | end | |
| 1584 | --- continue to wall run | |
| 1585 | Torsoz.CFrame = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,-side/2.2) | |
| 1586 | bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,-side/2.2) | |
| 1587 | else | |
| 1588 | ---- if player ends wall run at end of wall | |
| 1589 | Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1590 | bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1591 | Torsoz.Velocity = NV | |
| 1592 | HWRCooldown = 8 | |
| 1593 | break | |
| 1594 | end | |
| 1595 | ||
| 1596 | local hitz3, enz3 = RAY(Torsoz.Position, Torsoz.CFrame.lookVector*2) | |
| 1597 | if hitz3 ~= nil and hitz3.CanCollide == true then | |
| 1598 | Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1599 | bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+dir) | |
| 1600 | Torsoz.Velocity = NV | |
| 1601 | HWRCooldown = 8 | |
| 1602 | break | |
| 1603 | end | |
| 1604 | ||
| 1605 | bv.Parent = Torsoz | |
| 1606 | bv.velocity = (dir*(sprint-0.5)) + Vector3.new(0,GravPoint,0) | |
| 1607 | bg.cframe = bg.cframe * CFrame.Angles(aniangle/80,aniangle/80,0) | |
| 1608 | Torsoz.CFrame = Torsoz.CFrame * CFrame.Angles(aniangle/80,aniangle/80,0) | |
| 1609 | local j3,j3a = GetWeld(joint3) | |
| 1610 | local j4,j4a = GetWeld(joint4) | |
| 1611 | SetWeld(joint3,1,1, j3,j3a, j3,Vector3.new(-0.2+(aniangle/4),0,0)) | |
| 1612 | SetWeld(joint4,1,1, j4,j4a, j4,Vector3.new(-0.2+(-aniangle/4),0,0)) | |
| 1613 | if side == math.pi/2 then | |
| 1614 | local j1,j1a = GetWeld(joint1) | |
| 1615 | SetWeld(joint1,1,1, j1,j1a, j1, Vector3.new(0,0,0.8+(aniangle2/14))) | |
| 1616 | else | |
| 1617 | local j2,j2a = GetWeld(joint2) | |
| 1618 | SetWeld(joint2,1,1, j2,j2a, j2, Vector3.new(0,0,-0.8-(aniangle2/14))) | |
| 1619 | end | |
| 1620 | ||
| 1621 | wait(0.025) | |
| 1622 | if GravPoint < -100 then | |
| 1623 | bg.cframe = CFrame.new(enz2+(towall*-2), enz2) * CFrame.Angles(0,-side,0) | |
| 1624 | local offset = math.abs((bg.cframe.p.y+enz2.y) - bg.cframe.p.y) | |
| 1625 | Torsoz.CFrame = CFrame.new(Vector3.new(bg.cframe.p.x,offset,bg.cframe.p.z), enz2) * CFrame.Angles(0,-side,0) | |
| 1626 | break | |
| 1627 | end | |
| 1628 | ||
| 1629 | end | |
| 1630 | ||
| 1631 | if HWallRunning == "Jumping" then | |
| 1632 | HWRCooldown = 6 | |
| 1633 | joint1.C1 = CFrame.new(0,0.5,0) | |
| 1634 | ||
| 1635 | joint2.C1 = CFrame.new(0,0.5,0) | |
| 1636 | if side == -math.pi/2 then | |
| 1637 | joint2.C0 = CFrame.new(-1.35,0.5,0) * CFrame.Angles(0,side/2.4,-math.pi/3) | |
| 1638 | else | |
| 1639 | joint2.C0 = CFrame.new(-1.35,0.5,0) * CFrame.Angles(0,side/2.4,-math.pi/4) | |
| 1640 | end | |
| 1641 | ||
| 1642 | joint3.C1 = CFrame.new(0,1,0) | |
| 1643 | if side == -math.pi/2 then | |
| 1644 | joint3.C0 = CFrame.new(0.5,-0.8,0) * CFrame.Angles(0,math.pi+(side/2.4),-math.pi/4) | |
| 1645 | else | |
| 1646 | joint3.C0 = CFrame.new(0.5,-0.8,0) * CFrame.Angles(0,(side/2.4),math.pi/4) | |
| 1647 | end | |
| 1648 | joint4.MaxVelocity = 10 | |
| 1649 | joint4.DesiredAngle = 0 | |
| 1650 | joint4.C1 = CFrame.new(0,1,0) | |
| 1651 | if side == -math.pi/2 then | |
| 1652 | joint4.C0 = CFrame.new(-0.5,-0.8,0) * CFrame.Angles(0,math.pi+(side/2.4),math.pi/4) | |
| 1653 | else | |
| 1654 | joint4.C0 = CFrame.new(-0.5,-0.8,0) * CFrame.Angles(0,(side/2.4),-math.pi/4) | |
| 1655 | end | |
| 1656 | ||
| 1657 | local joint5 = Joint5 | |
| 1658 | joint5.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(0,side/2.4,0) | |
| 1659 | joint5.C0 = CFrame.new(0,1,0) | |
| 1660 | ||
| 1661 | local j1,j1a = GetWeld(joint1) | |
| 1662 | local j2,j2a = GetWeld(joint2) | |
| 1663 | local j3,j3a = GetWeld(joint3) | |
| 1664 | local j4,j4a = GetWeld(joint4) | |
| 1665 | local j5,j5a = GetWeld(joint5) | |
| 1666 | ||
| 1667 | GravPoint = 26 | |
| 1668 | local collidecount = 0 | |
| 1669 | local bgangle = side/2 | |
| 1670 | local count = 1 | |
| 1671 | local dir2 = (CFrame.new(NV, dir) * CFrame.Angles(0,-side/2.4,0)).lookVector | |
| 1672 | HWRDir = dir2 | |
| 1673 | bv.velocity = (dir2*(sprint+5)) + Vector3.new(0,GravPoint,0) | |
| 1674 | while HWallRunning == "Jumping" do | |
| 1675 | local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-4,0)) | |
| 1676 | local hitz2, enz2 = RAY(Torsoz.Position, dir2*1.4) | |
| 1677 | if hitz ~= nil and hitz.CanCollide == true then | |
| 1678 | local offset = math.abs(enz.y - Torsoz.CFrame.p.y) | |
| 1679 | Torsoz.CFrame = CFrame.new(enz+Vector3.new(0,2.9,0), enz+Vector3.new(0,2.9,0)+dir2) | |
| 1680 | Torsoz.Velocity = NV | |
| 1681 | break | |
| 1682 | end | |
| 1683 | ||
| 1684 | if hitz2 ~= nil and hitz2.CanCollide == true then | |
| 1685 | collidecount = collidecount + 1 | |
| 1686 | if collidecount == 4 then | |
| 1687 | Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position+dir2) * CFrame.new(0,0,0.4) | |
| 1688 | Torsoz.Velocity = Vector3.new(0,Torsoz.Velocity.y,0) | |
| 1689 | HWRCooldown = 5 | |
| 1690 | VWRCooldown = 5 | |
| 1691 | wait(0.02) | |
| 1692 | break | |
| 1693 | end | |
| 1694 | end | |
| 1695 | ||
| 1696 | if side/2 > 0 then | |
| 1697 | if bgangle > 0.2 then | |
| 1698 | bgangle = bgangle - 0.055 | |
| 1699 | end | |
| 1700 | else | |
| 1701 | if bgangle < -0.2 then | |
| 1702 | bgangle = bgangle + 0.055 | |
| 1703 | end | |
| 1704 | end | |
| 1705 | ||
| 1706 | if count <= 5 then | |
| 1707 | if side == -math.pi/2 then | |
| 1708 | SetWeld(joint1,count,5, j1,j1a, Vector3.new(1.35,0.5,0), Vector3.new(0,side/2.4,math.pi/4)) | |
| 1709 | SetWeld(joint2,count,5, j2,j2a, Vector3.new(-1.35,0.5,0), Vector3.new(0,side/2.4,-math.pi/3)) | |
| 1710 | SetWeld(joint3,count,5, j3,j3a, Vector3.new(0.5,-0.8,0), Vector3.new(0,-side/1.7,0)) | |
| 1711 | joint3.C0 = joint3.C0 * CFrame.Angles((-math.pi/4)/5*count,0,0) | |
| 1712 | SetWeld(joint4,count,5, j4,j4a, Vector3.new(-0.5,-0.8,0), Vector3.new(0,-side/1.7,0)) | |
| 1713 | joint4.C0 = joint4.C0 * CFrame.Angles((math.pi/4)/5*count,0,0) | |
| 1714 | else | |
| 1715 | SetWeld(joint1,count,5, j1,j1a, Vector3.new(1.35,0.5,0), Vector3.new(0,side/2.4,math.pi/3)) | |
| 1716 | SetWeld(joint2,count,5, j2,j2a, Vector3.new(-1.35,0.5,0), Vector3.new(0,side/2.4,-math.pi/4)) | |
| 1717 | SetWeld(joint3,count,5, j3,j3a, Vector3.new(0.5,-0.8,0), Vector3.new(0,-side/1.7,0)) | |
| 1718 | joint3.C0 = joint3.C0 * CFrame.Angles((math.pi/4)/5*count,0,0) | |
| 1719 | SetWeld(joint4,count,5, j4,j4a, Vector3.new(-0.5,-0.8,0), Vector3.new(0,-side/1.7,0)) | |
| 1720 | joint4.C0 = joint4.C0 * CFrame.Angles((-math.pi/4)/5*count,0,0) | |
| 1721 | end | |
| 1722 | ||
| 1723 | count = count + 1 | |
| 1724 | end | |
| 1725 | ||
| 1726 | bg.Parent = Torsoz | |
| 1727 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(0,side/15,-bgangle) | |
| 1728 | bv.velocity = (dir2*(sprint+5)) + Vector3.new(0,GravPoint,0) | |
| 1729 | if collidecount ~= 0 then | |
| 1730 | bv.velocity = Vector3.new(0,bv.velocity.y,0) | |
| 1731 | end | |
| 1732 | if GravPoint < -120 then | |
| 1733 | break | |
| 1734 | end | |
| 1735 | wait(0.025) | |
| 1736 | end | |
| 1737 | end | |
| 1738 | ||
| 1739 | Hu.PlatformStand = false | |
| 1740 | bv:remove() | |
| 1741 | ||
| 1742 | HWRGravDrop = false | |
| 1743 | Stand() | |
| 1744 | HWallRunning = false | |
| 1745 | end | |
| 1746 | end | |
| 1747 | ||
| 1748 | function VWR(part, pos) | |
| 1749 | if (part.className == "Part" and part.Shape == Enum.PartType.Block) or part.className ~= "Part" then | |
| 1750 | print("VWR Activated")
| |
| 1751 | flow.Value = flow.Value + 9 | |
| 1752 | Standing = false | |
| 1753 | VWallRunning = true | |
| 1754 | Action = "VWallRunning" | |
| 1755 | GravPoint = 0 | |
| 1756 | local percent = 1 | |
| 1757 | VWRLastPart = part | |
| 1758 | local dir, dirc = FindSurface(part, pos) | |
| 1759 | towall = -dir | |
| 1760 | dir = (CFrame.new(NV, -dir) * CFrame.Angles(math.pi/2,0,0)).lookVector | |
| 1761 | --[[ | |
| 1762 | local p = P:Clone() | |
| 1763 | p.Parent = char | |
| 1764 | p.Size = Vector3.new(2,2,2) | |
| 1765 | p.BrickColor = BrickColor.new("Lime green")
| |
| 1766 | p.CanCollide = false | |
| 1767 | p.CFrame = part.CFrame * CFrame.new(dirc*5) | |
| 1768 | p.Transparency = 0.3 | |
| 1769 | ]] | |
| 1770 | local bv = Instance.new("BodyVelocity", Torsoz)
| |
| 1771 | bv.Name = "StaminaBodyObject" | |
| 1772 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1773 | bv.P = 9000 | |
| 1774 | bv.velocity = (dir*(sprint-1))*percent | |
| 1775 | ||
| 1776 | local bg = Instance.new("BodyGyro", Torsoz)
| |
| 1777 | bg.Name = "StaminaBodyObject" | |
| 1778 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
| 1779 | bg.D = 100 | |
| 1780 | local posi = pos + (-towall*1.8) | |
| 1781 | bg.cframe = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0) | |
| 1782 | Torsoz.CFrame = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0) | |
| 1783 | ||
| 1784 | local joint1 = Joint3 | |
| 1785 | SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,0,math.pi/8)) | |
| 1786 | ||
| 1787 | local joint2 = Joint4 | |
| 1788 | SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,0,-math.pi/8)) | |
| 1789 | ||
| 1790 | local joint3 = Joint1 | |
| 1791 | SetWeld(joint3,1,1, NV,NV, Vector3.new(0.48,-0.6,-0.1), Vector3.new(0,math.pi/2,0)) | |
| 1792 | joint3.C1 = CFrame.new(0,0.7,0.2) * CFrame.Angles(0,math.pi/2,0) | |
| 1793 | ||
| 1794 | local joint4 = Joint2 | |
| 1795 | SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.48,-0.6,-0.1), Vector3.new(0,math.pi/2,0)) | |
| 1796 | joint4.C1 = CFrame.new(0,0.7,0.2) * CFrame.Angles(0,math.pi/2,0) | |
| 1797 | ||
| 1798 | local joint5 = Joint5 | |
| 1799 | SetWeld(joint5,1,1, NV,NV, Vector3.new(0,1,0), Vector3.new(math.pi/20,0,0)) | |
| 1800 | ||
| 1801 | local aniangle = 0 | |
| 1802 | local aniplus = true | |
| 1803 | ||
| 1804 | while VWallRunning == true do | |
| 1805 | local hitz, enz = RAY(Torsoz.Position, towall*2.1) | |
| 1806 | local hitz2, enz2 = RAY(Torsoz.Position, (CFrame.new(NV,towall)*CFrame.Angles(math.pi/2,0,0)).lookVector*2.4) | |
| 1807 | ||
| 1808 | if aniangle > math.pi then | |
| 1809 | aniplus = false | |
| 1810 | elseif aniangle < -math.pi then | |
| 1811 | aniplus = true | |
| 1812 | end | |
| 1813 | if aniplus == true then | |
| 1814 | aniangle = aniangle + (1.3*(percent+0.2)) | |
| 1815 | elseif aniplus == false then | |
| 1816 | aniangle = aniangle - (1.3*(percent+0.2)) | |
| 1817 | end | |
| 1818 | ||
| 1819 | bv.velocity = (dir*(sprint-1))*percent | |
| 1820 | if VWRLeft == true then | |
| 1821 | bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * (11*percent+5)) | |
| 1822 | end | |
| 1823 | if VWRRight == true then | |
| 1824 | bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * (11*percent+5)) | |
| 1825 | end | |
| 1826 | ||
| 1827 | bg.cframe = CFrame.new(posi, posi+towall) * CFrame.Angles((math.pi/5),0,0) * CFrame.Angles(0,aniangle/60,0) | |
| 1828 | ||
| 1829 | SetWeld(joint1,1,1, NV,NV, Vector3.new(1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,aniangle/52,(math.pi/8)+(aniangle/30))) | |
| 1830 | SetWeld(joint2,1,1, NV,NV, Vector3.new(-1.4,0.45,-0.1), Vector3.new(-math.pi/3.2,aniangle/52,(-math.pi/8)+(-aniangle/30))) | |
| 1831 | SetWeld(joint3,1,1, NV,NV, Vector3.new(0.51,-0.75,-(aniangle/30)), Vector3.new(0,math.pi/2,(aniangle/8)-0.3)) | |
| 1832 | SetWeld(joint4,1,1, NV,NV, Vector3.new(-0.51,-0.75,(aniangle/30)), Vector3.new(0,math.pi/2,(-aniangle/8)-0.3)) | |
| 1833 | ||
| 1834 | if hitz == nil then | |
| 1835 | local lv = Torsoz.Position + (Torsoz.CFrame.lookVector*100) | |
| 1836 | Torsoz.CFrame = CFrame.new(Torsoz.Position, Vector3.new(lv.x,Torsoz.Position.y,lv.z)) | |
| 1837 | break | |
| 1838 | end | |
| 1839 | ||
| 1840 | if hitz2 ~= nil then | |
| 1841 | percent = 0 | |
| 1842 | VWallRunning = "Falling" | |
| 1843 | Action = "VWRFalling" | |
| 1844 | GravPoint = -7 | |
| 1845 | break | |
| 1846 | end | |
| 1847 | ||
| 1848 | wait(0.02) | |
| 1849 | percent = percent - 0.028 | |
| 1850 | if percent <= 0.15 then | |
| 1851 | VWallRunning = "Falling" | |
| 1852 | Action = "VWRFalling" | |
| 1853 | end | |
| 1854 | end | |
| 1855 | ||
| 1856 | -------------------------- Falling from VWR ------------------------------ | |
| 1857 | if VWallRunning == "Falling" then | |
| 1858 | GravPoint = GravPoint - 1 | |
| 1859 | local dirpos = (-towall *5) + Vector3.new(0,GravPoint,0) | |
| 1860 | bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude | |
| 1861 | ||
| 1862 | local j1,j1a = GetWeld(joint1) | |
| 1863 | local j2,j2a = GetWeld(joint2) | |
| 1864 | local j3,j3a = GetWeld(joint3) | |
| 1865 | local j4,j4a = GetWeld(joint4) | |
| 1866 | local j5,j5a = GetWeld(joint5) | |
| 1867 | ||
| 1868 | local counter = 0 | |
| 1869 | while VWallRunning == "Falling" do | |
| 1870 | counter = counter + 1 | |
| 1871 | local hitz, enz = RAY(H.Position, Vector3.new(0,-2.4,0)) | |
| 1872 | ||
| 1873 | dirpos = (-towall *5) + Vector3.new(0,GravPoint,0) | |
| 1874 | bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude | |
| 1875 | if VWRLeft == true then | |
| 1876 | bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9) | |
| 1877 | end | |
| 1878 | if VWRRight == true then | |
| 1879 | bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9) | |
| 1880 | end | |
| 1881 | bg.cframe = CFrame.new(NV, (-towall*30) + Vector3.new(0,GravPoint,0)) * CFrame.Angles(-math.pi/2.55,math.pi,0) | |
| 1882 | ||
| 1883 | if counter <= 35 then | |
| 1884 | SetWeld(joint1,counter,35, j1,j1a, Vector3.new(1.4,0.45,-0.1), Vector3.new(math.pi/9,0,math.pi/9)) | |
| 1885 | SetWeld(joint2,counter,35, j2,j2a, Vector3.new(-1.4,0.45,-0.1), Vector3.new(math.pi/9,0,-math.pi/9)) | |
| 1886 | SetWeld(joint3,counter,35, j3,j3a, Vector3.new(0.5,-0.75,0), Vector3.new(0,math.pi/2,math.pi/9)) | |
| 1887 | joint3.C1 = CFrame.new(0,0.7 + (0.3/35*counter),0.2 - (0.2/35*counter)) * CFrame.Angles(0,math.pi/2,0) | |
| 1888 | SetWeld(joint4,counter,35, j4,j4a, Vector3.new(-0.5,-0.75,0), Vector3.new(0,math.pi/2,math.pi/9)) | |
| 1889 | joint4.C1 = CFrame.new(0,0.7 + (0.3/35*counter),0.2 - (0.2/35*counter)) * CFrame.Angles(0,math.pi/2,0) | |
| 1890 | SetWeld(joint5,counter,35, j5,j5a, Vector3.new(0,1,0), Vector3.new(-math.pi/6,0,0)) | |
| 1891 | end | |
| 1892 | ||
| 1893 | if hitz ~= nil then | |
| 1894 | bv:remove() | |
| 1895 | Torsoz.CFrame = CFrame.new(enz+Vector3.new(0,2,0), (enz+Vector3.new(0,2,0)) + ((-towall*25) + Vector3.new(0,GravPoint,0))) * CFrame.Angles(-math.pi/2.55,math.pi,0) | |
| 1896 | Torsoz.Velocity = NV | |
| 1897 | Torsoz.RotVelocity = NV | |
| 1898 | local bp = Instance.new("BodyPosition", Torsoz)
| |
| 1899 | bp.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1900 | bp.position = Torsoz.CFrame.p | |
| 1901 | game:service("Debris"):AddItem(bp, 0.16)
| |
| 1902 | flow.Value = 0 | |
| 1903 | break | |
| 1904 | end | |
| 1905 | ||
| 1906 | if GravPoint > - 180 then | |
| 1907 | GravPoint = GravPoint - 1.9 | |
| 1908 | end | |
| 1909 | if counter > 200 then | |
| 1910 | break | |
| 1911 | end | |
| 1912 | wait(0.02) | |
| 1913 | end | |
| 1914 | ||
| 1915 | local bp = Instance.new("BodyPosition")
| |
| 1916 | ||
| 1917 | local counter2 = counter | |
| 1918 | local bgangleplus = 0 | |
| 1919 | ||
| 1920 | local j1,j1a = GetWeld(joint1) | |
| 1921 | local j2,j2a = GetWeld(joint2) | |
| 1922 | local j3,j3a = GetWeld(joint3) | |
| 1923 | local j4,j4a = GetWeld(joint4) | |
| 1924 | local j5,j5a = GetWeld(joint5) | |
| 1925 | ||
| 1926 | local landingpos | |
| 1927 | ||
| 1928 | while VWallRunning == "BackflipFromFall" do | |
| 1929 | counter2 = counter2 + 1 | |
| 1930 | local hitz, enz = RAY(H.Position+Vector3.new(0,2,0), Vector3.new(0,-4.4,0)) | |
| 1931 | ||
| 1932 | if counter2 - counter < 13 then | |
| 1933 | bgangleplus = bgangleplus - ((math.pi*1.1)/13) | |
| 1934 | end | |
| 1935 | if counter2 - counter <= 13 then | |
| 1936 | SetWeld(joint1,counter2-counter,13, j1,j1a, Vector3.new(1.4,0.5,0.1), Vector3.new(math.pi/2,0.1,math.pi/2)) | |
| 1937 | SetWeld(joint2,counter2-counter,13, j2,j2a, Vector3.new(-1.4,0.5,0.1), Vector3.new(math.pi/2,-0.1,-math.pi/2)) | |
| 1938 | SetWeld(joint3,counter2-counter,13, j3,j3a, Vector3.new(0.52,-0.3,-0.65), Vector3.new(0,math.pi/2,0)) | |
| 1939 | SetWeld(joint4,counter2-counter,13, j4,j4a, Vector3.new(-0.51,-0.9,-0.05), Vector3.new(0,math.pi/2,0)) | |
| 1940 | SetWeld(joint5,counter2-counter,13, j5,j5a, Vector3.new(0,0.9,0), Vector3.new(-math.pi/7,0,0)) | |
| 1941 | end | |
| 1942 | ||
| 1943 | dirpos = (-towall *5) + Vector3.new(0,GravPoint,0) | |
| 1944 | --bv.velocity = Vector3.new(0,-2,0) | |
| 1945 | bv.velocity = CFrame.new(NV, dirpos).lookVector * dirpos.magnitude | |
| 1946 | if VWRLeft == true then | |
| 1947 | bv.velocity = bv.velocity + ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9) | |
| 1948 | end | |
| 1949 | if VWRRight == true then | |
| 1950 | bv.velocity = bv.velocity - ((CFrame.new(NV, towall) * CFrame.Angles(0,math.pi/2,0)).lookVector * 9) | |
| 1951 | end | |
| 1952 | bg.cframe = CFrame.new(NV, (-towall*30) + Vector3.new(0,GravPoint,0)) * CFrame.Angles((-math.pi/2.4) + bgangleplus,math.pi,0) | |
| 1953 | ||
| 1954 | if hitz ~= nil then | |
| 1955 | bv:remove() | |
| 1956 | landingpos = enz - (towall*1.3) | |
| 1957 | if counter2 - counter > 8 then | |
| 1958 | bp = Instance.new("BodyPosition", Torsoz)
| |
| 1959 | bp.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1960 | bp.position = enz+Vector3.new(0,2.4,0) + (-towall*1) | |
| 1961 | VWallRunning = "LandingFall" | |
| 1962 | else | |
| 1963 | Torsoz.CFrame = bg.cframe + (enz+Vector3.new(0,2.3,0)) | |
| 1964 | Torsoz.Velocity = NV | |
| 1965 | Torsoz.RotVelocity = NV | |
| 1966 | local bp = Instance.new("BodyPosition", Torsoz)
| |
| 1967 | bp.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 1968 | bp.position = Torsoz.CFrame.p | |
| 1969 | game:service("Debris"):AddItem(bp, 0.14)
| |
| 1970 | flow.Value = 0 | |
| 1971 | end | |
| 1972 | break | |
| 1973 | end | |
| 1974 | ||
| 1975 | if GravPoint > - 180 then | |
| 1976 | GravPoint = GravPoint - 1.9 | |
| 1977 | end | |
| 1978 | if counter2 > 200 then | |
| 1979 | break | |
| 1980 | end | |
| 1981 | wait(0.02) | |
| 1982 | end | |
| 1983 | ||
| 1984 | if VWallRunning == "LandingFall" then | |
| 1985 | print("Landing")
| |
| 1986 | ||
| 1987 | joint3.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0) | |
| 1988 | joint4.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0) | |
| 1989 | local j1,j1a = GetWeld(joint1) | |
| 1990 | local j2,j2a = GetWeld(joint2) | |
| 1991 | local j3,j3a = GetWeld(joint3) | |
| 1992 | local j4,j4a = GetWeld(joint4) | |
| 1993 | local j5,j5a = GetWeld(joint5) | |
| 1994 | ||
| 1995 | local a | |
| 1996 | local mesh | |
| 1997 | if GravPoint < -70 then | |
| 1998 | a = P:Clone() | |
| 1999 | a.Parent = Torsoz | |
| 2000 | a.Name = "AirLandingEffect" | |
| 2001 | a.BrickColor = BrickColor.new("Medium stone grey")
| |
| 2002 | a.Transparency = 0.3 | |
| 2003 | a.CFrame = CFrame.new(landingpos+Vector3.new(0,0.4,0)) | |
| 2004 | mesh = Instance.new("SpecialMesh", a)
| |
| 2005 | mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
| 2006 | mesh.Scale = Vector3.new(0,0,0) | |
| 2007 | end | |
| 2008 | ||
| 2009 | local bgcf = CFrame.new(NV, Vector3.new(towall.x,0,towall.z)) | |
| 2010 | bg.cframe = bgcf * CFrame.Angles(-math.pi/7,0,0) | |
| 2011 | local bgval = math.pi/7/2 | |
| 2012 | ||
| 2013 | for i = 1, 6 do | |
| 2014 | Hu.PlatformStand = true | |
| 2015 | SetWeld(joint1,i,6, j1,j1a, Vector3.new(1.2,0.5,0.2), Vector3.new(math.pi/2,0.5,math.pi/1.2)) | |
| 2016 | SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.2,0.5,0.2), Vector3.new(math.pi/2,-0.5,-math.pi/1.2)) | |
| 2017 | SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.51,-0.3,-0.8), Vector3.new(0,math.pi/2,-math.pi/7)) | |
| 2018 | SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.51,-0.8,-0.7), Vector3.new(0,math.pi/2,-math.pi/3)) | |
| 2019 | SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,0.85,0), Vector3.new(-math.pi/8,0,0)) | |
| 2020 | bp.position = bp.position + Vector3.new(0,-0.07,0) | |
| 2021 | bg.cframe = bgcf * CFrame.Angles((-bgval*2) + (bgval/6*i),0,0) | |
| 2022 | Torsoz.CFrame = bg.cframe + bp.position | |
| 2023 | if a ~= nil then | |
| 2024 | mesh.Scale = mesh.Scale + Vector3.new(1.3,0.35,1.3) | |
| 2025 | a.Transparency = 0.3 + (0.7/6*i) | |
| 2026 | end | |
| 2027 | wait(0.02) | |
| 2028 | end | |
| 2029 | if a ~= nil then | |
| 2030 | a:remove() | |
| 2031 | end | |
| 2032 | local j1,j1a = GetWeld(joint1) | |
| 2033 | local j2,j2a = GetWeld(joint2) | |
| 2034 | local j3,j3a = GetWeld(joint3) | |
| 2035 | local j4,j4a = GetWeld(joint4) | |
| 2036 | local j5,j5a = GetWeld(joint5) | |
| 2037 | for i = 1, 6 do | |
| 2038 | Hu.PlatformStand = true | |
| 2039 | SetWeld(joint1,i,6, j1,j1a, Vector3.new(1.5,0.5,0), Vector3.new(0,0,0)) | |
| 2040 | SetWeld(joint2,i,6, j2,j2a, Vector3.new(-1.5,0.5,0), Vector3.new(0,0,0)) | |
| 2041 | SetWeld(joint3,i,6, j3,j3a, Vector3.new(0.5,-1,0), Vector3.new(0,math.pi/2,0)) | |
| 2042 | SetWeld(joint4,i,6, j4,j4a, Vector3.new(-0.5,-1,0), Vector3.new(0,math.pi/2,0)) | |
| 2043 | SetWeld(joint5,i,6, j5,j5a, Vector3.new(0,1,0), Vector3.new(0,0,0)) | |
| 2044 | bp.position = bp.position + Vector3.new(0,0.1,0) | |
| 2045 | bg.cframe = bgcf * CFrame.Angles(-bgval + (bgval/6*i),0,0) | |
| 2046 | Torsoz.CFrame = bg.cframe + bp.position | |
| 2047 | wait(0.02) | |
| 2048 | end | |
| 2049 | ||
| 2050 | bp:remove() | |
| 2051 | end | |
| 2052 | ||
| 2053 | end | |
| 2054 | ||
| 2055 | bv:remove() | |
| 2056 | bg:remove() | |
| 2057 | VWallRunning = false | |
| 2058 | Stand() | |
| 2059 | end | |
| 2060 | end | |
| 2061 | ||
| 2062 | function Slide(pos) | |
| 2063 | flow.Value = flow.Value + 6 | |
| 2064 | Action = "Sliding" | |
| 2065 | Sliding = true | |
| 2066 | GravPoint = Torsoz.Velocity.y | |
| 2067 | local spd = Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude + 10 | |
| 2068 | local dir = Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).unit | |
| 2069 | ||
| 2070 | local bv = Instance.new("BodyVelocity", Torsoz)
| |
| 2071 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
| 2072 | bv.velocity = dir*spd | |
| 2073 | local bg = Instance.new("BodyGyro", Torsoz)
| |
| 2074 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
| 2075 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0) | |
| 2076 | ||
| 2077 | local joint1 = Joint1 | |
| 2078 | local joint2 = Joint2 | |
| 2079 | local joint3 = Joint3 | |
| 2080 | local joint4 = Joint4 | |
| 2081 | local joint5 = Joint5 | |
| 2082 | local j1,j1a = GetWeld(joint1) | |
| 2083 | local j2,j2a = GetWeld(joint2) | |
| 2084 | ||
| 2085 | SetWeld(joint1,1,1, NV,NV, Vector3.new(j1.x,j1.y,j1.z), Vector3.new(j1a.x,math.pi/2,j1a.z)) | |
| 2086 | joint1.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0) | |
| 2087 | SetWeld(joint2,1,1, NV,NV, Vector3.new(j2.x,j2.y,j2.z), Vector3.new(j2a.x,math.pi/2,j2a.z)) | |
| 2088 | joint2.C1 = CFrame.new(0,1,0) * CFrame.Angles(0,math.pi/2,0) | |
| 2089 | ||
| 2090 | local j1,j1a = GetWeld(joint1) | |
| 2091 | local j2,j2a = GetWeld(joint2) | |
| 2092 | local j3,j3a = GetWeld(joint3) | |
| 2093 | local j4,j4a = GetWeld(joint4) | |
| 2094 | local j5,j5a = GetWeld(joint5) | |
| 2095 | ||
| 2096 | local count = 0 | |
| 2097 | local lastpos | |
| 2098 | ||
| 2099 | while Sliding == true do | |
| 2100 | count = count + 1 | |
| 2101 | Hu.PlatformStand = true | |
| 2102 | local hitz1, enz1 = RAY(Torsoz.Position+Vector3.new(0,0.03,0), dir *2.5) | |
| 2103 | local hitz2, enz2 = RAY(Torsoz.Position-Vector3.new(0,0.2,0), dir *2.5) | |
| 2104 | local ghitz, genz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0)) | |
| 2105 | bv.velocity = dir*spd + Vector3.new(0,GravPoint,0) | |
| 2106 | ||
| 2107 | if count <= 5 then | |
| 2108 | SetWeld(joint1,count,5, j1,j1a, Vector3.new(0.5,-0.8,-0.15), Vector3.new(0,(math.pi/2)+0.1,-0.4)) | |
| 2109 | SetWeld(joint2,count,5, j2,j2a, Vector3.new(-0.5,-1,0), Vector3.new(0,(math.pi/2)-0.4,0)) | |
| 2110 | SetWeld(joint3,count,5, j3,j3a, Vector3.new(1.5,0.5,0), Vector3.new(-0.7,-0.24,math.pi/5)) | |
| 2111 | SetWeld(joint4,count,5, j4,j4a, Vector3.new(-1.5,0.5,0), Vector3.new(-0.1,0,-math.pi/1.5)) | |
| 2112 | SetWeld(joint5,count,5, j5,j5a, Vector3.new(0,1,0), Vector3.new(-0.5,-0.2,0)) | |
| 2113 | end | |
| 2114 | ||
| 2115 | if (hitz1 ~= nil and hitz1.CanCollide == true) or (hitz2 ~= nil and hitz2.CanCollide == true) then | |
| 2116 | bv:remove() | |
| 2117 | bg:remove() | |
| 2118 | Sliding = "HitObject" | |
| 2119 | end | |
| 2120 | if ghitz ~= nil then | |
| 2121 | GravPoint = 0 | |
| 2122 | Torsoz.CFrame = CFrame.new(genz, genz+dir) * CFrame.Angles(math.pi/2.2,0.24,0) + Vector3.new(0,0.7,0) | |
| 2123 | spd = spd - 0.95 | |
| 2124 | else | |
| 2125 | if GravPoint > -180 then | |
| 2126 | GravPoint = GravPoint - 5.6 | |
| 2127 | end | |
| 2128 | spd = spd - 0.36 | |
| 2129 | end | |
| 2130 | if spd < 7 then | |
| 2131 | Sliding = false | |
| 2132 | end | |
| 2133 | wait(0.02) | |
| 2134 | end | |
| 2135 | ||
| 2136 | if Sliding == false then | |
| 2137 | local j1,j1a = GetWeld(joint1) | |
| 2138 | local j2,j2a = GetWeld(joint2) | |
| 2139 | local j3,j3a = GetWeld(joint3) | |
| 2140 | local j4,j4a = GetWeld(joint4) | |
| 2141 | local j5,j5a = GetWeld(joint5) | |
| 2142 | for i = 1, 4 do | |
| 2143 | SetWeld(joint1,i,4, j1,j1a, Vector3.new(0.5,-1,0), Vector3.new(0,math.pi/2,0)) | |
| 2144 | SetWeld(joint2,i,4, j2,j2a, Vector3.new(-0.5,-1,0), Vector3.new(0,math.pi/2,0)) | |
| 2145 | SetWeld(joint3,i,4, j3,j3a, Vector3.new(1.5,0.5,0), NV) | |
| 2146 | SetWeld(joint4,i,4, j4,j4a, Vector3.new(-1.5,0.5,0), NV) | |
| 2147 | SetWeld(joint5,i,4, j5,j5a, Vector3.new(0,1,0), NV) | |
| 2148 | local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0)) | |
| 2149 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles((math.pi/2.2) - ((math.pi/2.2)/4*i),0.24 - (0.24/4*i),0) | |
| 2150 | bv.velocity = dir*spd + Vector3.new(0,GravPoint,0) | |
| 2151 | ||
| 2152 | if hitz ~= nil then | |
| 2153 | GravPoint = 0 | |
| 2154 | Torsoz.CFrame = CFrame.new(enz, enz+dir) * CFrame.Angles((math.pi/2.2) - ((math.pi/2.2)/4*i),0.24 - (0.24/4*i),0) + Vector3.new(0,0.7+(1.8/4*i),0) | |
| 2155 | spd = spd - 0.95 | |
| 2156 | else | |
| 2157 | if GravPoint > -180 then | |
| 2158 | GravPoint = GravPoint - 5.6 | |
| 2159 | end | |
| 2160 | spd = spd - 0.36 | |
| 2161 | end | |
| 2162 | wait(0.02) | |
| 2163 | end | |
| 2164 | local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-2.6,0)) | |
| 2165 | Torsoz.CFrame = CFrame.new(enz, enz+dir) + Vector3.new(0,3,0) | |
| 2166 | end | |
| 2167 | bv:remove() | |
| 2168 | bg:remove() | |
| 2169 | SlideCooldown = 10 | |
| 2170 | Stand() | |
| 2171 | end | |
| 2172 | ||
| 2173 | function KD(key) | |
| 2174 | if pause.Value == false then | |
| 2175 | if key == string.char(32) then | |
| 2176 | Space = true | |
| 2177 | ||
| 2178 | local ghitz, genz = RAY(Torsoz.Position, Vector3.new(0,-3.7,0)) | |
| 2179 | local hitz, enz = RAY(Torsoz.Position+Vector3.new(0,1.1,0), Torsoz.CFrame.lookVector*2.3) | |
| 2180 | local righthitz, rightenz | |
| 2181 | local lefthitz, leftenz | |
| 2182 | ||
| 2183 | if HWallRunning == false then | |
| 2184 | righthitz, rightenz = RAY(Torsoz.Position, ((Torsoz.CFrame * CFrame.new(1.5,0,-0.2)).p - Torsoz.CFrame.p).unit*3.9) | |
| 2185 | lefthitz, leftenz = RAY(Torsoz.Position, ((Torsoz.CFrame * CFrame.new(-1.5,0,-0.2)).p - Torsoz.CFrame.p).unit*3.9) | |
| 2186 | ||
| 2187 | elseif HWallRunning == "Jumping" then | |
| 2188 | righthitz, rightenz = RAY(Torsoz.Position, ((CFrame.new(Torsoz.Position, Torsoz.Position + HWRDir) * CFrame.new(1.5,0,-0.2)).p - Torsoz.Position).unit*3.9) | |
| 2189 | lefthitz, leftenz = RAY(Torsoz.Position, ((CFrame.new(Torsoz.Position, Torsoz.Position + HWRDir) * CFrame.new(-1.5,0,-0.2)).p - Torsoz.Position).unit*3.9) | |
| 2190 | ||
| 2191 | end | |
| 2192 | ||
| 2193 | if Action == "Standing" and Shift == true and (hitz == nil or hitz.CanCollide == false) and (righthitz == nil or righthitz.CanCollide == false) and (lefthitz == nil or lefthitz.CanCollide == false) and (ghitz == nil or ghitz.CanCollide == false) and (Torsoz.Velocity.y > 6 and Torsoz.Velocity.y < 50) and DivingCooldown <= 0 then | |
| 2194 | if stamina >= 10 then | |
| 2195 | --if Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 12 then | |
| 2196 | Dive() | |
| 2197 | --end | |
| 2198 | end | |
| 2199 | end | |
| 2200 | ||
| 2201 | if hitz == nil and VWallRunning == "Falling" then | |
| 2202 | VWallRunning = "BackflipFromFall" | |
| 2203 | end | |
| 2204 | ||
| 2205 | if Shift == true and Torsoz.Velocity.y > -50 and Diving == false and DivingCooldown <= 0 then | |
| 2206 | local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-3.5,0)) | |
| 2207 | ||
| 2208 | if hitz ~= nil then | |
| 2209 | if Action == "Standing" and VWRCooldown == 0 then | |
| 2210 | if hitz2 == nil or hitz2.CanCollide == false then | |
| 2211 | VWR(hitz, enz) | |
| 2212 | end | |
| 2213 | end | |
| 2214 | end | |
| 2215 | ||
| 2216 | if (HWallRunning == false or (HWallRunning == "Jumping" and (HWRLastPart ~= righthitz or HWRLastPart ~= lefthitz))) and HWRCooldown == 0 and VWallRunning == false then | |
| 2217 | ||
| 2218 | if (hitz == nil or HWallRunning == "Jumping") and ((righthitz ~= nil and righthitz.Parent:findFirstChild("Humanoid") == nil and righthitz.Parent.className ~= "Hat") or (lefthitz ~= nil and lefthitz.Parent:findFirstChild("Humanoid") == nil and lefthitz.Parent.className ~= "Hat")) then
| |
| 2219 | if hitz2 == nil or hitz2.CanCollide == false then | |
| 2220 | local right = (rightenz - Torsoz.Position).magnitude | |
| 2221 | local left = (leftenz - Torsoz.Position).magnitude | |
| 2222 | if right < left then | |
| 2223 | if HWallRunning == "Jumping" and HWRLastPart ~= righthitz then | |
| 2224 | HWallRunning = false | |
| 2225 | while Standing == false do | |
| 2226 | wait(0.01) | |
| 2227 | end | |
| 2228 | print("2nd Right Activated!")
| |
| 2229 | HWallRun(righthitz, rightenz, -math.pi/2) | |
| 2230 | else | |
| 2231 | if hitz == nil then | |
| 2232 | print("Right Activated")
| |
| 2233 | HWallRun(righthitz, rightenz, -math.pi/2) | |
| 2234 | end | |
| 2235 | end | |
| 2236 | elseif left < right then | |
| 2237 | if HWallRunning == "Jumping" and HWRLastPart ~= lefthitz then | |
| 2238 | HWallRunning = false | |
| 2239 | while Standing == false do | |
| 2240 | wait(0.01) | |
| 2241 | end | |
| 2242 | print("2nd Left Activated!")
| |
| 2243 | HWallRun(lefthitz, leftenz, math.pi/2) | |
| 2244 | else | |
| 2245 | if hitz == nil then | |
| 2246 | print("Left Activated")
| |
| 2247 | HWallRun(lefthitz, leftenz, math.pi/2) | |
| 2248 | end | |
| 2249 | end | |
| 2250 | end | |
| 2251 | end | |
| 2252 | end | |
| 2253 | end | |
| 2254 | ||
| 2255 | end | |
| 2256 | ||
| 2257 | if HWallRunning == true then | |
| 2258 | HWallRunning = "Jumping" | |
| 2259 | Action = "HWRJumping" | |
| 2260 | end | |
| 2261 | ||
| 2262 | elseif key == string.char(48) then | |
| 2263 | Shift = true | |
| 2264 | elseif key == string.char(50) then | |
| 2265 | if Action == "Standing" then | |
| 2266 | Sit() | |
| 2267 | elseif HWallRunning == true then | |
| 2268 | HWRGravDrop = true | |
| 2269 | end | |
| 2270 | elseif key == string.char(52) then | |
| 2271 | if Shift == true and Action == "Standing" and SlideCooldown == 0 and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 15 and Torsoz.Velocity.y > -40 then | |
| 2272 | print("Sliding")
| |
| 2273 | Slide() | |
| 2274 | end | |
| 2275 | elseif key == "a" then | |
| 2276 | VWRLeft = true | |
| 2277 | elseif key == "d" then | |
| 2278 | VWRRight = true | |
| 2279 | end | |
| 2280 | end | |
| 2281 | end | |
| 2282 | ||
| 2283 | function KU(key) | |
| 2284 | if key == string.char(32) then | |
| 2285 | Space = false | |
| 2286 | elseif key == string.char(48) then | |
| 2287 | Shift = false | |
| 2288 | elseif key == string.char(50) then | |
| 2289 | if Action == "Sitting" then | |
| 2290 | Stand() | |
| 2291 | end | |
| 2292 | elseif key == string.char(52) then | |
| 2293 | Sliding = false | |
| 2294 | elseif key == "a" then | |
| 2295 | VWRLeft = false | |
| 2296 | elseif key == "d" then | |
| 2297 | VWRRight = false | |
| 2298 | end | |
| 2299 | end | |
| 2300 | ||
| 2301 | mouse.KeyDown:connect(function(key) KD(key) end) | |
| 2302 | mouse.KeyUp:connect(function(key) KU(key) end) | |
| 2303 | ||
| 2304 | Joint1 = Instance.new("Snap", Torsoz)
| |
| 2305 | GetWeld(Joint1) | |
| 2306 | Joint2 = Instance.new("Snap", Torsoz)
| |
| 2307 | GetWeld(Joint2) | |
| 2308 | Joint3 = Instance.new("Snap", Torsoz)
| |
| 2309 | GetWeld(Joint3) | |
| 2310 | Joint4 = Instance.new("Snap", Torsoz)
| |
| 2311 | GetWeld(Joint4) | |
| 2312 | Joint5 = Instance.new("Snap", Torsoz)
| |
| 2313 | GetWeld(Joint5) | |
| 2314 | Stand() | |
| 2315 | ||
| 2316 | local animatebg = Instance.new("BodyGyro")
| |
| 2317 | animatebg.D = 100 | |
| 2318 | local GravAction = "Idle" | |
| 2319 | local PrevGravAction = GravAction | |
| 2320 | ||
| 2321 | local prevrapos = (RA.CFrame * CFrame.new(0,-1,0)).p | |
| 2322 | local prevlapos = (LA.CFrame * CFrame.new(0,-1,0)).p | |
| 2323 | local hue = 0 | |
| 2324 | local recyclecount = 0 | |
| 2325 | local tickoffset = tick() | |
| 2326 | local fadetab = {}
| |
| 2327 | local fadetab2 = {}
| |
| 2328 | local animatebgcount = 0 | |
| 2329 | ||
| 2330 | for i = 1, 13 do | |
| 2331 | local p = P:Clone() | |
| 2332 | p.Name = "Part"..i | |
| 2333 | local mesh = Instance.new("SpecialMesh", p)
| |
| 2334 | mesh.MeshId = "http://www.roblox.com/Asset/?id=9856898" | |
| 2335 | mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980" | |
| 2336 | table.insert(fadetab, {p, mesh})
| |
| 2337 | end | |
| 2338 | for i = 1, 13 do | |
| 2339 | local p = P:Clone() | |
| 2340 | p.Name = "Part"..i | |
| 2341 | local mesh = Instance.new("SpecialMesh", p)
| |
| 2342 | mesh.MeshId = "http://www.roblox.com/Asset/?id=9856898" | |
| 2343 | mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980" | |
| 2344 | table.insert(fadetab2, {p, mesh})
| |
| 2345 | end | |
| 2346 | ||
| 2347 | game:service("RunService").Stepped:connect(function()
| |
| 2348 | GravAction = "Idle" | |
| 2349 | hue = hue + 3 | |
| 2350 | hue = hue % 360 | |
| 2351 | ||
| 2352 | ------------- anim angle changing -------- | |
| 2353 | if animangle > math.pi then | |
| 2354 | animplus = false | |
| 2355 | elseif animangle < -math.pi then | |
| 2356 | animplus = true | |
| 2357 | end | |
| 2358 | if animplus == true then | |
| 2359 | animangle = animangle + animspeed | |
| 2360 | elseif animplus == false then | |
| 2361 | animangle = animangle - animspeed | |
| 2362 | end | |
| 2363 | ||
| 2364 | local hitz, enz = RAY(Torsoz.Position, Vector3.new(0,-3.9,0)) | |
| 2365 | if Shift == true then | |
| 2366 | Hu.WalkSpeed = sprint | |
| 2367 | else | |
| 2368 | Hu.WalkSpeed = 16 | |
| 2369 | end | |
| 2370 | if (FOV >= 70 and FOV < 74) and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude > 25 then | |
| 2371 | FOV = FOV + 1 | |
| 2372 | elseif (FOV <= 74 and FOV > 70) and Vector3.new(Torsoz.Velocity.x,0,Torsoz.Velocity.z).magnitude < 20 then | |
| 2373 | FOV = FOV - 1 | |
| 2374 | end | |
| 2375 | if pause.Value == true then | |
| 2376 | Hu.WalkSpeed = 0 | |
| 2377 | end | |
| 2378 | if Sitting == true then | |
| 2379 | local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-2.2,0)) | |
| 2380 | Hu.PlatformStand = true | |
| 2381 | if hitz2 == nil then | |
| 2382 | Stand() | |
| 2383 | end | |
| 2384 | end | |
| 2385 | if Diving == true then | |
| 2386 | Hu.PlatformStand = true | |
| 2387 | DivingBV.velocity = Vector3.new(DivingDir.x*(sprint+2),GravPoint,DivingDir.z*(sprint+2)) | |
| 2388 | DivingBG.cframe = CFrame.new(Torsoz.Position, Torsoz.Position+DivingBV.velocity) * CFrame.Angles(-math.pi/2,0,0) | |
| 2389 | ||
| 2390 | if GravPoint > -180 then | |
| 2391 | GravPoint = GravPoint - 2 | |
| 2392 | end | |
| 2393 | end | |
| 2394 | if DivingCooldown > 0 then | |
| 2395 | DivingCooldown = DivingCooldown - 1 | |
| 2396 | end | |
| 2397 | if HWallRunning == true then | |
| 2398 | if HWRGravDrop == false then | |
| 2399 | GravPoint = GravPoint - 0.4 | |
| 2400 | else | |
| 2401 | GravPoint = GravPoint - 2 | |
| 2402 | end | |
| 2403 | elseif HWallRunning == "Jumping" then | |
| 2404 | GravPoint = GravPoint - 1.7 | |
| 2405 | end | |
| 2406 | ----------------------------- stamina ---------------------------------------- | |
| 2407 | if Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude > 18 and Action == "Standing" and Shift == true then | |
| 2408 | if stamina > 0 then | |
| 2409 | stamina = stamina - 0.5 | |
| 2410 | if stamina < 0 then | |
| 2411 | Shift = false | |
| 2412 | stamina = 0 | |
| 2413 | end | |
| 2414 | else | |
| 2415 | Shift = false | |
| 2416 | stamina = 0 | |
| 2417 | end | |
| 2418 | if Action == "Standing" then | |
| 2419 | animspeed = 0.85 | |
| 2420 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/4.85,0,0)) | |
| 2421 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/4.85,0,0)) | |
| 2422 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/3.5,0,0)) | |
| 2423 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/3.5,0,0)) | |
| 2424 | end | |
| 2425 | elseif Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude > 12 and Action ~= "Sliding" then | |
| 2426 | if stamina < maxstamina then | |
| 2427 | stamina = stamina + 0.5 | |
| 2428 | if stamina > maxstamina then | |
| 2429 | stamina = maxstamina | |
| 2430 | end | |
| 2431 | else | |
| 2432 | stamina = maxstamina | |
| 2433 | end | |
| 2434 | if Action == "Standing" then | |
| 2435 | animspeed = 0.65 | |
| 2436 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/7,0,0)) | |
| 2437 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/7,0,0)) | |
| 2438 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/5,0,0)) | |
| 2439 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/5,0,0)) | |
| 2440 | end | |
| 2441 | elseif Vector3.new(Torsoz.Velocity.x, 0, Torsoz.Velocity.z).magnitude < 2 then | |
| 2442 | animspeed = 0.1 | |
| 2443 | if Action == "Standing" then | |
| 2444 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/38,0,0)) | |
| 2445 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/38,0,0)) | |
| 2446 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new(animangle/30,0,0)) | |
| 2447 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new(-animangle/30,0,0)) | |
| 2448 | end | |
| 2449 | if stamina < maxstamina then | |
| 2450 | if Sitting == false then | |
| 2451 | stamina = stamina + 0.65 | |
| 2452 | else | |
| 2453 | stamina = stamina + 1.02 | |
| 2454 | end | |
| 2455 | if stamina > maxstamina then | |
| 2456 | stamina = maxstamina | |
| 2457 | end | |
| 2458 | else | |
| 2459 | stamina = maxstamina | |
| 2460 | end | |
| 2461 | end | |
| 2462 | ||
| 2463 | if hitz == nil then | |
| 2464 | if Torsoz.Velocity.y > 1 or (Torsoz.Velocity.y < -1 and Torsoz.Velocity.y > -90) then | |
| 2465 | if Action == "Standing" then | |
| 2466 | GravAction = "Rising" | |
| 2467 | animspeed = 0.1 | |
| 2468 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.5,-1,0), Vector3.new(-animangle/38,0,0)) | |
| 2469 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.5,-1,0), Vector3.new(animangle/38,0,0)) | |
| 2470 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.5,0.5,0), Vector3.new((math.pi-0.2)+(animangle/30),0,0)) | |
| 2471 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.5,0.5,0), Vector3.new((math.pi-0.2)+(-animangle/30),0,0)) | |
| 2472 | if animatebg.Parent ~= nil then | |
| 2473 | animatebg.Parent = Torsoz | |
| 2474 | animatebg.maxTorque = Vector3.new(1/0,10000,1/0) | |
| 2475 | local lokvec = Torsoz.CFrame.lookVector*100 | |
| 2476 | animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z)) | |
| 2477 | animatebg.Parent = nil | |
| 2478 | end | |
| 2479 | end | |
| 2480 | end | |
| 2481 | end | |
| 2482 | ||
| 2483 | if hitz == nil then | |
| 2484 | local hitz2, enz2 = RAY(Torsoz.Position, Vector3.new(0,-6,0)) | |
| 2485 | if hitz2 == nil then | |
| 2486 | if Torsoz.Velocity.y < -90 then | |
| 2487 | if Action == "Standing" then | |
| 2488 | GravAction = "Falling" | |
| 2489 | animspeed = 1.1 | |
| 2490 | animatebg.Parent = Torsoz | |
| 2491 | animatebg.maxTorque = Vector3.new(1/0,10000,1/0) | |
| 2492 | local lokvec = Torsoz.CFrame.lookVector*100 | |
| 2493 | animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z)) * CFrame.Angles(-math.pi/11,animangle/70,0) | |
| 2494 | SetWeld(Joint1,1,1, NV,NV, Vector3.new(0.45,-0.8,0), Vector3.new((animangle/27)-0.3,0,0.18)) | |
| 2495 | SetWeld(Joint2,1,1, NV,NV, Vector3.new(-0.45,-0.8,0), Vector3.new((-animangle/27)-0.3,0,-0.18)) | |
| 2496 | SetWeld(Joint3,1,1, NV,NV, Vector3.new(1.4,0.5,0), Vector3.new((math.pi+0.2)+(animangle/26),0,0.18)) | |
| 2497 | SetWeld(Joint4,1,1, NV,NV, Vector3.new(-1.4,0.5,0), Vector3.new((math.pi+0.2)+(-animangle/26),0,-0.18)) | |
| 2498 | end | |
| 2499 | end | |
| 2500 | elseif hitz2.CanCollide == true then | |
| 2501 | if animatebg.Parent ~= nil then | |
| 2502 | animatebg.Parent = Torsoz | |
| 2503 | animatebg.maxTorque = Vector3.new(1/0,10000,1/0) | |
| 2504 | local lokvec = Torsoz.CFrame.lookVector*100 | |
| 2505 | animatebg.cframe = CFrame.new(NV, Vector3.new(lokvec.x,0,lokvec.z)) | |
| 2506 | animatebg.Parent = nil | |
| 2507 | end | |
| 2508 | end | |
| 2509 | end | |
| 2510 | ||
| 2511 | if GravAction == "Idle" and animatebg.Parent ~= nil then | |
| 2512 | animatebg.Parent = nil | |
| 2513 | end | |
| 2514 | ||
| 2515 | if math.abs(tickoffset - tick()) > 0.05 then | |
| 2516 | tickoffset = tick() | |
| 2517 | local flowcolor = HSV(hue, 0.7,1) | |
| 2518 | recyclecount = (recyclecount % #fadetab) + 1 | |
| 2519 | if flow.Value > 25 then | |
| 2520 | local lapos = (LA.CFrame * CFrame.new(0,-1,0)).p | |
| 2521 | local rapos = (RA.CFrame * CFrame.new(0,-1,0)).p | |
| 2522 | local p = fadetab[recyclecount] | |
| 2523 | p[1].Parent = m | |
| 2524 | p[1].CFrame = CFrame.new((lapos+prevlapos)/2, lapos) | |
| 2525 | p[2].Scale = Vector3.new(0.5,0.5,(lapos-prevlapos).magnitude*2) | |
| 2526 | p[2].VertexColor = Vector3.new(flowcolor.r,flowcolor.g,flowcolor.b) | |
| 2527 | p[1].Transparency = math.abs((flow.Value/120) - 0.8) | |
| 2528 | p[1].Transparency = p[1].Transparency + (1/#fadetab) | |
| 2529 | local p = fadetab2[recyclecount] | |
| 2530 | p[1].Parent = m | |
| 2531 | p[1].CFrame = CFrame.new((rapos+prevrapos)/2, rapos) | |
| 2532 | p[2].Scale = Vector3.new(0.5,0.5,(rapos-prevrapos).magnitude*2) | |
| 2533 | p[2].VertexColor = Vector3.new(flowcolor.r,flowcolor.g,flowcolor.b) | |
| 2534 | p[1].Transparency = math.abs((flow.Value/120) - 0.8) | |
| 2535 | p[1].Transparency = p[1].Transparency + (1/#fadetab) | |
| 2536 | end | |
| 2537 | ||
| 2538 | for i, v in pairs(fadetab) do | |
| 2539 | if v[1].Transparency < 0.9 then | |
| 2540 | v[1].Transparency = v[1].Transparency + (1/#fadetab) | |
| 2541 | fadetab2[i][1].Transparency = fadetab2[i][1].Transparency + (1/#fadetab) | |
| 2542 | elseif v[1].Transparency ~= 1 then | |
| 2543 | v[1].Transparency = 1 | |
| 2544 | v[1].Position = Vector3.new(50000,0,0) | |
| 2545 | fadetab2[i][1].Transparency = 1 | |
| 2546 | fadetab2[i][1].Position = Vector3.new(50000,0,0) | |
| 2547 | end | |
| 2548 | end | |
| 2549 | ||
| 2550 | prevrapos = (RA.CFrame * CFrame.new(0,-1,0)).p | |
| 2551 | prevlapos = (LA.CFrame * CFrame.new(0,-1,0)).p | |
| 2552 | end | |
| 2553 | ||
| 2554 | if flow.Value > 140 then | |
| 2555 | if char.Parent ~= nil then | |
| 2556 | char:remove() | |
| 2557 | end | |
| 2558 | end | |
| 2559 | ||
| 2560 | if flowcooldown > 0 then | |
| 2561 | flowcooldown = flowcooldown - 1 | |
| 2562 | end | |
| 2563 | if HWRCooldown > 0 then | |
| 2564 | HWRCooldown = HWRCooldown - 1 | |
| 2565 | end | |
| 2566 | if VWRCooldown > 0 then | |
| 2567 | if hitz ~= nil and VWRCooldown > 0 then | |
| 2568 | VWRCooldown = VWRCooldown - 1 | |
| 2569 | end | |
| 2570 | end | |
| 2571 | if SlideCooldown > 0 then | |
| 2572 | SlideCooldown = SlideCooldown - 1 | |
| 2573 | end | |
| 2574 | ||
| 2575 | if Action == "HWallRunning" or Action == "VWallRunning" then | |
| 2576 | flow.Value = flow.Value + 0.24 | |
| 2577 | if flow.Value > 100 then | |
| 2578 | flow.Value = 100 | |
| 2579 | end | |
| 2580 | flowcooldown = 40 | |
| 2581 | elseif Action == "Diving" then | |
| 2582 | flowcooldown = 30 | |
| 2583 | elseif Action == "Sliding" then | |
| 2584 | flowcooldown = 15 | |
| 2585 | elseif Action == "Standing" or Action == "Sitting" then | |
| 2586 | if flow.Value > 0 and flowcooldown <= 0 then | |
| 2587 | flow.Value = flow.Value - 0.37 | |
| 2588 | if flow.Value < 0 then | |
| 2589 | flow.Value = 0 | |
| 2590 | end | |
| 2591 | end | |
| 2592 | end | |
| 2593 | ||
| 2594 | cam.FieldOfView = FOV | |
| 2595 | prevanimbgcount = animatebgcount | |
| 2596 | sprint = defsprint + ((flow.Value/100)*2.4) | |
| 2597 | PrevGravAction = GravAction | |
| 2598 | Calculate() | |
| 2599 | end) |