Advertisement
Rodapitati

as

Jul 24th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.44 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  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 = Owner
  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. -----SO BASICALLY I'M MONKEY-----
  89. ---------------------------------
  90.  
  91. --This script is made by mrfunnylaughs4.
  92.  
  93. local plr = owner
  94. local char = plr.Character
  95. local hum = char:FindFirstChildOfClass("Humanoid")
  96. local idleanim = Instance.new("Animation")
  97. idleanim.Name = "Roblox Idle Animation"
  98. idleanim.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  99. local idleanimplay = hum:LoadAnimation(idleanim)
  100. idleanimplay:Play()
  101. wait(0.1)
  102. if char:FindFirstChild("Animate") then
  103. char.Animate:Destroy()
  104. end
  105. local remote = Instance.new("RemoteEvent", char)
  106. remote.Name = "ReplicationEvent"
  107. local client = NLS([==[
  108. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  109. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  110. spawn(function()
  111. while game:GetService("RunService").Heartbeat:Wait() do
  112. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  113. end
  114. end)
  115. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  116. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  117. remote:FireServer(1, input.KeyCode)
  118. end
  119. end)
  120. mouse.Button1Down:Connect(function()
  121. remote:FireServer(2)
  122. end)
  123. remote.OnClientEvent:Connect(function()
  124. 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))
  125. end)
  126. ]==], char)
  127. local crabrave = Instance.new("Sound", char.Torso)
  128. local RS = char.Torso["Right Shoulder"]
  129. local LS = char.Torso["Left Shoulder"]
  130. local RH = char.Torso["Right Hip"]
  131. local LH = char.Torso["Left Hip"]
  132. local rootj = char.HumanoidRootPart.RootJoint
  133. local throwbutton = false
  134. local throw = false
  135. local normalanim = true
  136. local attackd = false
  137. local animpose = "Idle"
  138. local timepos = 0
  139. local sine = 0
  140. local RSnor = RS.C0
  141. local LSnor = LS.C0
  142. local RHnor = RH.C0
  143. local LHnor = LH.C0
  144. local rootjnor = rootj.C0
  145.  
  146. ---------------------------------
  147. --------------Set up-------------
  148. ---------------------------------
  149.  
  150. local sur = Instance.new("BillboardGui", char.Head)
  151. sur.Name = "Billboard"
  152. sur.Adornee = char.Head
  153. sur.Size = UDim2.new(10, 0, 5, 0)
  154. sur.StudsOffset = Vector3.new(0, 5, 0)
  155. local text = Instance.new("TextLabel", sur)
  156. text.Text = "SO BASICALLY IM MONKEY"
  157. text.Size = UDim2.new(1, 0, 1, 0)
  158. text.TextScaled = true
  159. text.BackgroundTransparency = 1
  160. text.Font = Enum.Font.SourceSansLight
  161. text.TextColor3 = Color3.new(1, 1, 1)
  162. text.TextStrokeTransparency = 0
  163.  
  164. ---------------------------------
  165. -------------Attacks-------------
  166. ---------------------------------
  167.  
  168. remote.OnServerEvent:Connect(function(Player, number, key)
  169. if number == 1 and plr.Name == Player.Name and attackd == false then
  170. if key == Enum.KeyCode.Z then
  171. sine = 0
  172. attackd = true
  173. normalanim = false
  174. hum.WalkSpeed = 0
  175. hum.JumpPower = 0
  176. for i = 1, 15 do
  177. game:GetService("RunService").Heartbeat:Wait()
  178. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(1.2, 0, 0) + Vector3.new(0, -1.6, 0), 0.15)
  179. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 1.1) + Vector3.new(0, 0, -0.3), 0.15)
  180. LS.C0 = LS.C0:Lerp(LSnor, 0.15)
  181. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  182. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  183. end
  184. for i = 1, 20 do
  185. game:GetService("RunService").Heartbeat:Wait()
  186. LS.C0 = LS.C0 * CFrame.Angles(0, 0, -0.06) + Vector3.new(0, 0, -0.03)
  187. end
  188. local banpart = Instance.new("Part", char)
  189. banpart.Size = Vector3.new(1, 1, 1)
  190. banpart.CanCollide = false
  191. local mesh = Instance.new("SpecialMesh", banpart)
  192. mesh.MeshType = "FileMesh"
  193. mesh.MeshId = "rbxassetid://28937301"
  194. mesh.TextureId = "rbxassetid://28937670"
  195. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  196. local weld = Instance.new("Weld", banpart)
  197. weld.Part0 = char["Left Arm"]
  198. weld.Part1 = banpart
  199. weld.C1 = CFrame.new(0, 1, 0)
  200. for i = 1, 20 do
  201. game:GetService("RunService").Heartbeat:Wait()
  202. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  203. RS.C0 = RS.C0:Lerp(RSnor, 0.15)
  204. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
  205. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  206. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  207. end
  208. throwbutton = true
  209. throw = true
  210. repeat game:GetService("RunService").Heartbeat:Wait()
  211. remote:FireClient(plr)
  212. until throw == false
  213. for i = 1, 15 do
  214. game:GetService("RunService").Heartbeat:Wait()
  215. LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
  216. end
  217. banpart.Parent = workspace
  218. weld:Destroy()
  219. banpart.CanCollide = true
  220. banpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 60
  221. local start = LS.C0
  222. for i = 1, 0, -1 / 15 do
  223. game:GetService("RunService").Heartbeat:Wait()
  224. LS.C0 = LSnor:Lerp(start, i * i)
  225. end
  226. normalanim = true
  227. attackd = false
  228. hum.WalkSpeed = 16
  229. hum.JumpPower = 50
  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. spawn(function()
  241. wait(15)
  242. if banpart.Parent == workspace then
  243. banpart:Destroy()
  244. end
  245. end)
  246. end
  247. if key == Enum.KeyCode.X then
  248. attackd = true
  249. local bpart = Instance.new("Part", workspace)
  250. bpart.Size = Vector3.new(2.4, 3.5, 2.4)
  251. bpart.Locked = true
  252. bpart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2)
  253. bpart.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50
  254. local mesh = Instance.new("SpecialMesh", bpart)
  255. mesh.MeshType = "FileMesh"
  256. mesh.MeshId = "http://www.roblox.com/asset/?id=29873142"
  257. mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
  258. mesh.TextureId = "http://www.roblox.com/asset/?id=31082268"
  259. local update = 0.4
  260. while update > 0.1 do
  261. local sound = Instance.new("Sound", bpart)
  262. sound.SoundId = "rbxasset://sounds\\clickfast.wav"
  263. sound.Volume = 5
  264. sound:Play()
  265. wait(update)
  266. update = update * 0.9
  267. end
  268. for i = 1, 50 do
  269. local banpart = Instance.new("Part", workspace)
  270. banpart.Size = Vector3.new(1, 1, 1)
  271. banpart.CanCollide = true
  272. banpart.CFrame = bpart.CFrame
  273. local bCFrame = CFrame.new(0, 0, 0)
  274. local bVel = Vector3.new(0, 0, 0)
  275. local mesh = Instance.new("SpecialMesh", banpart)
  276. mesh.MeshType = "FileMesh"
  277. mesh.MeshId = "rbxassetid://28937301"
  278. mesh.TextureId = "rbxassetid://28937670"
  279. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  280. local weld = Instance.new("Weld", banpart)
  281. weld.Part0 = bpart
  282. weld.Part1 = banpart
  283. spawn(function()
  284. wait(1)
  285. banpart.Touched:Connect(function(hit)
  286. if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
  287. local character = hit.Parent
  288. character:FindFirstChildOfClass("Humanoid").Sit = true
  289. local s = Instance.new("Sound", character.Head)
  290. s.SoundId = "rbxassetid://28976727"
  291. s.Volume = 10
  292. s:Play()
  293. end
  294. end)
  295. end)
  296. spawn(function()
  297. while wait() do
  298. if banpart.Parent ~= workspace then
  299. banpart = Instance.new("Part", workspace)
  300. banpart.Size = Vector3.new(1, 1, 1)
  301. banpart.CanCollide = true
  302. mesh = Instance.new("SpecialMesh", banpart)
  303. mesh.MeshType = "FileMesh"
  304. mesh.MeshId = "rbxassetid://28937301"
  305. mesh.TextureId = "rbxassetid://28937670"
  306. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  307. banpart.CFrame = bCFrame
  308. banpart.Velocity = bVel
  309. banpart.Touched:Connect(function(hit)
  310. if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
  311. local character = hit.Parent
  312. character:FindFirstChildOfClass("Humanoid").Sit = true
  313. local s = Instance.new("Sound", character.Head)
  314. s.SoundId = "rbxassetid://28976727"
  315. s.Volume = 10
  316. s:Play()
  317. end
  318. end)
  319. else
  320. bCFrame = banpart.CFrame
  321. bVel = banpart.Velocity
  322. end
  323. end
  324. end)
  325. end
  326. local explosion = Instance.new("Explosion", bpart)
  327. explosion.Position = bpart.Position
  328. local sound2 = Instance.new("Sound", bpart)
  329. sound2.SoundId = "rbxasset://sounds\\Rocket shot.wav"
  330. sound2.Volume = 5
  331. sound2:Play()
  332. bpart.CanCollide = false
  333. attackd = false
  334. end
  335. if key == Enum.KeyCode.C then
  336. sine = 0
  337. attackd = true
  338. normalanim = false
  339. hum.WalkSpeed = 0
  340. hum.JumpPower = 0
  341. for i = 1, 20 do
  342. game:GetService("RunService").Heartbeat:Wait()
  343. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  344. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 4), 0.15)
  345. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
  346. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  347. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  348. end
  349. local tpart = Instance.new("Part", char)
  350. tpart.Size = Vector3.new(5.523, 6.19, 22.966)
  351. tpart.Anchored = true
  352. tpart.BrickColor = BrickColor.new("Pine Cone")
  353. tpart.Material = "Wood"
  354. tpart.CanCollide = false
  355. tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
  356. local mesh = Instance.new("SpecialMesh", tpart)
  357. mesh.MeshType = "FileMesh"
  358. mesh.MeshId = "rbxassetid://1760841786"
  359. wait(0.5)
  360. for i = 1, 15 do
  361. game:GetService("RunService").Heartbeat:Wait()
  362. RS.C0 = RS.C0:Lerp(RS.C0 * CFrame.Angles(0, 0, -0.01), i)
  363. LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
  364. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  365. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  366. tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
  367. end
  368. tpart.Anchored = false
  369. tpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 100
  370. tpart.CanCollide = true
  371. tpart.Parent = workspace
  372. spawn(function()
  373. wait(0.3)
  374. tpart.Touched:Connect(function(hit)
  375. if hit.Size.X + hit.Size.Y + hit.Size.Z < 1000 then
  376. hit:BreakJoints()
  377. hit.Anchored = false
  378. hit.Velocity = tpart.Velocity
  379. end
  380. end)
  381. end)
  382. for i = 1, 20 do
  383. game:GetService("RunService").Heartbeat:Wait()
  384. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  385. RS.C0 = RS.C0:Lerp(RSnor, 0.15)
  386. LS.C0 = LS.C0:Lerp(LSnor, 0.15)
  387. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  388. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  389. end
  390. attackd = false
  391. normalanim = true
  392. hum.WalkSpeed = 16
  393. hum.JumpPower = 50
  394. end
  395. elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
  396. throwbutton = false
  397. throw = false
  398. end
  399. end)
  400.  
  401. ---------------------------------
  402. -----------Wrapping up-----------
  403. ---------------------------------
  404.  
  405. while game:GetService("RunService").Heartbeat:Wait() do
  406. if normalanim then
  407. sine = sine + 1
  408. end
  409. if crabrave.Parent == char.Torso then
  410. crabrave.SoundId = "rbxassetid://1609256184"
  411. crabrave.Playing = true
  412. crabrave.Volume = 1
  413. crabrave.Looped = true
  414. timepos = crabrave.TimePosition
  415. else
  416. crabrave = Instance.new("Sound", char.Torso)
  417. crabrave.TimePosition = timepos
  418. end
  419. if remote.Parent == char then
  420. remote.Name = "ReplicationEvent"
  421. else
  422. remote = Instance.new("RemoteEvent", char)
  423. end
  424. 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)
  425. if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
  426. animpose = "Walking"
  427. elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
  428. animpose = "Jumping"
  429. elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
  430. animpose = "Falling"
  431. else
  432. animpose = "Idle"
  433. end
  434. if animpose == "Idle" and normalanim then
  435. RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
  436. LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
  437. RH.C0 = RH.C0:Lerp(RHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  438. LH.C0 = LH.C0:Lerp(LHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  439. rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
  440. elseif animpose == "Walking" and normalanim then
  441. RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
  442. LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
  443. 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)
  444. 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)
  445. rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
  446. elseif animpose == "Jumping" and normalanim then
  447. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
  448. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  449. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  450. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  451. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  452. elseif animpose == "Falling" and normalanim then
  453. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
  454. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  455. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  456. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  457. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  458. end
  459. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement