View difference between Paste ID: 3JEJN88P and PV2ExtJd
SHOW: | | - or go back to the newest paste.
1-
local plr = game:GetService("Players").LocalPlayer
1+
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end local plr = game:GetService("Players").LocalPlayer
6
7
local function Sound(id)
8
        local s = Instance.new("Sound", plr.Character)
9
        s.SoundId = 'rbxassetid://' .. tostring(id)
10
        s.Looped = false
11
        s.Volume = 4
12
        s:Play()
13
        return s
14
end
15
--Decal(814260764)
16
local bg = Instance.new("BillboardGui", plr.Character.Torso)
17
bg.Adornee = plr.Character.Torso
18
bg.Size = UDim2.new(40,0,40,0)
19
bg.StudsOffset = Vector3.new(6, 2, 0)
20
local il = Instance.new("ImageLabel", bg)
21
il.Image = 'rbxassetid://814260764'
22
il.Size = UDim2.new(0.7,0,1,0)
23
il.BackgroundTransparency = 1
24
il.BorderSizePixel = 0
25
il.ImageColor3 = Color3.fromRGB(0,0,0)
26
for i,v in pairs(plr.Character:GetChildren()) do
27
        if v:IsA'BasePart' and v.Name ~= "Head" then
28
                v.Transparency = 1
29
        elseif v:IsA'Accessory' then
30
                coroutine.resume(coroutine.create(function()
31
                        v:WaitForChild'Handle'.Transparency = 1
32
                end))
33
        end
34
end
35
plr.Character.Head:FindFirstChildOfClass'SpecialMesh':Remove()
36
plr.Character.Head.face:Remove()
37
Instance.new("SpecialMesh", plr.Character.Head).MeshType = 'FileMesh'
38
local s = Sound(814276822)
39
s.Volume = 10
40
local hum = plr.Character:FindFirstChild("HumanoidRootPart")
41
hum.CFrame = hum.CFrame + Vector3.new(0,100,0)
42
wait(.1)
43
plr.Character.HumanoidRootPart.Anchored = true
44
local function Wave(clr, part, size)
45
        local p = Instance.new("Part", plr.Character)
46
        p.CanCollide = false
47
        p.Shape = 'Ball'
48
        p.Transparency = 0.7
49
        p.Anchored = true
50
        p.Size = Vector3.new(0,0,0)
51
        p.Locked = true
52
        p.BrickColor = clr or BrickColor.new("Really white")
53
        p.Position = part.Position or plr.Character.Torso.Position
54
        p.TopSurface = 'Smooth'
55
        p.BottomSurface = 'Smooth'
56
        local m = Instance.new("SpecialMesh", p)
57
        m.MeshType = 'Sphere'
58
        for i=0,size,30 do
59
                wait()
60
                m.Scale = Vector3.new(i*10,i*10,i*10)
61
        end
62
        p:Destroy()
63
end
64
local function Castle()
65
local mas = Instance.new("Model",game:GetService("Lighting")) 
66
mas.Name = "Castle of that kind"
67
local o1 = Instance.new("Model")
68
local o2 = Instance.new("Part")
69
local o3 = Instance.new("WedgePart")
70
local o4 = Instance.new("WedgePart")
71
o1.Parent = mas
72
o2.Parent = o1
73
o2.BrickColor = BrickColor.new("Really black")
74
o2.Position = Vector3.new(26, 36.5, 81)
75
o2.Anchored = true
76
o2.Locked = true
77
o2.Size = Vector3.new(130, 1, 130)
78
o2.CFrame = CFrame.new(26, 36.5, 81, 1, 0, 0, 0, 1, 0, 0, 0, 1)
79
o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
80
o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
81
o2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
82
o2.Position = Vector3.new(26, 36.5, 81)
83
o3.Parent = o1
84
o3.BrickColor = BrickColor.new("Really black")
85
o3.Position = Vector3.new(26, 107, 48.5000038)
86
o3.Anchored = true
87
o3.Locked = true
88
o3.Size = Vector3.new(130, 140, 65)
89
o3.CFrame = CFrame.new(26, 107, 48.5000038, 1, 0, 0, 0, 1, 0, 0, 0, 1)
90
o3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
91
o3.RightSurface = Enum.SurfaceType.SmoothNoOutlines
92
o3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
93
o3.Position = Vector3.new(26, 107, 48.5000038)
94
o4.Parent = o1
95
o4.BrickColor = BrickColor.new("Really black")
96
o4.Position = Vector3.new(26, 107, 113.5)
97
o4.Rotation = Vector3.new(-180, 0, -180)
98
o4.Anchored = true
99
o4.Locked = true
100
o4.Size = Vector3.new(130, 140, 65)
101
o4.CFrame = CFrame.new(26, 107, 113.5, -1.00000262, 0, 0, 0, 1, 0, 0, 0, -1.00000262)
102
o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
103
o4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
104
o4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
105
o4.Position = Vector3.new(26, 107, 113.5)
106
mas.Parent = workspace
107
mas:MakeJoints()
108
local mas1 = mas:GetChildren()
109
local m = Instance.new("Model", plr.Character)
110
for i=1,#mas1 do
111
        mas1[i].Parent = m
112
        ypcall(function() mas1[i]:MakeJoints() end)
113
end
114
mas:Destroy()
115
m.PrimaryPart = o2
116
m:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,-250,0)))
117
for i=-250,150,5 do
118
        wait()
119
        m:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,i,0)))
120
end
121
end
122
local function CreateBubble(rs, int)
123
        coroutine.resume(coroutine.create(function()
124
                local s,e = pcall(function()
125
                        local b = Instance.new("Part", plr.Character)
126
                        b.Shape = 'Ball'
127
                        b.Anchored = true
128
                        b.Locked = true
129
                        b.TopSurface = 'Smooth'
130
                        b.BottomSurface = 'Smooth'
131
                        b.CanCollide = false
132
                        b.Size = Vector3.new(0,0,0)
133
                        local m = Instance.new("SpecialMesh", b)
134
                        m.MeshType = 'Sphere'
135
                        b.BrickColor = BrickColor.Random()
136
                        b.Transparency = 0.7
137
                        m.Scale = Vector3.new(100,100,100)
138
                        math.randomseed(rs or os.time())
139
                        b.Position = Vector3.new(math.random(-300,300), math.random(5,15), math.random(-300,300))
140
                        game:GetService("Debris"):AddItem(b, 5)
141
                        coroutine.resume(coroutine.create(function()
142
                                while b.Parent do
143
                                        wait()
144
                                        b.Position = b.Position + Vector3.new(0,math.random(1,3),0)
145
                                end
146
                        end))
147
                        coroutine.resume(coroutine.create(function()
148
                                wait(5)
149
                                CreateBubble(int^5, int)
150
                        end))
151
                end)
152
                if not s and e then print(e) end
153
        end))
154
end
155
local t = 0
156
local tab = {11.902521692332811654, 22.332537756825331599, 42.780485221126582474, 48.632154458260629326, 54.38235228433040902, 63.607111451448872685}
157
game:GetService("RunService").Stepped:connect(function()
158
        pcall(function()
159
                if s.TimePosition > tab[1] then
160
                        table.remove(tab, 1)
161
                        t = t + 1
162
                        if t == 1 then
163
                                coroutine.resume(coroutine.create(function()
164
                                        Wave(BrickColor.new("Bright red"), plr.Character.Torso, 500)
165
                                end))
166
                                wait(.1)
167
                                il.ImageColor3 = Color3.fromRGB(255,255,255)
168
                        elseif t == 2 then
169
                                plr.Character.Humanoid.HipHeight = 20
170
                                plr.Character.Humanoid.WalkSpeed = 100
171
                                plr.Character.HumanoidRootPart.Anchored = false
172
                                plr.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(plr.Character.HumanoidRootPart.Position.X, 0, plr.Character.HumanoidRootPart.Z))
173
                        elseif t == 3 then
174
                                Castle()
175
                        elseif t == 4 then
176
                                coroutine.resume(coroutine.create(function()
177
                                        for i=0,30 do
178
                                                coroutine.resume(coroutine.create(function()
179
                                                        CreateBubble((i+1)^5, i+1)
180
                                                end))
181
                                        end
182
                                end))
183
                        elseif t == 5 then
184
                                game:GetService("Lighting").TimeOfDay = "19:00:00"
185
                        elseif t == 6 then
186
                                Wave(BrickColor.new("Bright red"), plr.Character.Torso, 2000)
187
                        end
188
                end
189
                if s.Playing == false then
190
                        played = true
191
                        s:Remove()
192
                        local asd = Sound(366263697)
193
                        asd.Looped = true
194
                        asd.Volume = 10
195
                end
196
        end)
197
end)
198
local key = false
199
local m = plr:GetMouse()
200
m.KeyDown:connect(function(k)
201
        if k == 'j' then
202
                key = true
203
                asd()
204
        end
205
end)
206
m.KeyUp:connect(function(k)
207
        if k == 'j' then
208
                key = false
209
                if beam then beam:Destroy() end
210
        end
211
end)
212
m.KeyDown:connect(function(k)
213
        if k == 'v' then
214
                key = true
215
                asgd()
216
        end
217
end)
218
m.KeyUp:connect(function(k)
219
        if k == 'v' then
220
                key = false
221
                if beam then beam:Destroy() end
222
        end
223
end)
224
function asd()
225
        coroutine.resume(coroutine.create(function()
226
                while key do
227
                wait()
228
                if beam then beam:Destroy() end
229
                local torso = plr.Character.Torso
230
                local ray = Ray.new(torso.CFrame.p, (m.Hit.p - torso.CFrame.p).unit * 300)                
231
                local p, pos = workspace:FindPartOnRay(ray, plr.Character, false, true)
232
                beam = Instance.new("Part", workspace)
233
                beam.BrickColor = BrickColor.new("Cyan")
234
                beam.FormFactor = "Custom"
235
                beam.Material = "Neon"
236
                beam.Transparency = 0.25
237
                beam.Anchored = true
238
                beam.Locked = true
239
                beam.CanCollide = false
240
                game:GetService("Debris"):AddItem(beam, 0.1)
241
                
242
                local distance = (torso.CFrame.p - pos).magnitude
243
                beam.Size = Vector3.new(3, 3, distance)
244
                beam.CFrame = CFrame.new(torso.CFrame.p, pos) * CFrame.new(0, 0, -distance / 2)
245
                
246
                if p then
247
                        for a,b in pairs(workspace:GetChildren()) do
248
                                if b:IsA'Model' and b:FindFirstChildOfClass'Humanoid' then
249
                                        if b:IsAncestorOf(p) then
250
                                                local char = b
251
                                                function Recur(part)
252
                                                        for c,d in pairs(part:GetChildren()) do
253
                                                                Recur(d)
254
                                                        end
255
                                                        if part:IsA'BasePart' then
256
                                                                part.BrickColor = BrickColor.Gray()
257
                                                                part.Material = Enum.Material.Cobblestone
258
                                                                part.Anchored = true
259
                                                        elseif part:IsA'Accessory' then
260
                                                                local h = part:FindFirstChild'Handle' if h then h.BrickColor = BrickColor.Gray() h.Material = Enum.Material.Cobblestone end
261
                                                                local m = part:FindFirstChildOfClass'SpecialMesh' if m then m.TextureId = "" end
262
                                                        elseif part:IsA'SpecialMesh' then
263
                                                                part.TextureId = ""
264
                                                        elseif part:IsA'Clothing' then
265
                                                                part:Destroy()
266
                                                        elseif part:IsA'ShirtGraphic' then
267
                                                                part:Destroy()
268
                                                        end
269
                                                end
270
                                                for i,v in pairs(b:GetChildren()) do
271
                                                        Recur(v)
272
                                                end
273
                                        end
274
                                end
275
                        end
276
                                --[[local ff = Instance.new("ForceField", plr.Character)
277
                                ff.Visible = false
278
                                game:GetService("Debris"):AddItem(ff, 0.5)
279
                                local ex = Instance.new("Explosion", p)
280
                                ex.Position = p.Position]]
281
                        end
282
                end
283
        end))
284
end
285
function asgd()
286
        coroutine.resume(coroutine.create(function()
287
                while key do
288
                wait()
289
                if beam then beam:Destroy() end
290
                local torso = plr.Character.Torso
291
                local ray = Ray.new(torso.CFrame.p, (m.Hit.p - torso.CFrame.p).unit * 300)                
292
                local p, pos = workspace:FindPartOnRay(ray, plr.Character, false, true)
293
                beam = Instance.new("Part", workspace)
294
                beam.BrickColor = BrickColor.new("Bright red")
295
                beam.FormFactor = "Custom"
296
                beam.Material = "Neon"
297
                beam.Transparency = 0.25
298
                beam.Anchored = true
299
                beam.Locked = true
300
                beam.CanCollide = false
301
                game:GetService("Debris"):AddItem(beam, 0.1)
302
                
303
                local distance = (torso.CFrame.p - pos).magnitude
304
                beam.Size = Vector3.new(19, 19, distance)
305
                beam.CFrame = CFrame.new(torso.CFrame.p, pos) * CFrame.new(0, 0, -distance / 2)
306
                
307
                if p then
308
                        for a,b in pairs(workspace:GetChildren()) do
309
                                if b:IsA'Model' and b:FindFirstChildOfClass'Humanoid' then
310
                                        if b:IsAncestorOf(p) then
311
                                                local char = b
312
                                                function Recur(part)
313
                                                        for c,d in pairs(part:GetChildren()) do
314
                                                                Recur(d)
315
                                                        end
316
                                                        if part:IsA'BasePart' then
317
                                                                part.BrickColor = BrickColor.Gray()
318
                                                                part.Material = Enum.Material.Cobblestone
319
                                                                part.Anchored = true
320
                                                        elseif part:IsA'Accessory' then
321
                                                                local h = part:FindFirstChild'Handle' if h then h.BrickColor = BrickColor.Gray() h.Material = Enum.Material.Cobblestone end
322
                                                                local m = part:FindFirstChildOfClass'SpecialMesh' if m then m.TextureId = "" end
323
                                                        elseif part:IsA'SpecialMesh' then
324
                                                                part.TextureId = ""
325
                                                        elseif part:IsA'Clothing' then
326
                                                                part:Destroy()
327
                                                        elseif part:IsA'ShirtGraphic' then
328
                                                                part:Destroy()
329
                                                        end
330
                                                end
331
                                                for i,v in pairs(b:GetChildren()) do
332
                                                        Recur(v)
333
                                                end
334
                                        end
335
                                end
336
                        end                      
337
                        end
338
                end
339
        end))
340
end
341
plr.CharacterAdded:connect(function()
342
        local bg = Instance.new("BillboardGui", plr.Character:WaitForChild'Torso')
343
bg.Adornee = plr.Character:WaitForChild'Torso'
344
bg.Size = UDim2.new(40,0,40,0)
345
bg.StudsOffset = Vector3.new(6, 2, 0)
346
local il = Instance.new("ImageLabel", bg)
347
il.Image = 'rbxassetid://814260764'
348
il.Size = UDim2.new(0.7,0,1,0)
349
il.BackgroundTransparency = 1
350
il.BorderSizePixel = 0
351
il.ImageColor3 = Color3.fromRGB(0,0,0)
352
for i,v in pairs(plr.Character:GetChildren()) do
353
        if v:IsA'BasePart' and v.Name ~= "Head" then
354
                v.Transparency = 1
355
        elseif v:IsA'Accessory' then
356
                coroutine.resume(coroutine.create(function()
357
                        v:WaitForChild'Handle'.Transparency = 1
358
                end))
359
        end
360
end
361
plr.Character:WaitForChild'Head':FindFirstChildOfClass'SpecialMesh':Remove()
362
plr.Character:WaitForChild'Head'.face:Remove()
363
Instance.new("SpecialMesh", plr.Character.Head).MeshType = 'FileMesh'
364
plr.Character.Humanoid.HipHeight = 20
365
plr.Character.Humanoid.WalkSpeed = 100
366
        if played then
367
                il.ImageColor3 = Color3.fromRGB(255,255,255)
368
                Sound(366263697).Looped = true
369
        else
370
                local s = Sound(814276822)
371
                s.Volume = 10
372
                plr.Character.Humanoid.HipHeight = 20
373
                plr.Character.Humanoid.WalkSpeed = 100
374
                local t = 0
375
local tab = {11.902521692332811654, 22.332537756825331599, 42.780485221126582474, 48.632154458260629326, 54.38235228433040902, 63.607111451448872685}
376
game:GetService("RunService").Stepped:connect(function()
377
        pcall(function()
378
                if s.TimePosition > tab[1] then
379
                        table.remove(tab, 1)
380
                        t = t + 1
381
                        if t == 1 then
382
                                coroutine.resume(coroutine.create(function()
383
                                        Wave(BrickColor.new("Bright red"), plr.Character.Torso, 500)
384
                                end))
385
                                wait(.1)
386
                                il.ImageColor3 = Color3.fromRGB(255,255,255)
387
                        elseif t == 2 then
388
                                plr.Character.Humanoid.HipHeight = 20
389
                                plr.Character.Humanoid.WalkSpeed = 100
390
                                plr.Character.Torso.Anchored = false
391
                                plr.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(plr.Character.HumanoidRootPart.Position.X, 0, plr.Character.HumanoidRootPart.Z))
392
                        elseif t == 3 then
393
                                Castle()
394
                        elseif t == 4 then
395
                                coroutine.resume(coroutine.create(function()
396
                                        for i=0,30 do
397
                                                coroutine.resume(coroutine.create(function()
398
                                                        CreateBubble((i+1)^5, i+1)
399
                                                end))
400
                                        end
401
                                end))
402
                        elseif t == 5 then
403
                                game:GetService("Lighting").TimeOfDay = "19:00:00"
404
                        elseif t == 6 then
405
                                Wave(BrickColor.new("Bright red"), plr.Character.Torso, 2000)
406
                        end
407
                end
408
                if s.Playing == false then
409
                        il.ImageColor3 = Color3.fromRGB(255,255,255)
410
                        played = true
411
                        s:Remove()
412
                        local asd = Sound(366263697)
413
                        asd.Looped = true
414
                        asd.Volume = 10
415
                end
416
        end)
417
end)
418
        end
419
end)