View difference between Paste ID: WtWXAdLP and faaynTrz
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4-
Player=game.Players.LocalPlayer
4+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.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,Connect=function(self,f)self.Function=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()}
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 and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87
88
print('Guitar')
89
print('By slenercat5')
90
print('F to toggle Camera perspectives')--FANCY :D
91
Player=owner
92
Character=Player.Character
93
Character.Animate.Disabled=true
94
local LeftArm = Character["Left Arm"]
95
local RightArm = Character["Right Arm"]
96
local LeftLeg = Character["Left Leg"]
97
local RightLeg = Character["Right Leg"]
98
local Head = Character.Head
99
local Torso = Character.Torso
100
local Camera = game.Workspace.CurrentCamera	
101
local RootPart = Character.HumanoidRootPart
102
local RootJoint = RootPart.RootJoint
103
local Humanoid=Character.Humanoid
104
CAM=Camera
105
FF=Instance.new('ForceField',Character)
106
FF.Visible=false
107
Humanoid.Name='LOLOL YOU CANT HIT ME'
108
Character.
109
Health:remove()
110
for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do
111
    v:Stop()
112
end
113
114
local newMotor = function(part0, part1, c0, c1)
115
		 w = Instance.new('Motor')
116
		w.Parent = part0
117
		w.Part0 = part0
118
		w.Part1 = part1
119
		w.C0 = c0
120
		w.C1 = c1
121
	
122
	return w
123
end
124
125
126
127
128
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
129
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
130
131
local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0)) 
132
local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0))
133
local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0))
134
local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0))
135
RootJoint.C1 = CFrame.new(0, 0, 0)
136
RootJoint.C0 = CFrame.new(0, 0, 0)
137
Torso.Neck.C1 = CFrame.new(0, 0, 0)
138
Torso.Neck.C0 = CFrame.new(0, 2.5, 0)
139
140
local rarmc1 = RW.C1
141
local larmc1 = LW.C1
142
local rlegc1 = RH.C1
143
local llegc1 = LH.C1
144
145
local resetc1 = false
146
147
function clerp(a, b, t)
148
	return a:lerp(b, t)
149
end
150
function AutoWeld(Foop, OOF)
151
				local W = Instance.new("Weld")
152
				W.Part0 = Foop
153
				W.Part1 = OOF
154
				local CJ = CFrame.new(Foop.Position)
155
				local C0 = Foop.CFrame:inverse()*CJ
156
				local C1 = OOF.CFrame:inverse()*CJ
157
				W.C0 = C0
158
				W.C1 = C1
159
				W.Name='o0o'
160
				W.Parent = Foop
161
				
162
end
163-
Ms=Player:GetMouse()
163+
164
165
166
function PlayAnimationFromTable(table, speed, bool)
167
	RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
168
	Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
169
	RW.C0 = clerp(RW.C0, table[3], speed) 
170
	LW.C0 = clerp(LW.C0, table[4], speed) 
171
	RH.C0 = clerp(RH.C0, table[5], speed) 
172
	LH.C0 = clerp(LH.C0, table[6], speed) 
173
	if bool == true then
174
		if resetc1 == false then
175
			resetc1 = true
176
			RootJoint.C1 = RootJoint.C1
177
			Torso.Neck.C1 = Torso.Neck.C1
178
			RW.C1 = rarmc1
179
			LW.C1 = larmc1
180
			RH.C1 = rlegc1
181
			LH.C1 = llegc1
182
		end
183
	end
184
end
185
sine=1
186
187
Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0)
188
189
190
Grass=Instance.new('Part',Character)
191
Grass.Name='Grass'
192
Grass.Anchored=true
193
Grass.Size=Vector3.new(11.42, 0.17, 17.6)
194
Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1)
195
Grass.Material='Grass'
196
Grass.BrickColor=BrickColor.new('Bright green')
197
m=Instance.new('CylinderMesh',Grass)
198
White=Instance.new('Part',Character)
199
White.Name='White Space'
200
White.Anchored=true
201
White.Size=Vector3.new(35.2, 0.05, 17.6)
202
White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1)
203
White.Material='Neon'
204
White.BrickColor=BrickColor.new('Medium stone grey')
205
m=Instance.new('CylinderMesh',White)
206
207
208
Humanoid.AutoRotate=false
209
Humanoid.WalkSpeed=0
210
Humanoid.JumpPower=0
211
212
Flute=Instance.new('Part',Character)
213
Flute.Name='Flute'
214
Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5)
215
m=Instance.new('SpecialMesh',Flute)
216
m.MeshId='http://www.roblox.com/asset/?id=161269074'
217
m.TextureId='http://www.roblox.com/asset/?id=228874694'
218
m.Scale=Vector3.new(0.922, 0.922, 0.922)
219
Flute.Size=Vector3.new(.5,2,.5)
220
221
AutoWeld(Flute,Torso)
222
THEME=Instance.new('Sound',Character.Torso)
223
music=nil
224
firsttype=false
225
Player.Chatted:connect(function(msg)
226
for def in string.gmatch(msg, "%d+") do
227
			print(def)
228
229
if def~=nil then
230
	music=def
231
end	
232
	end
233
234
for def in string.gmatch(msg,"[%u%l%p]+") do
235
			print(def)
236
	if def=='Play/' and music~=nil then
237
		THEME:stop()
238
		THEME.SoundId='rbxassetid://'.. music
239
		THEME:play()
240
	elseif def=='Play/Demo' then
241
		THEME:stop()
242
		THEME.SoundId='rbxassetid://'.. 164167420
243
		THEME:play()
244
	elseif def=='S_Guitar' then
245
		THEME:stop()
246
	end
247
end
248
music=nil
249
end)
250
Ms.KeyDown:connect(function(key)
251
    if key=='f' then
252
	if cam then
253
		cam=false
254
		CAM.CameraType='Custom'
255
	else
256
		cam=true
257
		CAM.CameraType='Scriptable'
258
	end
259
end
260
end)
261
262
263
cam=true--Custom Camera Perspectives
264
if cam==true then 
265
	CAM.CameraType=Enum.CameraType.Scriptable
266
267
end
268
Campart1=Instance.new('Part',Character)
269
Campart1.Transparency=1
270
Campart1.Anchored=true
271
Campart1.CanCollide=false
272
Campart2=Campart1:clone()
273
Campart2.Parent=Character
274
Campart3=Campart1:clone()
275
Campart3.Parent=Character
276
277
camtime=0
278
camphase=0
279
280
while 1 do
281
wait()	
282
	sine=sine+1
283
			PlayAnimationFromTable({
284
				CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0), 
285
				CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0), 
286
				CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700),  
287
				CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700), 
288
				CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) ,
289
				CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5),
290
			}, .3, false)
291
			
292
White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10)
293
Campart1=Instance.new('Part')
294
if cam==true then
295
	CAM.CameraType='Scriptable'
296
Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5)			
297
Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1)
298
Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3)
299
if camphase==0 then
300
	if camtime<20+math.random(-2,2) then
301
				CAM.CFrame=Campart1.CFrame
302
		camtime=camtime+1
303
			else
304
		camtime=0
305
		camphase=camphase+1
306
	end	
307
elseif camphase==1 then
308
	if camtime<40+math.random(-8,12) then
309
				CAM.CFrame=Campart2.CFrame
310
		camtime=camtime+1
311
			else
312
		camtime=0
313
		camphase=camphase+1
314
	end
315
elseif camphase==2 then
316
	if camtime<50+math.random(-2,5) then
317
				CAM.CFrame=Campart3.CFrame
318
		camtime=camtime+1
319
	else
320
		camtime=0
321
		camphase=camphase+1
322
	end	
323
	
324
elseif camphase==3 then
325
	camphase=0
326
end
327
328
329
end
330
end