SHOW:
|
|
- or go back to the newest paste.
1 | - | p = (game.Players.LocalPlayer.Name) |
1 | + | -- This script has been converted to FE by iPxter |
2 | - | char = game.Players.LocalPlayer.Character |
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 = game.Players.LocalPlayer |
5 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | - | local mouse = player:GetMouse() |
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 | - | game.Players.LocalPlayer.Character.Sound:Destroy() |
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 | p = owner | |
88 | char = owner | |
89 | ||
90 | ||
91 | local player = owner | |
92 | repeat wait() until player.Character.Humanoid | |
93 | local humanoid = player.Character.Humanoid | |
94 | ||
95 | ||
96 | for i,v in pairs(char:GetChildren()) do | |
97 | if v.ClassName == 'Hat' then | |
98 | v:Destroy() | |
99 | end | |
100 | end | |
101 | ||
102 | ScarySound1 = Instance.new("Sound") | |
103 | ScarySound1.Parent = char.Torso | |
104 | ScarySound1.SoundId = "rbxassetid://177113856" | |
105 | ScarySound1.Volume = 1 | |
106 | ||
107 | ScarySound2 = Instance.new("Sound") | |
108 | ScarySound2.Parent = char.Torso | |
109 | ScarySound2.SoundId = "rbxassetid://234313800" | |
110 | ScarySound2.Volume = 0.5 | |
111 | ScarySound2.Looped = true | |
112 | ||
113 | ScarySound3 = Instance.new("Sound") | |
114 | ScarySound3.Parent = char.Torso | |
115 | ScarySound3.SoundId = "rbxassetid://254933693" | |
116 | ScarySound3.Volume = 0.5 | |
117 | ScarySound3.Looped = true | |
118 | ||
119 | Punch = Instance.new("Sound") | |
120 | Punch.Parent = char.Torso | |
121 | Punch.SoundId = "rbxassetid://261566877" | |
122 | Punch.Volume = 1 | |
123 | Punch.Looped = false | |
124 | ||
125 | hole = Instance.new("Sound") | |
126 | hole.Parent = char.Torso | |
127 | hole.SoundId = "rbxassetid://266364769" | |
128 | hole.Volume = 1 | |
129 | hole.Looped = false | |
130 | ||
131 | owner | |
132 | ||
133 | function Normal() | |
134 | ScarySound3:Play() | |
135 | char.Humanoid.WalkSpeed = 16 | |
136 | char.Head.face.Texture = "rbxassetid://443236276" | |
137 | char["Left Leg"].Transparency = 0.5 | |
138 | char["Head"].Transparency = 0.5 | |
139 | char["Right Leg"].Transparency = 0.5 | |
140 | char["Torso"].Transparency = 0.5 | |
141 | char["Left Arm"].Transparency = 0.5 | |
142 | char["Right Arm"].Transparency = 0.5 | |
143 | end | |
144 | ||
145 | function GoInvisible() | |
146 | ScarySound3:Stop() | |
147 | ScarySound1:Stop() | |
148 | char.Humanoid.WalkSpeed = 120 | |
149 | char.Head.face.Transparency = 1 | |
150 | char["Left Leg"].Transparency = 0.5 | |
151 | char["Head"].Transparency = 0.5 | |
152 | char["Right Leg"].Transparency = 0.5 | |
153 | char["Torso"].Transparency = 0.5 | |
154 | char["Left Arm"].Transparency = 0.5 | |
155 | char["Right Arm"].Transparency = 0.5 | |
156 | wait(0.001) | |
157 | char["Left Leg"].Transparency = 0.6 | |
158 | char["Head"].Transparency = 0.6 | |
159 | char["Right Leg"].Transparency = 0.6 | |
160 | char["Torso"].Transparency = 0.6 | |
161 | char["Left Arm"].Transparency = 0.6 | |
162 | char["Right Arm"].Transparency = 0.6 | |
163 | wait(0.001) | |
164 | char["Left Leg"].Transparency = 0.7 | |
165 | char["Head"].Transparency = 0.7 | |
166 | char["Right Leg"].Transparency = 0.7 | |
167 | char["Torso"].Transparency = 0.7 | |
168 | char["Left Arm"].Transparency = 0.7 | |
169 | char["Right Arm"].Transparency = 0.7 | |
170 | wait(0.001) | |
171 | char["Left Leg"].Transparency = 1 | |
172 | char["Head"].Transparency = 1 | |
173 | char["Right Leg"].Transparency = 1 | |
174 | char["Torso"].Transparency = 1 | |
175 | char["Left Arm"].Transparency = 1 | |
176 | char["Right Arm"].Transparency = 1 | |
177 | end | |
178 | ||
179 | function GoVisible() | |
180 | ScarySound3:Play() | |
181 | char.Humanoid.WalkSpeed = 16 | |
182 | ScarySound1:Play() | |
183 | char.Head.face.Transparency = 0 | |
184 | char["Left Leg"].Transparency = 0.9 | |
185 | char["Head"].Transparency = 0.9 | |
186 | char["Right Leg"].Transparency = 9 | |
187 | char["Torso"].Transparency = 0.9 | |
188 | char["Left Arm"].Transparency = 0.9 | |
189 | char["Right Arm"].Transparency = 0.9 | |
190 | wait(0.001) | |
191 | char["Left Leg"].Transparency = 0.7 | |
192 | char["Head"].Transparency = 0.7 | |
193 | char["Right Leg"].Transparency = 0.7 | |
194 | char["Torso"].Transparency = 0.7 | |
195 | char["Left Arm"].Transparency = 0.7 | |
196 | char["Right Arm"].Transparency = 0.7 | |
197 | wait(0.001) | |
198 | char["Left Leg"].Transparency = 0.5 | |
199 | char["Head"].Transparency = 0.5 | |
200 | char["Right Leg"].Transparency = 0.5 | |
201 | char["Torso"].Transparency = 0.5 | |
202 | char["Left Arm"].Transparency = 0.5 | |
203 | char["Right Arm"].Transparency = 0.5 | |
204 | ||
205 | end | |
206 | ||
207 | Normal() | |
208 | ||
209 | local anim = Instance.new("Animation") | |
210 | anim.AnimationId = "rbxassetid://191123156" | |
211 | ||
212 | mouse.KeyDown:connect(function(key) | |
213 | if key == "z" then | |
214 | if char.Head.Transparency == 0.5 then | |
215 | GoInvisible() | |
216 | ||
217 | elseif char.Head.Transparency == 1 then | |
218 | GoVisible() | |
219 | end | |
220 | end end) | |
221 | ||
222 | mouse.KeyDown:connect(function(key) | |
223 | if key == "x" then | |
224 | if ScarySound2.IsPlaying == false then | |
225 | ScarySound2:Play() | |
226 | elseif ScarySound2.IsPlaying == true then | |
227 | ScarySound2:Stop() | |
228 | ||
229 | ||
230 | end | |
231 | end end) | |
232 | ||
233 | function onTouch(part) | |
234 | ||
235 | local humanoid = part.Parent:findFirstChild("Humanoid") | |
236 | local model = part.Parent | |
237 | local torso = part.Parent:findFirstChild("Torso") | |
238 | local head = part.Parent:findFirstChild("Head") | |
239 | local leftleg = part.Parent:findFirstChild("Left Leg") | |
240 | local rightleg = part.Parent:findFirstChild("Right Leg") | |
241 | local leftarm = part.Parent:findFirstChild("Left Arm") | |
242 | local rightarm = part.Parent:findFirstChild("Right Arm") | |
243 | ||
244 | ||
245 | if (humanoid ~=nil) then | |
246 | ||
247 | --humanoid.Health = 0 | |
248 | ||
249 | head.BrickColor = BrickColor.new("Really black") | |
250 | torso.BrickColor = BrickColor.new("Really black") | |
251 | leftleg.BrickColor = BrickColor.new("Really black") | |
252 | rightleg.BrickColor = BrickColor.new("Really black") | |
253 | rightarm.BrickColor = BrickColor.new("Really black") | |
254 | leftarm.BrickColor = BrickColor.new("Really black") | |
255 | humanoid.Sit = true | |
256 | wait(0.5) | |
257 | torso.Anchored = true | |
258 | wait(3) | |
259 | ||
260 | e=Instance.new('Part', model) | |
261 | e.Size = Vector3.new(2.25,2.25,2.25) | |
262 | e.Transparency = 1 | |
263 | e.Anchored = true | |
264 | e.CFrame = CFrame.new(head.Position) | |
265 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
266 | wait(0.1) | |
267 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
268 | wait(0.1) | |
269 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
270 | wait(0.1) | |
271 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
272 | wait(0.1) | |
273 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
274 | wait(0.1) | |
275 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
276 | wait(0.1) | |
277 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
278 | wait(0.1) | |
279 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
280 | wait(0.1) | |
281 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
282 | wait(0.1) | |
283 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
284 | wait(0.1) | |
285 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
286 | wait(0.1) | |
287 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
288 | wait(0.1) | |
289 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
290 | wait(0.1) | |
291 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
292 | wait(0.1) | |
293 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
294 | wait(0.1) | |
295 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
296 | wait(0.1) | |
297 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
298 | wait(0.1) | |
299 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
300 | wait(0.1) | |
301 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
302 | wait(0.1) | |
303 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
304 | wait(0.1) | |
305 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
306 | wait(0.1) | |
307 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
308 | wait(0.1) | |
309 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
310 | wait(0.1) | |
311 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
312 | wait(0.1) | |
313 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
314 | wait(0.1) | |
315 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
316 | wait(0.1) | |
317 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
318 | wait(0.1) | |
319 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
320 | wait(0.1) | |
321 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
322 | wait(0.1) | |
323 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
324 | wait(0.1) | |
325 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
326 | wait(0.1) | |
327 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
328 | wait(0.1) | |
329 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
330 | wait(0.1) | |
331 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
332 | wait(0.1) | |
333 | - | game.Players.LocalPlayer.Character.Torso.Touched:connect(onTouched) |
333 | + | |
334 | wait(0.1) | |
335 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
336 | wait(0.1) | |
337 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
338 | wait(0.1) | |
339 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
340 | wait(0.1) | |
341 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
342 | wait(0.1) | |
343 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
344 | wait(0.1) | |
345 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
346 | wait(0.1) | |
347 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
348 | wait(0.1) | |
349 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
350 | wait(0.1) | |
351 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
352 | wait(0.1) | |
353 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
354 | wait(0.1) | |
355 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
356 | wait(0.1) | |
357 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
358 | wait(0.1) | |
359 | head.Mesh.Scale = head.Mesh.Scale + Vector3.new(0.01,0.01,0.01) | |
360 | ||
361 | ||
362 | wait(2) | |
363 | head:Destroy() | |
364 | q=Instance.new('ParticleEmitter', e) | |
365 | q.Size = NumberSequence.new(0.5) | |
366 | q.Rate = 50 | |
367 | q.Transparency = NumberSequence.new(0.5) | |
368 | q.Speed = NumberRange.new(7) | |
369 | q.VelocitySpread = 100 | |
370 | q.Lifetime = NumberRange.new(1) | |
371 | q.Texture = 'rbxassetid://122275188' | |
372 | ||
373 | torso.Anchored = true | |
374 | rightleg.Anchored = true | |
375 | leftleg.Anchored = true | |
376 | rightarm.Anchored = true | |
377 | leftarm.Anchored = true | |
378 | ded = Instance.new("Sound") | |
379 | ded.Parent = torso | |
380 | ded.SoundId = "rbxassetid://131060226" | |
381 | ded.Volume = 1 | |
382 | ded.Looped = false | |
383 | wait() | |
384 | ded:Play() | |
385 | ||
386 | ||
387 | ||
388 | ||
389 | end | |
390 | ||
391 | end | |
392 | ||
393 | ||
394 | ||
395 | char.Torso.Touched:connect(onTouch) | |
396 | ||
397 | mouse.KeyDown:connect(function(key) | |
398 | if key == "c" then | |
399 | local playAnim = humanoid:LoadAnimation(anim) | |
400 | ||
401 | Punch:Play() | |
402 | playAnim:Play() | |
403 | ||
404 | ||
405 | ||
406 | end | |
407 | end) | |
408 | ||
409 | debounce = false | |
410 | ||
411 | function onTouched(hit) | |
412 | hole:Play() | |
413 | hit.CanCollide=false | |
414 | wait(.5) | |
415 | hit.CanCollide = true | |
416 | debounce = true | |
417 | ||
418 | end | |
419 | owner | |
420 | ||
421 | ||
422 | while wait() do | |
423 | char["Left Leg"].BrickColor = BrickColor.new("Really black") | |
424 | char["Head"].BrickColor = BrickColor.new("Really black") | |
425 | char["Right Leg"].BrickColor = BrickColor.new("Really black") | |
426 | char["Torso"].BrickColor = BrickColor.new("Really black") | |
427 | char["Left Arm"].BrickColor = BrickColor.new("Really black") | |
428 | char["Right Arm"].BrickColor = BrickColor.new("Really black") | |
429 | end |