View difference between Paste ID: 9y1zPJAt and bNtLbA11
SHOW: | | - or go back to the newest paste.
1
local player = game:GetService("Players").LocalPlayer
2
local char = player.Character
3
local mouse = player:GetMouse()
4
local knife = true
5
local phone = false
6
local rs = char.Torso["Right Shoulder"]
7
local activated = false
8
local Revolver = false
9
local readyts = true
10
local dmg = false
11
local hum = char.Humanoid
12
local chara = false
13
local LS = char.Torso["Left Shoulder"]
14
local RH = char.Torso["Right Hip"]
15
local LH = char.Torso["Left Hip"]
16
local RJ = char.HumanoidRootPart.RootJoint
17
local spinSpecial = false
18
local slash = false
19
--------------------------------------------------------[[Settings]]
20
char.Humanoid.MaxHealth = 200
21
char.Humanoid.Health = 200
22
--------------------------------------------------------[[Tools,Sounds]]
23
local Knife = Instance.new("Part",char)
24
Knife.Size = Vector3.new(0.2,3,0.8)
25
Knife.CanCollide = false
26
mesh = Instance.new("SpecialMesh")
27
mesh.Parent = Knife
28
mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
29
mesh.TextureId = "http://www.roblox.com/asset/?id=358682478"
30
weld = Instance.new("Weld")
31
weld.Parent = char
32
weld.Part0 = char["Right Arm"]
33
weld.Part1 = Knife
34
weld.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
35
local realKnife = Instance.new("Part",char)
36
realKnife.Size = Vector3.new(0.2,3,0.8)
37
realKnife.CanCollide = false
38
meshaa = Instance.new("SpecialMesh")
39
meshaa.Parent = realKnife
40
meshaa.MeshId = "http://www.roblox.com/asset/?id=121944778"
41
meshaa.TextureId = "http://www.roblox.com/asset/?id=362719969"
42
realKnife.Transparency = 1
43
weldsa = Instance.new("Weld")
44
weldsa.Parent = char
45
weldsa.Part0 = char["Right Arm"]
46
weldsa.Part1 = realKnife
47
weldsa.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(-1.57,0,0)
48
local SlashSound = Instance.new("Sound", Knife)
49
SlashSound.SoundId = "rbxassetid://394934205"
50
local DamageSound = Instance.new("Sound",Knife)
51
DamageSound.SoundId = "rbxassetid://388826051"
52
local Pp = Instance.new("Part",char)
53
		Pp.Size = Vector3.new(0.6,1.1,0.2)
54
		Pp.CanCollide = false
55
		Pp.Transparency = 1
56
		meshphon = Instance.new("SpecialMesh",Pp)
57
		meshphon.MeshId = "http://www.roblox.com/asset/?id=268471347"
58
		meshphon.TextureId = "http://www.roblox.com/asset/?id=270166778"
59
		meshphon.Scale = Vector3.new(1.8,1.8,1)
60
		weld2 = Instance.new("Weld")
61
		weld2.Parent = char
62
		weld2.Part0 = char["Right Arm"]
63
		weld2.Part1 = Pp
64
		weld2.C0 = CFrame.new(0,-0.6,-1) * CFrame.Angles(2,0,3.14)
65
local revol = Instance.new("Part",char)
66
revol.Size = Vector3.new(0.2,1.83,1.03)
67
revol.CanCollide = false
68
revol.Transparency = 1
69
local shotSound = Instance.new("Sound",revol)
70
shotSound.SoundId = "rbxassetid://145080998"
71
shotSound.PlaybackSpeed = 3
72
meshrevol = Instance.new("SpecialMesh",revol)
73
meshrevol.MeshId = "http://www.roblox.com/asset/?id=79401392"
74
meshrevol.TextureId = "rbxassetid://97889459"
75
meshrevol.Scale = Vector3.new(1.6,1.6,1.6)
76
meshrevol.VertexColor = Vector3.new(1,0.9,0)
77
weld3 = Instance.new("Weld")
78
weld3.Parent = char
79
weld3.Part0 = char["Right Arm"]
80
weld3.Part1 = revol
81
weld3.C0 = CFrame.new(0,-1.4,-0.3) * CFrame.Angles(3.14,0,0)
82
music = Instance.new("Sound")
83
music.Parent = char
84
music.SoundId = "rbxassetid://399570826"
85
music.Volume = 2
86
music.PlaybackSpeed = 1.15
87
music.Looped = true
88
laugh = Instance.new("Sound")
89
laugh.Parent = char
90
laugh.SoundId = "rbxassetid://319332735"
91
laugh.Volume = 4
92
--------------------------------------------------------[[Gui]]
93
local menu = Instance.new("ScreenGui")
94
menu.Parent = player.PlayerGui
95
local Frame = Instance.new("ImageLabel", menu)
96
Frame.Image = "rbxassetid://48656662"
97
Frame.Size = UDim2.new(0,200,0,300)
98
Frame.BackgroundTransparency = 1
99
Frame.Position = UDim2.new(0,10,0,200)
100
Frame.Visible = false
101
local button = Instance.new("TextButton", Frame)
102
button.Size = UDim2.new(1,-10,0,30)
103
button.Position = UDim2.new(0,10,0,10)
104
button.BackgroundTransparency = 1
105-
button.Text = "Revolver(Yellow Soul)"
105+
button.Text = "Edd's Revolver(Green Soul)"
106
button.BorderSizePixel = 0
107
button.TextColor3 = Color3.new(255,255,255)
108
button.TextStrokeTransparency = 0
109
button.Font = "SciFi"
110
button.TextScaled = true
111
--------------------------------------------------------[[Gui Scripts]]
112
button.MouseButton1Click:connect(function()
113
	if Revolver == true then
114
		Revolver = false
115
		button.TextColor3 = Color3.new(255,255,255)
116
	elseif Revolver == false then
117
		Revolver = true
118
		button.TextColor3 = Color3.new(255,255,0)
119
	end
120
end)
121
--------------------------------------------------------[[Animations]]
122
slash = Instance.new("Animation",workspace)
123
slash.AnimationId = "http://www.roblox.com/asset/?id=186934753"
124
shoot = Instance.new("Animation",workspace)
125
shoot.AnimationId = "http://www.roblox.com/Asset?ID=95383980"
126
--------------------------------------------------------[[Damage Functions]]
127
function DamageObject(hit)
128
	local char=hit.Parent
129
	if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
130
		local h=char:FindFirstChild("Humanoid")
131
		if h and h.Health > 0 then
132
			DamageSound:Play()
133
			h:TakeDamage(35)
134
			if h.Health == 0 then
135
			end
136
			dmg = true
137
			wait(1.5)
138
		end
139
	end
140
end
141
function shot(hit)
142
	local char=hit.Parent
143
	if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
144
		local h=char:FindFirstChild("Humanoid")
145
		if h and h.Health > 0 then
146
			h:TakeDamage(10)
147
			if h.Health == 0 then
148
			end
149
		end
150
	end
151
end
152
function CharaDmg(hit)
153
	local char=hit.Parent
154
	if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and dmg == false then
155
		local h=char:FindFirstChild("Humanoid")
156
		if h and h.Health > 0 then
157
			DamageSound:Play()
158
			h:TakeDamage(105)
159
			if h.Health == 0 then
160
			end
161
			dmg = true
162
			wait(1.5)
163
		end
164
	end
165
end
166
--------------------------------------------------------[[Normal Actions]]
167
mouse.KeyDown:connect(function(key)
168
	Key = key:lower()
169
	if Key == "z" and knife == true and phone == false and chara == false then -- Normal Slash
170
		knife = false
171
		dmg = false
172
		local slashstart = char.Humanoid:LoadAnimation(slash)
173
		Knife.Touched:connect(DamageObject)
174
		slashstart:Play()
175
		SlashSound:Play()
176
		wait(0.76)
177
		knife = true
178
	elseif Key == "c" and knife == true and phone == false and chara == false then -- Phone
179
		knife = false
180
		phone = true
181
		Knife.Transparency = 1
182
		for i = 1,5 do
183
			rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
184
			wait()
185
		end
186
		Frame.Visible = true
187
		Pp.Transparency = 0
188
		local menu = Instance.new("ScreenGui")
189
		menu.Parent = player.PlayerGui
190
		local button = Instance.new("TextButton", menu)
191
	elseif Key == "c" and knife == false and phone == true and Revolver == false and chara == false then -- phone Gui
192
		knife = true
193
		phone = false
194
		for i = 1,5 do
195
			rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
196
			wait()
197
		end
198
		Frame.Visible = false
199
		Knife.Transparency = 0
200
		Pp.Transparency = 1
201
	elseif Key == "c" and Revolver == true and phone == true and chara == false then
202
		phone = false
203
		revol.Transparency = 0
204
		Pp.Transparency = 1
205
		Frame.Visible = false
206
		for i = 1,5 do
207
			rs.C0 = rs.C0 * CFrame.Angles(0,0,-0.157)
208
			wait()
209
		end
210
	elseif Key == "c" and Revolver == true and phone == false and chara == false then
211
		phone = true
212
		Frame.Visible = true
213
		revol.Transparency = 1
214
		Pp.Transparency = 0
215
		for i = 1,5 do
216
			rs.C0 = rs.C0 * CFrame.Angles(0,0,0.157)
217
			wait()
218
		end
219
	elseif Key == "z" and Revolver == true then -- Revolver Script
220
		local shootstart = char.Humanoid:LoadAnimation(shoot)
221
		if (not readyts) then return end
222
	readyts = false
223
	targ = mouse.Target
224
	if (targ == nil) then 
225
		readyts = true
226
		return 
227
	end
228
	hum = targ.Parent:findFirstChild("Humanoid")
229
	Hit = mouse.hit
230
	shootstart:Play()
231
	shotSound:Play()
232
	local P = Instance.new("Part",char) 
233
	P.Name = "BulletTrail" 
234
	local Place0 = revol.CFrame 
235
	P.formFactor = 0 
236
	P.Size = Vector3.new(0,0,(Place0.p - Hit.p).magnitude) 
237
	P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p) 
238
	P.Anchored = true 
239
	P.CanCollide = false
240-
	P.BrickColor = BrickColor.new("White")
240+
	P.BrickColor = BrickColor.new("Green")
241
	P.Touched:connect(shot)
242
	for count = 1, 10 do
243
		P.Transparency = count/10
244
		wait()
245
	end
246
	P:remove()
247
	readyts = true
248
	elseif Key == "b" and chara == false and phone == false and Revolver == false then -- Chara Mode
249
		dmg = false
250
		chara = true
251
		local eye = Instance.new("Part")
252
		eye.Parent = game.Workspace
253
		eye.Size = Vector3.new(0,0,0)
254
		eye.BrickColor = BrickColor.new("Bright red")
255
		eye.Transparency = 0.3
256
		eye.Anchored = true
257
		eye.CanCollide = false
258
		eye.CFrame = char.Head.CFrame * CFrame.new(0.1,0.2,-0.6)
259
		local mesh = Instance.new("SpecialMesh")
260
		mesh.Parent = eye
261
		mesh.MeshType = "Sphere"
262
		char.Torso.Anchored = true
263
		char.Head.face.Parent = char.Humanoid
264
		local charaface = Instance.new("Decal")
265
		charaface.Parent = char.Head
266
		charaface.Texture = "http://www.roblox.com/asset/?id=435233416"
267
		char.Humanoid.MaxHealth = 1000
268
		char.Humanoid.Health = 1000
269
		laugh:Play()
270
		for i = 1,20 do
271
			mesh.Scale = mesh.Scale + Vector3.new(2,0,0)
272
			eye.Transparency = eye.Transparency + 0.035
273
			wait()
274
		end
275
		char.Torso.Anchored = false
276
		char.Humanoid.WalkSpeed = 32
277
		Knife.Touched:connect(CharaDmg)
278
		realKnife.Transparency = 0
279
		Knife.Transparency = 1
280
		music:Play()
281
	elseif Key == "z" and chara == true and knife == true then -- Chara Slash
282
		knife = false
283
		local slashstart = char.Humanoid:LoadAnimation(slash)
284
		slashstart:Play()
285
		SlashSound:Play()
286
		wait(0.1)
287
		knife = true
288
	elseif Key == "b" and chara == true then
289
		chara = false
290
		realKnife.Transparency = 1
291
		Knife.Transparency = 0
292
		music:Stop()
293
		char.Humanoid.WalkSpeed = 16
294
		char.Humanoid.MaxHealth = 200
295
		char.Humanoid.Health = 200
296
		char.Humanoid.face.Parent = char.Head
297
		char.Head.Decal:Destroy()
298
	elseif Key == "f" and knife == true and phone == false and Revolver == false and spinSpecial == false and chara == false then
299
		spinSpecial = true
300
		rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
301
		LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
302
		LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
303
		RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
304
		SlashSound:Play()
305
		Knife.Touched:connect(DamageObject)
306
		for i = 1,24 do
307
			dmg = false
308
			Knife.Touched:connect(DamageObject)
309
			RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
310
			wait(0.008)
311
		end
312
		dmg = true
313
		spinSpecial = false
314
		LH.C0 = LH.C0 * CFrame.new(0,-1,0)
315
		RH.C0 = RH.C0 * CFrame.new(0,-1,0)
316
		LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
317
		RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
318
		rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
319
		LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
320
	elseif Key == "f" and knife == true and chara == true and spinSpecial == false then
321
		spinSpecial = true
322
		rs.C0 = rs.C0 * CFrame.Angles(0,0.785,1.57)
323
		LS.C0 = LS.C0 * CFrame.Angles(0,-0.785,-1.57)
324
		LH.C0 = LH.C0 * CFrame.Angles(0,0,0.39) * CFrame.new(0,1,0)
325
		RH.C0 = RH.C0 * CFrame.Angles(0,0,-0.39) * CFrame.new(0,1,0)
326
		SlashSound:Play()
327
		Knife.Touched:connect(CharaDmg)
328
		for i = 1,24 do
329
			dmg = false
330
			Knife.Touched:connect(CharaDmg)
331
			RJ.C0 = RJ.C0 * CFrame.Angles(0.785,0,0)
332
			wait(0.008)
333
		end
334
		dmg = true
335
		spinSpecial = false
336
		LH.C0 = LH.C0 * CFrame.new(0,-1,0)
337
		RH.C0 = RH.C0 * CFrame.new(0,-1,0)
338
		LH.C0 = LH.C0 * CFrame.Angles(0,0,-0.39)
339
		RH.C0 = RH.C0 * CFrame.Angles(0,0,0.39)
340
		rs.C0 = rs.C0 * CFrame.Angles(-0.785,0,-1.57)
341
		LS.C0 = LS.C0 * CFrame.Angles(-0.785,0,1.57)
342
	end
343
end)