Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dmgd = {}
- local c = {}
- local nailg = Instance.new("Sound")
- nailg.SoundId = "rbxassetid://7312769496"
- owner.Character.Humanoid.WalkSpeed = 20
- nailg.PlayOnRemove = true
- nailg.Volume = 1.5
- nailg.PlaybackSpeed = 1
- local s1,s2,s3 = "rbxassetid://7312769496","rbxassetid://7312770494","rbxassetid://7312768500"
- local medicl = Instance.new("Sound")
- medicl.SoundId = "rbxassetid://435756212"
- medicl.Volume = 1.5
- local toolout = false
- local s1,s2,s3 = "rbxassetid://7312769496","rbxassetid://7312770494","rbxassetid://7312768500"
- local rayblacklist = {}
- tool = Instance.new("Tool",owner.Backpack)
- tool.Name = "Nailgun"
- dmg = 5
- nailgun = Instance.new("Part",tool)
- nailgun.Name = "Handle"
- drum = Instance.new("Part",nailgun)
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = nailgun
- Mesh.MeshId = "http://www.roblox.com/asset/?id=7572360356"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=7572369900"
- Mesh.Scale = Vector3.new(0.1, 0.1, 0.1)
- Mesh2 = Instance.new("SpecialMesh")
- Mesh2.Parent = drum
- Mesh2.MeshId = "http://www.roblox.com/asset/?id=7572364835"
- Mesh2.TextureId = "http://www.roblox.com/asset/?id=7572369900"
- Mesh2.Scale = Vector3.new(0.1, 0.1, 0.1)
- nailgun.Size = Vector3.new(0.549, 1.779,2.12325)
- drum.Size = Vector3.new(1.311, 1.8456,1.19775)
- local weld = Instance.new("Weld",nailgun)
- weld.Part0 = drum
- weld.Part1 = nailgun
- weld.C0 = CFrame.new(0,0.425,0.275)
- tool.Grip = CFrame.new(0,-0.25,0.25) * CFrame.Angles(0,math.rad(15),0)
- local weld2 = Instance.new("Weld",owner.Character.Torso)
- weld2.Part0 = owner.Character["Left Arm"]
- weld2.Part1 = owner.Character.Torso
- weld2.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.75)
- local weld3 = Instance.new("Weld",owner.Character.Torso)
- weld3.Part0 = owner.Character["Right Arm"]
- weld3.Part1 = owner.Character.Torso
- weld3.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- weld3.Enabled = false
- weld2.Enabled = false
- drum.Massless = true
- tool.Equipped:Connect(function()
- toolout = true
- weld3.Enabled = true
- drum.CanCollide = false
- weld2.Enabled = true
- nailg.Parent = nailgun
- nailg.PlaybackSpeed = 2
- nailg.SoundId = s3
- nailg.Parent = nil
- end)
- tool.Unequipped:Connect(function()
- toolout = false
- weld3.Enabled = false
- weld2.Enabled = false
- drum.CanCollide = true
- nailg.Parent = nailgun
- nailg.PlaybackSpeed = 2
- nailg.SoundId = s3
- nailg.Parent = nil
- end)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 2
- local object = weld3
- local object2 = weld2
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local timeToFade2 = 0.0575
- local tweenInfo2 = TweenInfo.new(timeToFade2,Enum.EasingStyle.Linear)
- local timeToFade3 = 0.35
- local tweenInfo3 = TweenInfo.new(timeToFade3,Enum.EasingStyle.Linear)
- local timeToFade4 = 0.125
- local tweenInfo4 = TweenInfo.new(timeToFade4,Enum.EasingStyle.Linear)
- local goal = {}
- goal.C0 = CFrame.Angles(math.rad(-89),math.rad(-16),0) * CFrame.new(-0.95,-0.5,1.05)
- local tween = tweenService:Create(object, tweenInfo, goal)
- local goal2 = {}
- goal2.C0 = CFrame.Angles(math.rad(-79),math.rad(66),0) * CFrame.new(0.3,-0.4,1.75)
- local tween2 = tweenService:Create(object2, tweenInfo, goal2)
- local goal3 = {}
- goal3.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- local tween3 = tweenService:Create(object, tweenInfo, goal3)
- local goal4 = {}
- goal4.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.65)
- local tween4 = tweenService:Create(object2, tweenInfo, goal4)
- local goal5 = {}
- goal5.C0 = CFrame.Angles(math.rad(-95),math.rad(-15),0) * CFrame.new(-1,-0.5,1.325)
- local tween5 = tweenService:Create(object, tweenInfo2, goal5)
- local goal6 = {}
- goal6.C0 = CFrame.Angles(math.rad(-85),math.rad(65),0) * CFrame.new(0.25,-0.4,1.67)
- local tween6 = tweenService:Create(object2, tweenInfo2, goal6)
- local goal7 = {}
- goal7.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- local tween7 = tweenService:Create(object, tweenInfo2, goal7)
- local goal8 = {}
- goal8.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.5)
- local tween8 = tweenService:Create(object2, tweenInfo2, goal8)
- local goal9 = {}
- goal9.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),math.rad(55)) * CFrame.new(-1,-0.45,1)
- local tween9 = tweenService:Create(object, tweenInfo2, goal9)
- local goal11 = {}
- goal11.C0 = CFrame.Angles(math.rad(10),math.rad(15),0) * CFrame.new(1,0.25,-0.5)
- local tween11 = tweenService:Create(object2, tweenInfo3, goal11)
- local goal12 = {}
- goal12.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.75)
- local tween12 = tweenService:Create(object2, tweenInfo3, goal12)
- local goal17 = {}
- goal17.C0 = CFrame.Angles(math.rad(-160),math.rad(5),0) * CFrame.new(0.75,-0.5,0.5)
- local tween17 = tweenService:Create(object2, tweenInfo3, goal17)
- local goal18 = {}
- goal18.C0 = CFrame.Angles(math.rad(-85),math.rad(5),0) * CFrame.new(0.75,-0.85,1.5)
- local tween18 = tweenService:Create(object2, tweenInfo2, goal18)
- local goal13 = {}
- goal13.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- local tween13 = tweenService:Create(object, tweenInfo3, goal13)
- local goal15 = {}
- goal15.C0 = CFrame.Angles(math.rad(-10),math.rad(-15),0) * CFrame.new(-1.35,-0.125,0.5)
- local tween15 = tweenService:Create(object, tweenInfo2, goal15)
- local goal16 = {}
- goal16.C0 = CFrame.Angles(math.rad(-150),math.rad(45),0) * CFrame.new(1.25,-1,0.75)
- local tween16 = tweenService:Create(object2, tweenInfo2, goal16)
- local goal20 = {}
- goal20.Grip = tool.Grip
- local tween20 = tweenService:Create(tool, tweenInfo4, goal20)
- tween:Play()
- tween2:Play()
- local reloading = false
- tween.Completed:Connect(function()
- if not reloading then
- tween3:Play()
- tween4:Play()
- end
- end)
- tween3.Completed:Connect(function()
- if not reloading then
- tween:Play()
- tween2:Play()
- end
- end)
- local active = false
- local ammo = 100
- tool.Activated:Connect(function()
- if ammo > 0 then
- tween:Cancel()
- tween2:Cancel()
- tween3:Cancel()
- tween4:Cancel()
- weld2.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.5)
- weld3.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- active = true
- end
- end)
- tool.Deactivated:Connect(function()
- if ammo > 0 then
- active = false
- tween20.Completed:Wait()
- tween:Play()
- tween2:Play()
- end
- end)
- local e = Instance.new("RemoteEvent",owner.Character)
- NLS([[
- print("r = reload")
- print("m = mEdICc")
- print('n = throw your "mad milk"')
- local iactive = false
- local e = script.Parent
- game:GetService("RunService").RenderStepped:Connect(function()
- if (workspace.CurrentCamera.CFrame.p - owner.Character.Head.Position).magnitude <= 1.7 then
- workspace.CurrentCamera.FieldOfView = 100
- owner.Character.Humanoid.CameraOffset = Vector3.new(0,0.25,-0.25)
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
- v.LocalTransparencyModifier = 0
- end
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 1
- end
- end
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
- end
- owner.Character.Head.Transparency = 1
- else
- owner.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 0
- end
- end
- workspace.CurrentCamera.FieldOfView = 70
- owner.Character.Head.Transparency = 0
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
- end
- end
- end)
- mouse = owner:GetMouse()
- mouse.Button1Down:Connect(function()
- iactive = true
- end)
- mouse.Button1Up:Connect(function()
- iactive = false
- end)
- mouse.KeyDown:Connect(function(key)
- key = key:lower()
- if key == "r" then
- e:FireServer("reload")
- elseif key == "m" then
- e:FireServer("medic")
- elseif key == "n" then
- e:FireServer("milmk",mouse.Hit)
- end
- end)
- while task.wait() do
- if iactive then
- e:FireServer("fire",mouse.Hit)
- wait(1/32)
- end
- end
- ]],e)
- reloading = false
- local medta = {"9105156322","9105157537","9105158278"}
- function medic()
- reloading = true
- local billboard = Instance.new("BillboardGui", owner.Character.Head)
- billboard.Size = UDim2.new(2,0,2,0)
- local frame = Instance.new("ImageLabel", billboard)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.125
- local object = billboard
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.StudsOffset = Vector3.new(0, 2.5, 0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- frame.BackgroundTransparency = 1
- frame.ImageTransparency = 1
- frame.Image = "http://www.roblox.com/asset/?id=2807917209"
- frame.Size = UDim2.new(1,0,1,0)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.125
- local object = frame
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.ImageTransparency = 0
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- game:GetService("Debris"):AddItem(billboard,2)
- reloading = true
- tween15:Play()
- tween16:Play()
- medicl.Parent = owner.Character.Head
- medicl.SoundId = "rbxassetid://"..medta[math.random(1,3)]
- medicl:Play()
- medicl.Ended:Wait()
- medicl.Parent = nil
- tween12:Play()
- tween13:Play()
- tween12.Completed:Wait()
- reloading = false
- end
- function reload()
- reloading = true
- ammo = 0
- active = false
- tween:Cancel()
- tween2:Cancel()
- tween3:Cancel()
- tween4:Cancel()
- weld2.C0 = CFrame.Angles(math.rad(-80),math.rad(65),0) * CFrame.new(0.25,-0.35,1.75)
- weld3.C0 = CFrame.Angles(math.rad(-90),math.rad(-15),0) * CFrame.new(-1,-0.45,1)
- tween9:Play()
- tween9.Completed:Wait()
- local cfr = owner.Character["Left Arm"].CFrame:Inverse() * drum.CFrame
- weld.Parent = owner.Character["Left Arm"]
- weld.Part1 = owner.Character["Left Arm"]
- task.wait()
- weld.C0 = cfr:Inverse()
- task.wait()
- tween11:Play()
- tween11.Completed:Wait()
- tween12:Play()
- tween13:Play()
- tween12.Completed:Wait()
- weld.Parent = nailgun
- weld.Part1 = nailgun
- task.wait()
- weld.C0 = CFrame.new(0,0.425,0.275)
- task.wait()
- ammo = 100
- tween:Play()
- tween2:Play()
- reloading = false
- end
- local reloading = false
- local firing = false
- function shoot()
- nailg.Parent = nailgun
- nailg.PlaybackSpeed = 2
- nailg.SoundId = s1
- nailg.Parent = nil
- firing = true
- tween5:Play()
- tween6:Play()
- coroutine.wrap(function()
- for i = 1, 6 do
- wait(0.0125)
- local Flame3 = Instance.new("SpawnLocation", script)
- Flame3.Size = Vector3.new(0.25,0.25,0.25)
- Flame3.Neutral = false
- Flame3.Enabled = false
- Flame3.CFrame = nailgun.CFrame * CFrame.new(0,0.65,-1)
- Flame3.Position = Flame3.Position + Vector3.new(nailgun.Velocity.X * owner:GetNetworkPing() * 12,nailgun.Velocity.Y * owner:GetNetworkPing() * 12,nailgun.Velocity.Z * owner:GetNetworkPing() * 12)
- Flame3.CanCollide = false
- Flame3.CanTouch = false
- Flame3.Color = Color3.fromRGB(255, 50, 50)
- Flame3.Material = "Neon"
- Flame3.Anchored = true
- Flame3.Name = "Flameslol"
- game:GetService("Debris"):AddItem(Flame3,0.0625)
- local timeToFade6 = 0.0625
- local object6 = Flame3
- local tweenInfo6 = TweenInfo.new(timeToFade6)
- local goal10 = {}
- goal10.CFrame = Flame3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
- goal10.Transparency = 1
- goal10.Color = Color3.fromRGB(255, 155, 0)
- local tween10 = tweenService:Create(object6, tweenInfo6, goal10)
- tween10:Play()
- end
- end)()
- local Flame3 = Instance.new("SpawnLocation", script)
- Flame3.Size = Vector3.new(0.25,0.25,0.25)
- Flame3.Neutral = false
- Flame3.Enabled = false
- Flame3.CFrame = nailgun.CFrame * CFrame.new(0,0.65,-1)
- Flame3.Position = Flame3.Position + Vector3.new(nailgun.Velocity.X * owner:GetNetworkPing() * 12,nailgun.Velocity.Y * owner:GetNetworkPing() * 12,nailgun.Velocity.Z * owner:GetNetworkPing() * 12)
- Flame3.CanCollide = false
- Flame3.Color = Color3.fromRGB(255, 50, 50)
- Flame3.Material = "Neon"
- Flame3.Anchored = true
- Flame3.Name = "Flameslol"
- game:GetService("Debris"):AddItem(Flame3,0.0625)
- local timeToFade6 = 0.0625
- local object6 = Flame3
- local tweenInfo6 = TweenInfo.new(timeToFade6)
- local goal10 = {}
- goal10.CFrame = Flame3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
- goal10.Transparency = 1
- goal10.Color = Color3.fromRGB(255, 155, 0)
- local tween10 = tweenService:Create(object6, tweenInfo6, goal10)
- tween10:Play()
- tween10.Completed:Wait()
- tween7:Play()
- tween8:Play()
- firing = false
- if not active then
- tween8.Completed:Wait()
- tween:Play()
- tween2:Play()
- end
- end
- e.OnServerEvent:Connect(function(_,action,hitp)
- if action == "fire" and ammo > 0 and not reloading and toolout then
- ammo -= 1
- shoot()
- local nail = Instance.new("SpawnLocation",script)
- nail.Enabled = false
- nail.CanCollide = false
- nail.Name = "nails?!"
- nail.Size = Vector3.new(0.2541875, 0.759,0.2541875)
- nail.CFrame = nailgun.CFrame * CFrame.new(0,0.7,-2.5)
- nail.Position = nail.Position + Vector3.new(nailgun.Velocity.X * owner:GetNetworkPing() * 12,nailgun.Velocity.Y * owner:GetNetworkPing() * 12,nailgun.Velocity.Z * owner:GetNetworkPing() * 12)
- nail.CFrame = CFrame.new(nail.Position) * CFrame.Angles(CFrame.new(hitp.Position,nail.Position):ToEulerAnglesXYZ()) * CFrame.Angles(math.rad(Random.new():NextNumber(-0.5,0.5)),math.rad(Random.new():NextNumber(-0.5,0.5)),math.rad(Random.new():NextNumber(-0.5,0.5))) * CFrame.Angles(math.rad(-90),0,0)
- local forks = Instance.new("BodyVelocity",nail)
- forks.MaxForce = Vector3.new(0,math.huge,0)
- forks.Velocity = Vector3.new(0,0,0)
- forks.Name = "usedaforks"
- local tweenService = game:GetService("TweenService")
- local timeToFade = 7.5
- local object = nail
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = nail.CFrame * CFrame.new(0,-500,0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- game:GetService("Debris"):AddItem(nail,20)
- nailm = Instance.new("SpecialMesh")
- nailm.Parent = nail
- nailm.MeshId = "http://www.roblox.com/asset/?id=6742739474"
- nailm.Scale = Vector3.new(0.03125, 0.0625, 0.03125)
- local tr = Instance.new("Trail",nail)
- nail.Touched:Connect(function(parth)
- if parth.Name ~= "nails?!" then
- tween:Cancel()
- tr.Enabled = false
- if not nail:FindFirstChild("the") then
- if nail:FindFirstChild("usedaforks") then
- nail:FindFirstChild("usedaforks"):Destroy()
- end
- local weldconst = Instance.new("WeldConstraint",nail)
- weldconst.Name = "the"
- weldconst.Part1 = parth
- weldconst.Part0 = nail
- local humanoid = parth.Parent:FindFirstChild("Humanoid") or parth.Parent.Parent:FindFirstChild("Humanoid")
- if humanoid then
- if not table.find(dmgd,humanoid) then
- humanoid.Health = humanoid.Health - dmg
- else
- humanoid.Health = humanoid.Health - dmg * 2
- end
- end
- end
- end
- return
- end)
- local attach1 = Instance.new("Attachment", nail)
- local attach2 = Instance.new("Attachment", nail)
- attach1.CFrame = CFrame.new(0,0,0.125)
- attach2.CFrame = CFrame.new(0,0,-0.125)
- tr.Attachment0 = attach1
- tr.Attachment1 = attach2
- tr.LightInfluence = 1
- if owner.Team == nil and owner.Neutral then
- local App = game:GetService("Players"):GetCharacterAppearanceAsync(owner.UserId)
- local col = App["Body Colors"].TorsoColor
- tr.Color = ColorSequence.new{ColorSequenceKeypoint.new(0,col.Color),ColorSequenceKeypoint.new(1,col.Color)}
- else
- local col = owner.TeamColor
- tr.Color = ColorSequence.new{ColorSequenceKeypoint.new(0,col),ColorSequenceKeypoint.new(1,col)}
- end
- tr.Transparency = NumberSequence.new(0.8125,1)
- tr.Lifetime = 0.185
- tr.WidthScale = NumberSequence.new{NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(1, 0)}
- tr.FaceCamera = true
- elseif action == "reload" and not reloading and not firing and toolout then
- nailg.Parent = nailgun
- nailg.PlaybackSpeed = 2
- nailg.SoundId = s2
- nailg.Parent = nil
- reload()
- elseif action == "medic" and not reloading and not firing and toolout then
- medic()
- elseif action == "milmk" and not reloading and not firing and toolout then
- tween11:Play()
- reloading = true
- coroutine.wrap(function()
- wait(10)
- if reloading then
- reloading = false
- end
- end)()
- tween11.Completed:Wait()
- local milk = Instance.new("SpawnLocation",script)
- milk.Enabled = false
- milk.Size = Vector3.new(0.367, 0.367,0.367)
- milk.Color = Color3.fromRGB(252, 247, 217)
- milkm = Instance.new("SpecialMesh")
- milkm.Parent = milk
- milkm.MeshId = "http://www.roblox.com/asset/?id=7783530621"
- milkm.TextureId = ""
- milkm.Scale = Vector3.new(1,1,1)
- local milk2 = Instance.new("SpawnLocation",script)
- milk2.Enabled = false
- milk2.Size = Vector3.new(1, 1,1)
- milk2.Transparency = 0.5
- milkm2 = Instance.new("SpecialMesh")
- milkm2.Parent = milk2
- milkm2.MeshId = "http://www.roblox.com/asset/?id=7783530779"
- milkm2.Scale = Vector3.new(1,1,1)
- milk2.CanTouch = false
- milk2.CanCollide = false
- local weld = Instance.new("Weld",milk)
- weld.Part0 = milk2
- weld.Part1 = milk
- local weld2 = Instance.new("Weld",owner.Character["Left Arm"])
- weld2.Part0 = milk
- weld2.Part1 = owner.Character["Left Arm"]
- weld2.C0 = CFrame.new(0,1.125,0)
- tween17:Play()
- tween17.Completed:Wait()
- tween18:Play()
- tween18.Completed:Wait()
- weld2:Destroy()
- wait()
- tween12:Play()
- local attachment = Instance.new("Attachment",milk)
- attachment.CFrame = CFrame.new(0,0,-0.4375)
- local pe2 = Instance.new("ParticleEmitter", attachment)
- pe2.Color = ColorSequence.new(Color3.fromRGB(252, 247, 217))
- pe2.LightEmission = 0
- pe2.LightInfluence = 1
- pe2.EmissionDirection = "Front"
- pe2.Orientation = Enum.ParticleOrientation.VelocityParallel
- pe2.Size = NumberSequence.new(0.35,0)
- pe2.Texture = "rbxassetid://243132757"
- pe2.Transparency = NumberSequence.new(0,1)
- pe2.Lifetime = NumberRange.new(4,6)
- pe2.Rate = 200
- pe2.Rotation = NumberRange.new(90)
- pe2.RotSpeed = NumberRange.new(0)
- pe2.Speed = NumberRange.new(10)
- pe2.SpreadAngle = Vector2.new(-55,55)
- pe2.Drag = NumberRange.new(1)
- pe2.Acceleration = Vector3.new(math.random(-10,10),-35,math.random(-10,10))
- local t = 0.5
- local g = Vector3.new(0, -game.Workspace.Gravity, 0);
- local x0 = milk.CFrame
- local v0 = (Vector3.new(50,50,50) * (hitp.Position - x0.Position).Unit - 0.5*g*t*t)/t;
- local nt = 0;
- local rs = game:GetService("RunService").Heartbeat
- local nt = 0
- local forks = Instance.new("BodyVelocity",milk)
- forks.MaxForce = Vector3.new(0,math.huge,0)
- forks.Velocity = Vector3.new(0,0,0)
- coroutine.wrap(function()
- while (nt < t*4) do
- milk.CFrame = CFrame.new(0.5*g*nt*nt + v0*nt + x0.Position) * CFrame.Angles(math.rad(360 * math.pi * nt),math.rad(-360 * math.pi * nt),math.rad(360 * math.pi * nt));
- nt = nt + rs:Wait()
- end
- end)()
- wait(0.25)
- milk.Touched:Connect(function()
- nt = 2
- reloading = false
- local pard = Instance.new("Part",script)
- pard.Anchored = true
- pard.Position = milk.Position
- pard.CanCollide = false
- pard.CanTouch = false
- pard.Transparency = 1
- pard.Size = Vector3.new(0.05,0.05,0.05)
- local explosion = Instance.new("Explosion")
- explosion.Visible = false
- explosion.BlastPressure = 0
- explosion.DestroyJointRadiusPercent = 0
- explosion.BlastRadius = 15
- local pe = Instance.new("ParticleEmitter", pard)
- pe.Color = ColorSequence.new(Color3.fromRGB(252, 247, 217))
- pe.LightEmission = 0
- pe.LightInfluence = 1
- pe.EmissionDirection = "Top"
- pe.Orientation = Enum.ParticleOrientation.VelocityParallel
- pe.Size = NumberSequence.new(0.35,0)
- pe.Texture = "rbxassetid://243132757"
- pe.Transparency = NumberSequence.new(0,1)
- pe.Lifetime = NumberRange.new(1,2)
- pe.Rate = 200
- pe.Rotation = NumberRange.new(90)
- pe.RotSpeed = NumberRange.new(0)
- pe.Speed = NumberRange.new(20)
- pe.SpreadAngle = Vector2.new(-35,35)
- pe.Drag = NumberRange.new(1)
- pe.Acceleration = Vector3.new(math.random(-10,10),-35,math.random(-10,10))
- coroutine.wrap(function()
- wait(0.25)
- pe.Enabled = false
- end)()
- local billboard = Instance.new("BillboardGui", pard)
- billboard.Size = UDim2.new(0.125,0,0.125,0)
- local frame = Instance.new("ImageLabel", billboard)
- frame.BackgroundTransparency = 1
- frame.ImageTransparency = 0.25
- frame.Image = "http://www.roblox.com/asset/?id=7833576267"
- frame.Size = UDim2.new(1,0,1,0)
- frame.ImageColor3 = Color3.fromRGB(252, 247, 217)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = billboard
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.Size = UDim2.new(5,0,5,0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- local goal2 = {}
- goal2.ImageTransparency = 1
- local tween2 = tweenService:Create(frame, tweenInfo, goal2)
- tween:Play()
- tween2:Play()
- game:GetService("Debris"):AddItem(billboard,0.25)
- game:GetService("Debris"):AddItem(pard,2.5)
- nailg.Parent = milk
- nailg.SoundId = "rbxassetid://8078087229"
- nailg.PlaybackSpeed = 1
- nailg.Parent = nil
- milk:Destroy()
- milk2:Destroy()
- explosion.Position = pard.Position
- explosion.Parent = pard
- explosion.Hit:Connect(function(part, distance)
- local humanoid = part.Parent:FindFirstChildWhichIsA("Humanoid") or part.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
- if humanoid and not table.find(c,humanoid) then
- table.insert(c,humanoid)
- table.insert(dmgd,humanoid)
- local distanceFactor = distance / explosion.BlastRadius
- distanceFactor = 1 - distanceFactor
- local time = math.clamp(20 * distanceFactor,5,20)
- coroutine.wrap(function()
- for i,v in pairs(humanoid.Parent:GetDescendants()) do
- coroutine.wrap(function()
- if v:IsA("SpecialMesh") then
- coroutine.wrap(function()
- local td = v.TextureId
- task.wait()
- v.TextureId = ""
- local decal = Instance.new("Texture",v.Parent)
- decal.StudsPerTileU = v.Parent.Size.X
- decal.StudsPerTileV = v.Parent.Size.Y
- decal.Face = "Front"
- decal.Texture = td
- decal.Transparency = 0.85
- game:GetService("Debris"):AddItem(decal,time)
- local tweenService = game:GetService("TweenService")
- local timeToFade = time
- local object = decal
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.Transparency = 0
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- tween.Completed:Wait()
- v.TextureId = td
- table.remove(dmgd,table.find(dmgd,humanoid))
- table.remove(c,table.find(c,humanoid))
- end)()
- elseif v:IsA("Clothing") then
- local tweenService = game:GetService("TweenService")
- local timeToFade = time
- local object = v
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.Color3 = v.Color3
- local tween = tweenService:Create(object, tweenInfo, goal)
- task.wait()
- local r = (252 / 255) / 5
- local g = (247 / 255) / 5
- local b = (217 / 255) / 5
- v.Color3 = Color3.new(r,g,b)
- task.wait()
- tween:Play()
- elseif v:IsA("BasePart") then
- local tweenService = game:GetService("TweenService")
- local timeToFade = time
- local object = v
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.Color = v.Color
- local tween = tweenService:Create(object, tweenInfo, goal)
- task.wait()
- local avg = (53/255) / 3
- local r = ((252 / 255) + avg) / 1.25
- local g = ((247 / 255) + avg) / 1.25
- local b = ((217 / 255) + avg) / 1.25
- v.Color = Color3.new(r,g,b)
- task.wait()
- tween:Play()
- end
- end)()
- end
- end)()
- end
- end)
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement