Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.75 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 = 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. for _,child in pairs (owner.Character:GetChildren()) do
  88. if child.ClassName == "Accessory" then
  89. child:remove()
  90. end
  91. end
  92.  
  93. for _,child in pairs (owner.Character:GetChildren()) do
  94. if child.ClassName == "Part" then
  95. child.Transparency = 1
  96. if child:FindFirstChild("face") then
  97. child.face:remove()
  98. end
  99. end
  100. end
  101.  
  102. if owner.Character.Head:FindFirstChild("Jumping") then
  103. owner.Character.Head.Jumping.SoundId = "rbxassetid://726242769"
  104. end
  105. owner.Character.Humanoid.WalkSpeed = 0
  106. owner.Character.Humanoid.MaxHealth = math.huge
  107. owner.Character.Humanoid.Health = math.huge
  108. B = Instance.new("Part")
  109. B.Name = "Body"
  110. B.Size = Vector3.new(5.5, 5.5, 5.5)
  111. B.Parent = owner.Character
  112. W = Instance.new("Weld")
  113. W.Parent = B
  114. W.Part0 = B
  115. W.Part1 = owner.Character.HumanoidRootPart
  116. M = Instance.new("SpecialMesh")
  117. M.Parent = B
  118. M.MeshId = "http://www.roblox.com/asset/?id=37223787"
  119. M.TextureId = "http://www.roblox.com/asset/?id=37606814"
  120. M.Scale = Vector3.new(8, 8, 8)
  121. A = Instance.new("Sound")
  122. A.Name = "Taunt"
  123. A.SoundId = "rbxassetid://189652125"
  124. A.Playing = true
  125. A.Parent = B
  126. E = Instance.new("Sound")
  127. E.Name = "Eat"
  128. E.Parent = B
  129. E.SoundId = "rbxassetid://212887990"
  130. E.Volume = 2
  131. FF = Instance.new("ForceField")
  132. FF.Parent = owner.Character
  133. FF.Visible = false
  134. P = Instance.new("Part")
  135. P.Name = "Eyes"
  136. P.Parent = B
  137. P.CanCollide = false
  138. W2 = Instance.new("Weld")
  139. W2.Parent = B
  140. W2.Part0 = B
  141. W2.Part1 = P
  142. eyes = Instance.new("SpecialMesh")
  143. eyes.Parent = P
  144. eyes.MeshId = "http://www.roblox.com/asset/?id=15721278"
  145. eyes.TextureId = "rbxassetid://15721268"
  146. eyes.Scale = Vector3.new(4.5, 4.5, 4.5)
  147. eyes.Offset = Vector3.new(0, 0.5, -0.1)
  148.  
  149. local mouse5 = owner:GetMouse()
  150. mouse5.KeyDown:connect(function(key)
  151. if key == string.char(32) then
  152.  
  153. owner.Character.Humanoid.WalkSpeed = 20
  154.  
  155. end
  156. end)
  157.  
  158. mouse5.KeyUp:connect(function(key)
  159. if key == string.char(32) then
  160.  
  161. owner.Character.Humanoid.WalkSpeed = 0
  162.  
  163. end
  164. end)
  165.  
  166. function onTouched(part)
  167.  
  168. if B.Velocity.Magnitude > 4 then
  169. for _,child in pairs (part.Parent:GetChildren()) do
  170. if child.ClassName == "Humanoid" then
  171. M.Scale = M.Scale + Vector3.new(0.1, 0.1, 0.1)
  172. M.Offset = M.Offset + Vector3.new(0, 0.035, 0)
  173. owner.Character.Humanoid.JumpPower = owner.Character.Humanoid.JumpPower + 0.25
  174. eyes.Scale = eyes.Scale + Vector3.new(0.0575, 0.0575, 0.0575)
  175. eyes.Offset = eyes.Offset + Vector3.new(0, 0.0325, 0)
  176. E.Playing = true
  177. if owner.Character.Head:FindFirstChild("Jumping") then
  178. owner.Character.Head.Jumping.Volume = owner.Character.Head.Jumping.Volume + 0.010
  179. owner.Character.Head.Jumping.PlaybackSpeed = owner.Character.Head.Jumping.PlaybackSpeed - 0.002
  180. owner.Character.Humanoid.CameraOffset = owner.Character.Humanoid.CameraOffset + Vector3.new(0, 0.025, 0)
  181. part:remove()
  182. end
  183.  
  184. end
  185. end
  186. end
  187. end
  188. B.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement