SHOW:
|
|
- or go back to the newest paste.
1 | - | me = game.Players.timetodie23232223 |
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 me = game.Players.timetodie23232223 | |
6 | ||
7 | h = Instance.new("HopperBin",me.Backpack) | |
8 | ||
9 | h.Name = "Batman" | |
10 | ||
11 | script.Parent = h | |
12 | ||
13 | ||
14 | ||
15 | bin = script.Parent | |
16 | ||
17 | hold = false | |
18 | ||
19 | ||
20 | ||
21 | deb = false | |
22 | ||
23 | ||
24 | ||
25 | torso = me.Character.Torso | |
26 | ||
27 | rarm = torso["Right Shoulder"] | |
28 | ||
29 | larm = torso["Left Shoulder"] | |
30 | ||
31 | leftnorm = larm.C0 | |
32 | ||
33 | rightnorm = rarm.C0 | |
34 | ||
35 | ||
36 | ||
37 | part = Instance.new("Part",me.Character) | |
38 | ||
39 | part.Size = Vector3.new(1,1,1) | |
40 | ||
41 | part.Position = Vector3.new(0,10,0) | |
42 | ||
43 | part.CanCollide = false | |
44 | ||
45 | part.Transparency = 1 | |
46 | ||
47 | ||
48 | ||
49 | weld = Instance.new("Weld",torso) | |
50 | ||
51 | weld.Part0 = torso | |
52 | ||
53 | weld.Part1 = part | |
54 | ||
55 | weld.C1 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(0,0,0) | |
56 | ||
57 | ||
58 | ||
59 | wings = part:clone() | |
60 | ||
61 | wings.Parent = me.Character | |
62 | ||
63 | wings.Transparency = 0 | |
64 | ||
65 | ||
66 | ||
67 | mesh = Instance.new("SpecialMesh",wings) | |
68 | ||
69 | mesh.MeshType = "FileMesh" | |
70 | ||
71 | mesh.MeshId = "http://www.roblox.com/asset/?id=19367744" | |
72 | ||
73 | mesh.TextureId = "http://www.roblox.com/asset/?id=19367734" | |
74 | ||
75 | mesh.Scale = Vector3.new(2,2,2) | |
76 | ||
77 | ||
78 | ||
79 | w2 = Instance.new("Weld",torso) | |
80 | ||
81 | w2.Part0 = w2.Parent | |
82 | ||
83 | w2.Part1 = wings | |
84 | ||
85 | w2.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,-0.2,-2) | |
86 | ||
87 | ||
88 | ||
89 | brick = part:clone() | |
90 | ||
91 | brick.Parent = me.Character | |
92 | ||
93 | ||
94 | ||
95 | wah = Instance.new("Weld",torso) | |
96 | ||
97 | wah.Part0 = torso | |
98 | ||
99 | wah.Part1 = brick | |
100 | ||
101 | wah.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(-1.2,-0.5,0) | |
102 | ||
103 | ||
104 | ||
105 | rw = Instance.new("Weld",brick) | |
106 | ||
107 | rw.Part0 = nil | |
108 | ||
109 | rw.Part1 = nil | |
110 | ||
111 | rw.C1 = CFrame.fromEulerAnglesXYZ(-0.6,-0.1,-0.2) * CFrame.new(0,0.5,0.3) | |
112 | ||
113 | ||
114 | ||
115 | star = Instance.new("Part",game.Lighting) | |
116 | ||
117 | star.formFactor = "Plate" | |
118 | ||
119 | star.Size = Vector3.new(1,0.4,1) | |
120 | ||
121 | star.CanCollide = false | |
122 | ||
123 | star:BreakJoints() | |
124 | ||
125 | ||
126 | ||
127 | starmesh = Instance.new("SpecialMesh",star) | |
128 | ||
129 | starmesh.MeshType = "FileMesh" | |
130 | ||
131 | starmesh.MeshId = "http://www.roblox.com/asset/?id=11376946" | |
132 | ||
133 | starmesh.TextureId = "http://www.roblox.com/asset/?id=11376931" | |
134 | ||
135 | starmesh.Scale = Vector3.new(3,3,3) | |
136 | ||
137 | ||
138 | ||
139 | speed = 0 | |
140 | ||
141 | maxspeed = 100 | |
142 | ||
143 | ||
144 | ||
145 | bin.Selected:connect(function(mouse) | |
146 | ||
147 | speed = 0 | |
148 | ||
149 | rw.Part0 = brick | |
150 | ||
151 | rw.Part1 = me.Character["Right Arm"] | |
152 | ||
153 | star.Parent = me.Character | |
154 | ||
155 | wepweld = Instance.new("Weld",me.Character["Right Arm"]) | |
156 | ||
157 | wepweld.Part0 = wepweld.Parent | |
158 | ||
159 | wepweld.Part1 = star | |
160 | ||
161 | wepweld.C1 = CFrame.fromEulerAnglesXYZ(1.57,1,0) * CFrame.new(0,1.4,0) | |
162 | ||
163 | mouse.Button1Down:connect(function() | |
164 | ||
165 | if deb then return end | |
166 | ||
167 | deb = true | |
168 | ||
169 | hold = true | |
170 | ||
171 | me.Character.Humanoid.PlatformStand = true | |
172 | ||
173 | bg = Instance.new("BodyGyro",part) | |
174 | ||
175 | bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
176 | ||
177 | bv = Instance.new("BodyVelocity",part) | |
178 | ||
179 | bv.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
180 | ||
181 | bg.cframe = CFrame.new(part.Position, mouse.Hit.p) | |
182 | ||
183 | bv.velocity = part.CFrame.lookVector * speed | |
184 | ||
185 | while hold do | |
186 | ||
187 | wait() | |
188 | ||
189 | speed = speed + 2 | |
190 | ||
191 | if speed >= maxspeed then | |
192 | ||
193 | speed = maxspeed | |
194 | ||
195 | end | |
196 | ||
197 | bg.cframe = CFrame.new(part.Position, mouse.Hit.p) | |
198 | ||
199 | bv.velocity = part.CFrame.lookVector * speed | |
200 | ||
201 | end | |
202 | ||
203 | end) | |
204 | ||
205 | mouse.Button1Up:connect(function() | |
206 | ||
207 | hold = false | |
208 | ||
209 | me.Character.Humanoid.PlatformStand = false | |
210 | ||
211 | for i = speed, 0, -8 do | |
212 | ||
213 | wait() | |
214 | ||
215 | speed = i | |
216 | ||
217 | bv.velocity = part.CFrame.lookVector * speed | |
218 | ||
219 | end | |
220 | ||
221 | bg:remove() | |
222 | ||
223 | bv:remove() | |
224 | ||
225 | deb = false | |
226 | ||
227 | end) | |
228 | ||
229 | mouse.KeyDown:connect(function(key) | |
230 | ||
231 | key = key:lower() | |
232 | ||
233 | if key == "q" then | |
234 | ||
235 | local bav = Instance.new("BodyAngularVelocity",torso) | |
236 | ||
237 | bav.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
238 | ||
239 | bav.angularvelocity = torso.CFrame.lookVector * -10 | |
240 | ||
241 | wait(0.6) | |
242 | ||
243 | bav:remove() | |
244 | ||
245 | elseif key == "e" then | |
246 | ||
247 | local bav = Instance.new("BodyAngularVelocity",torso) | |
248 | ||
249 | bav.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
250 | ||
251 | bav.angularvelocity = torso.CFrame.lookVector * 10 | |
252 | ||
253 | wait(0.6) | |
254 | ||
255 | bav:remove() | |
256 | ||
257 | elseif key == "f" then | |
258 | ||
259 | for i=1, 4 do | |
260 | ||
261 | rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.1,0.05,-0.3) | |
262 | ||
263 | wait() | |
264 | ||
265 | end | |
266 | ||
267 | for i=1, 3 do | |
268 | ||
269 | rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.05,0.1,0.4) | |
270 | ||
271 | wait() | |
272 | ||
273 | end | |
274 | ||
275 | local throw = star:clone() | |
276 | ||
277 | throw.Parent = workspace | |
278 | ||
279 | throw.CanCollide = true | |
280 | ||
281 | throw.CFrame = star.CFrame * CFrame.new(0,0,-2) | |
282 | ||
283 | throw.CFrame = CFrame.new(throw.Position, mouse.Hit.p) | |
284 | ||
285 | throw.Velocity = throw.CFrame.lookVector * 230 | |
286 | ||
287 | for i=1, 3 do | |
288 | ||
289 | rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.05,0.1,0.4) | |
290 | ||
291 | wait() | |
292 | ||
293 | end | |
294 | ||
295 | for i=1, 4 do | |
296 | ||
297 | rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.1,-0.1,-0.3) | |
298 | ||
299 | wait() | |
300 | ||
301 | end | |
302 | ||
303 | rw.C0 = CFrame.new(0,0,0) | |
304 | ||
305 | end | |
306 | ||
307 | end) | |
308 | ||
309 | end) | |
310 | ||
311 | ||
312 | ||
313 | bin.Deselected:connect(function() | |
314 | ||
315 | rw.Part0 = nil | |
316 | ||
317 | rw.Part1 = nil | |
318 | ||
319 | star.Parent = game.Lighting | |
320 | ||
321 | speed = 0 | |
322 | ||
323 | end) |