View difference between Paste ID: Mms8jgRJ and ZCistfw7
SHOW: | | - or go back to the newest paste.
1-
--- THE BELOW WILL FILTER ALL OBJS THAT APPEAR IN WORKSPACE WITH A TEXT PROPERTY
1+
2-
do
2+
3-
    local filteredMessages = { ['___'] = '___' };
3+
4-
    local onPropertyChanged = function (obj)   
4+
5-
        if (obj:isDescendantOf (workspace)) then   
5+
6-
            local objText = obj.Text;
6+
7-
           
7+
8-
            if (objText ~= '___' and objText:find '(%S)') then
8+
9-
                if (filteredMessages [objText] and filteredMessages [objText] ~= objText) then 
9+
10-
                    obj.Text = filteredMessages [objText];
10+
11-
                elseif (not filteredMessages [objText]) then
11+
12-
                    obj.Text = '___';
12+
13-
                   
13+
14-
                    local filtered = game:service 'Chat':FilterStringForBroadcast (objText, game:service 'Players'.localPlayer);
14+
15-
                   
15+
16-
                    filteredMessages [objText] = filtered;
16+
17-
                    filteredMessages [filtered] = filtered;
17+
18-
                   
18+
19-
                    obj.Text = filtered;
19+
20-
                end;
20+
21-
            end;
21+
22-
        end;
22+
23-
    end;
23+
24-
   
24+
25-
    local newInstance = Instance.new;
25+
26-
    Instance = {
26+
27-
        new = function (class, parent)
27+
28-
            local obj = newInstance (class, parent);
28+
29-
           
29+
30-
            if (pcall (function()return obj.Text;end)) then
30+
31-
                obj:getPropertyChangedSignal ('Parent'):connect (function () onPropertyChanged (obj) end);
31+
32-
                obj:getPropertyChangedSignal ('Text'):connect (function() onPropertyChanged (obj) end);
32+
33-
            end;
33+
34-
           
34+
35-
            return obj;
35+
36-
        end;
36+
37-
    };
37+
38-
end;
38+
39-
--- THE ABOVE
39+
40-
plrrr = game.Players.LocalPlayer
40+
41
    Power=450,
42-
base = Instance.new("ScreenGui",plrrr.PlayerGui)
42+
43-
bbg = Instance.new("BillboardGui",plrrr.Character.Head)
43+
44-
bbg.Size = UDim2.new(0,200,0,50)
44+
45-
bbg.StudsOffset = Vector3.new(0,3,0)
45+
46-
bbgTl = Instance.new("TextLabel",bbg)
46+
47-
bbgTl.BackgroundTransparency = 1
47+
48-
bbgTl.Size = UDim2.new(10,0,1,0)
48+
49-
bbgTl.Position = UDim2.new(-4.5,0,0,0)
49+
50-
bbgTl.Font = "SourceSansItalic"
50+
51-
bbgTl.Text = " "
51+
52-
bbgTl.TextSize = 34
52+
53-
bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
53+
54-
bbgTl.TextColor3 = Color3.new(1,0,1)
54+
55-
bbgTl.TextStrokeTransparency = 0
55+
56-
bbgTl.TextWrapped = true
56+
57-
plrrr.Chatted:connect(function(msg)
57+
58-
    bbgTl.Text = msg
58+
59-
    wait(9)
59+
60-
    if bbgTl.Text == msg then
60+
61-
        bbgTl.Text = " "
61+
62
    Snd.EmitterSize=10
63
    Snd.MaxDistance=100
64
    Snd.Parent=Parent
65
    
66
    return Snd
67
end
68
69
local Music=Sound('Music',true,1,1,0,RootPart)
70
71
function Part(Num)
72
    Settings.Parts=Num
73
74
    for i,v in pairs(Parts:GetChildren()) do
75
        v:Destroy()
76
    end
77
78
    for i=1,Num do
79
        local P=Instance.new('Part')
80
        local Light=Instance.new('PointLight')
81
        Light.Brightness=10
82
        Light.Range=10
83
        Light.Parent=P
84
        P.BrickColor=BrickColor.new(Settings.Color)
85
        P.Transparency=0
86
        P.Anchored=true
87
        P.CanCollide=false
88
        P.Material=Settings.Material
89
        P.Size=Vector3.new(.2,.2,.2)
90
        P.CFrame=CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)
91
        P.Locked=true
92
        P.Parent=Parts
93
    end
94-
mouse.Button1Down:connect(function()
94+
95-
    if plr.Character.Parent ~= workspace.Camera then
95+
96-
        if mouse ~= nil then
96+
97-
            if mouse.Target ~= nil then
97+
98-
                part = mouse.Target
98+
99-
                bp = Instance.new("BodyPosition",part)
99+
100-
                bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
100+
101-
                bp.Position = part.Position
101+
102-
                particles = Instance.new("ParticleEmitter",part)
102+
103-
                particles.Color = ColorSequence.new(Color3.new(0,0,0))
103+
104-
                particles.Size = NumberSequence.new(1)
104+
105-
                particles.Texture = "rbxassetid://292289455"
105+
106-
                particles.VelocitySpread = 360
106+
107-
                particles.Speed = NumberRange.new(0)
107+
108-
                particles.RotSpeed = NumberRange.new(0)
108+
109-
                particles.Rotation = NumberRange.new(0)
109+
110-
                particles.Rate = 250
110+
111-
                particles.Lifetime = NumberRange.new(.2,.4)
111+
112-
                particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
112+
113-
                dwn = true
113+
114
local Rad=0
115
116-
        while dwn == true do
116+
117-
            wait() 
117+
118-
            bp.Position = mouse.hit.p
118+
119-
            if part then
119+
120-
                if part.Parent:FindFirstChildOfClass("Humanoid") then
120+
121-
                    part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
121+
122
        end
123
        
124
        for i,v in pairs(Parts:GetChildren()) do
125
            v.CFrame=v.CFrame:Lerp(CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)*CFrame.Angles(9,math.rad((360/Settings.Parts)*((i+(i*Settings.Angle))/Settings.Split)+Rad),0)*CFrame.new(8,-8,Settings.Disposition+(v.Size.Z)),Settings.Goal)
126
        end
127-
mouse.Button1Up:connect(function()
127+
128-
    dwn = false
128+
129-
    if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
129+
130-
    if bp then bp:Destroy() end
130+
131-
    if particles then particles:Destroy() end
131+
132
        for i,v in pairs(Parts:GetChildren()) do
133
            v.Size=v.Size:Lerp(Vector3.new(.5,.5,(Music.PlaybackLoudness/Settings.Power)*math.random(9,20)),Settings.Goal)
134
        end
135
    end
136
end
137
138
spawn(Rot)
139
spawn(Size)
140
spawn(ColorChange)
141
142
function Chatted(Speaker,Message)
143
    for i,v in pairs(Whitelist) do
144
        if v.Name==Speaker.Name or v.UserId==Speaker.UserId then
145
            if Message:sub(1,6):lower():match(Settings.Prefix..'play ') then
146
                Music.SoundId='rbxassetid://'..Message:sub(7)
147
                Music:Play()
148
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'pause') then
149
                Music:Pause()
150
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'resume') then
151
                Music:Resume()
152
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'tpos ') then
153
                Music.TimePosition=tonumber(Message:sub(7))
154
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'emit ') then
155
                Music.EmitterSize=tonumber(Message:sub(7))
156
            elseif Message:sub(1,5):lower():match(Settings.Prefix..'vol ') then
157
                Music.Volume=tonumber(Message:sub(6))
158
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'pitch ') then
159
                Music.PlaybackSpeed=tonumber(Message:sub(8))
160
            elseif Message:sub(1,8):lower():match(Settings.Prefix..'maxdis ') then
161
                Music.MaxDistance=tonumber(Message:sub(9))
162
            elseif Message:sub(1,8):lower():match(Settings.Prefix..'prefix ') then
163
                Settings.Prefix=Message:sub(9)
164
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'angle ') then
165
                Settings.Angle=tonumber(Message:sub(8))
166
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'split ') then
167
                Settings.Split=tonumber(Message:sub(8))
168
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'goal ') then
169
                Settings.Goal=tonumber(Message:sub(7))
170
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'color ') then
171
                Settings.Color=Message:sub(8)
172
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'body ') then
173
                Settings.Body=tonumber(Message:sub(7))
174
            elseif Message:sub(1,10):lower():match(Settings.Prefix..'material ') then
175
                Settings.Material=Message:sub(11)
176
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'global') then
177
                if Settings.Global==false then
178
                    Settings.Global=true
179
                    Music.Parent=workspace
180
                else
181
                    Settings.Global=false
182
                    Music.Parent=RootPart
183
                end
184
            elseif Message:sub(1,6):lower():match(Settings.Prefix..'disp ') then
185
                Settings.Disposition=tonumber(Message:sub(7))
186
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'parts ') then
187
                Part(tonumber(Message:sub(8)))
188
            elseif Message:sub(1,7):lower():match(Settings.Prefix..'power ') then
189
                Settings.Power=tonumber(Message:sub(8))
190
            elseif Message:sub(1,8):lower():match(Settings.Prefix..'follow ') then
191
                for i,v in pairs(game.Players:GetPlayers()) do
192
                    if v.Name:lower():match(Message:sub(9):lower()) then
193
                        Follow=v.Name
194
                        Plr=game.Players[Follow]
195
                        Char=Plr.Character
196
                        RootPart=Char.HumanoidRootPart
197
                        if Settings.Global==false then
198
                            Music.Parent=RootPart
199
                        end
200
                    end
201
                end
202
            elseif Message:sub(1,11):lower():match(Settings.Prefix..'whitelist ') then
203
                for i,v in pairs(game.Players:GetPlayers()) do
204
				    if v.Name:lower():match(Message:sub(12):lower()) then
205
                        Whitelist[v.Name]={Name=v.Name,UserId=v.UserId} 
206
				    end
207
			    end
208
            elseif Message:sub(1,8):lower():match(Settings.Prefix..'rainbow') then
209
                if Settings.Rainbow==false then
210
                    Settings.Rainbow=true
211
                else
212
                    Settings.Rainbow=false
213
                end
214
            end
215
        end
216
    end
217
end
218
219
game.Players.PlayerAdded:connect(function(Plyr)
220
    Plyr.Chatted:connect(function(Message) Chatted(Plyr,Message) end)
221
end)
222
223
for i,v in pairs(game.Players:GetPlayers()) do
224
    v.Chatted:connect(function(Message) Chatted(v,Message) end)
225
end
226
227
local Mouse = game.Players.LocalPlayer:GetMouse()
228
local Plr = game.Players.LocalPlayer
229
230
Mouse.KeyDown:connect(function(KeyDown)
231
if KeyDown == "0" then
232
Plr.Character.Humanoid.WalkSpeed = 135
233
end
234
end)
235
236
Mouse.KeyUp:connect(function(KeyUp)
237
if KeyUp == "0" then
238
Plr.Character.Humanoid.WalkSpeed = 16
239
end
240
end)
241
242
local UserInputService = game:GetService("UserInputService")
243
local localPlayer = game.Players.LocalPlayer
244
local character
245
local humanoid
246
 
247
local canDoubleJump = false
248
local hasDoubleJumped = false
249
local oldPower
250
local TIME_BETWEEN_JUMPS = 0.2
251
local DOUBLE_JUMP_POWER_MULTIPLIER = 2
252
 
253
function onJumpRequest()
254
	if not character or not humanoid or not character:IsDescendantOf(workspace) or
255
	 humanoid:GetState() == Enum.HumanoidStateType.Dead then
256
		return
257
	end
258
 
259
	if canDoubleJump and not hasDoubleJumped then
260
		hasDoubleJumped = true
261
		humanoid.JumpPower = oldPower * DOUBLE_JUMP_POWER_MULTIPLIER
262
		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
263
	end
264
end
265
 
266
local function characterAdded(newCharacter)
267
	character = newCharacter
268
	humanoid = newCharacter:WaitForChild("Humanoid")
269
	hasDoubleJumped = false
270
	canDoubleJump = false
271
	oldPower = humanoid.JumpPower
272
 
273
	humanoid.StateChanged:connect(function(old, new)
274
		if new == Enum.HumanoidStateType.Landed then
275
			canDoubleJump = false
276
			hasDoubleJumped = false
277
			humanoid.JumpPower = oldPower
278
		elseif new == Enum.HumanoidStateType.Freefall then
279
			wait(TIME_BETWEEN_JUMPS)
280
			canDoubleJump = true
281
		end
282
	end)
283
end
284
 
285
if localPlayer.Character then
286
	characterAdded(localPlayer.Character)
287
end
288
 
289
localPlayer.CharacterAdded:connect(characterAdded)
290
UserInputService.JumpRequest:connect(onJumpRequest)