Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- ParticleEmitter8 = Instance.new("ParticleEmitter")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Animation11 = Instance.new("Animation")
- Animation12 = Instance.new("Animation")
- Camera13 = Instance.new("Camera")
- LocalScript14 = Instance.new("LocalScript")
- Tool0.Name = "Sapper"
- Tool0.Parent = mas
- Tool0.Grip = CFrame.new(0.100000001, 0, 0, -0.00183999329, 0.96539408, 0.260789216, -0.529998004, -0.222090662, 0.818399549, 0.847996831, -0.136711925, 0.51206553)
- Tool0.GripForward = Vector3.new(-0.260789216, -0.818399549, -0.51206553)
- Tool0.GripPos = Vector3.new(0.100000001, 0, 0)
- Tool0.GripRight = Vector3.new(-0.00183999329, -0.529998004, 0.847996831)
- Tool0.GripUp = Vector3.new(0.96539408, -0.222090662, -0.136711925)
- Tool0.ToolTip = "Why Don't We Just Give Up, Partner?"
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(44.5950012, 0.354999959, 14.8000002, -4.37113883e-08, 1, 0, -1, -4.37113883e-08, 0, 0, 0, 1)
- Part1.Orientation = Vector3.new(0, 0, -90)
- Part1.Position = Vector3.new(44.5950012, 0.354999959, 14.8000002)
- Part1.Rotation = Vector3.new(0, 0, -90)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Size = Vector3.new(0.709999979, 1.19000006, 0.400000006)
- Part1.BackParamA = -99999
- Part1.BackParamB = 99999
- Part1.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.BottomParamA = -99999
- Part1.BottomParamB = 99999
- Part1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Elasticity = 0
- Part1.Friction = 2
- Part1.FrontParamA = -99999
- Part1.FrontParamB = 99999
- Part1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.LeftParamA = -99999
- Part1.LeftParamB = 99999
- Part1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.Material = Enum.Material.Metal
- Part1.RightParamA = -99999
- Part1.RightParamB = 99999
- Part1.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.TopParamA = -99999
- Part1.TopParamB = 99999
- Part1.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part1.brickColor = BrickColor.new("Dark stone grey")
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=500759395"
- SpecialMesh2.Scale = Vector3.new(2, 1.5, 2)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=500759405"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Sound3.Name = "Equipped"
- Sound3.Parent = Part1
- Sound3.SoundId = "http://www.roblox.com/asset/?id=14863866"
- Sound3.Volume = 1
- Sound4.Name = "UnEquipped"
- Sound4.Parent = Part1
- Sound4.Pitch = 2
- Sound4.PlayOnRemove = true
- Sound4.PlaybackSpeed = 2
- Sound4.SoundId = "http://www.roblox.com/asset/?id=14863866"
- Sound4.Volume = 1
- Sound5.Name = "Planted"
- Sound5.Parent = Part1
- Sound5.SoundId = "http://roblox.com/asset/?id=10209475"
- Sound5.Volume = 1
- Sound6.Name = "Destroy"
- Sound6.Parent = Part1
- Sound6.SoundId = "http://roblox.com/asset/?id=10209481"
- Sound6.Volume = 1
- Sound7.Name = "Throw"
- Sound7.Parent = Part1
- Sound7.Pitch = 2.3465528488159
- Sound7.PlaybackSpeed = 2.3465528488159
- Sound7.SoundId = "rbxassetid://10209645"
- Sound7.Volume = 1
- ParticleEmitter8.Name = "Electric"
- ParticleEmitter8.Parent = Part1
- ParticleEmitter8.Rotation = NumberRange.new(-2048, 2048)
- ParticleEmitter8.Color = ColorSequence.new(Color3.new(0, 0.0666667, 1),Color3.new(0.631373, 0.631373, 1))
- ParticleEmitter8.Enabled = false
- ParticleEmitter8.Texture = "rbxassetid://57202933"
- ParticleEmitter8.Transparency = NumberSequence.new(0.5,0.5)
- ParticleEmitter8.Size = NumberSequence.new(0,0.99999964237213,0.9375,2.625,0)
- ParticleEmitter8.Acceleration = Vector3.new(0, -6, 0)
- ParticleEmitter8.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter8.Rate = inf
- ParticleEmitter8.RotSpeed = NumberRange.new(-2048, 2048)
- ParticleEmitter8.SpreadAngle = Vector2.new(50, 50)
- ParticleEmitter8.VelocitySpread = 50
- Sound9.Name = "TargetExplode"
- Sound9.Parent = Part1
- Sound9.SoundId = "rbxassetid://10209236"
- Sound9.Volume = 1
- Sound10.Name = "Sapping"
- Sound10.Parent = Part1
- Sound10.Looped = true
- Sound10.SoundId = "rbxassetid://259524227"
- Sound10.Volume = 1
- Animation11.Name = "HoldSapper"
- Animation11.Parent = Tool0
- Animation11.AnimationId = "rbxassetid://94108418"
- Animation12.Name = "ThrowSapper"
- Animation12.Parent = Tool0
- Animation12.AnimationId = "rbxassetid://233535408"
- Camera13.Name = "ThumbnailCamera"
- Camera13.Parent = Tool0
- Camera13.CFrame = CFrame.new(-0.603374362, -0.139123678, -3.10761571, -0.984140992, -0.00995710865, -0.177108377, -9.31322575e-10, 0.998423338, -0.0561317801, 0.177388057, -0.0552415848, -0.982589364)
- Camera13.CoordinateFrame = CFrame.new(-0.603374362, -0.139123678, -3.10761571, -0.984140992, -0.00995710865, -0.177108377, -9.31322575e-10, 0.998423338, -0.0561317801, 0.177388057, -0.0552415848, -0.982589364)
- Camera13.FieldOfView = 19.999999651642
- Camera13.Focus = CFrame.new(-0.249157578, -0.026860103, -1.14243674, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera13.focus = CFrame.new(-0.249157578, -0.026860103, -1.14243674, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- LocalScript14.Name = "SapperMain"
- LocalScript14.Parent = Tool0
- table.insert(cors,sandbox(LocalScript14,function()
- --[[ By: Brutez. ]]--
- local SapperMain=script.Parent;
- local Handle=SapperMain:WaitForChild("Handle");
- local THROWSOUND=Handle:FindFirstChild("Throw");
- local SuperPower=Handle:FindFirstChild("SuperPower");
- local SapperMeshData="rbxassetid://11821197";
- local TextureData="rbxassetid://21714689";
- local AttackAble=true;
- local AttackReloadTime=1;
- local ProjectileSpeed=137;
- local SapperModel;
- local PlayerMouse=Game.Players.LocalPlayer:GetMouse();
- local Targets={};
- getSapper=function()
- local Sapper = Instance.new("Part",SapperModel)
- Sapper.CanCollide = false
- Sapper.FormFactor = "Custom"
- Sapper.Size = Vector3.new(1, 1, 1)
- Sapper.TopSurface = "Smooth"
- Sapper.BottomSurface = "Smooth"
- Sapper.Name="Sapper"
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = SapperMeshData
- mesh.TextureId = TextureData
- mesh.Parent = Sapper
- local Destroy=Handle:FindFirstChild("Destroy"):Clone();
- Destroy.Parent=Sapper
- local Sap=Handle:FindFirstChild("Planted"):Clone();
- Sap.Parent=Sapper
- local IsSapping=Handle:FindFirstChild("Sapping"):Clone();
- IsSapping.Parent=Sapper
- local TargetExplode=Handle:FindFirstChild("TargetExplode"):Clone();
- TargetExplode.Parent=Sapper
- local SapperHealth=Instance.new("IntValue",Sapper);
- SapperHealth.Name="SapperHealth"
- SapperHealth.Value=50
- local Electric=Handle:FindFirstChild("Electric"):Clone();
- Electric.Parent=Sapper
- local lift = Instance.new("BodyForce")
- lift.force = Vector3.new(0, 195, 0) * Sapper:GetMass() * 0.4
- lift.Parent = Sapper
- return Sapper
- end
- onLeftDown=function ()
- if AttackAble then
- if not Game.Workspace:FindFirstChild(SapperMain.Parent.Name.."'s Sappers")then
- local PlayerSappers=Instance.new("Model",Game.Workspace)
- PlayerSappers.Name=SapperMain.Parent.Name.."'s Sappers"
- SapperModel=PlayerSappers
- else
- SapperModel=Game.Workspace:FindFirstChild(SapperMain.Parent.Name.."'s Sappers")
- end
- AttackAble=false
- delay(AttackReloadTime, function()
- AttackAble=true
- end)
- ThrowSapper:Play()
- Wait(0.2)
- if SapperMain.Parent:FindFirstChild("Humanoid") then
- THROWSOUND.Pitch=2+(math.random()*.5)
- THROWSOUND:Play()
- local TargetPoint=SapperMain.Parent:FindFirstChild("Humanoid").TargetPoint
- local Sapper = getSapper()
- Sapper.CFrame = CFrame.new(Handle.Position, TargetPoint)
- Sapper.Velocity = Sapper.CFrame.lookVector * ProjectileSpeed
- local TouchEnabled=true
- Sapper.Touched:connect(function(part)
- if part:IsDescendantOf(SapperMain.Parent)then return end
- if TouchEnabled then
- TouchEnabled=false
- if part and part.Name~="Base"and part.Name~="BasePlate" then
- if part and part.Parent and part.Parent.ClassName=="Model"then
- if not part.Parent:FindFirstChild("Sapper")then
- Sapper.Parent=part.Parent
- table.insert(Targets,part.Parent.Name)
- coroutine.resume(coroutine.create(function()
- for _=1,5 do
- Sapper.Velocity=Vector3.new(0,0,0)
- Wait(0)
- end
- end))
- Sapper:FindFirstChild("BodyForce"):Destroy()
- local w = Instance.new("Weld")
- w.Part0 = part
- w.Part1 = Sapper
- w.C0 = part.CFrame:toObjectSpace(Sapper.CFrame)
- w.Parent = Sapper
- local Hits=Sapper:FindFirstChild("Planted");
- local SapperHealth=Sapper:FindFirstChild("SapperHealth")
- Hits:Play();
- local Electric=Sapper:FindFirstChild("Electric");
- Electric.Enabled=true
- Sapper:FindFirstChild("Sapping"):Play()
- local NotFindHumanoid=true;
- local TargetHumanoid=nil;
- local ModelHealth=100
- while Wait(0) do
- if NotFindHumanoid and Sapper then
- for _,Child in pairs (part.Parent:GetChildren()) do
- if Child.ClassName == "Humanoid" then
- TargetHumanoid = Child
- NotFindHumanoid= false
- end
- end
- end
- if NotFindHumanoid then
- if part.Parent:FindFirstChild("Health")then
- if part.Parent:FindFirstChild("Health").Value>0.001 then
- part.Parent:FindFirstChild("Health").Value=part.Parent:FindFirstChild("Health").Value-0.3
- else
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("TargetExplode"):Play()
- part.Parent:BreakJoints()
- Sapper:BreakJoints()
- break
- end
- if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("Destroy"):Play()
- Sapper:BreakJoints()
- break
- end
- else
- if ModelHealth>0.001 then
- ModelHealth=ModelHealth-0.3
- else
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("TargetExplode"):Play()
- part.Parent:BreakJoints()
- Sapper:BreakJoints()
- break
- end
- if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("Destroy"):Play()
- Sapper:BreakJoints()
- break
- end
- end
- else
- if TargetHumanoid and TargetHumanoid.Health>0.001 then
- TargetHumanoid:TakeDamage(0.3)
- else
- part.Parent:BreakJoints()
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("TargetExplode"):Play()
- Sapper:BreakJoints()
- break
- end
- if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("Destroy"):Play()
- Sapper:BreakJoints()
- break
- end
- end
- end
- else
- Sapper:BreakJoints()
- end
- elseif part and part.Parent and part.Parent.ClassName=="Workspace" and part.Locked~=true then
- if not part:FindFirstChild("Sapper") then
- Sapper.Parent=part
- table.insert(Targets,part.Name)
- Sapper.Velocity=Vector3.new(0,0,0)
- local w = Instance.new("Weld")
- w.Part0 = part
- w.Part1 = Sapper
- w.C0 = part.CFrame:toObjectSpace(Sapper.CFrame)
- w.Parent = Sapper
- local Hits=Sapper:FindFirstChild("Planted");
- local SapperHealth=Sapper:FindFirstChild("SapperHealth")
- Hits:Play();
- local Electric=Sapper:FindFirstChild("Electric");
- Electric.Enabled=true
- Sapper:FindFirstChild("Sapping"):Play()
- local BrickHealth=100;
- while Wait(0)do
- if part:FindFirstChild("Health")then
- if part:FindFirstChild("Health").Value>0.001 then
- part:FindFirstChild("Health").Value=part:FindFirstChild("Health").Value-0.3
- else
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("TargetExplode"):Play()
- Sapper:BreakJoints()
- break
- end
- if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("Destroy"):Play()
- Sapper:BreakJoints()
- break
- end
- else
- if BrickHealth>0.001 then
- BrickHealth=BrickHealth-0.3
- else
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("TargetExplode"):Play()
- Sapper:BreakJoints()
- part:BreakJoints()
- part.Anchored=false
- break
- end
- if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
- Sapper:FindFirstChild("Sapping"):Stop()
- Sapper:FindFirstChild("Destroy"):Play()
- Sapper:BreakJoints()
- break
- end
- end
- end
- else
- Sapper:BreakJoints()
- end
- end
- end
- end
- end)
- end
- end
- end
- SapperMain.Equipped:connect(function(PlayerMouse)
- if not Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")then
- local PlayerSappers=Instance.new("Model",Game.Workspace)
- PlayerSappers.Name=Game.Players.LocalPlayer.Character.Name.."'s Sappers"
- SapperModel=PlayerSappers
- else
- SapperModel=Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")
- end
- local SapperMainHumanoid = Game.Players.LocalPlayer.Character:FindFirstChild('Humanoid');
- HoldSapper = SapperMainHumanoid:LoadAnimation(SapperMain:FindFirstChild('HoldSapper'));
- ThrowSapper = SapperMainHumanoid:LoadAnimation(SapperMain:FindFirstChild('ThrowSapper'));
- HoldSapper:Play()
- Handle.Equipped:Play()
- PlayerMouse.Button1Down:connect(function()
- onLeftDown(PlayerMouse)
- end)
- Game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").Died:connect(function()
- if Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers") then
- for _,Child in pairs (Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers"):GetChildren()) do
- if Child.Name=="Sapper" then
- Child:FindFirstChild("SapperHealth").Value=0
- Child:BreakJoints()
- end
- end
- end
- for i ,II in pairs(Targets) do
- if Game.Workspace:FindFirstChild(Targets[i]) and Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper")then
- Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):FindFirstChild("Destroy"):Play()
- Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):FindFirstChild("SapperHealth").Value=0
- Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):BreakJoints()
- end
- end
- Wait(1)
- if Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")then
- Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers"):Destroy()
- end
- end)
- end)
- SapperMain.Unequipped:connect(function()
- if ThrowSapper then
- ThrowSapper:Stop()
- ThrowSapper:Stop()
- end
- if HoldSapper ~= nil then
- HoldSapper:Stop()
- HoldSapper:remove()
- end
- end)
- --[[ By: Brutez. ]]--
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement