SHOW:
|
|
- or go back to the newest paste.
1 | - | Player = game:GetService("Players").LocalPlayer |
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 = owner | |
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 | Player = owner | |
87 | Character = Player.Character | |
88 | PlayerGui = Player.PlayerGui | |
89 | Backpack = Player.Backpack | |
90 | Torso = Character.Torso | |
91 | Head = Character.Head | |
92 | LeftArm = Character["Left Arm"] | |
93 | LeftLeg = Character["Left Leg"] | |
94 | RightArm = Character["Right Arm"] | |
95 | RightLeg = Character["Right Leg"] | |
96 | LS = Torso["Left Shoulder"] | |
97 | LH = Torso["Left Hip"] | |
98 | RS = Torso["Right Shoulder"] | |
99 | RH = Torso["Right Hip"] | |
100 | ||
101 | if (script.Parent.className ~= "HopperBin") then | |
102 | Tool = Instance.new("HopperBin") | |
103 | Tool.Parent = Backpack | |
104 | Tool.Name = "Painis" | |
105 | script.Parent = Tool | |
106 | end | |
107 | Bin = script.Parent | |
108 | ||
109 | so = function(id,par,vol,pit) | |
110 | coroutine.resume(coroutine.create(function() | |
111 | local sou = Instance.new("Sound",par or workspace) | |
112 | sou.Volume=vol | |
113 | sou.Pitch=pit or 1 | |
114 | sou.SoundId=id | |
115 | wait() | |
116 | sou:play() | |
117 | wait(6) | |
118 | sou:Remove() | |
119 | end)) | |
120 | end | |
121 | ||
122 | function ob1d(mouse) | |
123 | size=0.5 | |
124 | mode=1 | |
125 | color=BrickColor.new(Color3.new(math.random(),math.random(),math.random())) | |
126 | mo=Instance.new("Model") | |
127 | mo.Name="EEEEUGH HA HA HAAAAA" | |
128 | mo.Parent=workspace | |
129 | game.Debris:AddItem(mo,10) | |
130 | p=Instance.new("Seat") | |
131 | p.Name="Torso" | |
132 | p.Size=Vector3.new(14,50,14)*size | |
133 | p.BrickColor=color | |
134 | m=Instance.new("SpecialMesh") | |
135 | m.Parent=p | |
136 | p.Name="Torso" | |
137 | p.Parent=mo | |
138 | p=Instance.new("Seat") | |
139 | p.Shape="Ball" | |
140 | p.Size=Vector3.new(24,24,24)*size | |
141 | p.BrickColor=color | |
142 | p.Name="Legball" | |
143 | for i=1, 10 do | |
144 | lol=Instance.new("Seat") | |
145 | lol.BrickColor=BrickColor:Black() | |
146 | lol.Name="SEE?" | |
147 | lol.Parent=mo | |
148 | lol.Size=Vector3.new(1,math.random(30,40),1) *size | |
149 | w=Instance.new("Weld") | |
150 | w.Part0=p | |
151 | w.Part1=lol | |
152 | w.C0=CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
153 | w.Parent=w.Part0 | |
154 | end | |
155 | p.Parent=mo | |
156 | w=Instance.new("Weld") | |
157 | w.Part0=mo.Torso | |
158 | w.Part1=p | |
159 | w.C0=CFrame.new(16*(size/2),-48*(size/2),0) | |
160 | w.Parent=w.Part0 | |
161 | p=Instance.new("Seat") | |
162 | p.Shape="Ball" | |
163 | p.Size=Vector3.new(24,24,24)*size | |
164 | p.BrickColor=color | |
165 | p.Name="Legball" | |
166 | for i=1, 10 do | |
167 | lol=Instance.new("Seat") | |
168 | lol.BrickColor=BrickColor:Black() | |
169 | lol.Name="SEE?" | |
170 | lol.Parent=mo | |
171 | lol.Size=Vector3.new(1,math.random(30,40),1) *size | |
172 | w=Instance.new("Weld") | |
173 | w.Part0=p | |
174 | w.Part1=lol | |
175 | w.C0=CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
176 | w.Parent=w.Part0 | |
177 | end | |
178 | p.Parent=mo | |
179 | w=Instance.new("Weld") | |
180 | w.Part0=mo.Torso | |
181 | w.Part1=p | |
182 | w.C0=CFrame.new(-16*(size/2),-48*(size/2),0) | |
183 | w.Parent=w.Part0 | |
184 | p=Instance.new("Seat") | |
185 | p.Shape="Ball" | |
186 | p.Size=Vector3.new(21,15,21)*size | |
187 | p.BrickColor=color | |
188 | p.Name="Legball" | |
189 | for i=1, 10 do | |
190 | lol=Instance.new("Seat") | |
191 | lol.BrickColor=BrickColor:Black() | |
192 | lol.Name="SEE?" | |
193 | lol.Parent=mo | |
194 | lol.Size=Vector3.new(1,math.random(30,40),1) *size | |
195 | w=Instance.new("Weld") | |
196 | w.Part0=p | |
197 | w.Part1=lol | |
198 | w.C0=CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
199 | w.Parent=w.Part0 | |
200 | end | |
201 | p.Parent=mo | |
202 | w=Instance.new("Weld") | |
203 | w.Part0=mo.Torso | |
204 | w.Part1=p | |
205 | w.C0=CFrame.new(0,60*(size/2),0) | |
206 | m=Instance.new("SpecialMesh") | |
207 | m.Parent=p | |
208 | p.Name="Head" | |
209 | w.Parent=w.Part0 | |
210 | s=Instance.new("Sound") | |
211 | s.Parent=mo.Torso | |
212 | s.Volume=100 | |
213 | s.Pitch=1 | |
214 | s.SoundId="http://www.roblox.com/asset/?id=149779810" | |
215 | s.Looped=true | |
216 | s:play() | |
217 | coroutine.resume(coroutine.create(function(Part) | |
218 | while Part.Parent~=nil do | |
219 | wait(math.random()) | |
220 | --[[derp=math.random(1,11) | |
221 | if derp==1 then | |
222 | so("http://www.roblox.com/asset/?id=151172618",Part,100,math.random(0,2)+math.random()) --PINGAS | |
223 | elseif derp==2 then | |
224 | so("http://www.roblox.com/asset/?id=148636758",Part,100,math.random(0,2)+math.random()) --POOTIS | |
225 | elseif derp==3 then | |
226 | so("http://www.roblox.com/asset/?id=132026302",Part,100,math.random(0,2)+math.random()) --MEEM | |
227 | elseif derp==4 then | |
228 | so("http://www.roblox.com/asset/?id=131228548",Part,100,math.random(0,2)+math.random()) --GET OVER HERE | |
229 | elseif derp==5 then | |
230 | so("http://www.roblox.com/asset/?id=131554451",Part,100,math.random(0,2)+math.random()) --DED | |
231 | elseif derp==6 then | |
232 | so("http://www.roblox.com/asset/?id=130818264",Part,0.5,math.random(0,2)+math.random()) --ALL TOASTERS | |
233 | elseif derp==7 then | |
234 | so("http://www.roblox.com/asset/?id=131313234",Part,100,math.random(0,2)+math.random()) --BOOM HEDSHOT | |
235 | elseif derp==8 then | |
236 | so("http://www.roblox.com/asset/?id=130770819",Part,100,math.random(0,2)+math.random()) --I SELL PROPANE | |
237 | elseif derp==9 then | |
238 | so("http://www.roblox.com/asset/?id=130776108",Part,100,math.random(0,2)+math.random()) --OM NOM NOM | |
239 | elseif derp==10 then | |
240 | so("http://www.roblox.com/asset/?id=130768126",Part,100,math.random(0,2)+math.random()) --DRINK YO PRUNE JUICE | |
241 | elseif derp==11 then | |
242 | so("http://www.roblox.com/asset/?id=130815729",Part,100,math.random(0,2)+math.random()) --NOPE.AVI | |
243 | end]] | |
244 | so("http://www.roblox.com/asset/?id=148636758",Part,100,1) --GOTTA GO FAST | |
245 | end | |
246 | end),mo.Torso) | |
247 | --[[mo:MoveTo(Vector3.new(math.random(-300,300),60,math.random(-300,300))) | |
248 | mo.Torso.CFrame=mo.Torso.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
249 | ]] | |
250 | --mo:MoveTo(Vector3.new(0,60,0)) | |
251 | mo.Torso.CFrame=mo.Torso.CFrame*Torso.CFrame*CFrame.new(0,0,-50*size)*CFrame.fromEulerAnglesXYZ(-1.57,0,0) | |
252 | mo.Torso.Velocity=mouse.Hit.lookVector * 400 | |
253 | coroutine.resume(coroutine.create(function(Part) | |
254 | while true do | |
255 | wait(math.random(0,1)+math.random()) | |
256 | Part.RotVelocity=Vector3.new(math.random(-40,40),math.random(-40,40),math.random(-40,40)) | |
257 | --Part.RotVelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)) | |
258 | end | |
259 | end),mo.Torso) | |
260 | end | |
261 | ||
262 | function ob1u(mouse) | |
263 | end | |
264 | ||
265 | buttonhold = false | |
266 | ||
267 | function key(key,mouse) | |
268 | end | |
269 | ||
270 | function key2(key,mouse) | |
271 | end | |
272 | ||
273 | function s(mouse) | |
274 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
275 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
276 | mouse.KeyDown:connect(key) | |
277 | mouse.KeyUp:connect(key2) | |
278 | end | |
279 | ||
280 | function ds(mouse) | |
281 | end | |
282 | ||
283 | Bin.Selected:connect(s) | |
284 | Bin.Deselected:connect(ds) |