SHOW:
|
|
- or go back to the newest paste.
| 1 | --[[ | |
| 2 | Tf2 Engineer Class | |
| 3 | -------------------- | |
| 4 | Script by: 123jl123 | |
| 5 | --------------------- | |
| 6 | Sentry by: Madiik | |
| 7 | -- ]] | |
| 8 | ||
| 9 | ||
| 10 | local plr = game:service'Players'.LocalPlayer | |
| 11 | local char = plr.Character | |
| 12 | local mouse = plr:GetMouse() | |
| 13 | local humanoid = char:findFirstChild("Humanoid")
| |
| 14 | local torso = char:findFirstChild("Torso")
| |
| 15 | local head = char.Head | |
| 16 | local ra = char:findFirstChild("Right Arm")
| |
| 17 | local la = char:findFirstChild("Left Arm")
| |
| 18 | local rl = char:findFirstChild("Right Leg")
| |
| 19 | local ll = char:findFirstChild("Left Leg")
| |
| 20 | local rs = torso:findFirstChild("Right Shoulder")
| |
| 21 | local ls = torso:findFirstChild("Left Shoulder")
| |
| 22 | local rh = torso:findFirstChild("Right Hip")
| |
| 23 | local lh = torso:findFirstChild("Left Hip")
| |
| 24 | local neck = torso:findFirstChild("Neck")
| |
| 25 | local rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
| |
| 26 | local rootpart = char:findFirstChild("HumanoidRootPart")
| |
| 27 | local camera = workspace.CurrentCamera | |
| 28 | local anim = char:findFirstChild("Animate")
| |
| 29 | DA = false | |
| 30 | NoSentry = true | |
| 31 | maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name | |
| 32 | secondcolor = "Really black" | |
| 33 | WSHM = {'10209908','10209905','10209905','10209908'}
| |
| 34 | WSH = WSHM[math.random(1,#WSHM)] | |
| 35 | wait(1 / 60) | |
| 36 | Effects = { }
| |
| 37 | local Player = game.Players.localPlayer | |
| 38 | local Character = Player.Character | |
| 39 | local Humanoid = Character.Humanoid | |
| 40 | local mouse = Player:GetMouse() | |
| 41 | local LeftArm = Character["Left Arm"] | |
| 42 | local RightArm = Character["Right Arm"] | |
| 43 | local LeftLeg = Character["Left Leg"] | |
| 44 | local RightLeg = Character["Right Leg"] | |
| 45 | local Head = Character.Head | |
| 46 | local Torso = Character.Torso | |
| 47 | local cam = game.Workspace.CurrentCamera | |
| 48 | local RootPart = Character.HumanoidRootPart | |
| 49 | local RootJoint = RootPart.RootJoint | |
| 50 | local equipped = false | |
| 51 | local attack = false | |
| 52 | local Anim = 'Idle' | |
| 53 | local idle = 0 | |
| 54 | local attacktype = 1 | |
| 55 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 56 | local velocity = RootPart.Velocity.y | |
| 57 | local sine = 0 | |
| 58 | local change = 1 | |
| 59 | local grabbed = false | |
| 60 | local cn = CFrame.new | |
| 61 | local mr = math.rad | |
| 62 | local angles = CFrame.Angles | |
| 63 | local ud = UDim2.new | |
| 64 | local c3 = Color3.new | |
| 65 | local slashDamage = 15 | |
| 66 | trans = 1 | |
| 67 | for i,v in pairs(char:GetChildren()) do if v:IsA("Accessory") then v:Remove() end end
| |
| 68 | for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v:Remove() end end
| |
| 69 | Wep = 1 | |
| 70 | equippedgun2 = false | |
| 71 | ||
| 72 | ||
| 73 | ||
| 74 | ||
| 75 | ||
| 76 | ||
| 77 | ||
| 78 | ||
| 79 | ||
| 80 | ||
| 81 | --SB Plasma Shotgun 2013 | |
| 82 | ||
| 83 | --madiik's plasma shottie | |
| 84 | ||
| 85 | --variables | |
| 86 | ||
| 87 | ||
| 88 | ||
| 89 | --some more variables | |
| 90 | ||
| 91 | local spread = 1 | |
| 92 | -- end of some more variables | |
| 93 | ||
| 94 | local sound = Instance.new("Sound",head)
| |
| 95 | sound.SoundId = "http://www.roblox.com/asset?id=10209842" | |
| 96 | sound.Volume = 2 | |
| 97 | sound.Pitch = 1 | |
| 98 | ||
| 99 | ||
| 100 | ||
| 101 | ||
| 102 | ||
| 103 | ||
| 104 | ||
| 105 | local sound2 = Instance.new("Sound",head)
| |
| 106 | sound2.SoundId = "http://www.roblox.com/asset?id=10209881" | |
| 107 | sound2.Volume = 1 | |
| 108 | sound2.Pitch = 1 | |
| 109 | ||
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | ||
| 115 | ||
| 116 | function attach(weld, part0, part1) | |
| 117 | weld.Part0 = part0 | |
| 118 | weld.Part1 = part1 | |
| 119 | end | |
| 120 | ||
| 121 | ||
| 122 | ||
| 123 | ||
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | ||
| 128 | ||
| 129 | --create func | |
| 130 | function part(parent, size, color, formfactor, collide, transparency) | |
| 131 | if transparency == nil then transparency = 0 end | |
| 132 | if collide == nil then collide = false end | |
| 133 | if formfactor == nil then formfactor = Enum.FormFactor.Custom end | |
| 134 | local p=Instance.new("Part", parent)
| |
| 135 | p.FormFactor=formfactor | |
| 136 | p.CanCollide=false | |
| 137 | p.Size=size | |
| 138 | p.Locked=true | |
| 139 | p.Transparency=transparency | |
| 140 | p.Position=torso.Position | |
| 141 | p.BrickColor=color | |
| 142 | p.FrontSurface="SmoothNoOutlines" | |
| 143 | p.BackSurface="SmoothNoOutlines" | |
| 144 | p.LeftSurface="SmoothNoOutlines" | |
| 145 | p.BottomSurface="SmoothNoOutlines" | |
| 146 | p.TopSurface="SmoothNoOutlines" | |
| 147 | p.RightSurface="SmoothNoOutlines" | |
| 148 | return p | |
| 149 | end | |
| 150 | function wedge(parent, size, color, formfactor, collide, transparency) | |
| 151 | ||
| 152 | if transparency == nil then transparency = 0 end | |
| 153 | if collide == nil then collide = false end | |
| 154 | if formfactor == nil then formfactor = Enum.FormFactor.Custom end | |
| 155 | ||
| 156 | local p=Instance.new("WedgePart", parent)
| |
| 157 | p.FormFactor=formfactor | |
| 158 | p.CanCollide=false | |
| 159 | p.Size=size | |
| 160 | p.Locked=true | |
| 161 | p.Position = torso.Position | |
| 162 | p.BrickColor=color | |
| 163 | p.FrontSurface="SmoothNoOutlines" | |
| 164 | p.BackSurface="SmoothNoOutlines" | |
| 165 | p.LeftSurface="SmoothNoOutlines" | |
| 166 | p.BottomSurface="SmoothNoOutlines" | |
| 167 | p.TopSurface="SmoothNoOutlines" | |
| 168 | p.RightSurface="SmoothNoOutlines" | |
| 169 | return p | |
| 170 | end | |
| 171 | function weld(part0, part1, c0, parent, c1) | |
| 172 | if parent == nil then parent = gun end | |
| 173 | if c1 == nil then c1 = CFrame.new() end | |
| 174 | ||
| 175 | local wel=Instance.new("Weld", parent)
| |
| 176 | wel.Part0 = part0 | |
| 177 | wel.Part1 = part1 | |
| 178 | wel.C0 = c0 | |
| 179 | wel.C1 = c1 | |
| 180 | return wel | |
| 181 | end | |
| 182 | function specialmesh(parent, meshType, scale, meshId) | |
| 183 | local mesh = Instance.new("SpecialMesh", parent)
| |
| 184 | mesh.Scale = scale | |
| 185 | mesh.MeshType = meshType | |
| 186 | mesh.MeshId = meshId | |
| 187 | return mesh | |
| 188 | end | |
| 189 | ||
| 190 | ||
| 191 | --some ray functi0n | |
| 192 | ||
| 193 | function rayCast2(speed, gravity, from) | |
| 194 | coroutine.wrap(function() | |
| 195 | if char.Humanoid.Health == 0 then return end | |
| 196 | local rayP = Instance.new("Part")
| |
| 197 | rayP.Name = "rayP" | |
| 198 | rayP.BrickColor = BrickColor.new("New Yeller")
| |
| 199 | rayP.Material = 'Neon' | |
| 200 | rayP.Anchored = true | |
| 201 | rayP.CanCollide = false | |
| 202 | rayP.Locked = true | |
| 203 | rayP.TopSurface = Enum.SurfaceType.Smooth | |
| 204 | rayP.BottomSurface = Enum.SurfaceType.Smooth | |
| 205 | rayP.formFactor = Enum.FormFactor.Custom | |
| 206 | rayP.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 207 | ||
| 208 | ||
| 209 | ||
| 210 | Instance.new("BlockMesh", rayP).Scale = Vector3.new(0.2, 0.2, 10)
| |
| 211 | ||
| 212 | ||
| 213 | ||
| 214 | ||
| 215 | ||
| 216 | ||
| 217 | ||
| 218 | ||
| 219 | local bulletposition = from.Position + Vector3.new(0, 0.3, 0) | |
| 220 | ||
| 221 | local bulletvelocity = (Vector3.new(math.random(-spread*4,spread*4), math.random(-spread*4,spread*4), math.random(-spread*4,spread*4)))+( plr:GetMouse().Hit.p - bulletposition).unit*speed | |
| 222 | local bulletlastposition = bulletposition | |
| 223 | ||
| 224 | ||
| 225 | ||
| 226 | ||
| 227 | coroutine.resume(coroutine.create(function() | |
| 228 | while true do | |
| 229 | local dt = wait() | |
| 230 | bulletlastposition = bulletposition | |
| 231 | bulletvelocity = bulletvelocity + (Vector3.new(0, -14.81*gravity, 0)*dt) | |
| 232 | bulletposition = bulletposition + (bulletvelocity*dt) | |
| 233 | ||
| 234 | local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition)) | |
| 235 | ||
| 236 | local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayP, TrailPart} )
| |
| 237 | ||
| 238 | if (torso.Position - rayP.Position).magnitude > 540 then | |
| 239 | rayP:Destroy() | |
| 240 | break | |
| 241 | end | |
| 242 | ||
| 243 | ||
| 244 | if hit then | |
| 245 | local damage = math.random(10, 20) | |
| 246 | if hit.Parent:findFirstChild("Humanoid") ~= nil then
| |
| 247 | hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage | |
| 248 | end | |
| 249 | if hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
| |
| 250 | hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage | |
| 251 | end | |
| 252 | bulletposition = hitposition | |
| 253 | rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) | |
| 254 | rayP:Destroy() | |
| 255 | break | |
| 256 | end | |
| 257 | rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) | |
| 258 | rayP.Parent = workspace | |
| 259 | end | |
| 260 | end)) | |
| 261 | end)() | |
| 262 | end | |
| 263 | ||
| 264 | ||
| 265 | ||
| 266 | ||
| 267 | ||
| 268 | ||
| 269 | ||
| 270 | --function attach(weld, part0, part1) | |
| 271 | --weld.Part0 = part0 | |
| 272 | --weld.Part1 = part1 | |
| 273 | --end | |
| 274 | ||
| 275 | ||
| 276 | ||
| 277 | ||
| 278 | ||
| 279 | ||
| 280 | ||
| 281 | ||
| 282 | ||
| 283 | ||
| 284 | ||
| 285 | ||
| 286 | ||
| 287 | ||
| 288 | ||
| 289 | ||
| 290 | ||
| 291 | ||
| 292 | ||
| 293 | ||
| 294 | ||
| 295 | ||
| 296 | ||
| 297 | ||
| 298 | ||
| 299 | ||
| 300 | ||
| 301 | TmRed = false | |
| 302 | TmBlue = false | |
| 303 | TeamColor = BrickColor.new("Really Black")
| |
| 304 | ||
| 305 | local BC = char["Body Colors"] | |
| 306 | BC.HeadColor = BrickColor.new("Bright yellow")
| |
| 307 | - | local BC = char["Body Colors"] |
| 307 | + | BC.RightArmColor = BrickColor.new("Bright yellow")
|
| 308 | - | BC.HeadColor = BrickColor.new("Pastel brown")
|
| 308 | + | BC.LeftArmColor = BrickColor.new("Bright yellow")
|
| 309 | - | BC.LeftArmColor = BrickColor.new("Pastel brown")
|
| 309 | + | BC.RightLegColor = BrickColor.new("Br. yellowish green")
|
| 310 | - | BC.LeftLegColor = BrickColor.new("Pastel brown")
|
| 310 | + | BC.LeftLegColor = BrickColor.new("Br. yellowish green")
|
| 311 | - | BC.RightArmColor = BrickColor.new("Pastel brown")
|
| 311 | + | BC.TorsoColor = BrickColor.new("Bright blue")
|
| 312 | - | BC.RightLegColor = BrickColor.new("Pastel brown")
|
| 312 | + | |
| 313 | - | BC.TorsoColor = BrickColor.new("Pastel brown")
|
| 313 | + | |
| 314 | New = function(Object, Parent, Name, Data) | |
| 315 | local Object = Instance.new(Object) | |
| 316 | for Index, Value in pairs(Data or {}) do
| |
| 317 | Object[Index] = Value | |
| 318 | end | |
| 319 | Object.Parent = Parent | |
| 320 | Object.Name = Name | |
| 321 | return Object | |
| 322 | end | |
| 323 | local AddInstance = function(Object, ...) | |
| 324 | local Obj = Instance.new(Object) | |
| 325 | for i,v in next,(...) do | |
| 326 | Obj[i] = v | |
| 327 | end | |
| 328 | return Obj | |
| 329 | end | |
| 330 | ||
| 331 | ||
| 332 | ||
| 333 | ||
| 334 | ||
| 335 | Team=function() | |
| 336 | ||
| 337 | local r=math.random(1,2) | |
| 338 | if r==1 then | |
| 339 | print('RED')
| |
| 340 | script.Name = "TeamRed" | |
| 341 | TmRed = true | |
| 342 | for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") then v:Remove() end end
| |
| 343 | for i,v in pairs(char:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
| |
| 344 | wait()shirt = Instance.new("Shirt", char)
| |
| 345 | shirt.Name = "Shirt" | |
| 346 | pants = Instance.new("Pants", char)
| |
| 347 | pants.Name = "Pants" | |
| 348 | char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0" | |
| 349 | char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0" | |
| 350 | - | char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232230" |
| 350 | + | |
| 351 | - | char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=69232580" |
| 351 | + | |
| 352 | ||
| 353 | if r==2 then | |
| 354 | print('BLUE')
| |
| 355 | TmBlue = true | |
| 356 | script.Name = "TeamBlue" | |
| 357 | for i,v in pairs(char:GetChildren()) do if v:IsA("Shirt") then v:Remove() end end
| |
| 358 | for i,v in pairs(char:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
| |
| 359 | wait()shirt = Instance.new("Shirt", char)
| |
| 360 | shirt.Name = "Shirt" | |
| 361 | pants = Instance.new("Pants", char)
| |
| 362 | pants.Name = "Pants" | |
| 363 | char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0" | |
| 364 | char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0" | |
| 365 | - | char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232247" |
| 365 | + | |
| 366 | - | char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=69232594" |
| 366 | + | |
| 367 | print(''..r)
| |
| 368 | end | |
| 369 | ||
| 370 | Team() | |
| 371 | ||
| 372 | ||
| 373 | ||
| 374 | local MusThingHat = AddInstance("Part",{
| |
| 375 | Parent = head, | |
| 376 | CFrame = head.CFrame, | |
| 377 | formFactor = "Symmetric", | |
| 378 | Size = Vector3.new(1, 1, 1), | |
| 379 | CanCollide = false, | |
| 380 | TopSurface = "Smooth", | |
| 381 | BottomSurface = "Smooth", | |
| 382 | Locked = true, | |
| 383 | BrickColor=BrickColor.new("Br. yellowish orange"),
| |
| 384 | Transparency = 1, | |
| 385 | }) | |
| 386 | local Weld = AddInstance("Weld",{
| |
| 387 | Parent = MusThingHat, | |
| 388 | Part0 = head, | |
| 389 | C0 = CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0), | |
| 390 | Part1 = MusThingHat, | |
| 391 | }) | |
| 392 | local Mesh = AddInstance("SpecialMesh",{
| |
| 393 | Parent = MusThingHat, | |
| 394 | ||
| 395 | Scale = Vector3.new(.1,0,.1), | |
| 396 | ||
| 397 | }) | |
| 398 | ||
| 399 | local Reaper = AddInstance("Part",{
| |
| 400 | Parent = head, | |
| 401 | CFrame = head.CFrame, | |
| 402 | formFactor = "Symmetric", | |
| 403 | Size = Vector3.new(1, 1, 1), | |
| 404 | CanCollide = false, | |
| 405 | TopSurface = "Smooth", | |
| 406 | BottomSurface = "Smooth", | |
| 407 | Locked = true, | |
| 408 | BrickColor=BrickColor.new("Br. yellowish orange"),
| |
| 409 | }) | |
| 410 | local Weld = AddInstance("Weld",{
| |
| 411 | Parent = Reaper, | |
| 412 | Part0 = head, | |
| 413 | C0 = CFrame.new(-.04,.7,-.1)*CFrame.Angles(0,0,.08), | |
| 414 | Part1 = Reaper, | |
| 415 | }) | |
| 416 | local Mesh = AddInstance("SpecialMesh",{
| |
| 417 | Parent = Reaper, | |
| 418 | MeshId = "rbxassetid://1047997", | |
| 419 | Scale = Vector3.new(1.06,1.05,1.06), | |
| 420 | - | MeshId = "rbxassetid://1073659", |
| 420 | + | |
| 421 | }) | |
| 422 | ||
| 423 | local Helmpart2 = AddInstance("Part",{
| |
| 424 | Parent = head, | |
| 425 | CFrame = head.CFrame, | |
| 426 | formFactor = "Symmetric", | |
| 427 | Size = Vector3.new(1, 1, 1), | |
| 428 | CanCollide = false, | |
| 429 | TopSurface = "Smooth", | |
| 430 | BottomSurface = "Smooth", | |
| 431 | Locked = true, | |
| 432 | BrickColor=BrickColor.new("White"),
| |
| 433 | }) | |
| 434 | local Weld = AddInstance("Weld",{
| |
| 435 | Parent = Helmpart2, | |
| 436 | Part0 = head, | |
| 437 | C0 = CFrame.new(.01,.4,.05)*CFrame.Angles(.1,0,-.02), | |
| 438 | Part1 = Helmpart2, | |
| 439 | }) | |
| 440 | local Mesh = AddInstance("SpecialMesh",{
| |
| 441 | Parent = Helmpart2, | |
| 442 | Scale = Vector3.new(1.28,.48,1.28), | |
| 443 | VertexColor = Vector3.new(1,1,1), | |
| 444 | }) | |
| 445 | ||
| 446 | ||
| 447 | local Glassespart2 = AddInstance("Part",{
| |
| 448 | Parent = head, | |
| 449 | CFrame = head.CFrame, | |
| 450 | formFactor = "Symmetric", | |
| 451 | Size = Vector3.new(1, 1, 1), | |
| 452 | CanCollide = false, | |
| 453 | TopSurface = "Smooth", | |
| 454 | BottomSurface = "Smooth", | |
| 455 | Locked = true, | |
| 456 | BrickColor=BrickColor.new("Really black"),
| |
| 457 | }) | |
| 458 | local Weld = AddInstance("Weld",{
| |
| 459 | Parent = Glassespart2, | |
| 460 | Part0 = head, | |
| 461 | C0 = CFrame.new(0,.35,0)*CFrame.Angles(0,0,0), | |
| 462 | Part1 = Glassespart2, | |
| 463 | }) | |
| 464 | local Mesh = AddInstance("SpecialMesh",{
| |
| 465 | Parent = Glassespart2, | |
| 466 | Scale = Vector3.new(1.27,.5,1.27), | |
| 467 | VertexColor = Vector3.new(1,1,1), | |
| 468 | }) | |
| 469 | ||
| 470 | ||
| 471 | ||
| 472 | ||
| 473 | ||
| 474 | ||
| 475 | ||
| 476 | ||
| 477 | local Reaper3 = AddInstance("Part",{
| |
| 478 | Parent = head, | |
| 479 | CFrame = head.CFrame, | |
| 480 | formFactor = "Symmetric", | |
| 481 | Size = Vector3.new(1, 1, 1), | |
| 482 | CanCollide = false, | |
| 483 | TopSurface = "Smooth", | |
| 484 | BottomSurface = "Smooth", | |
| 485 | Locked = true, | |
| 486 | BrickColor=BrickColor.new("Gold"),
| |
| 487 | }) | |
| 488 | local Weld = AddInstance("Weld",{
| |
| 489 | Parent = Reaper3, | |
| 490 | Part0 = head, | |
| 491 | C0 = CFrame.new(0,.3,-0.02)*CFrame.Angles(-.1,0,0), | |
| 492 | Part1 = Reaper3, | |
| 493 | }) | |
| 494 | local Mesh = AddInstance("SpecialMesh",{
| |
| 495 | Parent = Reaper3, | |
| 496 | MeshId = "rbxassetid://0", | |
| 497 | TextureId = "rbxassetid://0", | |
| 498 | - | MeshId = "rbxassetid://19380122", |
| 498 | + | |
| 499 | - | TextureId = "rbxassetid://19380117", |
| 499 | + | |
| 500 | }) | |
| 501 | ||
| 502 | ||
| 503 | ||
| 504 | ||
| 505 | ||
| 506 | ||
| 507 | ||
| 508 | local Reaper4 = AddInstance("Part",{
| |
| 509 | Parent = RightArm, | |
| 510 | CFrame = RightArm.CFrame, | |
| 511 | formFactor = "Symmetric", | |
| 512 | Size = Vector3.new(0.1, 0.5, 3), | |
| 513 | CanCollide = false, | |
| 514 | TopSurface = "Smooth", | |
| 515 | BottomSurface = "Smooth", | |
| 516 | Locked = true, | |
| 517 | Transparency = 0 | |
| 518 | }) | |
| 519 | local Weld = AddInstance("Weld",{
| |
| 520 | Parent = Reaper4, | |
| 521 | Part0 = RightArm, | |
| 522 | C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0), | |
| 523 | Part1 = Reaper4, | |
| 524 | }) | |
| 525 | local Mesh = AddInstance("SpecialMesh",{
| |
| 526 | Parent = Reaper4, | |
| 527 | MeshId = "rbxassetid://1047997", | |
| 528 | TextureId = "rbxassetid://1047998", | |
| 529 | - | MeshId = "rbxassetid://470533002", |
| 529 | + | |
| 530 | - | TextureId = "rbxassetid://470533004", |
| 530 | + | |
| 531 | }) | |
| 532 | ||
| 533 | local GunFire = AddInstance("Part",{
| |
| 534 | Parent = RightArm, | |
| 535 | CFrame = RightArm.CFrame, | |
| 536 | formFactor = "Symmetric", | |
| 537 | Size = Vector3.new(0.1, 0.1, 0.1), | |
| 538 | CanCollide = false, | |
| 539 | TopSurface = "Smooth", | |
| 540 | BottomSurface = "Smooth", | |
| 541 | Locked = true, | |
| 542 | Transparency = 1 | |
| 543 | }) | |
| 544 | local Weld = AddInstance("Weld",{
| |
| 545 | Parent = GunFire, | |
| 546 | Part0 = RightArm, | |
| 547 | C0 = CFrame.new(-0.8,-3.5,-0.7)*CFrame.Angles(4.7,3.4,0), | |
| 548 | Part1 = GunFire, | |
| 549 | }) | |
| 550 | ||
| 551 | ||
| 552 | local GunParticle = Instance.new("ParticleEmitter", GunFire);
| |
| 553 | GunParticle.VelocitySpread = 60; | |
| 554 | GunParticle.LightEmission = 200; | |
| 555 | ||
| 556 | local Colors2 = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
| |
| 557 | GunParticle.Size = NumberSequence.new(.05,.07); | |
| 558 | ||
| 559 | GunParticle.Color = ColorSequence.new(Colors2[math.random(#Colors2)]); | |
| 560 | GunParticle.Texture = "rbxassetid://252350680"; | |
| 561 | GunParticle.RotSpeed = NumberRange.new(10,70); | |
| 562 | GunParticle.Rate = 600; | |
| 563 | GunParticle.Speed = NumberRange.new(15); | |
| 564 | GunParticle.Transparency = NumberSequence.new(0,1); | |
| 565 | GunParticle.Lifetime = NumberRange.new(.01,.2); | |
| 566 | GunParticle.EmissionDirection = 'Back' | |
| 567 | GunParticle.Enabled = false | |
| 568 | ||
| 569 | ||
| 570 | ||
| 571 | ||
| 572 | ||
| 573 | ||
| 574 | ||
| 575 | ||
| 576 | local Reaper5 = AddInstance("Part",{
| |
| 577 | Parent = RightArm, | |
| 578 | CFrame = RightArm.CFrame, | |
| 579 | formFactor = "Symmetric", | |
| 580 | Size = Vector3.new(0.1, 0.5, 3), | |
| 581 | CanCollide = false, | |
| 582 | TopSurface = "Smooth", | |
| 583 | BottomSurface = "Smooth", | |
| 584 | Locked = true, | |
| 585 | Transparency = 1 | |
| 586 | }) | |
| 587 | local Weld = AddInstance("Weld",{
| |
| 588 | Parent = Reaper5, | |
| 589 | Part0 = RightArm, | |
| 590 | C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3), | |
| 591 | Part1 = Reaper5, | |
| 592 | }) | |
| 593 | local Mesh = AddInstance("SpecialMesh",{
| |
| 594 | Parent = Reaper5, | |
| 595 | MeshId = "rbxassetid://1047997", | |
| 596 | TextureId = "rbxassetid://1047998", | |
| 597 | - | MeshId = "rbxassetid://431003868", |
| 597 | + | |
| 598 | - | TextureId = "rbxassetid://430627740", |
| 598 | + | |
| 599 | }) | |
| 600 | ||
| 601 | ||
| 602 | ||
| 603 | local Arms = AddInstance("Model",{
| |
| 604 | Parent = cam, | |
| 605 | Name = "Arms", | |
| 606 | ||
| 607 | ||
| 608 | }) | |
| 609 | ||
| 610 | local Arm1 = AddInstance("Part",{
| |
| 611 | Parent = Arms, | |
| 612 | Name = "RightArm", | |
| 613 | CFrame = RightArm.CFrame, | |
| 614 | formFactor = "Symmetric", | |
| 615 | Size = Vector3.new(.85,1.85,.85), | |
| 616 | CanCollide = false, | |
| 617 | Material = "SmoothPlastic", | |
| 618 | TopSurface = "Smooth", | |
| 619 | BottomSurface = "Smooth", | |
| 620 | Locked = true, | |
| 621 | BrickColor=BrickColor.new("Pastel brown"),
| |
| 622 | Transparency = 0 | |
| 623 | }) | |
| 624 | local Weld = AddInstance("Weld",{
| |
| 625 | Parent = Arm1, | |
| 626 | Part0 = RightArm, | |
| 627 | C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0), | |
| 628 | Part1 = Arm1, | |
| 629 | }) | |
| 630 | ||
| 631 | local Arm2 = AddInstance("Part",{
| |
| 632 | Parent = Arms, | |
| 633 | Name = "LeftArm", | |
| 634 | CFrame = LeftArm.CFrame, | |
| 635 | formFactor = "Symmetric", | |
| 636 | Size = Vector3.new(.85,1.85,.85), | |
| 637 | CanCollide = false, | |
| 638 | Material = "SmoothPlastic", | |
| 639 | TopSurface = "Smooth", | |
| 640 | BottomSurface = "Smooth", | |
| 641 | Locked = true, | |
| 642 | BrickColor=BrickColor.new("Pastel brown"),
| |
| 643 | Transparency = 0 | |
| 644 | }) | |
| 645 | local Weld = AddInstance("Weld",{
| |
| 646 | Parent = Arm2, | |
| 647 | Part0 = LeftArm, | |
| 648 | C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0), | |
| 649 | Part1 = Arm2, | |
| 650 | }) | |
| 651 | ||
| 652 | ||
| 653 | ||
| 654 | ||
| 655 | local Arm3 = AddInstance("Part",{
| |
| 656 | Parent = Arms, | |
| 657 | Name = "RightArm", | |
| 658 | CFrame = RightArm.CFrame, | |
| 659 | formFactor = "Symmetric", | |
| 660 | Size = Vector3.new(.9,.9,.9), | |
| 661 | CanCollide = false, | |
| 662 | Material = "SmoothPlastic", | |
| 663 | TopSurface = "Smooth", | |
| 664 | BottomSurface = "Smooth", | |
| 665 | Locked = true, | |
| 666 | BrickColor=TeamColor, | |
| 667 | Transparency = 0 | |
| 668 | }) | |
| 669 | local Weld = AddInstance("Weld",{
| |
| 670 | Parent = Arm3, | |
| 671 | Part0 = RightArm, | |
| 672 | C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0), | |
| 673 | Part1 = Arm3, | |
| 674 | }) | |
| 675 | ||
| 676 | local Arm4 = AddInstance("Part",{
| |
| 677 | Parent = Arms, | |
| 678 | Name = "LeftArm", | |
| 679 | CFrame = LeftArm.CFrame, | |
| 680 | formFactor = "Symmetric", | |
| 681 | Size = Vector3.new(.9,.9,.9), | |
| 682 | CanCollide = false, | |
| 683 | Material = "SmoothPlastic", | |
| 684 | TopSurface = "Smooth", | |
| 685 | BottomSurface = "Smooth", | |
| 686 | Locked = true, | |
| 687 | BrickColor=TeamColor, | |
| 688 | Transparency = 0 | |
| 689 | }) | |
| 690 | local Weld = AddInstance("Weld",{
| |
| 691 | Parent = Arm4, | |
| 692 | Part0 = LeftArm, | |
| 693 | C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0), | |
| 694 | Part1 = Arm4, | |
| 695 | }) | |
| 696 | local Arm5 = AddInstance("Part",{
| |
| 697 | Parent = Arms, | |
| 698 | Name = "RightArm", | |
| 699 | CFrame = RightArm.CFrame, | |
| 700 | formFactor = "Symmetric", | |
| 701 | Size = Vector3.new(.86,.8,.86), | |
| 702 | CanCollide = false, | |
| 703 | Material = "SmoothPlastic", | |
| 704 | TopSurface = "Smooth", | |
| 705 | BottomSurface = "Smooth", | |
| 706 | Locked = true, | |
| 707 | BrickColor=BrickColor.new("Br. yellowish orange"),
| |
| 708 | Transparency = 0 | |
| 709 | }) | |
| 710 | local Weld = AddInstance("Weld",{
| |
| 711 | Parent = Arm5, | |
| 712 | Part0 = RightArm, | |
| 713 | C0 = CFrame.new(0,-.55,0)*CFrame.Angles(0,0,0), | |
| 714 | Part1 = Arm5, | |
| 715 | }) | |
| 716 | ||
| 717 | local Reaper6 = AddInstance("Part",{
| |
| 718 | Parent = Arms, | |
| 719 | CFrame = RightArm.CFrame, | |
| 720 | formFactor = "Symmetric", | |
| 721 | Size = Vector3.new(0.1, 0.1, .1), | |
| 722 | CanCollide = false, | |
| 723 | TopSurface = "Smooth", | |
| 724 | BottomSurface = "Smooth", | |
| 725 | Locked = true, | |
| 726 | Transparency = 1 | |
| 727 | }) | |
| 728 | local Weld = AddInstance("Weld",{
| |
| 729 | Parent = Reaper6, | |
| 730 | Part0 = RightArm, | |
| 731 | C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0), | |
| 732 | Part1 = Reaper6, | |
| 733 | }) | |
| 734 | local Mesh = AddInstance("SpecialMesh",{
| |
| 735 | Parent = Reaper6, | |
| 736 | MeshId = "rbxassetid://1047997", | |
| 737 | TextureId = "rbxassetid://1047998", | |
| 738 | - | MeshId = "rbxassetid://470533002", |
| 738 | + | |
| 739 | - | TextureId = "rbxassetid://470533004", |
| 739 | + | |
| 740 | }) | |
| 741 | ||
| 742 | ||
| 743 | ||
| 744 | ||
| 745 | ||
| 746 | ||
| 747 | ||
| 748 | ||
| 749 | ||
| 750 | ||
| 751 | ||
| 752 | ||
| 753 | ||
| 754 | local Reaper7 = AddInstance("Part",{
| |
| 755 | Parent = Arms, | |
| 756 | CFrame = RightArm.CFrame, | |
| 757 | formFactor = "Symmetric", | |
| 758 | Size = Vector3.new(0.1, 0.5, 3), | |
| 759 | CanCollide = false, | |
| 760 | TopSurface = "Smooth", | |
| 761 | BottomSurface = "Smooth", | |
| 762 | Locked = true, | |
| 763 | Transparency = 1 | |
| 764 | }) | |
| 765 | local Weld = AddInstance("Weld",{
| |
| 766 | Parent = Reaper7, | |
| 767 | Part0 = RightArm, | |
| 768 | C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3), | |
| 769 | Part1 = Reaper7, | |
| 770 | }) | |
| 771 | local Mesh = AddInstance("SpecialMesh",{
| |
| 772 | Parent = Reaper7, | |
| 773 | MeshId = "rbxassetid://1047997", | |
| 774 | TextureId = "rbxassetid://1047998", | |
| 775 | - | MeshId = "rbxassetid://431003868", |
| 775 | + | |
| 776 | - | TextureId = "rbxassetid://430627740", |
| 776 | + | |
| 777 | }) | |
| 778 | ||
| 779 | ||
| 780 | head.face.Texture = "http://www.roblox.com/asset/?id=156600391" | |
| 781 | local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 782 | Humanoid.Animator:Destroy() | |
| 783 | Character.Animate:Destroy() | |
| 784 | ||
| 785 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
| 786 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
| 787 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
| 788 | ||
| 789 | ||
| 790 | RSH, LSH = nil, nil | |
| 791 | ||
| 792 | RW = Instance.new("Weld")
| |
| 793 | LW = Instance.new("Weld")
| |
| 794 | ||
| 795 | RH = Torso["Right Hip"] | |
| 796 | LH = Torso["Left Hip"] | |
| 797 | ||
| 798 | RSH = Torso["Right Shoulder"] | |
| 799 | LSH = Torso["Left Shoulder"] | |
| 800 | ||
| 801 | RSH.Parent = nil | |
| 802 | LSH.Parent = nil | |
| 803 | ||
| 804 | RW.Name = "RW" | |
| 805 | RW.Part0 = Torso | |
| 806 | RW.C0 = cn(1.5, 0.5, 0) | |
| 807 | RW.C1 = cn(0, 0.5, 0) | |
| 808 | RW.Part1 = RightArm | |
| 809 | RW.Parent = Torso | |
| 810 | ||
| 811 | LW.Name = "LW" | |
| 812 | LW.Part0 = Torso | |
| 813 | LW.C0 = cn(-1.5, 0.5, 0) | |
| 814 | LW.C1 = cn(0, 0.5, 0) | |
| 815 | LW.Part1 = LeftArm | |
| 816 | LW.Parent = Torso | |
| 817 | ||
| 818 | function clerp(a, b, t) | |
| 819 | local qa = {
| |
| 820 | QuaternionFromCFrame(a) | |
| 821 | } | |
| 822 | local qb = {
| |
| 823 | QuaternionFromCFrame(b) | |
| 824 | } | |
| 825 | local ax, ay, az = a.x, a.y, a.z | |
| 826 | local bx, by, bz = b.x, b.y, b.z | |
| 827 | local _t = 1 - t | |
| 828 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 829 | end | |
| 830 | ||
| 831 | function QuaternionFromCFrame(cf) | |
| 832 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 833 | local trace = m00 + m11 + m22 | |
| 834 | if trace > 0 then | |
| 835 | local s = math.sqrt(1 + trace) | |
| 836 | local recip = 0.5 / s | |
| 837 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 838 | else | |
| 839 | local i = 0 | |
| 840 | if m11 > m00 then | |
| 841 | i = 1 | |
| 842 | end | |
| 843 | if m22 > (i == 0 and m00 or m11) then | |
| 844 | i = 2 | |
| 845 | end | |
| 846 | if i == 0 then | |
| 847 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 848 | local recip = 0.5 / s | |
| 849 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 850 | elseif i == 1 then | |
| 851 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 852 | local recip = 0.5 / s | |
| 853 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 854 | elseif i == 2 then | |
| 855 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 856 | local recip = 0.5 / s | |
| 857 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 858 | end | |
| 859 | end | |
| 860 | end | |
| 861 | ||
| 862 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 863 | local xs, ys, zs = x + x, y + y, z + z | |
| 864 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 865 | local xx = x * xs | |
| 866 | local xy = x * ys | |
| 867 | local xz = x * zs | |
| 868 | local yy = y * ys | |
| 869 | local yz = y * zs | |
| 870 | local zz = z * zs | |
| 871 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
| 872 | end | |
| 873 | ||
| 874 | function QuaternionSlerp(a, b, t) | |
| 875 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 876 | local startInterp, finishInterp; | |
| 877 | if cosTheta >= 0.0001 then | |
| 878 | if (1 - cosTheta) > 0.0001 then | |
| 879 | local theta = math.acos(cosTheta) | |
| 880 | local invSinTheta = 1 / math.sin(theta) | |
| 881 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
| 882 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 883 | else | |
| 884 | startInterp = 1 - t | |
| 885 | finishInterp = t | |
| 886 | end | |
| 887 | else | |
| 888 | if (1 + cosTheta) > 0.0001 then | |
| 889 | local theta = math.acos(-cosTheta) | |
| 890 | local invSinTheta = 1 / math.sin(theta) | |
| 891 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
| 892 | finishInterp = math.sin(t * theta) * invSinTheta | |
| 893 | else | |
| 894 | startInterp = t - 1 | |
| 895 | finishInterp = t | |
| 896 | end | |
| 897 | end | |
| 898 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
| 899 | end | |
| 900 | ||
| 901 | function swait(num) | |
| 902 | if num == 0 or num == nil then | |
| 903 | game:service'RunService'.RenderStepped:wait(0) | |
| 904 | else | |
| 905 | for i = 0, num do | |
| 906 | game:service'RunService'.RenderStepped:wait(0) | |
| 907 | end | |
| 908 | end | |
| 909 | end | |
| 910 | ||
| 911 | local RbxUtility = LoadLibrary("RbxUtility")
| |
| 912 | local Create = RbxUtility.Create | |
| 913 | ||
| 914 | function RemoveOutlines(part) | |
| 915 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 916 | end | |
| 917 | ||
| 918 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
| 919 | local Part = Create("Part"){
| |
| 920 | formFactor = FormFactor, | |
| 921 | Parent = Parent, | |
| 922 | Reflectance = Reflectance, | |
| 923 | Transparency = Transparency, | |
| 924 | CanCollide = false, | |
| 925 | Locked = true, | |
| 926 | BrickColor = BrickColor.new(tostring(BColor)), | |
| 927 | Name = Name, | |
| 928 | Size = Size, | |
| 929 | Material = Material, | |
| 930 | } | |
| 931 | RemoveOutlines(Part) | |
| 932 | return Part | |
| 933 | end | |
| 934 | ||
| 935 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 936 | local Msh = Create(Mesh){
| |
| 937 | Parent = Part, | |
| 938 | Offset = OffSet, | |
| 939 | Scale = Scale, | |
| 940 | } | |
| 941 | if Mesh == "SpecialMesh" then | |
| 942 | Msh.MeshType = MeshType | |
| 943 | Msh.MeshId = MeshId | |
| 944 | end | |
| 945 | return Msh | |
| 946 | end | |
| 947 | ||
| 948 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
| 949 | local Weld = Create("Weld"){
| |
| 950 | Parent = Parent, | |
| 951 | Part0 = Part0, | |
| 952 | Part1 = Part1, | |
| 953 | C0 = C0, | |
| 954 | C1 = C1, | |
| 955 | } | |
| 956 | return Weld | |
| 957 | end | |
| 958 | ||
| 959 | function rayCast(Position, Direction, Range, Ignore) | |
| 960 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
| |
| 961 | end | |
| 962 | ||
| 963 | function CreateSound(id, par, vol, pit) | |
| 964 | coroutine.resume(coroutine.create(function() | |
| 965 | local sou = Instance.new("Sound", par or workspace)
| |
| 966 | sou.Volume = vol | |
| 967 | sou.Pitch = pit or 1 | |
| 968 | sou.SoundId = id | |
| 969 | wait() | |
| 970 | sou:play() | |
| 971 | game:GetService("Debris"):AddItem(sou, 6)
| |
| 972 | end)) | |
| 973 | end | |
| 974 | ||
| 975 | local function getclosest(obj, distance) | |
| 976 | local last, lastx = distance + 1 | |
| 977 | for i, v in pairs(workspace:GetChildren()) do | |
| 978 | if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
| |
| 979 | local t = v.Torso | |
| 980 | local dist = (t.Position - obj.Position).magnitude | |
| 981 | if dist <= distance then | |
| 982 | if dist < last then | |
| 983 | last = dist | |
| 984 | lastx = v | |
| 985 | end | |
| 986 | end | |
| 987 | end | |
| 988 | end | |
| 989 | return lastx | |
| 990 | end | |
| 991 | ||
| 992 | function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch) | |
| 993 | for i, v in pairs(hit:GetChildren()) do | |
| 994 | if v:IsA("Humanoid") and hit.Name ~= Character.Name then
| |
| 995 | local find = v:FindFirstChild("Hitz")
| |
| 996 | if not find then | |
| 997 | if v.Parent:findFirstChild("Head") then
| |
| 998 | local BillG = Create("BillboardGui"){
| |
| 999 | Parent = v.Parent.Head, | |
| 1000 | Size = UDim2.new(1, 0, 1, 0), | |
| 1001 | Adornee = v.Parent.Head, | |
| 1002 | StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)), | |
| 1003 | } | |
| 1004 | local TL = Create("TextLabel"){
| |
| 1005 | Parent = BillG, | |
| 1006 | Size = UDim2.new(3, 3, 3, 3), | |
| 1007 | BackgroundTransparency = 1, | |
| 1008 | Text = tostring(damage).."-", | |
| 1009 | TextColor3 = Color1.Color, | |
| 1010 | TextStrokeColor3 = Color2.Color, | |
| 1011 | TextStrokeTransparency = 0, | |
| 1012 | TextXAlignment = Enum.TextXAlignment.Center, | |
| 1013 | TextYAlignment = Enum.TextYAlignment.Center, | |
| 1014 | FontSize = Enum.FontSize.Size18, | |
| 1015 | Font = "ArialBold", | |
| 1016 | } | |
| 1017 | coroutine.resume(coroutine.create(function() | |
| 1018 | wait(1) | |
| 1019 | for i = 0, 1, .1 do | |
| 1020 | wait(.1) | |
| 1021 | BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0) | |
| 1022 | end | |
| 1023 | BillG:Destroy() | |
| 1024 | end)) | |
| 1025 | end | |
| 1026 | v.Health = v.Health - damage | |
| 1027 | local bool = Create("BoolValue"){
| |
| 1028 | Parent = v, | |
| 1029 | Name = 'Hitz', | |
| 1030 | } | |
| 1031 | if HSound ~= nil and HPitch ~= nil then | |
| 1032 | CreateSound(HSound, hit, 1, HPitch) | |
| 1033 | end | |
| 1034 | game:GetService("Debris"):AddItem(bool, cooldown)
| |
| 1035 | end | |
| 1036 | end | |
| 1037 | end | |
| 1038 | end | |
| 1039 | ||
| 1040 | ||
| 1041 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
| 1042 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 1043 | prt.Anchored = true | |
| 1044 | prt.CFrame = cframe | |
| 1045 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1046 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1047 | if Type == 1 or Type == nil then | |
| 1048 | table.insert(Effects, {
| |
| 1049 | prt, | |
| 1050 | "Block1", | |
| 1051 | delay, | |
| 1052 | x3, | |
| 1053 | y3, | |
| 1054 | z3, | |
| 1055 | msh | |
| 1056 | }) | |
| 1057 | elseif Type == 2 then | |
| 1058 | table.insert(Effects, {
| |
| 1059 | prt, | |
| 1060 | "Block2", | |
| 1061 | delay, | |
| 1062 | x3, | |
| 1063 | y3, | |
| 1064 | z3, | |
| 1065 | msh | |
| 1066 | }) | |
| 1067 | end | |
| 1068 | end | |
| 1069 | ||
| 1070 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 1071 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 1072 | prt.Anchored = true | |
| 1073 | prt.CFrame = cframe | |
| 1074 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1075 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1076 | table.insert(Effects, {
| |
| 1077 | prt, | |
| 1078 | "Cylinder", | |
| 1079 | delay, | |
| 1080 | x3, | |
| 1081 | y3, | |
| 1082 | z3, | |
| 1083 | msh | |
| 1084 | }) | |
| 1085 | end | |
| 1086 | ||
| 1087 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 1088 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
| 1089 | prt.Anchored = true | |
| 1090 | prt.CFrame = cframe * CFrame.new(x1, y1, z1) | |
| 1091 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1092 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1093 | table.insert(Effects, {
| |
| 1094 | prt, | |
| 1095 | "Cylinder", | |
| 1096 | delay, | |
| 1097 | x3, | |
| 1098 | y3, | |
| 1099 | z3, | |
| 1100 | msh | |
| 1101 | }) | |
| 1102 | end | |
| 1103 | ||
| 1104 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 1105 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 1106 | prt.Anchored = true | |
| 1107 | prt.CFrame = cframe | |
| 1108 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1109 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1110 | table.insert(Effects, {
| |
| 1111 | prt, | |
| 1112 | "Cylinder", | |
| 1113 | delay, | |
| 1114 | x3, | |
| 1115 | y3, | |
| 1116 | z3, | |
| 1117 | msh | |
| 1118 | }) | |
| 1119 | end | |
| 1120 | ||
| 1121 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 1122 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 1123 | prt.Anchored = true | |
| 1124 | prt.CFrame = cframe | |
| 1125 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1126 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1127 | table.insert(Effects, {
| |
| 1128 | prt, | |
| 1129 | "Cylinder", | |
| 1130 | delay, | |
| 1131 | x3, | |
| 1132 | y3, | |
| 1133 | z3, | |
| 1134 | msh | |
| 1135 | }) | |
| 1136 | end | |
| 1137 | ||
| 1138 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 1139 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 1140 | prt.Anchored = true | |
| 1141 | prt.CFrame = cframe | |
| 1142 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1143 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1144 | table.insert(Effects, {
| |
| 1145 | prt, | |
| 1146 | "Cylinder", | |
| 1147 | delay, | |
| 1148 | x3, | |
| 1149 | y3, | |
| 1150 | z3, | |
| 1151 | msh | |
| 1152 | }) | |
| 1153 | end | |
| 1154 | ||
| 1155 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
| 1156 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
| 1157 | prt.Anchored = true | |
| 1158 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1159 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 1160 | local num = math.random(10, 50) / 1000 | |
| 1161 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 1162 | table.insert(Effects, {
| |
| 1163 | prt, | |
| 1164 | "Shatter", | |
| 1165 | num, | |
| 1166 | prt.CFrame, | |
| 1167 | math.random() - math.random(), | |
| 1168 | 0, | |
| 1169 | math.random(50, 100) / 100 | |
| 1170 | }) | |
| 1171 | end | |
| 1172 | ||
| 1173 | ||
| 1174 | ||
| 1175 | ||
| 1176 | for i = 0, 1, 0.05 do | |
| 1177 | swait() | |
| 1178 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 1179 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
| 1180 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
| 1181 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3) | |
| 1182 | if Torsovelocity > 2 then | |
| 1183 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2) | |
| 1184 | RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
| 1185 | LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
| 1186 | elseif Torsovelocity < 1 then | |
| 1187 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1) | |
| 1188 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 1189 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 1190 | end | |
| 1191 | end | |
| 1192 | attack = false | |
| 1193 | ||
| 1194 | ||
| 1195 | ||
| 1196 | game:GetService'RunService'.Stepped:connect(function() | |
| 1197 | ||
| 1198 | ||
| 1199 | ||
| 1200 | if Wep == 1 then | |
| 1201 | equippedgun2 = false | |
| 1202 | Reaper4.Transparency = 1 | |
| 1203 | Reaper5.Transparency = 0 | |
| 1204 | Reaper6.Transparency = 1 | |
| 1205 | Reaper7.Transparency = 0 | |
| 1206 | end | |
| 1207 | if Wep == 2 then | |
| 1208 | equippedgun2 = true | |
| 1209 | Reaper4.Transparency = 0 | |
| 1210 | Reaper5.Transparency = 1 | |
| 1211 | Reaper6.Transparency = 0 | |
| 1212 | Reaper7.Transparency = 1 | |
| 1213 | end | |
| 1214 | if Wep == 3 then | |
| 1215 | equippedgun2 = false | |
| 1216 | Reaper4.Transparency = 1 | |
| 1217 | Reaper5.Transparency = 1 | |
| 1218 | Reaper6.Transparency = 1 | |
| 1219 | Reaper7.Transparency = 1 | |
| 1220 | end | |
| 1221 | ||
| 1222 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 1223 | velocity = RootPart.Velocity.y | |
| 1224 | sine = sine + change | |
| 1225 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
| 1226 | if equipped == true or equipped == false then | |
| 1227 | if RootPart.Velocity.y > 1 and hit == nil then | |
| 1228 | Anim = "Jump" | |
| 1229 | if attack == false and Wep == 1 then | |
| 1230 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1231 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1232 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1) | |
| 1233 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1) | |
| 1234 | RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1) | |
| 1235 | LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1) | |
| 1236 | end | |
| 1237 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
| 1238 | Anim = "Fall" | |
| 1239 | if attack == false and Wep == 1 then | |
| 1240 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1241 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1242 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1) | |
| 1243 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1) | |
| 1244 | RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1245 | LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1246 | end | |
| 1247 | elseif Torsovelocity < 1 and hit ~= nil then | |
| 1248 | Anim = "Idle" | |
| 1249 | if attack == false and Wep == 1 then | |
| 1250 | change = 1 | |
| 1251 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1) | |
| 1252 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1) | |
| 1253 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5 - -.1 * math.cos(sine / 25), 0) * angles(math.rad(50), math.rad(35 - 25 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1) | |
| 1254 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(80 + 7 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1) | |
| 1255 | RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1256 | LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1257 | end | |
| 1258 | elseif Torsovelocity > 2 and hit ~= nil then | |
| 1259 | Anim = "Walk" | |
| 1260 | if attack == false and Wep == 1 then | |
| 1261 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2) | |
| 1262 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 1263 | RW.C0 = clerp(RW.C0, CFrame.new(1.2 - -.05 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(50), math.rad(57 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1) | |
| 1264 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2 - -.05 * math.cos(sine / 4), 0.4 - -.05 * math.cos(sine / 4), -.4) * angles(math.rad(80 + 1 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1) | |
| 1265 | RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1266 | LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1267 | end | |
| 1268 | end | |
| 1269 | end | |
| 1270 | -----------------------[Anim2]-------------------------------------------------------------------------------------------------------------------------- | |
| 1271 | ||
| 1272 | if equipped == true or equipped == false then | |
| 1273 | if RootPart.Velocity.y > 1 and hit == nil then | |
| 1274 | Anim = "Jump" | |
| 1275 | if attack == false and Wep == 2 then | |
| 1276 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1277 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1278 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.2, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1) | |
| 1279 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.1, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1) | |
| 1280 | RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1) | |
| 1281 | LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1) | |
| 1282 | end | |
| 1283 | ||
| 1284 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
| 1285 | Anim = "Fall" | |
| 1286 | if attack == false and Wep == 2 then | |
| 1287 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1288 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1289 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.8, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.05) | |
| 1290 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.7, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.05) | |
| 1291 | RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1292 | LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1293 | end | |
| 1294 | elseif Torsovelocity < 1 and hit ~= nil then | |
| 1295 | Anim = "Idle" | |
| 1296 | if attack == false and Wep == 2 then | |
| 1297 | change = 1 | |
| 1298 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1) | |
| 1299 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1) | |
| 1300 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1) | |
| 1301 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1) | |
| 1302 | RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1303 | LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1304 | end | |
| 1305 | elseif Torsovelocity > 2 and hit ~= nil then | |
| 1306 | Anim = "Walk" | |
| 1307 | if attack == false and Wep == 2 then | |
| 1308 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-25 - 5 * math.cos(sine / 5))), .2) | |
| 1309 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(25 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 1310 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1) | |
| 1311 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1) | |
| 1312 | RH.C0 = clerp(RH.C0, cn(.95, -.9 + -.1 * math.cos(sine / 4),-.35) * RHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1313 | LH.C0 = clerp(LH.C0, cn(-.95, -.9 + .1 * math.cos(sine / 4), .35) * LHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1314 | end | |
| 1315 | ||
| 1316 | end | |
| 1317 | end | |
| 1318 | ||
| 1319 | ||
| 1320 | ||
| 1321 | -----------------------[Noraml Anim]-------------------------------------------------------------------------------------------------------------------------- | |
| 1322 | ||
| 1323 | if equipped == true or equipped == false then | |
| 1324 | if RootPart.Velocity.y > 1 and hit == nil then | |
| 1325 | Anim = "Jump" | |
| 1326 | if attack == false and Wep == 3 then | |
| 1327 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1328 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1329 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1) | |
| 1330 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1) | |
| 1331 | RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1) | |
| 1332 | LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1) | |
| 1333 | end | |
| 1334 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
| 1335 | Anim = "Fall" | |
| 1336 | if attack == false and Wep == 3 then | |
| 1337 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1338 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 1339 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1) | |
| 1340 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1) | |
| 1341 | RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1342 | LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 1343 | end | |
| 1344 | elseif Torsovelocity < 1 and hit ~= nil then | |
| 1345 | Anim = "Idle" | |
| 1346 | if attack == false and Wep == 3 then | |
| 1347 | change = 1 | |
| 1348 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1) | |
| 1349 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1) | |
| 1350 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0 * math.cos(sine / 25), 0) * angles(math.rad(0), math.rad(0 - 0 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1) | |
| 1351 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0 + 0 * math.cos(sine / 25)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.1) | |
| 1352 | RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1353 | LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1) | |
| 1354 | end | |
| 1355 | elseif Torsovelocity > 2 and hit ~= nil then | |
| 1356 | Anim = "Walk" | |
| 1357 | if attack == false and Wep == 3 then | |
| 1358 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2) | |
| 1359 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 1360 | RW.C0 = clerp(RW.C0, CFrame.new(1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + -50 * math.cos(sine / 4)), math.rad(0 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.3) | |
| 1361 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + 50 * math.cos(sine / 4)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3) | |
| 1362 | RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1363 | LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 1364 | end | |
| 1365 | end | |
| 1366 | end | |
| 1367 | ||
| 1368 | ||
| 1369 | ||
| 1370 | ||
| 1371 | ||
| 1372 | ||
| 1373 | ||
| 1374 | ||
| 1375 | ||
| 1376 | ||
| 1377 | ||
| 1378 | ||
| 1379 | ||
| 1380 | ||
| 1381 | ||
| 1382 | ||
| 1383 | ||
| 1384 | ||
| 1385 | if #Effects > 0 then | |
| 1386 | for e = 1, #Effects do | |
| 1387 | if Effects[e] ~= nil then | |
| 1388 | local Thing = Effects[e] | |
| 1389 | if Thing ~= nil then | |
| 1390 | local Part = Thing[1] | |
| 1391 | local Mode = Thing[2] | |
| 1392 | local Delay = Thing[3] | |
| 1393 | local IncX = Thing[4] | |
| 1394 | local IncY = Thing[5] | |
| 1395 | local IncZ = Thing[6] | |
| 1396 | if Thing[1].Transparency <= 1 then | |
| 1397 | if Thing[2] == "Block1" then | |
| 1398 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1399 | local Mesh = Thing[1].Mesh | |
| 1400 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1401 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1402 | elseif Thing[2] == "Block2" then | |
| 1403 | Thing[1].CFrame = Thing[1].CFrame | |
| 1404 | local Mesh = Thing[7] | |
| 1405 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1406 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1407 | elseif Thing[2] == "Cylinder" then | |
| 1408 | local Mesh = Thing[1].Mesh | |
| 1409 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1410 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1411 | elseif Thing[2] == "Blood" then | |
| 1412 | local Mesh = Thing[7] | |
| 1413 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
| 1414 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1415 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1416 | elseif Thing[2] == "Elec" then | |
| 1417 | local Mesh = Thing[1].Mesh | |
| 1418 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
| 1419 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1420 | elseif Thing[2] == "Disappear" then | |
| 1421 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1422 | elseif Thing[2] == "Shatter" then | |
| 1423 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1424 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
| 1425 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
| 1426 | Thing[6] = Thing[6] + Thing[5] | |
| 1427 | end | |
| 1428 | else | |
| 1429 | Part.Parent = nil | |
| 1430 | table.remove(Effects, e) | |
| 1431 | end | |
| 1432 | end | |
| 1433 | end | |
| 1434 | end | |
| 1435 | end | |
| 1436 | end) | |
| 1437 | ||
| 1438 | ||
| 1439 | ||
| 1440 | ||
| 1441 | ||
| 1442 | ||
| 1443 | ||
| 1444 | ||
| 1445 | ||
| 1446 | ||
| 1447 | ||
| 1448 | ||
| 1449 | ||
| 1450 | local No = Instance.new("Sound", head);
| |
| 1451 | No.SoundId = "rbxassetid://1566864059" | |
| 1452 | No.Volume = 3 | |
| 1453 | - | No.SoundId = "rbxassetid://245064504" |
| 1453 | + | |
| 1454 | yes.SoundId = "rbxassetid://1355342346" | |
| 1455 | yes.Volume = 3 | |
| 1456 | - | yes.SoundId = "rbxassetid://131384028" |
| 1456 | + | |
| 1457 | HitM.SoundId = "rbxassetid://"..WSH | |
| 1458 | HitM.Volume = 1.1 | |
| 1459 | local Swing = Instance.new("Sound", Reaper5);
| |
| 1460 | Swing.SoundId = "rbxassetid://10209850" | |
| 1461 | Swing.Volume = 1.5 | |
| 1462 | Swing.Pitch = 1.1 | |
| 1463 | local SwingH = Instance.new("Sound", Reaper5);
| |
| 1464 | SwingH.SoundId = "rbxassetid://10209590" | |
| 1465 | SwingH.Volume = 2.9 | |
| 1466 | SwingH.Pitch = .8 | |
| 1467 | local Taunt = Instance.new("Sound", head);
| |
| 1468 | Taunt.SoundId = "rbxassetid://1355342346" | |
| 1469 | Taunt.Volume = 2 | |
| 1470 | - | Taunt.SoundId = "rbxassetid://150611842" |
| 1470 | + | |
| 1471 | RUS.SoundId = "rbxassetid://1061334189" | |
| 1472 | RUS.Volume = 2.5 | |
| 1473 | - | RUS.SoundId = "rbxassetid://322621962" |
| 1473 | + | |
| 1474 | RUS.Looped = true | |
| 1475 | ||
| 1476 | ||
| 1477 | ||
| 1478 | ||
| 1479 | ||
| 1480 | ||
| 1481 | ||
| 1482 | ||
| 1483 | ||
| 1484 | ||
| 1485 | function BuildSentry() | |
| 1486 | do --CFrame lerp (stravant, clerp by AntiBoomz0r) | |
| 1487 | local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation? | |
| 1488 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 1489 | local trace = m00 + m11 + m22 | |
| 1490 | if trace > 0 then | |
| 1491 | local s = math.sqrt(1 + trace) | |
| 1492 | local recip = 0.5/s | |
| 1493 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 1494 | else | |
| 1495 | local i = 0 | |
| 1496 | if m11 > m00 then | |
| 1497 | i = 1 | |
| 1498 | end | |
| 1499 | if m22 > (i == 0 and m00 or m11) then | |
| 1500 | i = 2 | |
| 1501 | end | |
| 1502 | if i == 0 then | |
| 1503 | local s = math.sqrt(m00-m11-m22+1) | |
| 1504 | local recip = 0.5/s | |
| 1505 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 1506 | elseif i == 1 then | |
| 1507 | local s = math.sqrt(m11-m22-m00+1) | |
| 1508 | local recip = 0.5/s | |
| 1509 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 1510 | elseif i == 2 then | |
| 1511 | local s = math.sqrt(m22-m00-m11+1) | |
| 1512 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 1513 | end | |
| 1514 | end | |
| 1515 | end | |
| 1516 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 1517 | local xs, ys, zs = x + x, y + y, z + z | |
| 1518 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 1519 | local xx = x*xs | |
| 1520 | local xy = x*ys | |
| 1521 | local xz = x*zs | |
| 1522 | local yy = y*ys | |
| 1523 | local yz = y*zs | |
| 1524 | local zz = z*zs | |
| 1525 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
| 1526 | end | |
| 1527 | function QuaternionSlerp(a, b, t) | |
| 1528 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 1529 | local startInterp, finishInterp; | |
| 1530 | if cosTheta >= 0.0001 then | |
| 1531 | if (1 - cosTheta) > 0.0001 then | |
| 1532 | local theta = math.acos(cosTheta) | |
| 1533 | local invSinTheta = 1/math.sin(theta) | |
| 1534 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 1535 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 1536 | else | |
| 1537 | startInterp = 1-t | |
| 1538 | finishInterp = t | |
| 1539 | end | |
| 1540 | else | |
| 1541 | if (1+cosTheta) > 0.0001 then | |
| 1542 | local theta = math.acos(-cosTheta) | |
| 1543 | local invSinTheta = 1/math.sin(theta) | |
| 1544 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 1545 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 1546 | else | |
| 1547 | startInterp = t-1 | |
| 1548 | finishInterp = t | |
| 1549 | end | |
| 1550 | end | |
| 1551 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
| 1552 | end | |
| 1553 | function clerp(a,b,t) | |
| 1554 | local qa = {QuaternionFromCFrame(a)}
| |
| 1555 | local qb = {QuaternionFromCFrame(b)}
| |
| 1556 | local ax, ay, az = a.x, a.y, a.z | |
| 1557 | local bx, by, bz = b.x, b.y, b.z | |
| 1558 | local _t = 1-t | |
| 1559 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 1560 | end | |
| 1561 | end | |
| 1562 | ||
| 1563 | ||
| 1564 | ||
| 1565 | ||
| 1566 | local ABS = math.abs; | |
| 1567 | local SIN = math.sin; | |
| 1568 | local ASIN = math.asin; | |
| 1569 | local COS = math.cos; | |
| 1570 | ||
| 1571 | local new = Instance.new; | |
| 1572 | ||
| 1573 | function math_pos(float) | |
| 1574 | if float < 0 then float = 0 end | |
| 1575 | return float | |
| 1576 | end | |
| 1577 | function math_neg(float) | |
| 1578 | if float > 0 then float = 0 end | |
| 1579 | return float | |
| 1580 | end | |
| 1581 | function math_max(float, max) | |
| 1582 | if float > max then float = max end | |
| 1583 | return float | |
| 1584 | end | |
| 1585 | function math_min(float, min) | |
| 1586 | if float > min then float = min end | |
| 1587 | return float | |
| 1588 | end | |
| 1589 | ||
| 1590 | function SharpSin(double_p1) | |
| 1591 | return ASIN(SIN(double_p1)); | |
| 1592 | end | |
| 1593 | ||
| 1594 | local Storage = Instance.new("Model", script);
| |
| 1595 | ||
| 1596 | function WeldP(part0, part1, C0, C1) | |
| 1597 | local W = new("Weld", Storage);
| |
| 1598 | W.Part0 = part0; | |
| 1599 | W.Part1 = part1; | |
| 1600 | W.C0 = C0 or CFrame.new(); | |
| 1601 | W.C1 = C1 or CFrame.new(); | |
| 1602 | return W; | |
| 1603 | end | |
| 1604 | ||
| 1605 | function Bevel(part, sizeV3) | |
| 1606 | local BvlMesh = new("SpecialMesh", part)
| |
| 1607 | BvlMesh.MeshId = "rbxasset://fonts/torso.mesh"; | |
| 1608 | if (sizeV3 ~= nil) then | |
| 1609 | BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z); | |
| 1610 | else | |
| 1611 | BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z); | |
| 1612 | end | |
| 1613 | end | |
| 1614 | ||
| 1615 | ||
| 1616 | ||
| 1617 | local Scale = 0.5 -- 1 is size of a robloxian (mostly); | |
| 1618 | ||
| 1619 | Storage.Name = "ä"; | |
| 1620 | ||
| 1621 | local BasePart = new("Part");
| |
| 1622 | BasePart.FormFactor = "Custom"; | |
| 1623 | BasePart.TopSurface = 10; | |
| 1624 | BasePart.BottomSurface = 10; | |
| 1625 | BasePart.LeftSurface = 10; | |
| 1626 | BasePart.RightSurface = 10; | |
| 1627 | BasePart.FrontSurface = 10; | |
| 1628 | BasePart.BackSurface = 10; | |
| 1629 | ||
| 1630 | local CylPart = new("Part");
| |
| 1631 | CylPart.FormFactor = "Custom"; | |
| 1632 | CylPart.TopSurface = 10; | |
| 1633 | CylPart.BottomSurface = 10; | |
| 1634 | CylPart.LeftSurface = 10; | |
| 1635 | CylPart.RightSurface = 10; | |
| 1636 | CylPart.FrontSurface = 10; | |
| 1637 | CylPart.BackSurface = 10; | |
| 1638 | new("CylinderMesh", CylPart);
| |
| 1639 | ||
| 1640 | local TopFrame = BasePart:clone() | |
| 1641 | TopFrame.Parent = Storage; | |
| 1642 | TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale); | |
| 1643 | TopFrame.BrickColor = TeamColor; | |
| 1644 | ||
| 1645 | new("CylinderMesh", TopFrame);
| |
| 1646 | ||
| 1647 | local Screw = CylPart:clone(); | |
| 1648 | Screw.Parent = Storage; | |
| 1649 | Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale); | |
| 1650 | Screw.BrickColor = BrickColor.new(199); | |
| 1651 | ||
| 1652 | local CGreyStyle = CylPart:clone() | |
| 1653 | CGreyStyle.Parent = Storage; | |
| 1654 | CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale); | |
| 1655 | CGreyStyle.BrickColor = BrickColor.new(199); | |
| 1656 | ||
| 1657 | local TurretCasing = BasePart:clone(); | |
| 1658 | TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale); | |
| 1659 | TurretCasing.BrickColor = BrickColor.new(199); | |
| 1660 | TurretCasing.Parent = Storage; | |
| 1661 | ||
| 1662 | Bevel(TurretCasing); | |
| 1663 | ||
| 1664 | local TurretFront = BasePart:clone(); | |
| 1665 | TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale); | |
| 1666 | TurretFront.BrickColor = TeamColor; | |
| 1667 | TurretFront.Parent = Storage; | |
| 1668 | ||
| 1669 | local Barrel = CylPart:clone(); | |
| 1670 | Barrel.Parent = Storage; | |
| 1671 | Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale); | |
| 1672 | Barrel.BrickColor = BrickColor.Black(); | |
| 1673 | ||
| 1674 | ||
| 1675 | local Particle = Instance.new("ParticleEmitter", Barrel);
| |
| 1676 | Particle.VelocitySpread = 30; | |
| 1677 | Particle.LightEmission = 200; | |
| 1678 | ||
| 1679 | local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
| |
| 1680 | ||
| 1681 | Particle.Size = NumberSequence.new(.05,.07); | |
| 1682 | ||
| 1683 | Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]); | |
| 1684 | Particle.Texture = "rbxassetid://252350680"; | |
| 1685 | Particle.RotSpeed = NumberRange.new(10,70); | |
| 1686 | Particle.Rate = 300; | |
| 1687 | Particle.Speed = NumberRange.new(15); | |
| 1688 | Particle.Transparency = NumberSequence.new(0,1); | |
| 1689 | Particle.Lifetime = NumberRange.new(.01,.2); | |
| 1690 | Particle.Enabled = false | |
| 1691 | ||
| 1692 | ||
| 1693 | ||
| 1694 | local RedDot = BasePart:clone(); | |
| 1695 | RedDot.Parent = Storage; | |
| 1696 | RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale); | |
| 1697 | RedDot.BrickColor = BrickColor.new("Really red");
| |
| 1698 | ||
| 1699 | local Sphere = Instance.new("SpecialMesh", RedDot);
| |
| 1700 | Sphere.MeshType = "Sphere"; | |
| 1701 | Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale); | |
| 1702 | ||
| 1703 | ||
| 1704 | Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale)); | |
| 1705 | ||
| 1706 | local Joint = CylPart:clone(); | |
| 1707 | Joint.Parent = Storage; | |
| 1708 | Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale); | |
| 1709 | Joint.BrickColor = BrickColor.Black(); | |
| 1710 | ||
| 1711 | local Hold = BasePart:clone(); | |
| 1712 | Hold.Parent = Storage; | |
| 1713 | Hold.BrickColor = BrickColor.Black(); | |
| 1714 | Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale); | |
| 1715 | ||
| 1716 | local Bolt = BasePart:clone(); | |
| 1717 | Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale); | |
| 1718 | Bolt.Parent = Storage; | |
| 1719 | Bolt.BrickColor = BrickColor.Black(); | |
| 1720 | ||
| 1721 | local Bolt2 = BasePart:clone(); | |
| 1722 | Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale); | |
| 1723 | Bolt2.Parent = Storage; | |
| 1724 | Bolt2.BrickColor = BrickColor.Black(); | |
| 1725 | ||
| 1726 | ||
| 1727 | local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale)); | |
| 1728 | WeldP(TopFrame, CGreyStyle); | |
| 1729 | WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale)); | |
| 1730 | WeldP(TopFrame, Screw); | |
| 1731 | local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0)); | |
| 1732 | ||
| 1733 | WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0)); | |
| 1734 | ||
| 1735 | local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale)); | |
| 1736 | ||
| 1737 | WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0)); | |
| 1738 | ||
| 1739 | WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0)); | |
| 1740 | ||
| 1741 | local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0)); | |
| 1742 | ||
| 1743 | ||
| 1744 | ||
| 1745 | local Leg1 = BasePart:clone(); | |
| 1746 | Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale); | |
| 1747 | Leg1.Parent = Storage; | |
| 1748 | Leg1.BrickColor = BrickColor.Black(); | |
| 1749 | ||
| 1750 | ||
| 1751 | WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi)); | |
| 1752 | ||
| 1753 | ||
| 1754 | local Leg2 = BasePart:clone(); | |
| 1755 | Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale); | |
| 1756 | Leg2.Parent = Storage; | |
| 1757 | Leg2.BrickColor = BrickColor.Black(); | |
| 1758 | ||
| 1759 | ||
| 1760 | WeldP(Leg2, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + -math.pi/6)); | |
| 1761 | ||
| 1762 | ||
| 1763 | local Leg3 = BasePart:clone(); | |
| 1764 | Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale); | |
| 1765 | Leg3.Parent = Storage; | |
| 1766 | Leg3.BrickColor = BrickColor.Black(); | |
| 1767 | ||
| 1768 | ||
| 1769 | WeldP(Leg3, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + math.pi/6)); | |
| 1770 | ||
| 1771 | for i,v in pairs(Storage:children()) do | |
| 1772 | if v.Name== "Part" then | |
| 1773 | trans = 1 | |
| 1774 | v.Transparency = 1 | |
| 1775 | end | |
| 1776 | end | |
| 1777 | ||
| 1778 | local InvisiBox = BasePart:clone(); | |
| 1779 | InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0); | |
| 1780 | InvisiBox.Parent = Storage; | |
| 1781 | InvisiBox.Transparency = 1 | |
| 1782 | InvisiBox.Name = 'box' | |
| 1783 | WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale)); | |
| 1784 | ||
| 1785 | local InvisiBox2 = BasePart:clone(); | |
| 1786 | InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0); | |
| 1787 | InvisiBox2.Parent = Arms; | |
| 1788 | InvisiBox2.Transparency = .9 | |
| 1789 | InvisiBox2.Name = 'box' | |
| 1790 | InvisiBox2.CanCollide = false | |
| 1791 | InvisiBox2.BrickColor = TeamColor | |
| 1792 | InvisiBox2.Material = 'Neon' | |
| 1793 | WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale)); | |
| 1794 | ||
| 1795 | InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0); | |
| 1796 | ||
| 1797 | local Action = "Idle"; | |
| 1798 | ||
| 1799 | local Target = nil; | |
| 1800 | ||
| 1801 | wait(1) | |
| 1802 | ||
| 1803 | InvisiBox.Anchored = true | |
| 1804 | ||
| 1805 | for i,v in pairs(Storage:children()) do | |
| 1806 | if v:IsA'Part' then | |
| 1807 | v.Locked = true | |
| 1808 | end | |
| 1809 | end | |
| 1810 | --// | |
| 1811 | --// SOUNDS | |
| 1812 | --// | |
| 1813 | for i,v in pairs(Storage:children()) do | |
| 1814 | if v.Name== "Part" then | |
| 1815 | trans = 1 | |
| 1816 | v.Transparency = 1 | |
| 1817 | end | |
| 1818 | end | |
| 1819 | for i,v in pairs(Storage:children()) do | |
| 1820 | if v.Name== "Part" then | |
| 1821 | trans = 1 | |
| 1822 | v.Transparency = 1 | |
| 1823 | for i = 1,11 do | |
| 1824 | ||
| 1825 | trans = trans - .1 | |
| 1826 | v.Transparency = trans | |
| 1827 | wait() | |
| 1828 | end | |
| 1829 | end | |
| 1830 | end | |
| 1831 | trans = 1 | |
| 1832 | ||
| 1833 | local OnFind = new("Sound", TopFrame);
| |
| 1834 | OnFind.SoundId = "rbxassetid://10209260" | |
| 1835 | OnFind.Volume = 1 | |
| 1836 | ||
| 1837 | ||
| 1838 | local OnFire = new("Sound", TopFrame);
| |
| 1839 | OnFire.SoundId = "rbxassetid://10209257" | |
| 1840 | OnFire.Volume = 1 | |
| 1841 | ||
| 1842 | local OnEmpty = new("Sound", TopFrame);
| |
| 1843 | OnEmpty.SoundId = "rbxassetid://10209225" | |
| 1844 | OnEmpty.Volume = 1 | |
| 1845 | ||
| 1846 | local Scanning = new("Sound", TopFrame);
| |
| 1847 | Scanning.SoundId = "rbxassetid://258704234" | |
| 1848 | Scanning.Volume = 1 | |
| 1849 | ||
| 1850 | local Explode = new("Sound", TopFrame);
| |
| 1851 | Explode.SoundId = "rbxassetid://10209236" | |
| 1852 | Explode.Volume = .5 | |
| 1853 | ||
| 1854 | local Move = new("Sound", TopFrame);
| |
| 1855 | Move.SoundId = "rbxassetid://258704467"; | |
| 1856 | Move.Volume = 1; | |
| 1857 | ||
| 1858 | ||
| 1859 | ||
| 1860 | ||
| 1861 | ||
| 1862 | function FindShortest(Table) | |
| 1863 | local Current = Table[1] | |
| 1864 | local Final | |
| 1865 | for _,v in pairs(Table) do | |
| 1866 | if v[2] ~= Current[2] then | |
| 1867 | if v[1] < Current[1] then | |
| 1868 | Current = v | |
| 1869 | end | |
| 1870 | end | |
| 1871 | end | |
| 1872 | Final = Current | |
| 1873 | return Final | |
| 1874 | end | |
| 1875 | ||
| 1876 | function GetNearbyPlayer() | |
| 1877 | ||
| 1878 | local List = {}
| |
| 1879 | for i,v in pairs(workspace:children()) do | |
| 1880 | if (v ~= nil) then | |
| 1881 | if (v:IsA'Model') then | |
| 1882 | if (v:findFirstChild'Torso' ~= nil) then | |
| 1883 | local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ(); | |
| 1884 | if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then | |
| 1885 | if (v ~= char) then | |
| 1886 | for x,z in next, v:children() do | |
| 1887 | if z:IsA'Humanoid' and z.Health > 0.01 then | |
| 1888 | table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
| |
| 1889 | end | |
| 1890 | end | |
| 1891 | end | |
| 1892 | end | |
| 1893 | end | |
| 1894 | end | |
| 1895 | end | |
| 1896 | end | |
| 1897 | if (FindShortest(List) ~= nil) then | |
| 1898 | return FindShortest(List)[2]; | |
| 1899 | else | |
| 1900 | return nil; | |
| 1901 | end | |
| 1902 | end | |
| 1903 | ||
| 1904 | local Health = Instance.new("Humanoid", Storage);
| |
| 1905 | Health.MaxHealth = 150; | |
| 1906 | Health.Health = 150; | |
| 1907 | ||
| 1908 | ||
| 1909 | ||
| 1910 | function RayC(Part, speed) | |
| 1911 | coroutine.wrap(function() | |
| 1912 | local Visual = BasePart:clone(); | |
| 1913 | Visual.FormFactor = "Custom"; | |
| 1914 | Visual.BrickColor = BrickColor.Yellow(); | |
| 1915 | Visual.Size = Vector3.new(.2, 3, .2); | |
| 1916 | Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0); | |
| 1917 | Visual.Anchored = true; | |
| 1918 | Visual.CanCollide = false; | |
| 1919 | Visual.Locked = true | |
| 1920 | ||
| 1921 | ||
| 1922 | coroutine.wrap(function() | |
| 1923 | ||
| 1924 | wait(.2) | |
| 1925 | ||
| 1926 | wait(.1); | |
| 1927 | wait(.3) | |
| 1928 | ||
| 1929 | end)() | |
| 1930 | ||
| 1931 | Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
| |
| 1932 | Visual.Mesh.Scale = Vector3.new(.5, 1, .5); | |
| 1933 | ||
| 1934 | local bulletpos = Visual.Position | |
| 1935 | local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed | |
| 1936 | local lastbulletpos = Visual.Position | |
| 1937 | Visual.Parent = Storage; | |
| 1938 | while game:service'RunService'.Stepped:wait() do | |
| 1939 | ||
| 1940 | lastbulletpos = bulletpos | |
| 1941 | bulletpos = bulletpos + bulletvelocity | |
| 1942 | local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos)) | |
| 1943 | local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true) | |
| 1944 | if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then | |
| 1945 | Visual:Destroy(); | |
| 1946 | break | |
| 1947 | end | |
| 1948 | Visual.Anchored = true | |
| 1949 | Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0); | |
| 1950 | if hit then | |
| 1951 | if hit.Parent:IsA'Hat' then | |
| 1952 | if hit.Parent.Parent:IsA'Model' then | |
| 1953 | for x,z in next, hit.Parent.Parent:children() do | |
| 1954 | if z:IsA'Humanoid' then | |
| 1955 | z:TakeDamage(math.random(8,12)); | |
| 1956 | end | |
| 1957 | end | |
| 1958 | end | |
| 1959 | else | |
| 1960 | if hit.Parent:IsA'Model' then | |
| 1961 | for x,z in next, hit.Parent:children() do | |
| 1962 | if z:IsA'Humanoid' then | |
| 1963 | z:TakeDamage(math.random(8,12)); | |
| 1964 | end | |
| 1965 | end | |
| 1966 | end | |
| 1967 | end | |
| 1968 | ||
| 1969 | Visual:Destroy(); | |
| 1970 | break | |
| 1971 | end | |
| 1972 | end | |
| 1973 | end)() | |
| 1974 | end | |
| 1975 | ||
| 1976 | lastTick = tick(); | |
| 1977 | local db = false; | |
| 1978 | game:service'RunService'.RenderStepped:connect(function() | |
| 1979 | if Action == "DEAD" then return end; | |
| 1980 | ||
| 1981 | ||
| 1982 | if not Wrangler then | |
| 1983 | --// | |
| 1984 | --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT | |
| 1985 | --// | |
| 1986 | ||
| 1987 | ||
| 1988 | --// | |
| 1989 | --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED | |
| 1990 | --// | |
| 1991 | ||
| 1992 | if (Storage:findFirstChild'Shield') then | |
| 1993 | Storage:findFirstChild'Shield':Destroy(); | |
| 1994 | end | |
| 1995 | ||
| 1996 | local LastTarget = Target; | |
| 1997 | ||
| 1998 | --// | |
| 1999 | --// CHECK FOR NEARBY ENEMIES | |
| 2000 | --// | |
| 2001 | local Player = GetNearbyPlayer(); | |
| 2002 | Target = Player; | |
| 2003 | ||
| 2004 | --// | |
| 2005 | --// BEEP ON TARGET FOUND | |
| 2006 | --// | |
| 2007 | if (Target ~= LastTarget and Target ~= nil) then | |
| 2008 | Move.Pitch = 0.9 + math.random()/9; | |
| 2009 | Move:play(); | |
| 2010 | OnFind:play(); | |
| 2011 | Action = "Standby"; | |
| 2012 | end | |
| 2013 | ||
| 2014 | --// | |
| 2015 | --// IDLE | |
| 2016 | --// | |
| 2017 | if Action == "Idle" then | |
| 2018 | RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1); | |
| 2019 | RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1); | |
| 2020 | end | |
| 2021 | ||
| 2022 | ||
| 2023 | --// | |
| 2024 | --// SENTRY DEAD | |
| 2025 | --// | |
| 2026 | ||
| 2027 | --// | |
| 2028 | --// IF PLAYER EXISTS, FIRE! | |
| 2029 | --// | |
| 2030 | ||
| 2031 | ||
| 2032 | ||
| 2033 | if Action == "Standby" then | |
| 2034 | pcall(function() | |
| 2035 | local tor = Target.Torso.CFrame.p -- Target CFrame | |
| 2036 | local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround. | |
| 2037 | local heading = math.atan2(direction.x, direction.z)-- | |
| 2038 | local RotY = math.deg(heading) | |
| 2039 | if RotY < 0 then | |
| 2040 | RotY = (360 - math.abs(RotY)); | |
| 2041 | end | |
| 2042 | RotateAxisX.C1 = --Begin here | |
| 2043 | clerp(RotateAxisX.C1, | |
| 2044 | CFrame.new( | |
| 2045 | ||
| 2046 | Vector3.new(), --The Pivot0 of pointing the weld. | |
| 2047 | Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here | |
| 2048 | ||
| 2049 | * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0), | |
| 2050 | .1 | |
| 2051 | ); | |
| 2052 | ||
| 2053 | local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0) | |
| 2054 | local RX, RY, RZ = Point:toEulerAnglesXYZ() | |
| 2055 | if math.deg(RX) > 45 then | |
| 2056 | RX = math.rad(45) | |
| 2057 | elseif math.deg(RX) < -55 then | |
| 2058 | RX = math.rad(-55) | |
| 2059 | end | |
| 2060 | RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1) | |
| 2061 | ||
| 2062 | end) | |
| 2063 | end | |
| 2064 | if Action == "Fire" then | |
| 2065 | pcall(function() | |
| 2066 | local tor = Target.Torso.CFrame.p; | |
| 2067 | local direction = InvisiBox.CFrame.lookVector | |
| 2068 | local heading = math.atan2(direction.x, direction.z) | |
| 2069 | local RotY = math.deg(heading) | |
| 2070 | if RotY < 0 then | |
| 2071 | RotY = (360 - math.abs(RotY)); | |
| 2072 | end | |
| 2073 | RotateAxisX.C1 = --Begin here | |
| 2074 | clerp(RotateAxisX.C1, | |
| 2075 | CFrame.new( | |
| 2076 | ||
| 2077 | Vector3.new(), --The Pivot0 of pointing the weld. | |
| 2078 | Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here | |
| 2079 | ||
| 2080 | * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0), | |
| 2081 | .1 | |
| 2082 | ); | |
| 2083 | ||
| 2084 | BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new()) | |
| 2085 | local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0) | |
| 2086 | local RX, RY, RZ = Point:toEulerAnglesXYZ() | |
| 2087 | if math.deg(RX) > 45 then | |
| 2088 | RX = math.rad(45) | |
| 2089 | elseif math.deg(RX) < -55 then | |
| 2090 | RX = math.rad(-55) | |
| 2091 | end | |
| 2092 | RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1) | |
| 2093 | end) | |
| 2094 | end | |
| 2095 | ||
| 2096 | if (Target ~= nil) then | |
| 2097 | if Action == "Fire" or db then return end | |
| 2098 | if Action == "Standby" then | |
| 2099 | db = true | |
| 2100 | wait(.2); | |
| 2101 | end | |
| 2102 | Action = "Fire"; | |
| 2103 | db = false | |
| 2104 | OnFire:play(); | |
| 2105 | ||
| 2106 | Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]); | |
| 2107 | ||
| 2108 | local PointLight = Instance.new("PointLight", Barrel);
| |
| 2109 | PointLight.Color = Color3.new(1,.8,0) | |
| 2110 | PointLight.Brightness = 6; | |
| 2111 | Particle.Enabled = true | |
| 2112 | game:service'Debris':AddItem(PointLight, .05); | |
| 2113 | ||
| 2114 | ||
| 2115 | ||
| 2116 | RayC(Barrel, 20) | |
| 2117 | ||
| 2118 | ||
| 2119 | ||
| 2120 | ||
| 2121 | wait(.1) | |
| 2122 | Particle.Enabled = false | |
| 2123 | if (Target ~= nil) then | |
| 2124 | Action = "Standby"; | |
| 2125 | else | |
| 2126 | Action = "Idle"; | |
| 2127 | end | |
| 2128 | end | |
| 2129 | ||
| 2130 | if tick() - lastTick > 2.5 and Target == nil then | |
| 2131 | lastTick = tick(); | |
| 2132 | Scanning:play(); | |
| 2133 | end | |
| 2134 | end | |
| 2135 | ||
| 2136 | if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then | |
| 2137 | Action = "DEAD"; | |
| 2138 | if db then return end | |
| 2139 | RotateAxisY:Destroy(); | |
| 2140 | TurretToFrame:Destroy(); | |
| 2141 | Joint:Destroy(); | |
| 2142 | InvisiBox2:Destroy(); | |
| 2143 | db = true | |
| 2144 | local expl = Instance.new("Explosion", Storage);
| |
| 2145 | ||
| 2146 | expl.BlastRadius = .3; | |
| 2147 | expl.BlastPressure = 2050000; | |
| 2148 | expl.Position = TopFrame.Position; | |
| 2149 | Explode:Play() | |
| 2150 | NoSentry = true | |
| 2151 | game:service'Debris':AddItem(Storage, 3); | |
| 2152 | ||
| 2153 | end | |
| 2154 | ||
| 2155 | end) | |
| 2156 | end | |
| 2157 | ||
| 2158 | ||
| 2159 | ||
| 2160 | combo = 0 | |
| 2161 | function strike(hit) | |
| 2162 | if hit and hit.Parent and hit.Parent.Name ~= char.Name then | |
| 2163 | local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
| |
| 2164 | if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
| |
| 2165 | if combo == 1 then | |
| 2166 | targetHumanoid:TakeDamage(slashDamage) | |
| 2167 | SwingH:Play() | |
| 2168 | ||
| 2169 | end | |
| 2170 | ||
| 2171 | ||
| 2172 | ||
| 2173 | end | |
| 2174 | end | |
| 2175 | end | |
| 2176 | ||
| 2177 | ||
| 2178 | ||
| 2179 | Reaper5.Touched:connect(strike) | |
| 2180 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2181 | function AnimSit() | |
| 2182 | for i = 0, 1, 0.05 do | |
| 2183 | ||
| 2184 | swait() | |
| 2185 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2186 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2187 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1) | |
| 2188 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1) | |
| 2189 | RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2190 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1) | |
| 2191 | end | |
| 2192 | ||
| 2193 | end | |
| 2194 | ||
| 2195 | function AnimSitHit1() | |
| 2196 | for i = 0, 1, 0.05 do | |
| 2197 | ||
| 2198 | swait() | |
| 2199 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1) | |
| 2200 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
| 2201 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1) | |
| 2202 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08) | |
| 2203 | RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1) | |
| 2204 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1) | |
| 2205 | end | |
| 2206 | ||
| 2207 | end | |
| 2208 | ||
| 2209 | ||
| 2210 | function AnimSitHit2() | |
| 2211 | for i = 0, 1, 0.05 do | |
| 2212 | ||
| 2213 | swait() | |
| 2214 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2215 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1) | |
| 2216 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1) | |
| 2217 | RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3) | |
| 2218 | RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2219 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1) | |
| 2220 | end | |
| 2221 | ||
| 2222 | end | |
| 2223 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2224 | ||
| 2225 | function No1() | |
| 2226 | for i = 0, 1, 0.05 do | |
| 2227 | ||
| 2228 | swait() | |
| 2229 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2230 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1) | |
| 2231 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1) | |
| 2232 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1) | |
| 2233 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2234 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2235 | end | |
| 2236 | ||
| 2237 | end | |
| 2238 | ||
| 2239 | ||
| 2240 | ||
| 2241 | function No2() | |
| 2242 | for i = 0, 1, 0.05 do | |
| 2243 | ||
| 2244 | swait() | |
| 2245 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2246 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1) | |
| 2247 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1) | |
| 2248 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1) | |
| 2249 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2250 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2251 | end | |
| 2252 | ||
| 2253 | end | |
| 2254 | ||
| 2255 | ||
| 2256 | ||
| 2257 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2258 | ||
| 2259 | function Yes1() | |
| 2260 | for i = 0, 1, 0.1 do | |
| 2261 | ||
| 2262 | swait() | |
| 2263 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2264 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1) | |
| 2265 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1) | |
| 2266 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1) | |
| 2267 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2268 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2269 | end | |
| 2270 | ||
| 2271 | end | |
| 2272 | ||
| 2273 | ||
| 2274 | ||
| 2275 | function Yes2() | |
| 2276 | for i = 0, 1, 0.1 do | |
| 2277 | ||
| 2278 | swait() | |
| 2279 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1) | |
| 2280 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 2281 | LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1) | |
| 2282 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1) | |
| 2283 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2284 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1) | |
| 2285 | end | |
| 2286 | ||
| 2287 | end | |
| 2288 | ||
| 2289 | ||
| 2290 | ||
| 2291 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2292 | function AttackAnim1() | |
| 2293 | for i = 0, 1, 0.05 do | |
| 2294 | swait() | |
| 2295 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1) | |
| 2296 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
| 2297 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08) | |
| 2298 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3) | |
| 2299 | if Torsovelocity > 2 then | |
| 2300 | RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
| 2301 | LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3) | |
| 2302 | elseif Torsovelocity < 1 then | |
| 2303 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1) | |
| 2304 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1) | |
| 2305 | end | |
| 2306 | end | |
| 2307 | end | |
| 2308 | ||
| 2309 | ||
| 2310 | function AttackAnim2() | |
| 2311 | for i = 0, 1, 0.05 do | |
| 2312 | swait() | |
| 2313 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2) | |
| 2314 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1) | |
| 2315 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25) | |
| 2316 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3) | |
| 2317 | if Torsovelocity > 2 then | |
| 2318 | RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2319 | LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2320 | ||
| 2321 | elseif Torsovelocity < 1 then | |
| 2322 | RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1) | |
| 2323 | LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1) | |
| 2324 | end | |
| 2325 | end | |
| 2326 | end | |
| 2327 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2328 | ||
| 2329 | ||
| 2330 | ||
| 2331 | function ShotAttackAnim1() | |
| 2332 | for i = 0, 1, 0.07 do | |
| 2333 | swait() | |
| 2334 | ||
| 2335 | if Torsovelocity > 2 then | |
| 2336 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2) | |
| 2337 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 2338 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2339 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2) | |
| 2340 | RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2341 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2342 | ||
| 2343 | ||
| 2344 | ||
| 2345 | elseif Torsovelocity < 1 then | |
| 2346 | ||
| 2347 | ||
| 2348 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2) | |
| 2349 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2) | |
| 2350 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2351 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2) | |
| 2352 | RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2353 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2354 | ||
| 2355 | ||
| 2356 | end | |
| 2357 | end | |
| 2358 | end | |
| 2359 | ||
| 2360 | ||
| 2361 | ||
| 2362 | ||
| 2363 | ||
| 2364 | function ShotAttackAnim2() | |
| 2365 | for i = 0, 1, 0.05 do | |
| 2366 | swait() | |
| 2367 | ||
| 2368 | if Torsovelocity > 2 then | |
| 2369 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2) | |
| 2370 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 2371 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1) | |
| 2372 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1) | |
| 2373 | RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2374 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2375 | ||
| 2376 | ||
| 2377 | ||
| 2378 | elseif Torsovelocity < 1 then | |
| 2379 | ||
| 2380 | ||
| 2381 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2) | |
| 2382 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2) | |
| 2383 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1) | |
| 2384 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1) | |
| 2385 | RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2386 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2387 | ||
| 2388 | ||
| 2389 | end | |
| 2390 | end | |
| 2391 | end | |
| 2392 | ||
| 2393 | ||
| 2394 | ||
| 2395 | function ShotAttackAnim3() | |
| 2396 | for i = 0, 1, 0.05 do | |
| 2397 | swait() | |
| 2398 | ||
| 2399 | if Torsovelocity > 2 then | |
| 2400 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2) | |
| 2401 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 2402 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2403 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2) | |
| 2404 | RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2405 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2406 | ||
| 2407 | ||
| 2408 | ||
| 2409 | elseif Torsovelocity < 1 then | |
| 2410 | ||
| 2411 | ||
| 2412 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2) | |
| 2413 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2) | |
| 2414 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2415 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2) | |
| 2416 | RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2417 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2418 | ||
| 2419 | ||
| 2420 | end | |
| 2421 | end | |
| 2422 | end | |
| 2423 | ||
| 2424 | function ShotAttackAnim4() | |
| 2425 | for i = 0, 1, 0.05 do | |
| 2426 | swait() | |
| 2427 | ||
| 2428 | if Torsovelocity > 2 then | |
| 2429 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2) | |
| 2430 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2) | |
| 2431 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2432 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2) | |
| 2433 | RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2434 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3) | |
| 2435 | ||
| 2436 | ||
| 2437 | ||
| 2438 | elseif Torsovelocity < 1 then | |
| 2439 | ||
| 2440 | ||
| 2441 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2) | |
| 2442 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2) | |
| 2443 | RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2) | |
| 2444 | LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2) | |
| 2445 | RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2446 | LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2) | |
| 2447 | ||
| 2448 | ||
| 2449 | end | |
| 2450 | end | |
| 2451 | end | |
| 2452 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2453 | ||
| 2454 | function DanAni1() | |
| 2455 | for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do | |
| 2456 | ||
| 2457 | swait() | |
| 2458 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.4) * angles(math.rad(5), math.rad(-8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2459 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2) | |
| 2460 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.25) * angles(math.rad(170), math.rad(0), math.rad(20)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2461 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(90), math.rad(0), math.rad(-45)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2462 | RH.C0 = clerp(RH.C0, cn(1, -.2, -.4) * RHCF * angles(math.rad(-4), math.rad(-15), math.rad(-5)), MusThingHat.Mesh.Scale.Y*0.3) | |
| 2463 | LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(4), math.rad(5), math.rad(5)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2464 | end | |
| 2465 | ||
| 2466 | end | |
| 2467 | ||
| 2468 | ||
| 2469 | ||
| 2470 | function DanAni2() | |
| 2471 | for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do | |
| 2472 | ||
| 2473 | swait() | |
| 2474 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.5) * angles(math.rad(8), math.rad(8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2475 | Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2) | |
| 2476 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.25) * angles(math.rad(180), math.rad(0), math.rad(25)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2477 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(0), math.rad(0), math.rad(45)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2478 | RH.C0 = clerp(RH.C0, cn(1, -1, -.0) * RHCF * angles(math.rad(4), math.rad(-5), math.rad(-8)), MusThingHat.Mesh.Scale.Y*0.2) | |
| 2479 | LH.C0 = clerp(LH.C0, cn(-1, -.2, -.4) * LHCF * angles(math.rad(-4), math.rad(15), math.rad(8)), MusThingHat.Mesh.Scale.Y*0.3) | |
| 2480 | end | |
| 2481 | ||
| 2482 | ||
| 2483 | end | |
| 2484 | ||
| 2485 | ||
| 2486 | ||
| 2487 | -------------------------------------------------------------------------------------------------------------------------- | |
| 2488 | ||
| 2489 | BuildNow = false | |
| 2490 | ||
| 2491 | Shotuse = false | |
| 2492 | ||
| 2493 | wait2 = false | |
| 2494 | ||
| 2495 | mouse.KeyDown:connect(function(key) | |
| 2496 | ||
| 2497 | if key == "g" and attack == false then | |
| 2498 | yes:Play() | |
| 2499 | head.face.Texture = "http://www.roblox.com/asset/?id=393521316" | |
| 2500 | humanoid.WalkSpeed = 0 | |
| 2501 | attack = true | |
| 2502 | Yes1() | |
| 2503 | Yes2() | |
| 2504 | Yes1() | |
| 2505 | Yes2() | |
| 2506 | attack = false | |
| 2507 | humanoid.WalkSpeed = 16 | |
| 2508 | head.face.Texture = "http://www.roblox.com/asset/?id=156600391" | |
| 2509 | end | |
| 2510 | end) | |
| 2511 | ||
| 2512 | ||
| 2513 | mouse.KeyDown:connect(function(key) | |
| 2514 | if key == "e" and attack == false then | |
| 2515 | if Wep == 1 then | |
| 2516 | Wep = 2 | |
| 2517 | else | |
| 2518 | Wep = 1 | |
| 2519 | end | |
| 2520 | ||
| 2521 | ||
| 2522 | end | |
| 2523 | end) | |
| 2524 | ||
| 2525 | mouse.KeyDown:connect(function(key) | |
| 2526 | if key == "p" and attack == false then | |
| 2527 | ||
| 2528 | Wep = 3 | |
| 2529 | ||
| 2530 | ||
| 2531 | ||
| 2532 | end | |
| 2533 | end) | |
| 2534 | ||
| 2535 | ||
| 2536 | ||
| 2537 | ||
| 2538 | ||
| 2539 | ||
| 2540 | ||
| 2541 | ||
| 2542 | ||
| 2543 | ||
| 2544 | ||
| 2545 | ||
| 2546 | equippedgun = true | |
| 2547 | ||
| 2548 | ||
| 2549 | ||
| 2550 | ||
| 2551 | coroutine.wrap(function() | |
| 2552 | while equippedgun do | |
| 2553 | ||
| 2554 | if spread < 0 then spread = 0 end | |
| 2555 | if humanoid.Health == 0 then break end | |
| 2556 | ||
| 2557 | ||
| 2558 | game:service'RunService'.Stepped:wait() | |
| 2559 | end | |
| 2560 | end)() | |
| 2561 | ||
| 2562 | mouse.Button1Down:connect(function() | |
| 2563 | if debounce then return end | |
| 2564 | if equippedgun2 == true and attack == false then | |
| 2565 | Shotuse = true | |
| 2566 | debounce = true | |
| 2567 | ||
| 2568 | wait(.2) | |
| 2569 | ||
| 2570 | sound:play() | |
| 2571 | ||
| 2572 | ||
| 2573 | ||
| 2574 | coroutine.wrap(function() | |
| 2575 | wait(0.3) | |
| 2576 | for angle = 0, 4 do | |
| 2577 | ||
| 2578 | wait() | |
| 2579 | end | |
| 2580 | ||
| 2581 | wait(0.2) | |
| 2582 | sound2:play() | |
| 2583 | ||
| 2584 | ||
| 2585 | wait(0.1) | |
| 2586 | for move = 0, 3 do | |
| 2587 | if move > 2 then return end | |
| 2588 | ||
| 2589 | ||
| 2590 | wait(0.06) | |
| 2591 | end | |
| 2592 | end)() | |
| 2593 | spread = spread + 1 | |
| 2594 | coroutine.wrap(function() | |
| 2595 | for bullitz = 0, 7 do | |
| 2596 | if bullitz > 6 then return end | |
| 2597 | rayCast2(300, 1, Reaper4) | |
| 2598 | GunParticle.Enabled = true | |
| 2599 | local PointLight = Instance.new("PointLight", Reaper4);
| |
| 2600 | PointLight.Color = Color3.new(.2,.2,0) | |
| 2601 | PointLight.Brightness = 2; | |
| 2602 | game:service'Debris':AddItem(PointLight, .05); | |
| 2603 | end | |
| 2604 | end)() | |
| 2605 | coroutine.wrap(function() | |
| 2606 | for _ = 0, 50 do | |
| 2607 | pcall(function() | |
| 2608 | spread = spread - 0.03 | |
| 2609 | end) | |
| 2610 | wait() | |
| 2611 | end | |
| 2612 | end)() | |
| 2613 | wait(1) | |
| 2614 | debounce = false | |
| 2615 | end | |
| 2616 | ||
| 2617 | end) | |
| 2618 | ||
| 2619 | ||
| 2620 | ||
| 2621 | ||
| 2622 | ||
| 2623 | ||
| 2624 | ||
| 2625 | ||
| 2626 | ||
| 2627 | mouse.Button1Down:connect(function(key) | |
| 2628 | ||
| 2629 | if attack == false and Wep == 1 then | |
| 2630 | attack = true | |
| 2631 | ||
| 2632 | AttackAnim1() | |
| 2633 | combo = 1 | |
| 2634 | Swing:Play() | |
| 2635 | AttackAnim2() | |
| 2636 | attack = false | |
| 2637 | combo = 0 | |
| 2638 | end | |
| 2639 | end) | |
| 2640 | ||
| 2641 | ||
| 2642 | ||
| 2643 | mouse.KeyDown:connect(function(key) | |
| 2644 | ||
| 2645 | if key == "f" and attack == false then | |
| 2646 | No:Play() | |
| 2647 | humanoid.WalkSpeed = 0 | |
| 2648 | attack = true | |
| 2649 | No1() | |
| 2650 | No2() | |
| 2651 | attack = false | |
| 2652 | humanoid.WalkSpeed = 16 | |
| 2653 | end | |
| 2654 | end) | |
| 2655 | ||
| 2656 | ||
| 2657 | ||
| 2658 | ||
| 2659 | mouse.KeyDown:connect(function(key) | |
| 2660 | if attack == false or DA == true then | |
| 2661 | if key == "r" and Wep == 3 then | |
| 2662 | ||
| 2663 | if DA == false then | |
| 2664 | DA = true | |
| 2665 | RUS:Play() | |
| 2666 | attack=true | |
| 2667 | humanoid.WalkSpeed = 0 | |
| 2668 | head.face.Texture = "http://www.roblox.com/asset/?id=393521316" | |
| 2669 | else | |
| 2670 | DA = false | |
| 2671 | RUS:Stop() | |
| 2672 | attack=false | |
| 2673 | humanoid.WalkSpeed = 16 | |
| 2674 | head.face.Texture = "http://www.roblox.com/asset/?id=156600391" | |
| 2675 | end | |
| 2676 | end | |
| 2677 | end | |
| 2678 | end) | |
| 2679 | ||
| 2680 | ||
| 2681 | ||
| 2682 | mouse.KeyDown:connect(function(key) | |
| 2683 | ||
| 2684 | if key == "t" and attack == false then | |
| 2685 | Taunt:Play() | |
| 2686 | humanoid.WalkSpeed = 0 | |
| 2687 | attack = true | |
| 2688 | No1() | |
| 2689 | Yes2() | |
| 2690 | attack = false | |
| 2691 | humanoid.WalkSpeed = 16 | |
| 2692 | end | |
| 2693 | end) | |
| 2694 | ||
| 2695 | mouse.KeyDown:connect(function(key) | |
| 2696 | if key == "z" then | |
| 2697 | ||
| 2698 | ||
| 2699 | ||
| 2700 | if NoSentry == false and attack == false and wait2 == false then | |
| 2701 | wait2 = true | |
| 2702 | for i,v in pairs(script:children()) do | |
| 2703 | if (v:IsA'Model') then | |
| 2704 | ||
| 2705 | ||
| 2706 | for i,v in pairs(v:children()) do | |
| 2707 | if (v:IsA'Humanoid') then | |
| 2708 | v.Health = 0 | |
| 2709 | end | |
| 2710 | end | |
| 2711 | ||
| 2712 | ||
| 2713 | end | |
| 2714 | ||
| 2715 | NoSentry = true | |
| 2716 | ||
| 2717 | end | |
| 2718 | ||
| 2719 | ||
| 2720 | ||
| 2721 | end | |
| 2722 | ||
| 2723 | ||
| 2724 | ||
| 2725 | if NoSentry == true and attack == false and wait2 == false and Wep == 1 then | |
| 2726 | attack = true | |
| 2727 | wait2 = true | |
| 2728 | humanoid.WalkSpeed = 0 | |
| 2729 | AnimSit() | |
| 2730 | AnimSitHit1() | |
| 2731 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2732 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2733 | HitM:Play() | |
| 2734 | BuildNow = true | |
| 2735 | AnimSitHit2() | |
| 2736 | AnimSitHit1() | |
| 2737 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2738 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2739 | HitM:Play() | |
| 2740 | AnimSitHit2() | |
| 2741 | AnimSitHit1() | |
| 2742 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2743 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2744 | HitM:Play() | |
| 2745 | AnimSitHit2() | |
| 2746 | AnimSitHit1() | |
| 2747 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2748 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2749 | HitM:Play() | |
| 2750 | AnimSitHit2() | |
| 2751 | AnimSitHit1() | |
| 2752 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2753 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2754 | HitM:Play() | |
| 2755 | AnimSitHit2() | |
| 2756 | AnimSitHit1() | |
| 2757 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2758 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2759 | HitM:Play() | |
| 2760 | AnimSitHit2() | |
| 2761 | AnimSitHit1() | |
| 2762 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2763 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2764 | HitM:Play() | |
| 2765 | AnimSitHit2() | |
| 2766 | AnimSitHit1() | |
| 2767 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2768 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2769 | HitM:Play() | |
| 2770 | AnimSitHit2() | |
| 2771 | AnimSitHit1() | |
| 2772 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2773 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2774 | HitM:Play() | |
| 2775 | AnimSitHit2() | |
| 2776 | AnimSitHit1() | |
| 2777 | WSH = WSHM[math.random(1,#WSHM)] | |
| 2778 | HitM.SoundId = "rbxassetid://"..WSH | |
| 2779 | HitM:Play() | |
| 2780 | AnimSitHit2() | |
| 2781 | AnimSit() | |
| 2782 | ||
| 2783 | humanoid.WalkSpeed = 16 | |
| 2784 | attack = false | |
| 2785 | NoSentry = false | |
| 2786 | ||
| 2787 | end | |
| 2788 | wait() | |
| 2789 | ||
| 2790 | wait2 = false | |
| 2791 | end end) | |
| 2792 | ||
| 2793 | ||
| 2794 | ||
| 2795 | humanoid.Died:connect(function() | |
| 2796 | Arms:Destroy() | |
| 2797 | end) | |
| 2798 | ||
| 2799 | print([[ | |
| 2800 | ||
| 2801 | ||
| 2802 | ---------------------------------------- | |
| 2803 | Tf2 Engineer Class | |
| 2804 | ---------------------------------------- | |
| 2805 | Script by: 123jl123 | |
| 2806 | Sentry by: Madiik | |
| 2807 | TheBoozled gave me a Mesh and Sounds from tf2 | |
| 2808 | ---------------------------------------- | |
| 2809 | Dont leak and dont do it..... | |
| 2810 | ---------------------------------------- | |
| 2811 | ]]) | |
| 2812 | ||
| 2813 | game:GetService("RunService"):BindToRenderStep("ew", 0, function()
| |
| 2814 | MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z) | |
| 2815 | end) | |
| 2816 | ||
| 2817 | local mesh1anan = Instance.new("SpecialMesh")
| |
| 2818 | mesh1anan.MeshType = Enum.MeshType.FileMesh | |
| 2819 | mesh1anan.Scale = Vector3.new(3,3,3) | |
| 2820 | mesh1anan.MeshId = "http://www.roblox.com/asset/?id=1047997" | |
| 2821 | mesh1anan.TextureId = "http://www.roblox.com/asset/?id=1047998" | |
| 2822 | - | mesh1anan.MeshId = "http://www.roblox.com/asset/?id=521754610" |
| 2822 | + | |
| 2823 | - | mesh1anan.TextureId = "http://www.roblox.com/asset/?id=521754612" |
| 2823 | + | |
| 2824 | Glow2 = Color3.new(0,0,0) | |
| 2825 | ||
| 2826 | GlowParticle = Instance.new("ParticleEmitter")
| |
| 2827 | GlowParticle.LightEmission = 1 | |
| 2828 | ||
| 2829 | GlowParticle.Size = NumberSequence.new(0,2) | |
| 2830 | GlowParticle.Texture = "http://www.roblox.com/asset/?id=1383009392" | |
| 2831 | GlowParticle.Transparency = NumberSequence.new(0,1) | |
| 2832 | - | GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985" |
| 2832 | + | |
| 2833 | GlowParticle.Lifetime = NumberRange.new(0.5) | |
| 2834 | GlowParticle.Rate= 25 | |
| 2835 | GlowParticle.Speed =NumberRange.new(0) | |
| 2836 | ||
| 2837 | ||
| 2838 | function RainDucks() | |
| 2839 | local locationanan = char.Torso.CFrame | |
| 2840 | local tacoa = Instance.new("Part")
| |
| 2841 | tacoa.Size = Vector3.new(.5,.5,.5) | |
| 2842 | tacoa.CanCollide = false | |
| 2843 | tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6)) | |
| 2844 | local meshanananan = mesh1anan:clone() | |
| 2845 | meshanananan.Parent = tacoa | |
| 2846 | meshanananan.Scale = Vector3.new(1,1,1) | |
| 2847 | tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8)) | |
| 2848 | tacoa.Parent = workspace | |
| 2849 | ||
| 2850 | ||
| 2851 | game:GetService("Debris"):AddItem(tacoa,4)
| |
| 2852 | local GP = GlowParticle:clone() | |
| 2853 | GP.Parent = tacoa | |
| 2854 | Glow1 = Color3.new(math.random(), math.random(), math.random()) | |
| 2855 | GP.Color = ColorSequence.new(Glow1,Glow2) | |
| 2856 | ||
| 2857 | end | |
| 2858 | ||
| 2859 | ||
| 2860 | ||
| 2861 | --]] | |
| 2862 | ||
| 2863 | ||
| 2864 | ||
| 2865 | while true do wait() | |
| 2866 | if BuildNow == true then | |
| 2867 | BuildNow = false | |
| 2868 | ||
| 2869 | BuildSentry() | |
| 2870 | end | |
| 2871 | if Shotuse == true then | |
| 2872 | Shotuse = false | |
| 2873 | attack = true | |
| 2874 | ShotAttackAnim1() | |
| 2875 | GunParticle.Enabled = false | |
| 2876 | ShotAttackAnim2() | |
| 2877 | ShotAttackAnim3() | |
| 2878 | ShotAttackAnim4() | |
| 2879 | ShotAttackAnim3() | |
| 2880 | attack = false | |
| 2881 | end | |
| 2882 | ||
| 2883 | ||
| 2884 | ||
| 2885 | ||
| 2886 | if DA == true then | |
| 2887 | DanAni1() | |
| 2888 | RainDucks() | |
| 2889 | local PointLight = Instance.new("PointLight", Torso);
| |
| 2890 | PointLight.Color = Color3.new(math.random(), math.random(), math.random()) | |
| 2891 | PointLight.Brightness = 50; | |
| 2892 | PointLight.Range = MusThingHat.Mesh.Scale.Y*10; | |
| 2893 | game:service'Debris':AddItem(PointLight, .3); | |
| 2894 | ||
| 2895 | DanAni2() | |
| 2896 | RainDucks() | |
| 2897 | local PointLight = Instance.new("PointLight", Torso);
| |
| 2898 | PointLight.Color = Color3.new(math.random(), math.random(), math.random()) | |
| 2899 | PointLight.Brightness = 50; | |
| 2900 | PointLight.Range = MusThingHat.Mesh.Scale.Y*10; | |
| 2901 | game:service'Debris':AddItem(PointLight, .3); | |
| 2902 | ||
| 2903 | ||
| 2904 | ||
| 2905 | end | |
| 2906 | ||
| 2907 | ||
| 2908 | ||
| 2909 | ||
| 2910 | ||
| 2911 | ||
| 2912 | end |