View difference between Paste ID: BABi8Bk9 and 1pxKzUND
SHOW: | | - or go back to the newest paste.
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,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
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
6
7
8
---------------------------------
9
-----SO BASICALLY I'M MONKEY-----
10
---------------------------------
11
12
--This script is made by mrfunnylaughs4.
13
14
local plr = owner
15
local char = plr.Character
16
local hum = char:FindFirstChildOfClass("Humanoid")
17
local idleanim = Instance.new("Animation")
18
idleanim.Name = "Roblox Idle Animation"
19
idleanim.AnimationId = "http://www.roblox.com/asset/?id=180435571"
20
local idleanimplay = hum:LoadAnimation(idleanim)
21
idleanimplay:Play()
22
wait(0.1)
23
if char:FindFirstChild("Animate") then
24
	char.Animate:Destroy()
25
end
26
local remote = Instance.new("RemoteEvent", char)
27
remote.Name = "ReplicationEvent"
28
local client = NLS([==[
29
	local mouse = game:GetService("Players").LocalPlayer:GetMouse()
30
	local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
31
	spawn(function()
32
		while game:GetService("RunService").Heartbeat:Wait() do
33
			remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
34
		end
35
	end)
36
	game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
37
		if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
38
			remote:FireServer(1, input.KeyCode)
39
		end
40
	end)
41
	mouse.Button1Down:Connect(function()
42
		remote:FireServer(2)
43
	end)
44
	remote.OnClientEvent:Connect(function()
45
		game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
46
	end)
47
]==], char)
48
local crabrave = Instance.new("Sound", char.Torso)
49
local RS = char.Torso["Right Shoulder"]
50
local LS = char.Torso["Left Shoulder"]
51
local RH = char.Torso["Right Hip"]
52
local LH = char.Torso["Left Hip"]
53
local rootj = char.HumanoidRootPart.RootJoint
54
local throwbutton = false
55
local throw = false
56
local normalanim = true
57
local attackd = false
58
local animpose = "Idle"
59
local timepos = 0
60
local sine = 0
61
local RSnor = RS.C0
62
local LSnor = LS.C0
63
local RHnor = RH.C0
64
local LHnor = LH.C0
65
local rootjnor = rootj.C0
66
67
---------------------------------
68
--------------Set up-------------
69
---------------------------------
70
71
local sur = Instance.new("BillboardGui", char.Head)
72
sur.Name = "Billboard"
73
sur.Adornee = char.Head
74
sur.Size = UDim2.new(10, 0, 5, 0)
75
sur.StudsOffset = Vector3.new(0, 5, 0)
76
local text = Instance.new("TextLabel", sur)
77-
text.Text = "SO BASICALLY IM MONKEY"
77+
text.Text = "So basically im big dum"
78
text.Size = UDim2.new(1, 0, 1, 0)
79
text.TextScaled = true
80
text.BackgroundTransparency = 1
81
text.Font = Enum.Font.SourceSansLight
82
text.TextColor3 = Color3.new(1, 1, 1)
83
text.TextStrokeTransparency = 0
84
85
---------------------------------
86
-------------Attacks-------------
87
---------------------------------
88
89
remote.OnServerEvent:Connect(function(Player, number, key)
90
	if number == 1 and plr.Name == Player.Name and attackd == false then
91
		if key == Enum.KeyCode.Z then
92
			sine = 0
93
			attackd = true
94
			normalanim = false
95
			hum.WalkSpeed = 0
96
			hum.JumpPower = 0
97
			for i = 1, 15 do
98
				game:GetService("RunService").Heartbeat:Wait()
99
				rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(1.2, 0, 0) + Vector3.new(0, -1.6, 0), 0.15)
100
				RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 1.1) + Vector3.new(0, 0, -0.3), 0.15)
101
				LS.C0 = LS.C0:Lerp(LSnor, 0.15)
102
				RH.C0 = RH.C0:Lerp(RHnor, 0.15)
103
				LH.C0 = LH.C0:Lerp(LHnor, 0.15)
104
			end
105
			for i = 1, 20 do
106
				game:GetService("RunService").Heartbeat:Wait()
107
				LS.C0 = LS.C0 * CFrame.Angles(0, 0, -0.06) + Vector3.new(0, 0, -0.03)
108
			end
109
			local banpart = Instance.new("Part", char)
110
			banpart.Size = Vector3.new(1, 1, 1)
111
			banpart.CanCollide = false
112
			local mesh = Instance.new("SpecialMesh", banpart)
113
			mesh.MeshType = "FileMesh"
114
			mesh.MeshId = "rbxassetid://28937301"
115
			mesh.TextureId = "rbxassetid://28937670"
116
			mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
117
			local weld = Instance.new("Weld", banpart)
118
			weld.Part0 = char["Left Arm"]
119
			weld.Part1 = banpart
120
			weld.C1 = CFrame.new(0, 1, 0)
121
			for i = 1, 20 do
122
				game:GetService("RunService").Heartbeat:Wait()
123
				rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
124
				RS.C0 = RS.C0:Lerp(RSnor, 0.15)
125
				LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
126
				RH.C0 = RH.C0:Lerp(RHnor, 0.15)
127
				LH.C0 = LH.C0:Lerp(LHnor, 0.15)
128
			end
129
			throwbutton = true
130
			throw = true
131
			repeat game:GetService("RunService").Heartbeat:Wait()
132
				remote:FireClient(plr)
133
			until throw == false
134
			for i = 1, 15 do
135
				game:GetService("RunService").Heartbeat:Wait()
136
				LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
137
			end
138
			banpart.Parent = workspace
139
			weld:Destroy()
140
			banpart.CanCollide = true
141
			banpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 60
142
			local start = LS.C0
143
			for i = 1, 0, -1 / 15 do
144
				game:GetService("RunService").Heartbeat:Wait()
145
				LS.C0 = LSnor:Lerp(start, i * i)
146
			end
147
			normalanim = true
148
			attackd = false
149
			hum.WalkSpeed = 16
150
			hum.JumpPower = 50
151
			banpart.Touched:Connect(function(hit)
152
				if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
153
					local character = hit.Parent
154
					character:FindFirstChildOfClass("Humanoid").Sit = true
155
					local s = Instance.new("Sound", character.Head)
156
					s.SoundId = "rbxassetid://28976727"
157
					s.Volume = 10
158
					s:Play()
159
				end
160
			end)
161
			spawn(function()
162
				wait(15)
163
				if banpart.Parent == workspace then
164
					banpart:Destroy()
165
				end
166
			end)
167
		end
168
		if key == Enum.KeyCode.X then
169
			attackd = true
170
			local bpart = Instance.new("Part", workspace)
171
			bpart.Size = Vector3.new(2.4, 3.5, 2.4)
172
			bpart.Locked = true
173
			bpart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2)
174
			bpart.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50
175
			local mesh = Instance.new("SpecialMesh", bpart)
176
			mesh.MeshType = "FileMesh"
177
			mesh.MeshId = "http://www.roblox.com/asset/?id=29873142"
178
			mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
179
			mesh.TextureId = "http://www.roblox.com/asset/?id=31082268"
180
			local update = 0.4
181
			while update > 0.1 do
182
				local sound = Instance.new("Sound", bpart)
183
				sound.SoundId = "rbxasset://sounds\\clickfast.wav"
184
				sound.Volume = 5
185
				sound:Play()
186
				wait(update)
187
				update = update * 0.9
188
			end
189
			for i = 1, 50 do
190
				local banpart = Instance.new("Part", workspace)
191
				banpart.Size = Vector3.new(1, 1, 1)
192
				banpart.CanCollide = true
193
				banpart.CFrame = bpart.CFrame
194
				local bCFrame = CFrame.new(0, 0, 0)
195
				local bVel = Vector3.new(0, 0, 0)
196
				local mesh = Instance.new("SpecialMesh", banpart)
197
				mesh.MeshType = "FileMesh"
198
				mesh.MeshId = "rbxassetid://28937301"
199
				mesh.TextureId = "rbxassetid://28937670"
200
				mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
201
				local weld = Instance.new("Weld", banpart)
202
				weld.Part0 = bpart
203
				weld.Part1 = banpart
204
				spawn(function()
205
					wait(1)
206
					banpart.Touched:Connect(function(hit)
207
						if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
208
							local character = hit.Parent
209
							character:FindFirstChildOfClass("Humanoid").Sit = true
210
							local s = Instance.new("Sound", character.Head)
211
							s.SoundId = "rbxassetid://28976727"
212
							s.Volume = 10
213
							s:Play()
214
						end
215
					end)
216
				end)
217
				spawn(function()
218
					while wait() do
219
						if banpart.Parent ~= workspace then
220
							banpart = Instance.new("Part", workspace)
221
							banpart.Size = Vector3.new(1, 1, 1)
222
							banpart.CanCollide = true
223
							mesh = Instance.new("SpecialMesh", banpart)
224
							mesh.MeshType = "FileMesh"
225
							mesh.MeshId = "rbxassetid://28937301"
226
							mesh.TextureId = "rbxassetid://28937670"
227
							mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
228
							banpart.CFrame = bCFrame
229
							banpart.Velocity = bVel
230
							banpart.Touched:Connect(function(hit)
231
								if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
232
									local character = hit.Parent
233
									character:FindFirstChildOfClass("Humanoid").Sit = true
234
									local s = Instance.new("Sound", character.Head)
235
									s.SoundId = "rbxassetid://28976727"
236
									s.Volume = 10
237
									s:Play()
238
								end
239
							end)
240
						else
241
							bCFrame = banpart.CFrame
242
							bVel = banpart.Velocity
243
						end
244
					end
245
				end)
246
			end
247
			local explosion = Instance.new("Explosion", bpart)
248
			explosion.Position = bpart.Position
249
			local sound2 = Instance.new("Sound", bpart)
250
			sound2.SoundId = "rbxasset://sounds\\Rocket shot.wav"
251
			sound2.Volume = 5
252
			sound2:Play()
253
			bpart.CanCollide = false
254
			attackd = false
255
		end
256
		if key == Enum.KeyCode.C then
257
			sine = 0
258
			attackd = true
259
			normalanim = false
260
			hum.WalkSpeed = 0
261
			hum.JumpPower = 0
262
			for i = 1, 20 do
263
				game:GetService("RunService").Heartbeat:Wait()
264
				rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
265
				RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 4), 0.15)
266
				LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
267
				RH.C0 = RH.C0:Lerp(RHnor, 0.15)
268
				LH.C0 = LH.C0:Lerp(LHnor, 0.15)
269
			end
270
			local tpart = Instance.new("Part", char)
271
			tpart.Size = Vector3.new(5.523, 6.19, 22.966)
272
			tpart.Anchored = true
273
			tpart.BrickColor = BrickColor.new("Pine Cone")
274
			tpart.Material = "Wood"
275
			tpart.CanCollide = false
276
			tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
277
			local mesh = Instance.new("SpecialMesh", tpart)
278
			mesh.MeshType = "FileMesh"
279
			mesh.MeshId = "rbxassetid://1760841786"
280
			wait(0.5)
281
			for i = 1, 15 do
282
				game:GetService("RunService").Heartbeat:Wait()
283
				RS.C0 = RS.C0:Lerp(RS.C0 * CFrame.Angles(0, 0, -0.01), i)
284
				LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
285
				RH.C0 = RH.C0:Lerp(RHnor, 0.15)
286
				LH.C0 = LH.C0:Lerp(LHnor, 0.15)
287
				tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
288
			end
289
			tpart.Anchored = false
290
			tpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 100
291
			tpart.CanCollide = true
292
			tpart.Parent = workspace
293
			spawn(function()
294
				wait(0.3)
295
				tpart.Touched:Connect(function(hit)
296
					if hit.Size.X + hit.Size.Y + hit.Size.Z < 1000 then
297
						hit:BreakJoints()
298
						hit.Anchored = false
299
						hit.Velocity = tpart.Velocity
300
					end
301
				end)
302
			end)
303
			for i = 1, 20 do
304
				game:GetService("RunService").Heartbeat:Wait()
305
				rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
306
				RS.C0 = RS.C0:Lerp(RSnor, 0.15)
307
				LS.C0 = LS.C0:Lerp(LSnor, 0.15)
308
				RH.C0 = RH.C0:Lerp(RHnor, 0.15)
309
				LH.C0 = LH.C0:Lerp(LHnor, 0.15)
310
			end
311
			attackd = false
312
			normalanim = true
313
			hum.WalkSpeed = 16
314
			hum.JumpPower = 50
315
		end
316
	elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
317
		throwbutton = false
318
		throw = false
319
	end
320
end)
321
322
---------------------------------
323
-----------Wrapping up-----------
324
---------------------------------
325
326
while game:GetService("RunService").Heartbeat:Wait() do
327
	if normalanim then
328
		sine = sine + 1
329
	end
330
	if crabrave.Parent == char.Torso then
331
		crabrave.SoundId = "rbxassetid://1609256184"
332
		crabrave.Playing = true
333
		crabrave.Volume = 1
334
		crabrave.Looped = true
335
		timepos = crabrave.TimePosition
336
	else
337
		crabrave = Instance.new("Sound", char.Torso)
338
		crabrave.TimePosition = timepos
339
	end
340
	if remote.Parent == char then
341
		remote.Name = "ReplicationEvent"
342
	else
343
		remote = Instance.new("RemoteEvent", char)
344
	end
345
	local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
346
	if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
347
		animpose = "Walking"
348
	elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
349
		animpose = "Jumping"
350
	elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
351
		animpose = "Falling"
352
	else
353
		animpose = "Idle"
354
	end
355
	if animpose == "Idle" and normalanim then
356
		RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
357
		LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
358
		RH.C0 = RH.C0:Lerp(RHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
359
		LH.C0 = LH.C0:Lerp(LHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
360
		rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
361
	elseif animpose == "Walking" and normalanim then
362
		RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
363
		LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
364
		RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 10)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
365
		LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 10)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
366
		rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
367
	elseif animpose == "Jumping" and normalanim then
368
		rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
369
		RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
370
		LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
371
		RH.C0 = RH.C0:Lerp(RHnor, 0.15)
372
		LH.C0 = LH.C0:Lerp(LHnor, 0.15)
373
	elseif animpose == "Falling" and normalanim then
374
		rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
375
		RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
376
		LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
377
		RH.C0 = RH.C0:Lerp(RHnor, 0.15)
378
		LH.C0 = LH.C0:Lerp(LHnor, 0.15)
379
	end
380
end