SHOW:
|
|
- or go back to the newest paste.
1 | - | function lerp(weld,beglerp,endlerp,speed) |
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 | - | Sounds = {"rbxassetid://341648581","rbxassetid://288641333"} |
54 | + | |
55 | Char.Torso.Mesh.MeshType = "Sphere" | |
56 | Human = Char.Humanoid | |
57 | if Human:FindFirstChild("Animator") ~= nil then Human.Animator:Destroy() end | |
58 | Head = Char.Head | |
59 | Head.Transparency = 1 | |
60 | Head.face:Destroy() | |
61 | p = Instance.new("Part",Char) | |
62 | p.CanCollide = false | |
63 | p.TopSurface = 0 | |
64 | p.BottomSurface = 0 | |
65 | p.Transparency = 0.5 | |
66 | p.Size = Head.Size | |
67 | p.BrickColor = BrickColor.new("Pink") | |
68 | w = Instance.new("Weld",p) | |
69 | w.Part0 = Head | |
70 | w.Part1 = p | |
71 | m = Instance.new("SpecialMesh",p) | |
72 | m.Scale = Vector3.new(1.15,1,1.15) | |
73 | m.MeshId = "http://www.roblox.com/asset/?id=33366461" | |
74 | Instance.new("Decal",Head).Texture = "rbxassetid://434049954" | |
75 | LA = Char:findFirstChild("Left Arm") | |
76 | RA = Char:findFirstChild("Right Arm") | |
77 | LL = Char:findFirstChild("Left Leg") | |
78 | RL = Char:findFirstChild("Right Leg") | |
79 | T = Char:findFirstChild("Torso") | |
80 | LS = T:findFirstChild("Left Shoulder") | |
81 | RS = T:findFirstChild("Right Shoulder") | |
82 | LH = T:findFirstChild("Left Hip") | |
83 | RH = T:findFirstChild("Right Hip") | |
84 | Neck = T:findFirstChild("Neck") | |
85 | HM = Char:findFirstChild("HumanoidRootPart") | |
86 | RJ = Char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint") | |
87 | WLS = Instance.new("Weld", T) | |
88 | WLS.C0 = CFrame.new(-1.5, 0.5, 0) | |
89 | WLS.C1 = CFrame.new(0, 0.5, 0) | |
90 | WLS.Part0 = T | |
91 | WLS.Part1 = LA | |
92 | WRS = Instance.new("Weld", T) | |
93 | WRS.Part0 = T | |
94 | WRS.Part1 = RA | |
95 | WRS.C0 = CFrame.new(1.5, 0.5, 0) | |
96 | WRS.C1 = CFrame.new(0, 0.5, 0) | |
97 | WLH = LH | |
98 | WRH = RH | |
99 | LSC0 = WLS.C0 | |
100 | RSC0 = WRS.C0 | |
101 | LHC0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
102 | LHC1 = CFrame.new(-0.5, 1 ,0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
103 | RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
104 | RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
105 | WRJ = RJ | |
106 | RJC0 = WRJ.C0 | |
107 | RJC1 = WRJ.C1 | |
108 | NC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
109 | Run = game:GetService("RunService") | |
110 | Human.MaxHealth = 1000000 | |
111 | wait(0.1) | |
112 | Human.Health = Human.MaxHealth | |
113 | ||
114 | Meshes={ | |
115 | Blast="20329976", | |
116 | Crown="1323306", | |
117 | Ring="3270017", | |
118 | Claw="10681506", | |
119 | Crystal="9756362", | |
120 | Coil="9753878", | |
121 | Cloud="1095708", | |
122 | Skull="4770583", | |
123 | } | |
124 | ||
125 | function nooutlines(part) | |
126 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
127 | end | |
128 | ||
129 | function getmesh(mesh) | |
130 | return "rbxassetid://"..mesh | |
131 | end | |
132 | ||
133 | function effect(part,brickcolor,size,cframe,trans,transincrement,scaleby,loopwait,meshid,meshtype) | |
134 | local p = Instance.new("Part", part or workspace) | |
135 | p.Anchored = true | |
136 | p.CanCollide = false | |
137 | p.FormFactor = Enum.FormFactor.Custom | |
138 | p.Material = "SmoothPlastic" | |
139 | p.CFrame = cframe | |
140 | p.BrickColor = brickcolor | |
141 | p.Size = Vector3.new(1,1,1) | |
142 | p.Transparency = trans | |
143 | nooutlines(p) | |
144 | local m = Instance.new("SpecialMesh",p) | |
145 | if meshtype ~= nil and meshid == nil then | |
146 | m.MeshType = meshtype | |
147 | end | |
148 | if meshtype == nil and meshid ~= nil then | |
149 | m.MeshId = getmesh(meshid) | |
150 | end | |
151 | m.Scale = size | |
152 | coroutine.wrap(function() | |
153 | for i = 0,loopwait,0.1 do | |
154 | p.CFrame = p.CFrame | |
155 | p.Transparency = p.Transparency +transincrement | |
156 | m.Scale = m.Scale + scaleby | |
157 | wait(1/60) | |
158 | end | |
159 | p:Destroy() | |
160 | end)() | |
161 | return p | |
162 | end | |
163 | ||
164 | PlaySound = function(part,volume,pitch,id,looped) | |
165 | local Sound = Instance.new("Sound", part) | |
166 | Sound.SoundId = id | |
167 | Sound.Pitch = pitch | |
168 | Sound.Volume = volume | |
169 | coroutine.wrap(function() | |
170 | wait() | |
171 | Sound:Play() | |
172 | if looped == nil and Sound.SoundId ~= Sounds[2] then | |
173 | game.Debris:AddItem(Sound,10) | |
174 | end | |
175 | end)() | |
176 | if looped == true then | |
177 | Sound.Looped = true | |
178 | ThisSound = Sound | |
179 | end | |
180 | end | |
181 | PlaySound(Head,0.5,1,Sounds[1],true) | |
182 | ||
183 | function GetDistance(Obj,Mag) | |
184 | for _,v in pairs(workspace:GetChildren()) do | |
185 | if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v ~= Char then | |
186 | local Mag2 = (v.Torso.Position - Obj.Position).magnitude | |
187 | if Mag2 < Mag then | |
188 | return v | |
189 | end | |
190 | end | |
191 | end | |
192 | end | |
193 | ||
194 | function Die(touched) | |
195 | if touched.Parent ~= nil and touched.Parent ~= Char and touched.Parent:FindFirstChild("Head") ~= nil and touched.Parent:FindFirstChild("Humanoid") ~= nil then | |
196 | PlaySound(touched.Parent.Head,0.1,0.9,Sounds[2],true) | |
197 | touched:Destroy() | |
198 | end | |
199 | end | |
200 | ||
201 | function Rwait(long) | |
202 | if long == 0 or long == nil then | |
203 | Run.RenderStepped:wait() | |
204 | else | |
205 | for i = 0,long do | |
206 | Run.RenderStepped:wait() | |
207 | end | |
208 | end | |
209 | end | |
210 | ||
211 | keys = mouse.KeyDown:connect(function(key) | |
212 | if key == "q" then | |
213 | game:GetService("Chat"):Chat(Char,"who wants to gnaw on human bones") | |
214 | end | |
215 | if key == "e" then | |
216 | game:GetService("Chat"):Chat(Char,"can i gnaw your human bones") | |
217 | end | |
218 | if key == "r" then | |
219 | game:GetService("Chat"):Chat(Char,"hello") | |
220 | end | |
221 | if key == "t" then | |
222 | game:GetService("Chat"):Chat(Char,"would you like to gnaw some human bones sir/madam") | |
223 | end | |
224 | if key == "y" then | |
225 | game:GetService("Chat"):Chat(Char,"walking in the fields over here") | |
226 | end | |
227 | if key == "u" then | |
228 | game:GetService("Chat"):Chat(Char,"im hungry",2) | |
229 | end | |
230 | if key == "p" then | |
231 | game:GetService("Chat"):Chat(Char,"nom",2) | |
232 | end | |
233 | if key == "z" then | |
234 | game:GetService("Chat"):Chat(Char,"no") | |
235 | end | |
236 | if key == "x" then | |
237 | game:GetService("Chat"):Chat(Char,"yes") | |
238 | end | |
239 | if key == "c" then | |
240 | game:GetService("Chat"):Chat(Char,"https://www.youtube.com/watch?v=jdRCNM2k42o") | |
241 | end | |
242 | if key == "f" and enabled == true then | |
243 | enabled = false | |
244 | game:GetService("Chat"):Chat(Char,"gnaw time",2) | |
245 | Head.Decal.Texture = "rbxassetid://449278124" | |
246 | Human.WalkSpeed = 50 | |
247 | po = Head.Touched:connect(Die) | |
248 | legspeed = 1 | |
249 | for i = 1,80 do | |
250 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,0),armspeed) | |
251 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,0),armspeed) | |
252 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
253 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
254 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-HM.RotVelocity.Y/20),speed) | |
255 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,HM.RotVelocity.Y/12),speed) | |
256 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
257 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed) | |
258 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed) | |
259 | end | |
260 | Rwait() | |
261 | end | |
262 | legspeed = 0.15 | |
263 | Human.WalkSpeed = 16 | |
264 | Head.Decal.Texture = "rbxassetid://434049954" | |
265 | po:disconnect() | |
266 | enabled = true | |
267 | end | |
268 | end) | |
269 | ||
270 | function Cast(Pos,Dir,Amp,IgnoreList) | |
271 | return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit*Amp), IgnoreList) | |
272 | end | |
273 | ||
274 | while true do | |
275 | surface = Cast(HM.Position,(CFrame.new(HM.Position,HM.Position - Vector3.new(0,1,0))).lookVector,4,Char) | |
276 | if on == true then | |
277 | angle = (angle % 100) +anglespeed/10 | |
278 | armangle = (armangle % 100) +armanglespeed/10 | |
279 | legangle = (legangle % 100) +leganglespeed/10 | |
280 | if action == "Idle" and enabled == true and surface ~= nil then | |
281 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(0,0,-math.pi/8),armspeed) | |
282 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,0,math.pi/8),armspeed) | |
283 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
284 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
285 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
286 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(math.sin(angle*0.25/2)*0.25/5,0,0),speed) | |
287 | end | |
288 | if action == "Walk" and enabled == true and surface ~= nil then | |
289 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.sin(armangle)*2,0,0),armspeed) | |
290 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(-math.sin(armangle)*2,0,0),armspeed) | |
291 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed) | |
292 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)*2),legspeed) | |
293 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-HM.RotVelocity.Y/20),speed) | |
294 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,HM.RotVelocity.Y/12),speed) | |
295 | end | |
296 | if HM.Velocity.Y >= 5 and enabled == true and surface == nil then | |
297 | action = "Jump" | |
298 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/1.5,0,0),armspeed) | |
299 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/1.5,0,0),armspeed) | |
300 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,-math.pi/10),legspeed) | |
301 | lerp(WRH,WRH.C0,RHC0 *CFrame.new(1,0.5,0) *CFrame.Angles(0,0,-math.pi/8),legspeed) | |
302 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
303 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed) | |
304 | Rwait() | |
305 | end | |
306 | if HM.Velocity.Y <= -5 and enabled == true and surface == nil then | |
307 | action = "Fall" | |
308 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/3,0,0),armspeed) | |
309 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/3,0,0),armspeed) | |
310 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.pi/10),legspeed) | |
311 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.pi/4),legspeed) | |
312 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.pi/8,0,0),speed) | |
313 | lerp(Neck,Neck.C0,NC0,speed) | |
314 | Rwait() | |
315 | end | |
316 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude <= 2 then | |
317 | action = "Idle" | |
318 | elseif Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
319 | action = "Walk" | |
320 | end | |
321 | end | |
322 | Rwait() | |
323 | end |