Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- SpecialMesh25 = Instance.new("SpecialMesh")
- Part26 = Instance.new("Part")
- SpecialMesh27 = Instance.new("SpecialMesh")
- Trail28 = Instance.new("Trail")
- Sound29 = Instance.new("Sound")
- SpecialMesh25.MeshId = "rbxassetid://2125899404"
- SpecialMesh25.MeshType = Enum.MeshType.FileMesh
- Part26.Name = "Grenade"
- Part26.Parent = mas
- Part26.CFrame = CFrame.new(38.2035713, 1.02035296, 21.0111828, -0.776946664, -0.0182258431, -0.629302561, -0.629268765, -0.00825065561, 0.777144015, -0.0193562619, 0.999799848, -0.00505863409)
- Part26.Orientation = Vector3.new(-51, -90.4599991, -90.75)
- Part26.Position = Vector3.new(38.2035713, 1.02035296, 21.0111828)
- Part26.Rotation = Vector3.new(-90.3699951, -39, 178.659988)
- Part26.Color = Color3.new(0.152941, 0.27451, 0.176471)
- Part26.Velocity = Vector3.new(0.0464646779, 0.00033079437, 0.0308197252)
- Part26.Size = Vector3.new(1.43749833, 2.29999709, 1.43749833)
- Part26.BrickColor = BrickColor.new("Earth green")
- Part26.RotVelocity = Vector3.new(-0.000168789324, 0.010219017, 0.000870788237)
- Part26.brickColor = BrickColor.new("Earth green")
- Part26.FormFactor = Enum.FormFactor.Plate
- Part26.formFactor = Enum.FormFactor.Plate
- SpecialMesh27.Parent = Part26
- SpecialMesh27.MeshId = "http://www.roblox.com/Asset/?id=10207236"
- SpecialMesh27.Scale = Vector3.new(0.244374722, 0.244374692, 0.244374722)
- SpecialMesh27.VertexColor = Vector3.new(255, 255, 255)
- SpecialMesh27.MeshType = Enum.MeshType.FileMesh
- Trail28.Parent = Part26
- Trail28.Attachment0 = nil
- Trail28.Attachment1 = nil
- Trail28.Color = ColorSequence.new(Color3.new(0.152941, 0.27451, 0.176471),Color3.new(0.152941, 0.27451, 0.176471))
- Trail28.LightInfluence = 1
- Trail28.Transparency = NumberSequence.new(0.5,0.61249995231628,0.71249997615814,1)
- Trail28.Lifetime = 0.10000000149012
- Sound29.Parent = Part26
- Sound29.EmitterSize = 24
- Sound29.MinDistance = 24
- Sound29.SoundId = "http://www.roblox.com/asset/?id=326088041"
- Sound29.Volume = 7
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- local GRENADE = script.Grenade
- GRENADE.Parent = nil
- GRENADE.Anchored = false
- local SIZE = 1
- function ApplyDamage(Humanoid,Damage,OneShot)
- Damage = Damage * DAMAGEMULTIPLIER
- local DEAD = false
- if Humanoid.Health < 2000 and OneShot == false then
- if Humanoid.Health - Damage > 0 then
- Humanoid.Health = Humanoid.Health - Damage
- else
- Humanoid.Parent:BreakJoints()
- DEAD = true
- end
- else
- DEAD = true
- Humanoid.Parent:BreakJoints()
- end
- if DEAD == true then
- local PARTS = {}
- for index, CHILD in pairs(Humanoid.Parent:GetChildren()) do
- if CHILD:IsA("BasePart") then
- table.insert(PARTS,CHILD)
- end
- end
- coroutine.resume(coroutine.create(function()
- wait(2)
- repeat
- Swait()
- local PIECE = nil
- if MRANDOM(1,5) == 1 then
- for E = 1, #PARTS do
- if MRANDOM(1,5) == 1 then
- PIECE = PARTS[E]
- table.remove(PARTS,E)
- break
- end
- end
- end
- if PIECE ~= nil then
- if PIECE.Name == "Head" then
- WACKYEFFECT({Time = MRANDOM(10,30)*5, EffectType = "Box", Size = VT(PIECE.Size.Z,PIECE.Size.Y,PIECE.Size.Z), Size2 = (VT(PIECE.Size.Z,PIECE.Size.Y,PIECE.Size.Z))*MRANDOM(7,14)/10, Transparency = PIECE.Transparency, Transparency2 = 1, CFrame = PIECE.CFrame, MoveToPos = PIECE.Position+VT(0,MRANDOM(5,8)/1.5,0), RotationX = MRANDOM(-25,25)/35, RotationY = MRANDOM(-25,25)/35, RotationZ = MRANDOM(-25,25)/35, Material = "Neon", Color = C3(0.4,0,0), SoundID = 3264923, SoundPitch = MRANDOM(12,16)/10, SoundVolume = 2})
- else
- WACKYEFFECT({Time = MRANDOM(10,30)*5, EffectType = "Box", Size = PIECE.Size, Size2 = PIECE.Size*MRANDOM(7,14)/10, Transparency = PIECE.Transparency, Transparency2 = 1, CFrame = PIECE.CFrame, MoveToPos = PIECE.Position+VT(0,MRANDOM(5,8)/1.5,0), MRANDOM(-25,25)/35, RotationY = MRANDOM(-25,25)/35, RotationZ = MRANDOM(-25,25)/35, Material = "Neon", Color = C3(0.4,0,0), SoundID = 3264923, SoundPitch = MRANDOM(12,16)/10, SoundVolume = 2})
- end
- PIECE:remove()
- end
- until #PARTS == 0
- end))
- end
- end
- function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH)
- if FLOOR ~= nil then
- for i = 1, AMOUNT do
- local DEBREE = CreatePart(3, Effects, "Neon", FLOOR.Reflectance, FLOOR.Transparency, "Peal", "Debree", BLOCKSIZE, false)
- DEBREE.Material = FLOOR.Material
- DEBREE.Color = FLOOR.Color
- DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
- DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
- coroutine.resume(coroutine.create(function()
- Swait(15)
- DEBREE.Parent = workspace
- DEBREE.CanCollide = true
- Debris:AddItem(DEBREE,SWAIT)
- end))
- end
- end
- end
- function ApplyAoE2(POSITION, RANGE, MINDMG, MAXDMG, FLING, INSTAKILL)
- for index, CHILD in pairs(workspace:GetDescendants()) do
- if CHILD.ClassName == "Model" and CHILD ~= Character then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- if HUM then
- local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO and RANGE >= (TORSO.Position - POSITION).Magnitude then
- if INSTAKILL == true then
- CHILD:BreakJoints()
- else
- local DMG = MRANDOM(MINDMG, MAXDMG)
- ApplyDamage(HUM, DMG)
- end
- if FLING > 0 then
- for _, c in pairs(CHILD:GetChildren()) do
- if c:IsA("BasePart") then
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
- bv.velocity = CF(POSITION, TORSO.Position).lookVector * FLING
- bv.Parent = c
- Debris:AddItem(bv, 0.05)
- end
- end
- end
- end
- end
- end
- end
- end
- function SHAKECAM(POSITION, RANGE, INTENSITY, TIME)
- end
- local HELDGUN, GUNWELD
- local GUNOFFSET = CF(0, 0.8, -1.3)
- function CastProperRay(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos, EndPos).lookVector
- return Raycast(StartPos, DIRECTION, Distance, Ignore)
- end
- function GearGrenade()
- ATTACK = true
- Rooted = false
- chatfunc("Fire in the Hole!")
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * SIZE, 0.35 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0.2 * SIZE) * ANGLES(RAD(-20), RAD(-25), RAD(-3)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- until ATTACK == false
- end))
- local GYRO = IT("BodyGyro", RootPart)
- GYRO.D = 2
- GYRO.P = 20000
- GYRO.MaxTorque = VT(0, 4000000, 0)
- GYRO.CFrame = CF(RootPart.Position, Mouse.Hit.p)
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- GYRO.CFrame = CF(RootPart.Position, Mouse.Hit.p)
- until ATTACK == false
- GYRO:Remove()
- end))
- for i = 0, 0.4, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(-5)), 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0 * SIZE) * ANGLES(RAD(-5), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- local NADE = GRENADE:Clone()
- NADE.CFrame = LeftArm.CFrame * CF(0, -1.2 * SIZE, 0) * ANGLES(RAD(90), RAD(0), RAD(0))
- NADE.Parent = Effects
- CreateSound(326088041, NADE, 7, 1, false)
- local WELD = weldBetween(LeftArm, NADE)
- for i = 0, 0.7, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(25)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(-15)), 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0 * SIZE) * ANGLES(RAD(150), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- coroutine.resume(coroutine.create(function()
- WELD:remove()
- local DISTANCE = (NADE.Position - Mouse.Hit.p).Magnitude
- if DISTANCE > 150 then
- DISTANCE = 150
- end
- NADE.Velocity = CF(NADE.Position - VT(0, 5, 0), Mouse.Hit.p).lookVector * (DISTANCE * 2)
- wait(0.2)
- TOUCH = NADE.Touched:Connect(function()
- TOUCH:Disconnect()
- wait(0.5)
- NADE.Anchored = true
- NADE.Transparency = 1
- NADE.CanCollide = false
- local COLORS = {
- C3(0.8862745098039215, 0.6078431372549019, 0.25098039215686274),
- C3(0, 1, 0),
- C3(0.9607843137254902, 0.803921568627451, 0.18823529411764706)
- }
- WACKYEFFECT({
- Time = 66,
- EffectType = "Sphere",
- Size = VT(45, 45, 45),
- Size2 = VT(450, 450, 450),
- Transparency = 0.99,
- Transparency2 = 1,
- CFrame = CF(NADE.Position),
- MoveToPos = nil,
- RotationX = 0,
- RotationY = 0,
- RotationZ = 0,
- Material = "Neon",
- Color = C3(1, 1, 1),
- SoundID = nil,
- SoundPitch = nil,
- SoundVolume = nil
- })
- for i = 1, 45 do
- WACKYEFFECT({
- Time = MRANDOM(10, 60),
- EffectType = "Sphere",
- Size = VT(45, 45, 45) * MRANDOM(5, 12) / 10,
- Size2 = VT(65, 65, 65) * MRANDOM(5, 22) / 10,
- Transparency = 0,
- Transparency2 = 1,
- CFrame = CF(NADE.Position) * ANGLES(RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360))) * CF(0, 15, 0),
- MoveToPos = nil,
- RotationX = 0,
- RotationY = 0,
- RotationZ = 0,
- Material = "Neon",
- Color = COLORS[MRANDOM(1, #COLORS)],
- SoundID = nil,
- SoundPitch = nil,
- SoundVolume = nil
- })
- end
- ApplyAoE2(NADE.Position, 75, 35, 80, 145, true)
- SHAKECAM(NADE.Position, 160, 12, 25)
- CreateSound(174580476, NADE, 10, 1, false)
- CreateSound(165970126, NADE, 6, 1, false)
- Debris:AddItem(NADE, 10)
- end)
- end))
- for i = 0, 0.3, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(15)), 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), -0.2 * SIZE) * ANGLES(RAD(25), RAD(0), RAD(10)) * LEFTSHOULDERC0, 2 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(-5), RAD(-80), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- ATTACK = false
- Rooted = false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement