View difference between Paste ID: 4HjtcB4K and 72tSQbnM
SHOW: | | - or go back to the newest paste.
1
print("FE code by Starzozero, Thanks to him!")
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
6
    print("FE Compatibility code by Mokiros, Edited by StarzoZero")
7
    local rp = RealPlayer
8
    script.Parent = rp.Character
9
   
10
    --RemoteEvent for communicating
11
    local Event = Instance.new("RemoteEvent")
12
    Event.Name = "UserInput_Event"
13
 
14
    --Fake event to make stuff like Mouse.KeyDown work
15
    local function fakeEvent()
16
        local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
17
        t.connect = t.Connect
18
        return t
19
    end
20
 
21
    --Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
23
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
    end}
27
    --Merged 2 functions into one by checking amount of arguments
28
    CAS.UnbindAction = CAS.BindAction
29
 
30
    --This function will trigger the events that have been :Connect()'ed
31
    local function te(self,ev,...)
32
        local t = m[ev]
33
        if t and t._fakeEvent then
34
            for _,f in pairs(t.Functions) do
35
                f(...)
36
            end
37
        end
38
    end
39
    m.TrigEvent = te
40
    UIS.TrigEvent = te
41
 
42
    Event.OnServerEvent:Connect(function(plr,io)
43
        if plr~=rp then return end
44
        m.Target = io.Target
45
        m.Hit = io.Hit
46
        if not io.isMouse then
47
            local b = io.UserInputState == Enum.UserInputState.Begin
48
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
49
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
50
            end
51
            if io.UserInputType == Enum.UserInputType.MouseButton2 then
52
                return m:TrigEvent(b and "Button2Down" or "Button2Up")
53
            end
54
            for _,t in pairs(CAS.Actions) do
55
                for _,k in pairs(t.Keys) do
56
                    if k==io.KeyCode then
57
                        t.Function(t.Name,io.UserInputState,io)
58
                    end
59
                end
60
            end
61
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
62
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
63
        end
64
    end)
65
    Event.Parent = NLS([==[
66
    local Player = game:GetService("Players").LocalPlayer
67
    local Event = script:WaitForChild("UserInput_Event")
68
    local Mouse = Player:GetMouse()
69
    local UIS = game:GetService("UserInputService")
70
    local input = function(io,a)
71
        if a then return end
72
        --Since InputObject is a client-side instance, we create and pass table instead
73
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
74
    end
75
    UIS.InputBegan:Connect(input)
76
    UIS.InputEnded:Connect(input)
77
    local h,t
78
    --Give the server mouse data 30 times every second, but only if the values changed
79
    --If player is not moving their mouse, client won't fire events
80
    while wait(1/30) do
81
        if h~=Mouse.Hit or t~=Mouse.Target then
82
            h,t=Mouse.Hit,Mouse.Target
83
            Event:FireServer({isMouse=true,Target=t,Hit=h})
84
        end
85
    end]==],Player.Character)
86
 
87
    ----Sandboxed game object that allows the usage of client-side methods and services
88
    --Real game object
89
    local _rg = game
90
 
91
    --Metatable for fake service
92
    local fsmt = {
93
        __index = function(self,k)
94
            local s = rawget(self,"_RealService")
95
            if s then
96
                return typeof(s[k])=="function"
97
                and function(_,...)return s[k](s,...)end or s[k]
98
            end
99
        end,
100
        __newindex = function(self,k,v)
101
            local s = rawget(self,"_RealService")
102
            if s then s[k]=v end
103
        end
104
    }
105
    local function FakeService(t,RealService)
106
        t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
107
        return setmetatable(t,fsmt)
108
    end
109
 
110
    --Fake game object
111
    local g = {
112
        GetService = function(self,s)
113
            return rawget(self,s) or _rg:GetService(s)
114
        end,
115
        Players = FakeService({
116
            LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
117
        },"Players"),
118
        UserInputService = FakeService(UIS,"UserInputService"),
119
        ContextActionService = FakeService(CAS,"ContextActionService"),
120
        RunService = FakeService({
121
            _btrs = {},
122
            RenderStepped = _rg:GetService("RunService").Heartbeat,
123
            BindToRenderStep = function(self,name,_,fun)
124
                self._btrs[name] = self.Heartbeat:Connect(fun)
125
            end,
126
            UnbindFromRenderStep = function(self,name)
127
                self._btrs[name]:Disconnect()
128
            end,
129
        },"RunService")
130
    }
131
    rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
132
    g.service = g.GetService
133
    FakeService(g,game)
134
    --Changing owner to fake player object to support owner:GetMouse()
135
    game,owner = g,g.Players.LocalPlayer
136
end
137
138
warn("Z to start playing.")
139
warn("C - Beethoven's moon sonata.")
140
warn("V - Giorno meme")
141
warn("M - InSaNiTy")
142
warn("L - Can Can 1")
143
warn("G - Can Can 2")
144
warn("N - Megalovania")
145
warn("P - We ArE NuMbEr LaSt")
146
warn("K - O.K WhAt")
147
warn("X to stop.")
148
warn("Made by Reset5017577.Edited by Xavier(added Giorno, InSaNiTy and Megalovania(b))")
149
150
plr = game.Players.LocalPlayer
151
char = plr.Character
152
mouse = plr:GetMouse()
153
hum = char.HumanoidRootPart
154
root = char.Torso
155
left = char["Left Arm"]
156
right = char["Right Arm"]
157
rightl = char["Right Leg"]
158
leftl = char["Left Leg"]
159
tors = char["Torso"]
160
piano = false
161
162
MUSIK2 = Instance.new("Sound",tors)
163
MUSIK2.Playing = false
164
MUSIK2.Looped = true
165
MUSIK2.Pitch = 1
166
MUSIK2.SoundId = "rbxassetid://282692567"
167
MUSIK2.Volume = 10
168
169
MUSIK5 = Instance.new("Sound",tors)
170
MUSIK5.Playing = false
171
MUSIK5.Looped = true
172
MUSIK5.Pitch = 1
173
MUSIK5.SoundId = "rbxassetid://2297862957"
174
MUSIK5.Volume = 10
175
176
MUSIK8 = Instance.new("Sound",tors)
177
MUSIK8.Playing = false
178
MUSIK8.Looped = true
179
MUSIK8.Pitch = 1
180
MUSIK8.SoundId = "rbxassetid://3182300166"
181
MUSIK8.Volume = 10
182
183
MUSIK9 = Instance.new("Sound",tors)
184
MUSIK9.Playing = false
185
MUSIK9.Looped = true
186
MUSIK9.Pitch = 1
187
MUSIK9.SoundId = "rbxassetid://698929986"
188
MUSIK9.Volume = 10
189
190
MUSIK10 = Instance.new("Sound",tors)
191
MUSIK10.Playing = false
192
MUSIK10.Looped = true
193
MUSIK10.Pitch = 1
194
MUSIK10.SoundId = "rbxassetid://1172332425"
195
MUSIK10.Volume = 10
196
197
198
199
200
201
MUSIK6 = Instance.new("Sound",tors)
202
MUSIK6.Playing = false
203
MUSIK6.Looped = true
204
MUSIK6.Pitch = 1
205
MUSIK6.SoundId = "rbxassetid://290101447"
206
MUSIK6.Volume = 10
207
208
209
MUSIK7 = Instance.new("Sound",tors)
210
MUSIK7.Playing = false
211
MUSIK7.Looped = true
212
MUSIK7.Pitch = 1
213
MUSIK7.SoundId = "rbxassetid://164854108"
214
MUSIK7.Volume = 10
215
216
217
MUSIK = Instance.new("Sound",tors)
218
MUSIK.Playing = false
219
MUSIK.Looped = true
220
MUSIK.Pitch = 1
221
MUSIK.SoundId = "rbxassetid://234659695"
222
MUSIK.Volume = 10
223
224
MUSIK3 = Instance.new("Sound",tors)
225
MUSIK3.Playing = false
226
MUSIK3.Looped = true
227
MUSIK3.Pitch = 1
228
MUSIK3.SoundId = "rbxassetid://4456886461"
229
MUSIK3.Volume = 10
230
231
MUSIK4 = Instance.new("Sound",tors)
232
MUSIK4.Playing = false
233
MUSIK4.Looped = true
234
MUSIK4.Pitch = 1
235
MUSIK4.SoundId = "rbxassetid://336265697"
236
MUSIK4.Volume = 10
237
238
gutf = Instance.new("Part")
239
gutf.Parent = tors
240
gutf.Size = Vector3.new(1, 1, 1)
241
gutf.CanCollide = false
242
243
wldf = Instance.new("Weld",owner.Character)
244
wldf.Parent = gutf
245
wldf.Part0 = gutf
246
wldf.Part1 = root
247
wldf.C0 = CFrame.new(0, 0.42,-3.5)
248
wldf.C1 = CFrame.Angles(0, 9.45, 0)
249
250
utm = Instance.new("SpecialMesh",gutf)
251
utm.MeshId = "rbxassetid://280038600"
252
utm.TextureId = "rbxassetid://280038797"
253
utm.Scale = Vector3.new(1, 1, 1)
254
255
arm1 = Instance.new("Weld")
256
arm1.Parent = left
257
arm1.Part0 = left
258
arm1.Part1 = root
259
260
arm2 = Instance.new("Weld")
261
arm2.Parent = right
262
arm2.Part0 = right
263
arm2.Part1 = root
264
265
arm2.C0 = CFrame.new(1.5, 1, 0.5)
266
arm2.C1 = CFrame.Angles(20, 0, 0)
267
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
268
arm1.C1 = CFrame.Angles(20, 0, 0)
269
270
function pianop()
271
char.Humanoid.WalkSpeed = 0
272
piano = true
273
MUSIK2:Play()
274
 
275
while piano do
276
wait(0.1)
277
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
278
arm2.C1 = CFrame.Angles(20, 0, 0)
279
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
280
arm1.C1 = CFrame.Angles(20, 0, 0)
281
wait(0.1)
282
arm2.C0 = CFrame.new(1.5, 1, 0.5)
283
arm2.C1 = CFrame.Angles(20, 0, 0)
284
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
285
arm1.C1 = CFrame.Angles(20, 0, 0)
286
end
287
end
288
289
function pianop2()
290
char.Humanoid.WalkSpeed = 0
291
piano = true
292
MUSIK:Play()
293
 
294
while piano do
295
wait(0.3)
296
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
297
arm2.C1 = CFrame.Angles(20, 0, 0)
298
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
299
arm1.C1 = CFrame.Angles(20, 0, 0)
300
wait(0.3)
301
arm2.C0 = CFrame.new(1.5, 1, 0.5)
302
arm2.C1 = CFrame.Angles(20, 0, 0)
303
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
304
arm1.C1 = CFrame.Angles(20, 0, 0)
305
end
306
end
307
308
function pianop3()
309
char.Humanoid.WalkSpeed = 0
310
piano = true
311
MUSIK3:Play()
312
 
313
while piano do
314
wait(0.3)
315
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
316
arm2.C1 = CFrame.Angles(20, 0, 0)
317
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
318
arm1.C1 = CFrame.Angles(20, 0, 0)
319
wait(0.3)
320
arm2.C0 = CFrame.new(1.5, 1, 0.5)
321
arm2.C1 = CFrame.Angles(20, 0, 0)
322
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
323
arm1.C1 = CFrame.Angles(20, 0, 0)
324
end
325
end
326
327
function pianop4()
328
char.Humanoid.WalkSpeed = 0
329
piano = true
330
MUSIK4:Play()
331
 
332
while piano do
333
wait(0.1)
334
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
335
arm2.C1 = CFrame.Angles(20, 0, 0)
336
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
337
arm1.C1 = CFrame.Angles(20, 0, 0)
338
wait(0.1)
339
arm2.C0 = CFrame.new(1.5, 1, 0.5)
340
arm2.C1 = CFrame.Angles(20, 0, 0)
341
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
342
arm1.C1 = CFrame.Angles(20, 0, 0)
343
end
344
end
345
346
function pianop5()
347
char.Humanoid.WalkSpeed = 0
348
piano = true
349
MUSIK5:Play()
350
 
351
while piano do
352
wait(0.1)
353
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
354
arm2.C1 = CFrame.Angles(20, 0, 0)
355
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
356
arm1.C1 = CFrame.Angles(20, 0, 0)
357
wait(0.1)
358
arm2.C0 = CFrame.new(1.5, 1, 0.5)
359
arm2.C1 = CFrame.Angles(20, 0, 0)
360
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
361
arm1.C1 = CFrame.Angles(20, 0, 0)
362
end
363
end
364
365
function pianop6()
366
char.Humanoid.WalkSpeed = 0
367
piano = true
368
MUSIK6:Play()
369
 
370
while piano do
371
wait(0.1)
372
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
373
arm2.C1 = CFrame.Angles(20, 0, 0)
374
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
375
arm1.C1 = CFrame.Angles(20, 0, 0)
376
wait(0.1)
377
arm2.C0 = CFrame.new(1.5, 1, 0.5)
378
arm2.C1 = CFrame.Angles(20, 0, 0)
379
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
380
arm1.C1 = CFrame.Angles(20, 0, 0)
381
end
382
end
383
384
function pianop7()
385
char.Humanoid.WalkSpeed = 0
386
piano = true
387
MUSIK7:Play()
388
 
389
while piano do
390
wait(0.1)
391
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
392
arm2.C1 = CFrame.Angles(20, 0, 0)
393
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
394
arm1.C1 = CFrame.Angles(20, 0, 0)
395
wait(0.1)
396
arm2.C0 = CFrame.new(1.5, 1, 0.5)
397
arm2.C1 = CFrame.Angles(20, 0, 0)
398
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
399
arm1.C1 = CFrame.Angles(20, 0, 0)
400
end
401
end
402
403
function pianop8()
404
char.Humanoid.WalkSpeed = 0
405
piano = true
406
MUSIK8:Play()
407
 
408
while piano do
409
wait(0.1)
410
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
411
arm2.C1 = CFrame.Angles(20, 0, 0)
412
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
413
arm1.C1 = CFrame.Angles(20, 0, 0)
414
wait(0.1)
415
arm2.C0 = CFrame.new(1.5, 1, 0.5)
416
arm2.C1 = CFrame.Angles(20, 0, 0)
417
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
418
arm1.C1 = CFrame.Angles(20, 0, 0)
419
end
420
end
421
422
function pianop9()
423
char.Humanoid.WalkSpeed = 0
424
piano = true
425
MUSIK9:Play()
426
 
427
while piano do
428
wait(0.1)
429
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
430
arm2.C1 = CFrame.Angles(20, 0, 0)
431
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
432
arm1.C1 = CFrame.Angles(20, 0, 0)
433
wait(0.1)
434
arm2.C0 = CFrame.new(1.5, 1, 0.5)
435
arm2.C1 = CFrame.Angles(20, 0, 0)
436
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
437
arm1.C1 = CFrame.Angles(20, 0, 0)
438
end
439
end
440
441
function pianop10()
442
char.Humanoid.WalkSpeed = 0
443
piano = true
444
MUSIK10:Play()
445
 
446
while piano do
447
wait(0.1)
448
arm2.C0 = CFrame.new(1.5, 1.3, 0.5)
449
arm2.C1 = CFrame.Angles(20, 0, 0)
450
arm1.C0 = CFrame.new(-1.5, 1.3, 0.5)
451
arm1.C1 = CFrame.Angles(20, 0, 0)
452
wait(0.1)
453
arm2.C0 = CFrame.new(1.5, 1, 0.5)
454
arm2.C1 = CFrame.Angles(20, 0, 0)
455
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
456
arm1.C1 = CFrame.Angles(20, 0, 0)
457
end
458
end
459
460
461
462
463
function stop2()
464
char.Humanoid.WalkSpeed = 16
465
MUSIK2:Stop()
466
MUSIK:Stop()
467
MUSIK3:Stop()
468
MUSIK4:Stop()
469
MUSIK5:Stop()
470
MUSIK6:Stop()
471
MUSIK7:Stop()
472
MUSIK8:Stop()
473
MUSIK9:Stop()
474
MUSIK10:Stop()
475
piano = false
476
arm2.C0 = CFrame.new(1.5, 1, 0.5)
477
arm2.C1 = CFrame.Angles(20, 0, 0)
478
arm1.C0 = CFrame.new(-1.5, 1, 0.5)
479
arm1.C1 = CFrame.Angles(20, 0, 0)
480
end
481
482
mouse.KeyDown:connect(function(Press)
483
    Press=Press:lower()
484
if Press=="z" and piano == false then
485
        pianop()
486
end
487
if Press=="c" and piano == false then
488
        pianop2()
489
end
490
if Press=="v" and piano == false then
491
        pianop3()
492
end
493
if Press=="b" and piano == false then
494
        pianop4()
495
end
496
if Press=="m" and piano == false then
497
        pianop5()
498
end
499
if Press=="l" and piano == false then
500
        pianop6()
501
end
502
if Press=="g" and piano == false then
503
        pianop7()
504
end
505
if Press=="n" and piano == false then
506
        pianop8()
507
end
508
if Press=="p" and piano == false then
509
        pianop9()
510
end
511
if Press=="k" and piano == false then
512
        pianop10()
513
end
514
if Press=="x" and piano == true then
515
 stop2()
516
end
517
end)