View difference between Paste ID: EdVMKtZf and M3X3mSJj
SHOW: | | - or go back to the newest paste.
1
mouse.KeyDown:connect(function(key)
2
    if key == "q" then
3
        local part = Instance.new("Part", workspace)
4
        part.Name = "Brick"
5
        part.Size = Vector3.new(2, 2, 2)
6
        part.CFrame = mouse.hit
7
        while wait() do
8
            part.BrickColor = BrickColor.Random()
9
        end
10
    elseif key == "e" then
11
        for i, v in pairs(workspace:GetChildren()) do
12
            if v:IsA "Part" and v.Name == "Brick" then
13
                v:remove()
14
            end
15
        end
16
    end
17
end)
18
19
script.Parent = workspace.CurrentCamera
20
local plr = game:GetService("Players").LocalPlayer
21
22
local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
23
tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
24
tool.Name = "bluE"
25
26
local part = Instance.new("Part",tool)
27
part.Name = "Handle"
28
part.Size = Vector3.new(4,6,4)
29
part.TopSurface = "Smooth"
30
part.BottomSurface = "Smooth"
31
part.CanCollide = false
32
part:BreakJoints()
33
34-
sound4.SoundId = "rbxassetid://258057783"
34+
35
mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499"
36
mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421"
37
mesh.Scale = Vector3.new(2,2,2)
38
39
local sound = Instance.new("Sound",part)
40
sound.SoundId = "rbxassetid://511340819"
41
sound.Volume = 3
42
43
local sound2 = Instance.new("Sound",part)
44
sound2.SoundId = "rbxassetid://280667448"
45
sound2.Volume = 5
46
47
local sound3 = Instance.new("Sound",part)
48
sound3.SoundId = "rbxassetid://139100774"
49
sound3.Volume = 10
50
51
local sound4 = Instance.new("Sound",part)
52
sound4.SoundId = "rbxassetid://164946131"
53
sound4.Volume = 10
54
55
local sound5 = Instance.new("Sound",part)
56
sound5.SoundId = "rbxassetid://130932305"
57
sound5.Volume = 10
58
59
local sound6 = Instance.new("Sound",part)
60
sound6.SoundId = "rbxassetid://906084456"
61
sound6.Volume = 10
62
sound6.TimePosition = 2
63
64
function firstHum(target)
65
	for i,v in pairs(target:GetChildren()) do
66
		if v:IsA("Humanoid") then
67
			return v
68
		end
69
	end
70
	return nil
71
end
72
73
local slap = false
74
local cd = false
75
76
plr:GetMouse().Button1Down:connect(function()
77
	if tool.Parent == plr.Character then
78
		if slap == false then
79
			slap = true
80
			sound2:Play()
81
			local str = Instance.new("StringValue")
82
			str.Name = "toolanim"
83
			str.Value = "Slash"
84
			str.Parent = tool
85
			wait(1)
86
			slap = false
87
		end
88
	end
89
end)
90
91
part.Touched:connect(function(hit)
92
	if slap == true then
93
		if cd == false then
94
			if not hit:IsDescendantOf(plr.Character) then
95
				if hit.Parent:IsA("Model") then
96
					local fhum = firstHum(hit.Parent)
97
					if fhum then
98
						cd = true
99
						fhum.PlatformStand = true
100
						sound:Play()
101
						local con1
102
						con1 = game:GetService("RunService").Heartbeat:connect(function()
103-
						p2.BrickColor = BrickColor.new("New Yeller")
103+
104
						end)
105
						wait(0.1)
106
						local vel = Instance.new("BodyVelocity",hit)
107
						vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
108
						vel.MaxForce = Vector3.new(10000000,10000000,10000000)
109
						wait(1)
110
						cd = false
111
						vel:Destroy()
112
						local vel2 = Instance.new("BodyVelocity",hit)
113
						vel2.Velocity = Vector3.new(0,12.5,0)
114
						vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
115
						local p2 = Instance.new("Part",hit)
116
						p2.Anchored = true
117
						p2.Transparency = 0.6
118
						p2.CanCollide = false
119
						p2.Size = Vector3.new(0.2,0.2,0.2)
120
						p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
121
						p2.BrickColor = BrickColor.new("Teal")
122
						p2.Material = "Neon"
123
						local m2 = Instance.new("CylinderMesh",p2)
124
						m2.Scale = Vector3.new(60,10000,60)
125-
						p2.BrickColor = BrickColor.new("Really red")
125+
126
						scln.Parent = hit
127
						scln:Play()
128
						local con2
129
						con2 = game:GetService("RunService").Heartbeat:connect(function()
130
							p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
131
						end)
132
						wait(7)
133
						vel2.Velocity = Vector3.new(0,0,0)
134
						wait(0.5)
135
						scln:Stop()
136
						local scln3 = sound5:Clone()
137
						scln3.Parent = hit
138
						scln3:Play()
139
						wait(1)
140
						local bav = Instance.new("BodyAngularVelocity",hit)
141
						bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
142
						vel2.Velocity = Vector3.new(0,-250,0)
143
						p2.BrickColor = BrickColor.new("Really black")
144
						local scln6 = sound6:Clone()
145
						scln6.Parent = hit
146
						scln6:Play()
147
						local continue = false
148
						local htc
149
						htc = hit.Touched:connect(function(hitp)
150
							if not hitp:IsDescendantOf(hit.Parent) then
151
								continue = true
152
								scln6:Stop()
153
								vel2:Destroy()
154
								con2:Disconnect()
155
								con1:Disconnect()
156
								htc:Disconnect()
157
								p2:Destroy()
158
							end
159
						end)
160
						repeat wait() until continue == true
161
						local ctab = {}
162
						for i=1,4 do
163
							local p = Instance.new("Part",hit)
164
							p.Size = Vector3.new(30,30,30)
165
							p.Anchored = true
166
							p.CanCollide = false
167
							p.TopSurface = "Smooth"
168
							p.BottomSurface = "Smooth"
169
							p.Color = Color3.fromRGB(255,math.random(0,255),0)
170
							p.CFrame = hit.CFrame
171
							local con
172
							con = game:GetService("RunService").Heartbeat:connect(function()
173
								p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
174
								p.Transparency = p.Transparency + 0.01
175
								if p.Transparency >= 1 then
176
									con:Disconnect()
177
								end
178
							end)
179
							table.insert(ctab,con)
180
						end	
181
						Instance.new("Explosion",workspace).Position = hit.Position
182
						local scln2 = sound4:Clone()
183
						scln2.Parent = hit
184
						scln2:Play()
185
						vel2:Destroy()
186
						hit.Parent:BreakJoints()
187
						repeat wait() until not hit:IsDescendantOf(workspace)
188
						con2:Disconnect()
189
					end
190
				end
191
			end
192
		end
193
	end
194
end)