Advertisement
lafur

Untitled

Jan 15th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end function lerp(weld,beglerp,endlerp,speed)
  6. weld.C0 = beglerp:lerp(endlerp,speed)
  7. return weld.C0
  8. end
  9.  
  10. local speed = 0.15
  11. local angle = 0
  12. local anglespeed = 1.5
  13. local armspeed = 0.15
  14. local armangle = 0
  15. local armanglespeed = 1.5
  16. local legspeed = 0.15
  17. local legangle = 0
  18. local leganglespeed = 1.5
  19. ignore = {}
  20. on = true
  21. damen = true
  22. enabled = true
  23. combo = 1
  24. Player = game.Players.LocalPlayer
  25. mouse = Player:GetMouse()
  26. Char = Player.Character
  27. if Char["Body Colors"] ~= nil then
  28. Char["Body Colors"]:Destroy()
  29. end
  30. wait(0.1)
  31. if Char:FindFirstChild("Animate") ~= nil then Char.Animate:Destroy() end
  32. for i,v in pairs(Char:GetChildren()) do
  33. if v.ClassName == "Hat" then
  34. v:Destroy()
  35. end
  36. if v.ClassName == "Shirt" then
  37. v:Destroy()
  38. end
  39. if v.ClassName == "Pants" then
  40. v:Destroy()
  41. end
  42. if v.ClassName == "ShirtGraphic" then
  43. v:Destroy()
  44. end
  45. if v.ClassName == "CharacterMesh" then
  46. v:Destroy()
  47. end
  48. if v.Name == "Torso" or v.Name == "Left Arm" or v.Name == "Right Arm" or v.Name == "Left Leg" or v.Name == "Right Leg" then
  49. v.BrickColor = BrickColor.new("Pink")
  50. m = Instance.new("SpecialMesh",v)
  51. end
  52. end
  53. Char.Torso.Mesh.Scale = Vector3.new(1.4,1.25,2.5)
  54. Char.Torso.Mesh.Offset = Vector3.new(0,0,-0.5)
  55. Char.Torso.Mesh.MeshType = "Sphere"
  56. Human = Char.Humanoid
  57. if Human:FindFirstChild("Animator") ~= nil then Human.Animator:Destroy() end
  58. Sounds = {"rbxassetid://341648581","rbxassetid://288641333"}
  59. Head = Char.Head
  60. Head.Transparency = 1
  61. Head.face:Destroy()
  62. p = Instance.new("Part",Char)
  63. p.CanCollide = false
  64. p.TopSurface = 0
  65. p.BottomSurface = 0
  66. p.Transparency = 0.5
  67. p.Size = Head.Size
  68. p.BrickColor = BrickColor.new("Pink")
  69. w = Instance.new("Weld",p)
  70. w.Part0 = Head
  71. w.Part1 = p
  72. m = Instance.new("SpecialMesh",p)
  73. m.Scale = Vector3.new(1.15,1,1.15)
  74. m.MeshId = "http://www.roblox.com/asset/?id=33366461"
  75. Instance.new("Decal",Head).Texture = "rbxassetid://434049954"
  76. LA = Char:findFirstChild("Left Arm")
  77. RA = Char:findFirstChild("Right Arm")
  78. LL = Char:findFirstChild("Left Leg")
  79. RL = Char:findFirstChild("Right Leg")
  80. T = Char:findFirstChild("Torso")
  81. LS = T:findFirstChild("Left Shoulder")
  82. RS = T:findFirstChild("Right Shoulder")
  83. LH = T:findFirstChild("Left Hip")
  84. RH = T:findFirstChild("Right Hip")
  85. Neck = T:findFirstChild("Neck")
  86. HM = Char:findFirstChild("HumanoidRootPart")
  87. RJ = Char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  88. WLS = Instance.new("Weld", T)
  89. WLS.C0 = CFrame.new(-1.5, 0.5, 0)
  90. WLS.C1 = CFrame.new(0, 0.5, 0)
  91. WLS.Part0 = T
  92. WLS.Part1 = LA
  93. WRS = Instance.new("Weld", T)
  94. WRS.Part0 = T
  95. WRS.Part1 = RA
  96. WRS.C0 = CFrame.new(1.5, 0.5, 0)
  97. WRS.C1 = CFrame.new(0, 0.5, 0)
  98. WLH = LH
  99. WRH = RH
  100. LSC0 = WLS.C0
  101. RSC0 = WRS.C0
  102. LHC0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  103. LHC1 = CFrame.new(-0.5, 1 ,0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  104. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  105. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  106. WRJ = RJ
  107. RJC0 = WRJ.C0
  108. RJC1 = WRJ.C1
  109. NC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  110. Run = game:GetService("RunService")
  111. Human.MaxHealth = 1000000
  112. wait(0.1)
  113. Human.Health = Human.MaxHealth
  114.  
  115. Meshes={
  116. Blast="20329976",
  117. Crown="1323306",
  118. Ring="3270017",
  119. Claw="10681506",
  120. Crystal="9756362",
  121. Coil="9753878",
  122. Cloud="1095708",
  123. Skull="4770583",
  124. }
  125.  
  126. function nooutlines(part)
  127. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  128. end
  129.  
  130. function getmesh(mesh)
  131. return "rbxassetid://"..mesh
  132. end
  133.  
  134. function effect(part,brickcolor,size,cframe,trans,transincrement,scaleby,loopwait,meshid,meshtype)
  135. local p = Instance.new("Part", part or workspace)
  136. p.Anchored = true
  137. p.CanCollide = false
  138. p.FormFactor = Enum.FormFactor.Custom
  139. p.Material = "SmoothPlastic"
  140. p.CFrame = cframe
  141. p.BrickColor = brickcolor
  142. p.Size = Vector3.new(1,1,1)
  143. p.Transparency = trans
  144. nooutlines(p)
  145. local m = Instance.new("SpecialMesh",p)
  146. if meshtype ~= nil and meshid == nil then
  147. m.MeshType = meshtype
  148. end
  149. if meshtype == nil and meshid ~= nil then
  150. m.MeshId = getmesh(meshid)
  151. end
  152. m.Scale = size
  153. coroutine.wrap(function()
  154. for i = 0,loopwait,0.1 do
  155. p.CFrame = p.CFrame
  156. p.Transparency = p.Transparency +transincrement
  157. m.Scale = m.Scale + scaleby
  158. wait(1/60)
  159. end
  160. p:Destroy()
  161. end)()
  162. return p
  163. end
  164.  
  165. PlaySound = function(part,volume,pitch,id,looped)
  166. local Sound = Instance.new("Sound", part)
  167. Sound.SoundId = id
  168. Sound.Pitch = pitch
  169. Sound.Volume = volume
  170. coroutine.wrap(function()
  171. wait()
  172. Sound:Play()
  173. if looped == nil and Sound.SoundId ~= Sounds[2] then
  174. game.Debris:AddItem(Sound,10)
  175. end
  176. end)()
  177. if looped == true then
  178. Sound.Looped = true
  179. ThisSound = Sound
  180. end
  181. end
  182. PlaySound(Head,0.5,1,Sounds[1],true)
  183.  
  184. function GetDistance(Obj,Mag)
  185. for _,v in pairs(workspace:GetChildren()) do
  186. if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v ~= Char then
  187. local Mag2 = (v.Torso.Position - Obj.Position).magnitude
  188. if Mag2 < Mag then
  189. return v
  190. end
  191. end
  192. end
  193. end
  194.  
  195. function Die(touched)
  196. if touched.Parent ~= nil and touched.Parent ~= Char and touched.Parent:FindFirstChild("Head") ~= nil and touched.Parent:FindFirstChild("Humanoid") ~= nil then
  197. PlaySound(touched.Parent.Head,0.1,0.9,Sounds[2],true)
  198. touched:Destroy()
  199. end
  200. end
  201.  
  202. function Rwait(long)
  203. if long == 0 or long == nil then
  204. Run.RenderStepped:wait()
  205. else
  206. for i = 0,long do
  207. Run.RenderStepped:wait()
  208. end
  209. end
  210. end
  211.  
  212. keys = mouse.KeyDown:connect(function(key)
  213. if key == "q" then
  214. game:GetService("Chat"):Chat(Char,"who wants to gnaw on human bones")
  215. end
  216. if key == "e" then
  217. game:GetService("Chat"):Chat(Char,"can i gnaw your human bones")
  218. end
  219. if key == "r" then
  220. game:GetService("Chat"):Chat(Char,"hello")
  221. end
  222. if key == "t" then
  223. game:GetService("Chat"):Chat(Char,"would you like to gnaw some human bones sir/madam")
  224. end
  225. if key == "y" then
  226. game:GetService("Chat"):Chat(Char,"walking in the fields over here")
  227. end
  228. if key == "u" then
  229. game:GetService("Chat"):Chat(Char,"im hungry",2)
  230. end
  231. if key == "p" then
  232. game:GetService("Chat"):Chat(Char,"nom",2)
  233. end
  234. if key == "z" then
  235. game:GetService("Chat"):Chat(Char,"no")
  236. end
  237. if key == "x" then
  238. game:GetService("Chat"):Chat(Char,"yes")
  239. end
  240. if key == "c" then
  241. game:GetService("Chat"):Chat(Char,"https://www.youtube.com/watch?v=jdRCNM2k42o")
  242. end
  243. if key == "f" and enabled == true then
  244. enabled = false
  245. game:GetService("Chat"):Chat(Char,"gnaw time",2)
  246. Head.Decal.Texture = "rbxassetid://449278124"
  247. Human.WalkSpeed = 50
  248. po = Head.Touched:connect(Die)
  249. legspeed = 1
  250. for i = 1,80 do
  251. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,0),armspeed)
  252. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,0),armspeed)
  253. lerp(WLH,WLH.C0,LHC0,legspeed)
  254. lerp(WRH,WRH.C0,RHC0,legspeed)
  255. lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-HM.RotVelocity.Y/20),speed)
  256. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,HM.RotVelocity.Y/12),speed)
  257. if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then
  258. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed)
  259. lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed)
  260. end
  261. Rwait()
  262. end
  263. legspeed = 0.15
  264. Human.WalkSpeed = 16
  265. Head.Decal.Texture = "rbxassetid://434049954"
  266. po:disconnect()
  267. enabled = true
  268. end
  269. end)
  270.  
  271. function Cast(Pos,Dir,Amp,IgnoreList)
  272. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit*Amp), IgnoreList)
  273. end
  274.  
  275. while true do
  276. surface = Cast(HM.Position,(CFrame.new(HM.Position,HM.Position - Vector3.new(0,1,0))).lookVector,4,Char)
  277. if on == true then
  278. angle = (angle % 100) +anglespeed/10
  279. armangle = (armangle % 100) +armanglespeed/10
  280. legangle = (legangle % 100) +leganglespeed/10
  281. if action == "Idle" and enabled == true and surface ~= nil then
  282. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(0,0,-math.pi/8),armspeed)
  283. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,0,math.pi/8),armspeed)
  284. lerp(WLH,WLH.C0,LHC0,legspeed)
  285. lerp(WRH,WRH.C0,RHC0,legspeed)
  286. lerp(WRJ,WRJ.C0,RJC0,speed)
  287. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(math.sin(angle*0.25/2)*0.25/5,0,0),speed)
  288. end
  289. if action == "Walk" and enabled == true and surface ~= nil then
  290. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.sin(armangle)*2,0,0),armspeed)
  291. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(-math.sin(armangle)*2,0,0),armspeed)
  292. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed)
  293. lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed)
  294. lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-HM.RotVelocity.Y/20),speed)
  295. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,HM.RotVelocity.Y/12),speed)
  296. end
  297. if HM.Velocity.Y >= 5 and enabled == true and surface == nil then
  298. action = "Jump"
  299. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/1.5,0,0),armspeed)
  300. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/1.5,0,0),armspeed)
  301. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,-math.pi/10),legspeed)
  302. lerp(WRH,WRH.C0,RHC0 *CFrame.new(1,0.5,0) *CFrame.Angles(0,0,-math.pi/8),legspeed)
  303. lerp(WRJ,WRJ.C0,RJC0,speed)
  304. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed)
  305. Rwait()
  306. end
  307. if HM.Velocity.Y <= -5 and enabled == true and surface == nil then
  308. action = "Fall"
  309. lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/3,0,0),armspeed)
  310. lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/3,0,0),armspeed)
  311. lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.pi/10),legspeed)
  312. lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.pi/4),legspeed)
  313. lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.pi/8,0,0),speed)
  314. lerp(Neck,Neck.C0,NC0,speed)
  315. Rwait()
  316. end
  317. if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude <= 2 then
  318. action = "Idle"
  319. elseif Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then
  320. action = "Walk"
  321. end
  322. end
  323. Rwait()
  324. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement