View difference between Paste ID: Sm3heNSn and g8b9Bm2N
SHOW: | | - or go back to the newest paste.
1-
1+
2
function sandbox(var,func)
3
	local env = getfenv(func)
4
	local newenv = setmetatable({},{
5
		__index = function(self,k)
6
			if k=="script" then
7
				return var
8
			else
9
				return env[k]
10
			end
11
		end,
12
	})
13
	setfenv(func,newenv)
14
	return func
15
end
16
cors = {}
17
mas = Instance.new("Model",game:GetService("Lighting"))
18
Tool0 = Instance.new("Tool")
19
Part1 = Instance.new("Part")
20
SpecialMesh2 = Instance.new("SpecialMesh")
21
Sound3 = Instance.new("Sound")
22
Sound4 = Instance.new("Sound")
23
Sound5 = Instance.new("Sound")
24
Sound6 = Instance.new("Sound")
25
Sound7 = Instance.new("Sound")
26
ParticleEmitter8 = Instance.new("ParticleEmitter")
27
Sound9 = Instance.new("Sound")
28
Sound10 = Instance.new("Sound")
29
Animation11 = Instance.new("Animation")
30
Animation12 = Instance.new("Animation")
31
Camera13 = Instance.new("Camera")
32
LocalScript14 = Instance.new("LocalScript")
33
Tool0.Name = "Sapper"
34
Tool0.Parent = mas
35
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)
36
Tool0.GripForward = Vector3.new(-0.260789216, -0.818399549, -0.51206553)
37
Tool0.GripPos = Vector3.new(0.100000001, 0, 0)
38
Tool0.GripRight = Vector3.new(-0.00183999329, -0.529998004, 0.847996831)
39
Tool0.GripUp = Vector3.new(0.96539408, -0.222090662, -0.136711925)
40
Tool0.ToolTip = "Why Don't We Just Give Up, Partner?"
41
Part1.Name = "Handle"
42
Part1.Parent = Tool0
43
Part1.CFrame = CFrame.new(44.5950012, 0.354999959, 14.8000002, -4.37113883e-08, 1, 0, -1, -4.37113883e-08, 0, 0, 0, 1)
44
Part1.Orientation = Vector3.new(0, 0, -90)
45
Part1.Position = Vector3.new(44.5950012, 0.354999959, 14.8000002)
46
Part1.Rotation = Vector3.new(0, 0, -90)
47
Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
48
Part1.Size = Vector3.new(0.709999979, 1.19000006, 0.400000006)
49
Part1.BackParamA = -99999
50
Part1.BackParamB = 99999
51
Part1.BackSurface = Enum.SurfaceType.SmoothNoOutlines
52
Part1.BottomParamA = -99999
53
Part1.BottomParamB = 99999
54
Part1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
55
Part1.BrickColor = BrickColor.new("Dark stone grey")
56
Part1.Elasticity = 0
57
Part1.Friction = 2
58
Part1.FrontParamA = -99999
59
Part1.FrontParamB = 99999
60
Part1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
61
Part1.LeftParamA = -99999
62
Part1.LeftParamB = 99999
63
Part1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
64
Part1.Material = Enum.Material.Metal
65
Part1.RightParamA = -99999
66
Part1.RightParamB = 99999
67
Part1.RightSurface = Enum.SurfaceType.SmoothNoOutlines
68
Part1.TopParamA = -99999
69
Part1.TopParamB = 99999
70
Part1.TopSurface = Enum.SurfaceType.SmoothNoOutlines
71
Part1.brickColor = BrickColor.new("Dark stone grey")
72
Part1.FormFactor = Enum.FormFactor.Custom
73
Part1.formFactor = Enum.FormFactor.Custom
74
SpecialMesh2.Parent = Part1
75
SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=500759395"
76-
SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=11821197"
76+
77
SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=500759405"
78-
SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=21714689"
78+
79
Sound3.Name = "Equipped"
80
Sound3.Parent = Part1
81
Sound3.SoundId = "http://www.roblox.com/asset/?id=14863866"
82
Sound3.Volume = 1
83
Sound4.Name = "UnEquipped"
84
Sound4.Parent = Part1
85
Sound4.Pitch = 2
86
Sound4.PlayOnRemove = true
87
Sound4.PlaybackSpeed = 2
88
Sound4.SoundId = "http://www.roblox.com/asset/?id=14863866"
89
Sound4.Volume = 1
90
Sound5.Name = "Planted"
91
Sound5.Parent = Part1
92
Sound5.SoundId = "http://roblox.com/asset/?id=10209475"
93
Sound5.Volume = 1
94
Sound6.Name = "Destroy"
95
Sound6.Parent = Part1
96
Sound6.SoundId = "http://roblox.com/asset/?id=10209481"
97
Sound6.Volume = 1
98
Sound7.Name = "Throw"
99
Sound7.Parent = Part1
100
Sound7.Pitch = 2.3465528488159
101
Sound7.PlaybackSpeed = 2.3465528488159
102
Sound7.SoundId = "rbxassetid://10209645"
103
Sound7.Volume = 1
104
ParticleEmitter8.Name = "Electric"
105
ParticleEmitter8.Parent = Part1
106
ParticleEmitter8.Rotation = NumberRange.new(-2048, 2048)
107
ParticleEmitter8.Color = ColorSequence.new(Color3.new(0, 0.0666667, 1),Color3.new(0.631373, 0.631373, 1))
108
ParticleEmitter8.Enabled = false
109
ParticleEmitter8.Texture = "rbxassetid://57202933"
110
ParticleEmitter8.Transparency = NumberSequence.new(0.5,0.5)
111
ParticleEmitter8.Size = NumberSequence.new(0,0.99999964237213,0.9375,2.625,0)
112
ParticleEmitter8.Acceleration = Vector3.new(0, -6, 0)
113
ParticleEmitter8.Lifetime = NumberRange.new(1, 1)
114
ParticleEmitter8.Rate = inf
115
ParticleEmitter8.RotSpeed = NumberRange.new(-2048, 2048)
116
ParticleEmitter8.SpreadAngle = Vector2.new(50, 50)
117
ParticleEmitter8.VelocitySpread = 50
118
Sound9.Name = "TargetExplode"
119
Sound9.Parent = Part1
120
Sound9.SoundId = "rbxassetid://10209236"
121
Sound9.Volume = 1
122
Sound10.Name = "Sapping"
123
Sound10.Parent = Part1
124
Sound10.Looped = true
125
Sound10.SoundId = "rbxassetid://259524227"
126
Sound10.Volume = 1
127
Animation11.Name = "HoldSapper"
128
Animation11.Parent = Tool0
129
Animation11.AnimationId = "rbxassetid://94108418"
130
Animation12.Name = "ThrowSapper"
131
Animation12.Parent = Tool0
132
Animation12.AnimationId = "rbxassetid://233535408"
133
Camera13.Name = "ThumbnailCamera"
134
Camera13.Parent = Tool0
135
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)
136
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)
137
Camera13.FieldOfView = 19.999999651642
138
Camera13.Focus = CFrame.new(-0.249157578, -0.026860103, -1.14243674, 1, 0, 0, 0, 1, 0, 0, 0, 1)
139
Camera13.focus = CFrame.new(-0.249157578, -0.026860103, -1.14243674, 1, 0, 0, 0, 1, 0, 0, 0, 1)
140
LocalScript14.Name = "SapperMain"
141
LocalScript14.Parent = Tool0
142
table.insert(cors,sandbox(LocalScript14,function()
143
--[[ By: Brutez. ]]--
144
local SapperMain=script.Parent;
145
local Handle=SapperMain:WaitForChild("Handle");
146
local THROWSOUND=Handle:FindFirstChild("Throw");
147
local SuperPower=Handle:FindFirstChild("SuperPower");
148
local SapperMeshData="rbxassetid://11821197";
149
local TextureData="rbxassetid://21714689";
150
local AttackAble=true;
151
local AttackReloadTime=1;
152
local ProjectileSpeed=137;
153
local SapperModel;
154
local PlayerMouse=Game.Players.LocalPlayer:GetMouse();
155
local Targets={};
156
getSapper=function()
157
local Sapper = Instance.new("Part",SapperModel)
158
Sapper.CanCollide = false
159
Sapper.FormFactor = "Custom"
160
Sapper.Size = Vector3.new(1, 1, 1)
161
Sapper.TopSurface = "Smooth"
162
Sapper.BottomSurface = "Smooth"
163
Sapper.Name="Sapper"
164
local mesh = Instance.new("SpecialMesh")
165
mesh.MeshId = SapperMeshData
166
mesh.TextureId = TextureData
167
mesh.Parent = Sapper
168
local Destroy=Handle:FindFirstChild("Destroy"):Clone();
169
Destroy.Parent=Sapper
170
local Sap=Handle:FindFirstChild("Planted"):Clone();
171
Sap.Parent=Sapper
172
local IsSapping=Handle:FindFirstChild("Sapping"):Clone();
173
IsSapping.Parent=Sapper
174
local TargetExplode=Handle:FindFirstChild("TargetExplode"):Clone();
175
TargetExplode.Parent=Sapper
176
local SapperHealth=Instance.new("IntValue",Sapper);
177
SapperHealth.Name="SapperHealth"
178
SapperHealth.Value=50
179
local Electric=Handle:FindFirstChild("Electric"):Clone();
180
Electric.Parent=Sapper
181
local lift = Instance.new("BodyForce")
182
lift.force = Vector3.new(0, 195, 0) * Sapper:GetMass() * 0.4
183
lift.Parent = Sapper
184
return Sapper
185
end
186
onLeftDown=function ()
187
if AttackAble then
188
if not Game.Workspace:FindFirstChild(SapperMain.Parent.Name.."'s Sappers")then
189
local PlayerSappers=Instance.new("Model",Game.Workspace)
190
PlayerSappers.Name=SapperMain.Parent.Name.."'s Sappers"
191
SapperModel=PlayerSappers
192
else
193
SapperModel=Game.Workspace:FindFirstChild(SapperMain.Parent.Name.."'s Sappers")
194
end
195
AttackAble=false
196
delay(AttackReloadTime, function()
197
AttackAble=true
198
end)
199
ThrowSapper:Play()
200
Wait(0.2)
201
if SapperMain.Parent:FindFirstChild("Humanoid") then
202
THROWSOUND.Pitch=2+(math.random()*.5)
203
THROWSOUND:Play()
204
local TargetPoint=SapperMain.Parent:FindFirstChild("Humanoid").TargetPoint
205
local Sapper = getSapper()
206
Sapper.CFrame = CFrame.new(Handle.Position, TargetPoint)
207
Sapper.Velocity = Sapper.CFrame.lookVector * ProjectileSpeed
208
local TouchEnabled=true
209
Sapper.Touched:connect(function(part)
210
if part:IsDescendantOf(SapperMain.Parent)then return end
211
if TouchEnabled then 
212
TouchEnabled=false
213
if part and part.Name~="Base"and part.Name~="BasePlate" then
214
if part and part.Parent and part.Parent.ClassName=="Model"then
215
if not part.Parent:FindFirstChild("Sapper")then
216
Sapper.Parent=part.Parent
217
table.insert(Targets,part.Parent.Name)
218
coroutine.resume(coroutine.create(function()
219
for _=1,5 do
220
Sapper.Velocity=Vector3.new(0,0,0)
221
Wait(0)
222
end
223
end))
224
Sapper:FindFirstChild("BodyForce"):Destroy()
225
local w = Instance.new("Weld")
226
w.Part0 = part
227
w.Part1 = Sapper
228
w.C0 = part.CFrame:toObjectSpace(Sapper.CFrame)
229
w.Parent = Sapper
230
local Hits=Sapper:FindFirstChild("Planted");
231
local SapperHealth=Sapper:FindFirstChild("SapperHealth")
232
Hits:Play();
233
local Electric=Sapper:FindFirstChild("Electric");
234
Electric.Enabled=true
235
Sapper:FindFirstChild("Sapping"):Play()
236
local NotFindHumanoid=true;
237
local TargetHumanoid=nil;
238
local ModelHealth=100
239
while Wait(0) do
240
if NotFindHumanoid and Sapper then
241
for _,Child in pairs (part.Parent:GetChildren()) do
242
if Child.ClassName == "Humanoid" then
243
TargetHumanoid = Child
244
NotFindHumanoid= false
245
end
246
end
247
end
248
if NotFindHumanoid then
249
if part.Parent:FindFirstChild("Health")then
250
if part.Parent:FindFirstChild("Health").Value>0.001 then
251
part.Parent:FindFirstChild("Health").Value=part.Parent:FindFirstChild("Health").Value-0.3
252
else
253
Sapper:FindFirstChild("Sapping"):Stop()
254
Sapper:FindFirstChild("TargetExplode"):Play()
255
part.Parent:BreakJoints()
256
Sapper:BreakJoints()
257
break
258
end
259
if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
260
Sapper:FindFirstChild("Sapping"):Stop()
261
Sapper:FindFirstChild("Destroy"):Play()
262
Sapper:BreakJoints()
263
break
264
end
265
else
266
if ModelHealth>0.001 then
267
ModelHealth=ModelHealth-0.3
268
else
269
Sapper:FindFirstChild("Sapping"):Stop()
270
Sapper:FindFirstChild("TargetExplode"):Play()
271
part.Parent:BreakJoints()
272
Sapper:BreakJoints()
273
break
274
end
275
if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
276
Sapper:FindFirstChild("Sapping"):Stop()
277
Sapper:FindFirstChild("Destroy"):Play()
278
Sapper:BreakJoints()
279
break
280
end
281
end
282
else
283
if TargetHumanoid and TargetHumanoid.Health>0.001 then
284
TargetHumanoid:TakeDamage(0.3)
285
else
286
part.Parent:BreakJoints()
287
Sapper:FindFirstChild("Sapping"):Stop()
288
Sapper:FindFirstChild("TargetExplode"):Play()
289
Sapper:BreakJoints()
290
break
291
end
292
if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
293
Sapper:FindFirstChild("Sapping"):Stop()
294
Sapper:FindFirstChild("Destroy"):Play()
295
Sapper:BreakJoints()
296
break
297
end
298
end
299
end
300
else
301
Sapper:BreakJoints()
302
end
303
elseif part and part.Parent and part.Parent.ClassName=="Workspace" and part.Locked~=true then
304
if not part:FindFirstChild("Sapper") then
305
Sapper.Parent=part
306
table.insert(Targets,part.Name)
307
Sapper.Velocity=Vector3.new(0,0,0)
308
local w = Instance.new("Weld")
309
w.Part0 = part
310
w.Part1 = Sapper
311
w.C0 = part.CFrame:toObjectSpace(Sapper.CFrame)
312
w.Parent = Sapper
313
local Hits=Sapper:FindFirstChild("Planted");
314
local SapperHealth=Sapper:FindFirstChild("SapperHealth")
315
Hits:Play();
316
local Electric=Sapper:FindFirstChild("Electric");
317
Electric.Enabled=true
318
Sapper:FindFirstChild("Sapping"):Play()
319
local BrickHealth=100;
320
while Wait(0)do
321
if part:FindFirstChild("Health")then
322
if part:FindFirstChild("Health").Value>0.001 then
323
part:FindFirstChild("Health").Value=part:FindFirstChild("Health").Value-0.3
324
else
325
Sapper:FindFirstChild("Sapping"):Stop()
326
Sapper:FindFirstChild("TargetExplode"):Play()
327
Sapper:BreakJoints()
328
break
329
end
330
if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
331
Sapper:FindFirstChild("Sapping"):Stop()
332
Sapper:FindFirstChild("Destroy"):Play()
333
Sapper:BreakJoints()
334
break
335
end
336
else
337
if BrickHealth>0.001 then
338
BrickHealth=BrickHealth-0.3
339
else
340
Sapper:FindFirstChild("Sapping"):Stop()
341
Sapper:FindFirstChild("TargetExplode"):Play()
342
Sapper:BreakJoints()
343
part:BreakJoints()
344
part.Anchored=false
345
break
346
end
347
if SapperHealth.Value==0 or SapperHealth.Value<0.001 then
348
Sapper:FindFirstChild("Sapping"):Stop()
349
Sapper:FindFirstChild("Destroy"):Play()
350
Sapper:BreakJoints()
351
break
352
end
353
end
354
end
355
else
356
Sapper:BreakJoints()
357
end
358
end
359
end
360
end
361
end)
362
end
363
end
364
end
365
SapperMain.Equipped:connect(function(PlayerMouse)
366
if not Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")then
367
local PlayerSappers=Instance.new("Model",Game.Workspace)
368
PlayerSappers.Name=Game.Players.LocalPlayer.Character.Name.."'s Sappers"
369
SapperModel=PlayerSappers
370
else
371
SapperModel=Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")
372
end
373
local SapperMainHumanoid = Game.Players.LocalPlayer.Character:FindFirstChild('Humanoid');
374
HoldSapper  = SapperMainHumanoid:LoadAnimation(SapperMain:FindFirstChild('HoldSapper'));
375
ThrowSapper = SapperMainHumanoid:LoadAnimation(SapperMain:FindFirstChild('ThrowSapper'));
376
HoldSapper:Play()
377
Handle.Equipped:Play()
378
PlayerMouse.Button1Down:connect(function() 
379
onLeftDown(PlayerMouse)
380
end)
381
Game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").Died:connect(function()
382
if Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers") then
383
for _,Child in pairs (Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers"):GetChildren()) do
384
if Child.Name=="Sapper" then
385
Child:FindFirstChild("SapperHealth").Value=0
386
Child:BreakJoints()
387
end
388
end
389
end
390
for i ,II in pairs(Targets) do
391
if Game.Workspace:FindFirstChild(Targets[i]) and Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper")then
392
Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):FindFirstChild("Destroy"):Play()
393
Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):FindFirstChild("SapperHealth").Value=0
394
Game.Workspace:FindFirstChild(Targets[i]):FindFirstChild("Sapper"):BreakJoints()
395
end
396
end
397
Wait(1)
398
if Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers")then
399
Game.Workspace:FindFirstChild(Game.Players.LocalPlayer.Character.Name.."'s Sappers"):Destroy()
400
end
401
end)
402
end)
403
SapperMain.Unequipped:connect(function()
404
if ThrowSapper then
405
ThrowSapper:Stop()
406
ThrowSapper:Stop()
407
end
408
if HoldSapper ~= nil then
409
HoldSapper:Stop()
410
HoldSapper:remove()
411
end
412
end)
413
--[[ By: Brutez. ]]--
414
end))
415
for i,v in pairs(mas:GetChildren()) do
416
	v.Parent = game:GetService("Players").LocalPlayer.Backpack
417
	pcall(function() v:MakeJoints() end)
418
end
419
mas:Destroy()
420
for i,v in pairs(cors) do
421
	spawn(function()
422
		pcall(v)
423
	end)
424
end