SHOW:
|
|
- or go back to the newest paste.
1 | - | wait(1) |
1 | + | -- This script has been converted to FE by iPxter |
2 | - | local Player = game:GetService("Players").YourNameHere |
2 | + | |
3 | - | local Mouse,mouse,UserInputService,ContextActionService |
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 | - | script.Parent = Player.Character |
5 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
6 | - | local CAS = {Actions={}} |
6 | + | |
7 | - | local Event = Instance.new("RemoteEvent") |
7 | + | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") |
8 | - | Event.Name = "UserInput_Event" |
8 | + | script.Parent = Player.Character |
9 | - | Event.Parent = Player.Character |
9 | + | |
10 | - | local fakeEvent = function() |
10 | + | --RemoteEvent for communicating |
11 | - | local t = {_fakeEvent=true} |
11 | + | local Event = Instance.new("RemoteEvent") |
12 | - | t.Connect = function(self,f)self.Function=f end |
12 | + | Event.Name = "UserInput_Event" |
13 | - | t.connect = t.Connect |
13 | + | |
14 | - | return t |
14 | + | --Fake event to make stuff like Mouse.KeyDown work |
15 | local function fakeEvent() | |
16 | - | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} |
16 | + | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} |
17 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
17 | + | t.connect = t.Connect |
18 | - | function CAS:BindAction(name,fun,touch,...) |
18 | + | return t |
19 | - | CAS.Actions[name] = {Name=name,Function=fun,Keys={...}} |
19 | + | end |
20 | ||
21 | - | function CAS:UnbindAction(name) |
21 | + | --Creating fake input objects with fake variables |
22 | - | CAS.Actions[name] = nil |
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 function te(self,ev,...) |
24 | + | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) |
25 | - | local t = m[ev] |
25 | + | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil |
26 | - | if t and t._fakeEvent and t.Function then |
26 | + | end} |
27 | - | t.Function(...) |
27 | + | --Merged 2 functions into one by checking amount of arguments |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | - | m.TrigEvent = te |
30 | + | --This function will trigger the events that have been :Connect()'ed |
31 | - | UIS.TrigEvent = te |
31 | + | local function te(self,ev,...) |
32 | - | Event.OnServerEvent:Connect(function(plr,io) |
32 | + | local t = m[ev] |
33 | - | if plr~=Player then return end |
33 | + | if t and t._fakeEvent and t.Function then |
34 | - | if io.isMouse then |
34 | + | t.Function(...) |
35 | - | m.Target = io.Target |
35 | + | end |
36 | - | m.Hit = io.Hit |
36 | + | end |
37 | - | elseif io.UserInputType == Enum.UserInputType.MouseButton1 then |
37 | + | m.TrigEvent = te |
38 | - | if io.UserInputState == Enum.UserInputState.Begin then |
38 | + | UIS.TrigEvent = te |
39 | - | m:TrigEvent("Button1Down") |
39 | + | |
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | - | m:TrigEvent("Button1Up") |
41 | + | if plr~=Player then return end |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | - | for n,t in pairs(CAS.Actions) do |
44 | + | m.Hit = io.Hit |
45 | - | for _,k in pairs(t.Keys) do |
45 | + | else |
46 | - | if k==io.KeyCode then |
46 | + | local b = io.UserInputState == Enum.UserInputState.Begin |
47 | - | t.Function(t.Name,io.UserInputState,io) |
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 | - | if io.UserInputState == Enum.UserInputState.Begin then |
51 | + | for _,k in pairs(t.Keys) do |
52 | - | m:TrigEvent("KeyDown",io.KeyCode.Name:lower()) |
52 | + | if k==io.KeyCode then |
53 | - | UIS:TrigEvent("InputBegan",io,false) |
53 | + | t.Function(t.Name,io.UserInputState,io) |
54 | end | |
55 | - | m:TrigEvent("KeyUp",io.KeyCode.Name:lower()) |
55 | + | end |
56 | - | UIS:TrigEvent("InputEnded",io,false) |
56 | + | end |
57 | - | end |
57 | + | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
58 | - | end |
58 | + | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) |
59 | end | |
60 | - | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS |
60 | + | end) |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | - | wait(0.5) |
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 | - | local ScreenGui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) |
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 | local msg = Instance.new("Message",workspace) | |
87 | msg.Text = "Created By SageOfMumsV2 (Pingu) And Xeradius (AzuLX). - Noot Noot Script" | |
88 | ||
89 | wait(2) | |
90 | ||
91 | msg:Destroy() | |
92 | ||
93 | pingudecal = "http://www.roblox.com/asset/?id=382332426" | |
94 | ||
95 | local didpingu = false | |
96 | ||
97 | local ScreenGui = Instance.new("ScreenGui",owner, | |
98 | ||
99 | ScreenGui.Name = "nooties" | |
100 | ||
101 | local asd = Instance.new("TextButton",ScreenGui) | |
102 | ||
103 | asd.BackgroundColor3 = Color3.new(0,0,0) | |
104 | ||
105 | asd.BorderColor3 = Color3.new(0,0,0) | |
106 | ||
107 | asd.Name = "nooties" | |
108 | ||
109 | asd.Position = UDim2.new(1,-150,1,-90) | |
110 | ||
111 | asd.Size = UDim2.new(0,150,0,45) | |
112 | ||
113 | asd.Font = "SourceSansBold" | |
114 | ||
115 | asd.FontSize = "Size32" | |
116 | ||
117 | asd.Text = "Noot Noot!" | |
118 | ||
119 | asd.TextColor3 = Color3.new(255,255,255) | |
120 | ||
121 | asd.MouseButton1Down:connect(function() | |
122 | ||
123 | if didpingu == false then | |
124 | ||
125 | didpingu = true | |
126 | ||
127 | for i,v in pairs(game.Players:GetChildren()) do | |
128 | ||
129 | if v:IsA("Player") then | |
130 | ||
131 | local nooties = Instance.new("Sound",workspace) | |
132 | ||
133 | nooties.SoundId = "http://www.roblox.com/asset/?id=142912516" | |
134 | ||
135 | nooties.Volume = 1 | |
136 | ||
137 | nooties.Looped = true | |
138 | ||
139 | nooties:Play() | |
140 | ||
141 | end | |
142 | ||
143 | end | |
144 | ||
145 | wait(12) | |
146 | ||
147 | local Sky = Instance.new("Sky",game.Lighting) | |
148 | ||
149 | Sky.SkyboxBk = pingudecal | |
150 | ||
151 | Sky.SkyboxDn = pingudecal | |
152 | ||
153 | Sky.SkyboxFt = pingudecal | |
154 | ||
155 | Sky.SkyboxLf = pingudecal | |
156 | ||
157 | Sky.SkyboxRt = pingudecal | |
158 | ||
159 | Sky.SkyboxUp = pingudecal | |
160 | ||
161 | local function modelasd() | |
162 | ||
163 | for i,v in pairs(workspace:GetChildren()) do | |
164 | ||
165 | if v:IsA("Model") then | |
166 | ||
167 | for i,a in pairs(v:GetChildren()) do | |
168 | ||
169 | local top = Instance.new("Decal",a) | |
170 | ||
171 | top.Face = "Top" | |
172 | ||
173 | top.Texture = pingudecal | |
174 | ||
175 | local btm = Instance.new("Decal",a) | |
176 | ||
177 | btm.Face = "Bottom" | |
178 | ||
179 | btm.Texture = pingudecal | |
180 | ||
181 | local lft = Instance.new("Decal",a) | |
182 | ||
183 | lft.Face = "Left" | |
184 | ||
185 | lft.Texture = pingudecal | |
186 | ||
187 | local rft = Instance.new("Decal",a) | |
188 | ||
189 | rft.Face = "Right" | |
190 | ||
191 | rft.Texture = pingudecal | |
192 | ||
193 | local frnt = Instance.new("Decal",a) | |
194 | ||
195 | frnt.Face = "Front" | |
196 | ||
197 | frnt.Texture = pingudecal | |
198 | ||
199 | local bk = Instance.new("Decal",a) | |
200 | ||
201 | bk.Face = "Back" | |
202 | ||
203 | bk.Texture = pingudecal | |
204 | ||
205 | local VTest = Instance.new("ParticleEmitter") | |
206 | ||
207 | VTest.Parent = a | |
208 | ||
209 | VTest.Texture = pingudecal | |
210 | ||
211 | VTest.Speed = NumberRange.new(200) | |
212 | ||
213 | VTest.Rate = 200 | |
214 | ||
215 | VTest.Size = NumberSequence.new(10000,10000) | |
216 | ||
217 | VTest.Lifetime = NumberRange.new(1000) | |
218 | ||
219 | local pepe = coroutine.create(function() | |
220 | ||
221 | while wait() do | |
222 | ||
223 | local Explosion = Instance.new("Explosion",a) | |
224 | ||
225 | Explosion.BlastRadius = 10000 | |
226 | ||
227 | end | |
228 | ||
229 | end) | |
230 | ||
231 | coroutine.resume(pepe) | |
232 | ||
233 | end | |
234 | ||
235 | end | |
236 | ||
237 | end | |
238 | ||
239 | end | |
240 | ||
241 | local function partasd() | |
242 | ||
243 | for i,a in pairs(workspace:GetChildren()) do | |
244 | ||
245 | local top = Instance.new("Decal",a) | |
246 | ||
247 | top.Face = "Top" | |
248 | ||
249 | top.Texture = pingudecal | |
250 | ||
251 | local btm = Instance.new("Decal",a) | |
252 | ||
253 | btm.Face = "Bottom" | |
254 | ||
255 | btm.Texture = pingudecal | |
256 | ||
257 | local lft = Instance.new("Decal",a) | |
258 | ||
259 | lft.Face = "Left" | |
260 | ||
261 | lft.Texture = pingudecal | |
262 | ||
263 | local rft = Instance.new("Decal",a) | |
264 | ||
265 | rft.Face = "Right" | |
266 | ||
267 | rft.Texture = pingudecal | |
268 | ||
269 | local frnt = Instance.new("Decal",a) | |
270 | ||
271 | frnt.Face = "Front" | |
272 | ||
273 | frnt.Texture = pingudecal | |
274 | ||
275 | local bk = Instance.new("Decal",a) | |
276 | ||
277 | bk.Face = "Back" | |
278 | ||
279 | bk.Texture = pingudecal | |
280 | ||
281 | local VTest = Instance.new("ParticleEmitter") | |
282 | ||
283 | VTest.Parent = a | |
284 | ||
285 | VTest.Texture = pingudecal | |
286 | ||
287 | VTest.Speed = NumberRange.new(200) | |
288 | ||
289 | VTest.Rate = 200 | |
290 | ||
291 | VTest.Lifetime = NumberRange.new(1000) | |
292 | ||
293 | VTest.Size = NumberSequence.new(10000,10000) | |
294 | ||
295 | local pepe = coroutine.create(function() | |
296 | ||
297 | while wait() do | |
298 | ||
299 | if a.Name ~= "Head" or "Torso" or "Left Arm" or "Right Arm" or "Left Leg" or "Right Leg" then | |
300 | ||
301 | local Explosion = Instance.new("Explosion",a) | |
302 | ||
303 | Explosion.BlastRadius = 10000 | |
304 | ||
305 | end | |
306 | ||
307 | end | |
308 | ||
309 | end) | |
310 | ||
311 | coroutine.resume(pepe) | |
312 | ||
313 | end | |
314 | ||
315 | end | |
316 | ||
317 | partasd() | |
318 | ||
319 | modelasd() | |
320 | ||
321 | else | |
322 | ||
323 | warn("Already Ran! Did not execute the script!") | |
324 | ||
325 | end | |
326 | end) |