View difference between Paste ID: iBzJSCWY and 7VVbc0Bi
SHOW: | | - or go back to the newest paste.
1-
me = game.Players.YOURNAMEHERE
1+
me = game.Players.JayTheLionJR
2
hoppa = Instance.new("HopperBin")
3
hoppa.Parent = me.Backpack
4
hoppa.Name = "Steal"
5
script.Parent = hoppa
6
function selected(mouse, key)
7
mouse.Button1Down:connect(function()
8
if mouse.Target then
9
local targ = mouse.Target
10
if targ.Name == "Base" then return end
11
local too = Instance.new("Tool")
12
too.Parent = me.Backpack
13
too.Name = targ.Name
14
too.GripPos = Vector3.new(0,0,0)
15
if targ.Size.Y >= 1 then
16
too.GripPos = Vector3.new(0,-0.5,0)
17
elseif targ.Size.Y >= 2 then
18
too.GripPos = Vector3.new(0,-1,0)
19
elseif targ.Size.Y >= 3 then
20
too.GripPos = Vector3.new(0,-1.5,0)
21
elseif targ.Size.Y >= 4 then
22
too.GripPos = Vector3.new(0,-2,0)
23
end
24
local hand = targ
25
hand.Name = "Handle"
26
hand.Anchored = false
27
hand.Parent = too
28
hand.CanCollide = false
29
local gee = false
30
local function touch(hit)
31
if gee == false then return end
32
local hum = hit.Parent:findFirstChild("Humanoid")
33
if hum ~= nil then
34
hum:TakeDamage(math.random(5,10))
35
end
36
end
37
hand.Touched:connect(touch)
38
too.Equipped:connect(function()
39
too.Activated:connect(function()
40
gee = true
41
local val = Instance.new("StringValue")
42
val.Parent = too
43
val.Name = "toolanim"
44
val.Value = "Slash"
45
wait(0.5)
46
gee = false
47
end)
48
end)
49
end
50
end)
51
end
52
53-
script.Parent.Selected:connect(selected)
53+
script.Parent.Selected:connect(selected)
54
55
plr = game.Players.LocalPlayer
56
mouse = plr:GetMouse()
57
function onClicked()
58
local x = Instance.new("Explosion", workspace)	
59
x.Position = mouse.Hit.p
60
x.BlastRadius = 10
61
x.BlastPressure = 9e9	
62
end
63
mouse.Button1Down:connect(onClicked)
64
-- x10Shield --
65
local me = game:GetService("Players").LocalPlayer
66
local ShieldSize = 5
67
local canCollide = false
68
local isLocked = false
69
local defaultTransparency = 1
70
local whitelist = {"", "", "", ""}
71
72
local scriptBreak = false
73
local followPart = me.Character.HumanoidRootPart
74
local actualList = {}
75
local playerList = {}
76
table.insert(playerList, me)
77
for i,v in pairs(game:GetService("Players"):GetPlayers()) do
78
		for _,wplay in pairs(whitelist) do
79
		if v.Name:lower() == wplay:lower() then
80
			table.insert(playerList, v)
81
		end
82
	end
83
end
84
85
local MainLocation = me.Character.Torso
86
87
function createShield()
88
	pcall(function()
89
		pcall(function()
90
			for i,v in pairs(MainLocation:GetChildren()) do
91
				if v.Name == "weinershield" then
92
					v:Destroy()
93
				end
94
			end
95
		end)
96
		local mod = Instance.new("Model", MainLocation)
97
		mod.Name = "weinershield"
98
		local p1 = Instance.new("Part", mod)
99
		p1.Name = "front"
100
		p1.Size = Vector3.new(ShieldSize,ShieldSize,1)
101
		p1.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2))
102
		local b = Instance.new("BlockMesh", p1)
103
		b.Scale = Vector3.new(1, 1, 0)
104
		local p2 = Instance.new("Part", mod)
105
		p2.Name = "back"
106
		p2.Size = Vector3.new(ShieldSize,ShieldSize,1)
107
		p2.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2))
108
		local b = Instance.new("BlockMesh", p2)
109
		b.Scale = Vector3.new(1, 1, 0)
110
		local p3 = Instance.new("Part", mod)
111
		p3.Name = "left"
112
		p3.Size = Vector3.new(1,ShieldSize,ShieldSize)
113
		p3.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
114
		local b = Instance.new("BlockMesh", p3)
115
		b.Scale = Vector3.new(0, 1, 1)
116
		local p4 = Instance.new("Part", mod)
117
		p4.Name = "right"
118
		p4.Size = Vector3.new(1,ShieldSize,ShieldSize)
119
		p4.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
120
		local b = Instance.new("BlockMesh", p4)
121
		b.Scale = Vector3.new(0, 1, 1)
122
		local p5 = Instance.new("Part", mod)
123
		p5.Name = "top"
124
		p5.Size = Vector3.new(ShieldSize,1,ShieldSize)
125
		p5.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z)
126
		local b = Instance.new("BlockMesh", p5)
127
		b.Scale = Vector3.new(1, 0, 1)
128
		local p6 = Instance.new("Part", mod)
129
		p6.Name = "bottom"
130
		p6.Size = Vector3.new(ShieldSize,1,ShieldSize)
131
		p6.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z)
132
		local b = Instance.new("BlockMesh", p6)
133
		b.Scale = Vector3.new(1, 0, 1)
134
		for i,v in pairs(mod:GetChildren()) do
135
			v.Anchored = true
136
			v.Transparency = defaultTransparency
137
			v.Material = "Neon"
138
			v.TopSurface = "Smooth"
139
			v.BottomSurface = "Smooth"
140
			v.CanCollide = canCollide
141
		end
142
		mod.ChildRemoved:connect(function(a)
143
			game:GetService("RunService").Stepped:wait()
144
			if a.ClassName == "Part" then
145
				createShield()
146
			end
147
		end)
148
	end)
149
end	
150
151
function updateShield()
152
	pcall(function()
153
		char = me.Character
154
		for i,v in pairs(MainLocation:findFirstChild("weinershield"):GetChildren()) do
155
			v.Anchored = true
156
			v.Transparency = defaultTransparency
157
			v.Material = "Neon"
158
			v.TopSurface = "Smooth"
159
			v.BottomSurface = "Smooth"
160
			v.CanCollide = canCollide
161
		end
162
		MainLocation:findFirstChild("weinershield").front.Size = Vector3.new(ShieldSize,ShieldSize,1)
163
		MainLocation:findFirstChild("weinershield").front.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z+(ShieldSize/2))
164
		MainLocation:findFirstChild("weinershield").back.Size = Vector3.new(ShieldSize,ShieldSize,1)
165
		MainLocation:findFirstChild("weinershield").back.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y, followPart.Position.Z-(ShieldSize/2))
166
		MainLocation:findFirstChild("weinershield").left.Size = Vector3.new(1,ShieldSize,ShieldSize)
167
		MainLocation:findFirstChild("weinershield").left.CFrame = CFrame.new(followPart.Position.X+(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
168
		MainLocation:findFirstChild("weinershield").right.Size = Vector3.new(1,ShieldSize,ShieldSize)
169
		MainLocation:findFirstChild("weinershield").right.CFrame = CFrame.new(followPart.Position.X-(ShieldSize/2), followPart.Position.Y, followPart.Position.Z)
170
		MainLocation:findFirstChild("weinershield").top.Size = Vector3.new(ShieldSize,1,ShieldSize)
171
		MainLocation:findFirstChild("weinershield").top.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y+(ShieldSize/2), followPart.Position.Z)
172
		MainLocation:findFirstChild("weinershield").bottom.Size = Vector3.new(ShieldSize,1,ShieldSize)
173
		MainLocation:findFirstChild("weinershield").bottom.CFrame = CFrame.new(followPart.Position.X, followPart.Position.Y-(ShieldSize/2), followPart.Position.Z)
174
	end)
175
end
176
177
178
local function CreateRegion3FromLocAndSize(Position, Size)
179
	local SizeOffset = Size/2
180
	local Point1 = Position - SizeOffset
181
	local Point2 = Position + SizeOffset
182
	return Region3.new(Point1, Point2)
183
end
184
185
createShield()
186
game:GetService("RunService").Heartbeat:connect(function()
187
	if not scriptBreak then
188
		local me = game:GetService("Players").LocalPlayer
189
		local char = workspace:findFirstChild(me.Name)
190
		actualList = {}
191
		for i,v in pairs(playerList) do
192
			pcall(function()
193
				table.insert(actualList, workspace:findFirstChild(v.Name))
194
			end)
195
		end
196
		if MainLocation:findFirstChild("weinershield") ~= nil then
197
			updateShield()
198
		else
199
			createShield()
200
		end
201
		pcall(function()
202
			local Region = CreateRegion3FromLocAndSize(followPart.Position, Vector3.new(ShieldSize+1,ShieldSize+1,ShieldSize+1))
203
			for _,Part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region,actualList,math.huge)) do
204
				if Part.Name ~= "Base" and not Part:isDescendantOf(MainLocation:findFirstChild("weinershield")) then
205
					Part:Destroy()
206
				end
207
			end
208
		end)
209
		pcall(function()
210
			for i,v in pairs(actualList) do
211
				if v:findFirstChild("Humanoid") ~= nil then
212
					v.Humanoid.MaxHealth = math.huge
213
					v.Humanoid.Health = math.huge
214
				else
215
					Instance.new("Humanoid", v)
216
				end
217
			end
218
		end)
219
	end
220
end)