Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tool2 = Instance.new("Tool",owner.Backpack)
- tool2.Name = "Crowbar"
- local partt = Instance.new("Part",tool2)
- partt.Name = "Handle"
- local hitdb = false
- partt.Size = Vector3.new(0.2,3.2,0.6)
- tool2.Grip = CFrame.new(0,-0.15,-0.15) * CFrame.Angles(0,math.rad(180),0)
- local mm = Instance.new("SpecialMesh",partt)
- mm.TextureId = "rbxassetid://441564112"
- mm.MeshId = "rbxassetid://441564090"
- mm.Scale = Vector3.new(0.015, 0.015, 0.015)
- local launch = {"7449437191","7449437048","7449436988","7449436902"}
- local pickup = "7449454869"
- local drop = "7449454513"
- tool = Instance.new("Tool",owner.Backpack)
- tool.Name = "Gravity Gun"
- tool.Grip = CFrame.new(0.45,-0.5,2) * CFrame.Angles(0,math.rad(10),0)
- local part = Instance.new("Part",tool)
- part.Reflectance = 0.125
- part.Name = "Handle"
- part.Size = Vector3.new(1.6048,1.0809,3.1887) * 1.5
- local p2 = Instance.new("Part",part)
- p2.Shape = "Cylinder"
- p2.Size = Vector3.new(1.5,0.85,0.85)
- p2.CanCollide = false
- p2.Massless = true
- p2.Color = Color3.fromRGB(255,100,0)
- p2.Reflectance = 0.125
- p2.Material = "Neon"
- local wel = Instance.new("Weld",part)
- wel.Part0 = p2
- wel.Part1 = part
- wel.C1 = CFrame.new(0.25,-0.25,-0.25) * CFrame.Angles(0,math.rad(90),0)
- TweenService = game:GetService("TweenService")
- spininfo = TweenInfo.new(0.25,Enum.EasingStyle.Linear)
- Spin1 = TweenService:Create(wel,spininfo,{C1 = wel.C1 * CFrame.Angles(math.rad(120),0,0)})
- Spin2 = TweenService:Create(wel,spininfo,{C1 = wel.C1 * CFrame.Angles(math.rad(240),0,0)})
- Spin3 = TweenService:Create(wel,spininfo,{C1 = wel.C1 * CFrame.Angles(math.rad(360),0,0)})
- Spin1.Completed:Connect(function()Spin2:Play() end)
- Spin2.Completed:Connect(function()Spin3:Play() end)
- Spin3.Completed:Connect(function()Spin1:Play() end)
- Spin1:Play()
- local p3 = Instance.new("Part",part)
- p3.CanCollide = false
- p3.Massless = true
- p3.Transparency = 0.9
- p3.Color = Color3.fromRGB(230,230,230)
- local m3 = Instance.new("SpecialMesh",p3)
- m3.MeshId = "rbxassetid://7442685765"
- m3.Scale = Vector3.new(0.25,0.25,0.25)
- local wel2 = Instance.new("Weld",part)
- wel2.Part0 = p3
- wel2.Part1 = part
- wel2.C0 = CFrame.new(0.25,0.5,-2) * CFrame.Angles(math.rad(-40),math.rad(180),0)
- wel2.C1 = CFrame.new(0,1.4,0)
- local m = Instance.new("SpecialMesh",part)
- m.TextureId = "rbxassetid://7442695635"
- m.MeshId = "rbxassetid://7442685591"
- m.Scale = Vector3.new(0.1125,0.1125,0.1125)
- local sound = Instance.new("Sound")
- sound.Volume = 1.25
- local s = Instance.new("Sound",part)
- s.Volume = 1.5
- s.Looped = true
- s.SoundId = "rbxassetid://7449423195"
- sound.PlayOnRemove = true
- p = Instance.new("Part",owner. Character)
- p.CanCollide = false
- p.Size = Vector3.new(0.01,0.01,0.01)
- p.Transparency = 1
- a2 = Instance.new("Part",owner. Character)
- a2.CanCollide = false
- a2.Size = Vector3.new(0.01,0.01,0.01)
- a2.Transparency = 1
- a = Instance.new("Part",owner. Character)
- a.CanCollide = false
- a.Size = Vector3.new(0.01,0.01,0.01)
- a.Transparency = 1
- local weldd = Instance.new("Weld", a)
- weldd.Part0 = p
- weldd.Part1 = a
- local weldd2 = Instance.new("Weld", owner.Character.Torso)
- weldd2.Part0 = a
- weldd2.Part1 = owner.Character.Torso
- local weldd3 = Instance.new("Weld", owner.Character.Torso)
- weldd3.Part0 = a2
- weldd3.Part1 = owner.Character.Torso
- weldd3.C1 = CFrame.new(1.5,0.5,0)
- local headd = Instance.new("Weld", owner.Character.Torso)
- headd.Part0 = owner.Character.Head
- headd.Part1 = owner.Character.Torso
- headd.C1 = CFrame.new(0,1,0)
- local weld = Instance.new("Weld", p)
- weld.Part0 = p
- weld.Part1 = owner.Character["Right Arm"]
- weld.C0 = CFrame.new(1.45, 0.5, -0.85) * CFrame.Angles(math.rad(90),0,math.rad(-10))
- local weld2 = Instance.new("Weld", p)
- weld2.Part0 = p
- weld2.Part1 = owner.Character["Left Arm"]
- weld2.C0 = CFrame.new(-0.35, 0.45, -1.65) * CFrame.Angles(math.rad(95),math.rad(10),math.rad(20))
- local weld3 = Instance.new("Weld", a2)
- weld3.Part0 = a2
- weld3.Part1 = owner.Character["Right Arm"]
- weld3.C0 = CFrame.new(0, 0, -0.5) * CFrame.Angles(math.rad(90),0,0)
- weld2.Enabled = false
- weld3.Enabled = false
- weld.Enabled = false
- tool2.Equipped:Connect(function()
- weld3.Enabled = true
- sound.PlaybackSpeed = 1
- sound.Volume = 1.5
- sound.SoundId = "rbxassetid://769464514"
- sound.Parent = partt
- sound.Parent = nil
- end)
- tool2.Unequipped:Connect(function()
- weld3.Enabled = false
- end)
- tool.Equipped:Connect(function()
- weld2.Enabled = true
- weld.Enabled = true
- sound.PlaybackSpeed = 1
- sound.Volume = 1.5
- sound.SoundId = "rbxassetid://7449454666"
- sound.Parent = part
- sound.Parent = nil
- end)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = weld
- local object2 = weld2
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- local tweenInfo2 = TweenInfo.new(timeToFade,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
- local goal = {}
- goal.C0 = CFrame.new(1.45, 0.65, -0.2) * CFrame.Angles(math.rad(100),0,math.rad(-10))
- local tween1 = tweenService:Create(object, tweenInfo, goal)
- local goal2 = {}
- goal2.C0 = CFrame.new(-0.35, 0.55, -1) * CFrame.Angles(math.rad(105),math.rad(10),math.rad(20))
- local tween2 = tweenService:Create(object2, tweenInfo, goal2)
- local goal3 = {}
- goal3.C0 = CFrame.new(1.45, 0.5, -0.85) * CFrame.Angles(math.rad(90),0,math.rad(-10))
- local tween3 = tweenService:Create(object, tweenInfo2, goal3)
- local goal4 = {}
- goal4.C0 = CFrame.new(-0.35, 0.45, -1.65) * CFrame.Angles(math.rad(95),math.rad(10),math.rad(20))
- local tween4 = tweenService:Create(object2, tweenInfo2, goal4)
- tween1.Completed:Connect(function()
- tween3:Play()
- tween4:Play()
- end)
- local candamage = false
- tool2.Activated:Connect(function()
- if not candamage then
- candamage = true
- sound.PlaybackSpeed = 1
- sound.Volume = 1.5
- sound.SoundId = "rbxassetid://2156366946"
- sound.Parent = partt
- sound.Parent = nil
- local gs = {}
- local s = math.random(-10,10)
- if (s < 5 and s > -5) then
- repeat
- s = math.random(-10,10)
- until not (s < 5 and s > -5)
- end
- gs.C0 = CFrame.new(0, 0, -0.75) * CFrame.Angles(math.rad(90),math.rad(s),math.rad(0)) * CFrame.new(0,0,0.25)
- local tt = tweenService:Create(weld3, TweenInfo.new(0.125,Enum.EasingStyle.Quint,Enum.EasingDirection.Out), gs)
- tt:Play()
- tt.Completed:Wait()
- local gs = {}
- gs.C0 = CFrame.new(0, 0, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
- local tt = tweenService:Create(weld3, TweenInfo.new(0.125,Enum.EasingStyle.Quint,Enum.EasingDirection.In), gs)
- tt:Play()
- tt.Completed:Wait()
- candamage = false
- hitdb = false
- end
- end)
- local speed = 1
- local speed2 = 0
- local g = {}
- g.C1 = CFrame.new(0, 0.1, 0) * CFrame.Angles(0,0,math.rad(2))
- local t = tweenService:Create(weldd, TweenInfo.new(5,Enum.EasingStyle.Quad,Enum.EasingDirection.In), g)
- local g2 = {}
- g2.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0,0,math.rad(-2))
- local t2 = tweenService:Create(weldd, TweenInfo.new(5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out), g2)
- local g3 = {}
- g3.C1 = CFrame.Angles(math.rad(-2),math.rad(2),0)
- local t3 = tweenService:Create(weldd2, TweenInfo.new(0.125,Enum.EasingStyle.Linear,Enum.EasingDirection.In), g3)
- local g4 = {}
- g4.C1 = CFrame.Angles(math.rad(-2),math.rad(-2),0)
- local t4 = tweenService:Create(weldd2, TweenInfo.new(0.25,Enum.EasingStyle.Linear,Enum.EasingDirection.Out), g4)
- local g5 = {}
- g5.C1 = CFrame.Angles(0,math.rad(0),0)
- local t5 = tweenService:Create(weldd2, TweenInfo.new(0.25,Enum.EasingStyle.Linear,Enum.EasingDirection.In), g5)
- local t6 = tweenService:Create(weldd2, TweenInfo.new(0.25,Enum.EasingStyle.Linear,Enum.EasingDirection.In), g3)
- t:Play()
- local walking = false
- t.Completed:Connect(function()
- t2:Play()
- end)
- t2.Completed:Connect(function()
- t:Play()
- end)
- t3.Completed:Connect(function()
- if walking then
- t4:Play()
- else
- t5:Play()
- end
- end)
- t4.Completed:Connect(function()
- if walking then
- t6:Play()
- else
- t5:Play()
- end
- end)
- t6.Completed:Connect(function()
- if walking then
- t4:Play()
- else
- t5:Play()
- end
- end)
- owner.Character.Humanoid.Changed:Connect(function()
- if owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) and owner.Character:FindFirstChildWhichIsA("Part").Velocity.Magnitude <= 0 then
- walking = true
- t3:Play()
- elseif owner.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) then
- walking = false
- end
- end)
- beam1 = Instance.new("Beam",part)
- beam1.Texture = "rbxassetid://1274380363"
- beam1.TextureMode = "Stretch"
- beam1.TextureLength = 1
- beam1.TextureSpeed = -10
- beam1.LightEmission = 1
- beam1.CurveSize0 = 0
- beam1.CurveSize1 = 0
- beam1.Width0 = 0.125
- beam1.Width1 = 0.25
- beam1.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(1, 0.75)}
- beam1.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 100,0)),ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 100,0))}
- beam2 = Instance.new("Beam",part)
- beam2.Texture = "rbxassetid://1274380363"
- beam2.TextureMode = "Stretch"
- beam2.TextureLength = 1
- beam2.TextureSpeed = -10
- beam2.LightEmission = 1
- beam2.CurveSize0 = 0
- beam2.CurveSize1 = 0
- beam2.Width0 = 0.125
- beam2.Width1 = 0.25
- beam2.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(1, 0.75)}
- beam2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 100,0)),ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 100,0))}
- beam3 = Instance.new("Beam",part)
- beam3.Texture = "rbxassetid://1274380363"
- beam3.TextureMode = "Stretch"
- beam3.TextureLength = 1
- beam3.TextureSpeed = -10
- beam3.LightEmission = 1
- beam3.CurveSize0 = 0
- beam3.CurveSize1 = 0
- beam3.Width0 = 0.125
- beam3.Width1 = 0.25
- beam3.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.35), NumberSequenceKeypoint.new(1, 0.75)}
- beam3.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 100,0)),ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 100,0))}
- beam1.FaceCamera = true
- beam2.FaceCamera = true
- beam3.FaceCamera = true
- local at = Instance.new("Attachment",part)
- at.CFrame = CFrame.new(0.25,0.6,-2.35)
- local at2 = Instance.new("Attachment",part)
- at2.CFrame = CFrame.new(1.025,-0.7,-2.35)
- local at3 = Instance.new("Attachment",part)
- at3.CFrame = CFrame.new(-0.525,-0.7,-2.35)
- beam1.Attachment0 = at
- beam2.Attachment0 = at2
- beam3.Attachment0 = at3
- tool.Unequipped:Connect(function()
- weld2.Enabled = false
- weld.Enabled = false
- sound.PlaybackSpeed = 1
- sound.Volume = 1.5
- sound.SoundId = "rbxassetid://7449454594"
- sound.Parent = part
- sound.Parent = nil
- end)
- local attachment2 = Instance.new("Attachment",part)
- attachment2.CFrame = CFrame.new(0.25,-0.25,-1.25)
- local attachment3 = Instance.new("Attachment",part)
- attachment3.CFrame = CFrame.new(0.25,-0.25,-2.25)
- local align = nil
- local align2 = nil
- local sparks = ColorSequence.new{ColorSequenceKeypoint.new(0,Color3.fromRGB(255, 100, 0)),ColorSequenceKeypoint.new(0.75,Color3.fromRGB(225, 75, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(200, 50, 0))}
- local pe = Instance.new("ParticleEmitter",attachment3)
- pe.Color = sparks
- pe.LightEmission = 0
- pe.LightInfluence = 0.125
- pe.EmissionDirection = "Front"
- pe.Orientation = Enum.ParticleOrientation.VelocityParallel
- pe.Size = NumberSequence.new(0.35,0)
- pe.Texture = "rbxassetid://243132757"
- pe.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,0.65)}
- pe.Lifetime = NumberRange.new(0.5,1)
- pe.Rate = 100
- pe.Enabled = false
- pe.Rotation = NumberRange.new(90)
- pe.RotSpeed = NumberRange.new(0)
- pe.Speed = NumberRange.new(40)
- pe.SpreadAngle = Vector2.new(-15,15)
- pe.Drag = NumberRange.new(0.25)
- pe.Acceleration = Vector3.new(0,-65,0)
- e = Instance.new("RemoteEvent",part)
- e.OnServerEvent:Connect(function(_,info,partt)
- if info == "drop" then
- sound.PlaybackSpeed = 1
- sound.Volume = 0.5
- sound.SoundId = "rbxassetid://"..drop
- sound.Parent = part
- sound.Parent = nil
- beam1.Attachment1 = nil
- beam2.Attachment1 = nil
- beam3.Attachment1 = nil
- if align then
- align:Destroy()
- end
- if align2 then
- align2:Destroy()
- end
- s:Stop()
- elseif info == "grab" then
- s:Play()
- sound.PlaybackSpeed = 1
- sound.Volume = 1.5
- sound.SoundId = "rbxassetid://"..pickup
- sound.Parent = part
- sound.Parent = nil
- if partt:FindFirstAncestorWhichIsA("Model") and partt:FindFirstAncestorWhichIsA("Model").PrimaryPart then
- partt = partt:FindFirstAncestorWhichIsA("Model").PrimaryPart
- end
- local attachment0 = Instance.new("Attachment",partt)
- local attachment1 = Instance.new("Attachment",part)
- beam1.Attachment1 = attachment2
- beam2.Attachment1 = attachment2
- beam3.Attachment1 = attachment2
- attachment1.CFrame = CFrame.new(0.25,0,-6)
- align = Instance.new("AlignPosition",part)
- align.Attachment0 = attachment0
- align.Attachment1 = attachment1
- align.RigidityEnabled = true
- align2 = Instance.new("AlignOrientation",part)
- align2.Attachment0 = attachment0
- align2.Attachment1 = attachment1
- align2.RigidityEnabled = true
- elseif info == "yeet" then
- pe.Brightness = 1
- pe.SpreadAngle = Vector2.new(-50,50)
- pe.Acceleration = Vector3.new(0,-15,0)
- pe.LightEmission = 0.1
- pe:Emit(95)
- s:Stop()
- if align and align.Attachment0 and align.Attachment0.Parent then
- tween1:Play()
- tween2:Play()
- local bv = Instance.new("BodyVelocity",align.Attachment0.Parent)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = part.CFrame.lookVector * 200 + Vector3.new(0,10,0)
- align:Destroy()
- sound.PlaybackSpeed = 1.125
- sound.Volume = 1
- sound.SoundId = "rbxassetid://"..launch[math.random(1,4)]
- sound.Parent = part
- sound.Parent = nil
- beam1.Attachment1 = nil
- beam2.Attachment1 = nil
- beam3.Attachment1 = nil
- game:GetService("Debris"):AddItem(bv,0.0625)
- if align2 then
- align2:Destroy()
- end
- end
- elseif info == "look" then
- local lookvector = owner.Character.Torso.CFrame:toObjectSpace(partt).lookVector.unit
- weldd.C0 = weldd.C0:Lerp(CFrame.Angles(math.sin(-lookvector.Y)*1,math.sin(lookvector.X)*1,0), 0.2)
- headd.C0 = headd.C0:Lerp(CFrame.new(0,-0.5,0) * CFrame.Angles(math.sin(-lookvector.Y)*1,math.sin(lookvector.X)*1,0), 0.2)
- weldd3.C0 = weldd3.C0:Lerp(CFrame.Angles(math.sin(-lookvector.Y)*1,math.sin(lookvector.X)*1,0), 0.2)
- end
- end)
- NLS([[
- mouse = owner:GetMouse()
- count = 0
- e = script.Parent
- mouse.KeyDown:Connect(function(key)
- key = key:lower()
- if key == "e" and count == 0 then
- local params = OverlapParams.new()
- params.FilterDescendantsInstances = {owner.Character:GetDescendants()}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- for _, v in pairs(workspace:GetPartBoundsInBox(owner.Character.Head.CFrame * CFrame.new(0,0,-20), Vector3.new(0.25,0.25,40), params)) do
- if v ~= nil and v.Anchored == false then
- count = 1
- e:FireServer("grab",v)
- break
- end
- end
- elseif key == "e" and count == 1 then
- count = 0
- e:FireServer("drop")
- elseif key == "q" and count == 1 then
- e:FireServer("yeet")
- count = 0
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- e:FireServer("look",workspace.CurrentCamera.CFrame)
- end)
- ]],e)
- while task.wait() do
- if candamage then
- local params = OverlapParams.new()
- params.FilterDescendantsInstances = {owner.Character:GetDescendants(), script}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- for _, v in pairs(workspace:GetPartBoundsInBox(partt.CFrame, partt.Size * 1.5, params)) do
- if (v:FindFirstAncestorOfClass("Model") and v:FindFirstAncestorOfClass("Model"):FindFirstChildWhichIsA("Humanoid")) and not hitdb then
- hitdb = true
- v:FindFirstAncestorOfClass("Model"):FindFirstChildWhichIsA("Humanoid").Health -= 15
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement