View difference between Paste ID: CKjqqNJH and nnKU1gbB
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
local RealPlayer = Player
4
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
5
6
print('Guitar')
7
print('By slenercat5')
8
print('F to toggle Camera perspectives')--FANCY :D
9
Player=owner
10
Character=Player.Character
11
Character.Animate.Disabled=true
12
local LeftArm = Character["Left Arm"]
13
local RightArm = Character["Right Arm"]
14
local LeftLeg = Character["Left Leg"]
15
local RightLeg = Character["Right Leg"]
16
local Head = Character.Head
17
local Torso = Character.Torso
18
local Camera = game.Workspace.CurrentCamera	
19
local RootPart = Character.HumanoidRootPart
20
local RootJoint = RootPart.RootJoint
21
local Humanoid=Character.Humanoid
22
CAM=Camera
23
FF=Instance.new('ForceField',Character)
24
FF.Visible=false
25
Humanoid.Name='LOLOL YOU CANT HIT ME'
26
Character.
27
Health:remove()
28
for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do
29
    v:Stop()
30
end
31
32
local newMotor = function(part0, part1, c0, c1)
33
		 w = Instance.new('Motor')
34
		w.Parent = part0
35
		w.Part0 = part0
36
		w.Part1 = part1
37
		w.C0 = c0
38
		w.C1 = c1
39
	
40
	return w
41
end
42
43
44
45
46
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
47
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
48
49
local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0)) 
50
local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0))
51
local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0))
52
local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0))
53
RootJoint.C1 = CFrame.new(0, 0, 0)
54
RootJoint.C0 = CFrame.new(0, 0, 0)
55
Torso.Neck.C1 = CFrame.new(0, 0, 0)
56
Torso.Neck.C0 = CFrame.new(0, 2.5, 0)
57
58
local rarmc1 = RW.C1
59
local larmc1 = LW.C1
60
local rlegc1 = RH.C1
61
local llegc1 = LH.C1
62
63
local resetc1 = false
64
65
function clerp(a, b, t)
66
	return a:lerp(b, t)
67
end
68
function AutoWeld(Foop, OOF)
69
				local W = Instance.new("Weld")
70
				W.Part0 = Foop
71
				W.Part1 = OOF
72
				local CJ = CFrame.new(Foop.Position)
73
				local C0 = Foop.CFrame:inverse()*CJ
74
				local C1 = OOF.CFrame:inverse()*CJ
75
				W.C0 = C0
76
				W.C1 = C1
77
				W.Name='o0o'
78
				W.Parent = Foop
79
				
80
end
81
82
83
84
function PlayAnimationFromTable(table, speed, bool)
85
	RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
86
	Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
87
	RW.C0 = clerp(RW.C0, table[3], speed) 
88
	LW.C0 = clerp(LW.C0, table[4], speed) 
89
	RH.C0 = clerp(RH.C0, table[5], speed) 
90
	LH.C0 = clerp(LH.C0, table[6], speed) 
91
	if bool == true then
92
		if resetc1 == false then
93
			resetc1 = true
94
			RootJoint.C1 = RootJoint.C1
95
			Torso.Neck.C1 = Torso.Neck.C1
96
			RW.C1 = rarmc1
97
			LW.C1 = larmc1
98
			RH.C1 = rlegc1
99
			LH.C1 = llegc1
100
		end
101
	end
102
end
103
sine=1
104
105
Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0)
106
107
108
Grass=Instance.new('Part',Character)
109
Grass.Name='Grass'
110
Grass.Anchored=true
111
Grass.Size=Vector3.new(11.42, 0.17, 17.6)
112
Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1)
113
Grass.Material='Grass'
114
Grass.BrickColor=BrickColor.new('Bright green')
115
m=Instance.new('CylinderMesh',Grass)
116
White=Instance.new('Part',Character)
117
White.Name='White Space'
118
White.Anchored=true
119
White.Size=Vector3.new(35.2, 0.05, 17.6)
120
White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1)
121
White.Material='Neon'
122
White.BrickColor=BrickColor.new('Medium stone grey')
123
m=Instance.new('CylinderMesh',White)
124
125
126
Humanoid.AutoRotate=false
127
Humanoid.WalkSpeed=0
128
Humanoid.JumpPower=0
129
130
Flute=Instance.new('Part',Character)
131
Flute.Name='Flute'
132
Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5)
133
m=Instance.new('SpecialMesh',Flute)
134
m.MeshId='http://www.roblox.com/asset/?id=161269074'
135
m.TextureId='http://www.roblox.com/asset/?id=228874694'
136
m.Scale=Vector3.new(0.922, 0.922, 0.922)
137
Flute.Size=Vector3.new(.5,2,.5)
138
139
AutoWeld(Flute,Torso)
140
THEME=Instance.new('Sound',Character.Torso)
141
music=nil
142
firsttype=false
143
Player.Chatted:connect(function(msg)
144
for def in string.gmatch(msg, "%d+") do
145
			print(def)
146
147
if def~=nil then
148
	music=def
149
end	
150
	end
151
152
for def in string.gmatch(msg,"[%u%l%p]+") do
153
			print(def)
154
	if def=='Play/' and music~=nil then
155
		THEME:stop()
156
		THEME.SoundId='rbxassetid://'.. music
157
		THEME:play()
158
	elseif def=='Play/Demo' then
159
		THEME:stop()
160
		THEME.SoundId='rbxassetid://'.. 2120635557
161
		THEME:play()
162
	elseif def=='S_Guitar' then
163
		THEME:stop()
164
	end
165
end
166
music=nil
167
end)
168
Ms=Player:GetMouse()
169
Ms.KeyDown:connect(function(key)
170
    if key=='f' then
171
	if cam then
172
		cam=false
173
		CAM.CameraType='Custom'
174
	else
175
		cam=true
176
		CAM.CameraType='Scriptable'
177
	end
178
end
179
end)
180
181
182
cam=true--Custom Camera Perspectives
183
if cam==true then 
184
	CAM.CameraType=Enum.CameraType.Scriptable
185
186
end
187
Campart1=Instance.new('Part',Character)
188
Campart1.Transparency=1
189
Campart1.Anchored=true
190
Campart1.CanCollide=false
191
Campart2=Campart1:clone()
192
Campart2.Parent=Character
193
Campart3=Campart1:clone()
194
Campart3.Parent=Character
195
196
camtime=0
197
camphase=0
198
199
while 1 do
200
wait()	
201
	sine=sine+1
202
			PlayAnimationFromTable({
203
				CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0), 
204
				CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0), 
205
				CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700),  
206
				CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700), 
207
				CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) ,
208
				CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5),
209
			}, .3, false)
210
			
211
White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10)
212
if cam==true then
213-
Campart1=Instance.new('Part')
213+
214
if camphase==0 then
215
	if camtime<20+math.random(-2,2) then
216-
Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5)			
216+
217-
Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1)
217+
218-
Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3)
218+
219
		camphase=camphase+1
220
	end	
221-
				CAM.CFrame=Campart1.CFrame
221+
222
	if camtime<40+math.random(-8,12) then
223
				CAM.CFrame=Campart2.CFrame
224
		camtime=camtime+1
225
			else
226
		camtime=0
227
		camphase=camphase+1
228
	end
229
elseif camphase==2 then
230
	if camtime<50+math.random(-2,5) then
231
				CAM.CFrame=Campart3.CFrame
232
		camtime=camtime+1
233
	else
234
		camtime=0
235
		camphase=camphase+1
236
	end	
237
	
238
elseif camphase==3 then
239
	camphase=0
240
end
241
242
243
end
244
end