SHOW:
|
|
- or go back to the newest paste.
1 | - | local plr = game:GetService('Players').LocalPlayer |
1 | + | -- This script has been converted to FE by iPxter |
2 | - | local mouse = plr:GetMouse() |
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 = 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 | local plr = game:GetService('Players').COMMANDCODES1234 | |
87 | ||
88 | local chr = plr.Character | |
89 | local rope = nil | |
90 | local working = false | |
91 | local working2 = false | |
92 | local forward = false | |
93 | local backward = false | |
94 | local shooting = false | |
95 | local left = false | |
96 | local right = false | |
97 | local crawling = false | |
98 | local active = true | |
99 | local wing1 = nil | |
100 | local wing2 = nil | |
101 | local hats = {} | |
102 | local gui = Instance.new('ScreenGui') | |
103 | gui.Parent = plr.PlayerGui | |
104 | gui.Name = "Spiderman" | |
105 | gui.ResetOnSpawn = false | |
106 | local frame = Instance.new('Frame',gui) | |
107 | frame.Size = UDim2.new(0.2,0,0.2,0) | |
108 | frame.Position = UDim2.new(0,0,0.9,0) | |
109 | frame.BackgroundColor3 = Color3.fromRGB(255, 66, 66) | |
110 | frame.BorderSizePixel = 4 | |
111 | frame.BorderColor3 = Color3.fromRGB(66, 134, 244) | |
112 | frame.Active = true | |
113 | frame.Draggable = true | |
114 | local txt = Instance.new('TextLabel',frame) | |
115 | txt.Text = "Spiderman Gui" | |
116 | txt.TextColor3 = Color3.fromRGB(66, 134, 244) | |
117 | txt.Size = UDim2.new(1,0,0.3,0) | |
118 | txt.TextScaled = true | |
119 | txt.BackgroundTransparency = 1 | |
120 | local but = Instance.new('TextButton',frame) | |
121 | but.Text = "Toggle Suit" | |
122 | but.TextColor3 = Color3.fromRGB(255, 66, 66) | |
123 | but.Size = UDim2.new(0.7,0,0.3,0) | |
124 | but.Position = UDim2.new(0.15,0,0.5,0) | |
125 | but.BorderSizePixel = 0 | |
126 | but.TextScaled = true | |
127 | but.BackgroundColor3 = Color3.fromRGB(66, 134, 244) | |
128 | but.MouseButton1Down:connect(function() | |
129 | active = not active | |
130 | end) | |
131 | local txt2 = Instance.new('TextLabel',frame) | |
132 | txt2.Text = "Toggle wall climb on with C." | |
133 | txt2.TextColor3 = Color3.fromRGB(66, 134, 244) | |
134 | txt2.Size = UDim2.new(1,0,0.15,0) | |
135 | txt2.Position = UDim2.new(0,0,0.85,0) | |
136 | txt2.TextScaled = true | |
137 | txt2.BackgroundTransparency = 1 | |
138 | function webshot(char) | |
139 | local haaaaaaaaa = coroutine.wrap(function() | |
140 | if char:FindFirstChildOfClass('Humanoid').Health > 0 then | |
141 | for i,v in pairs(char:GetChildren()) do | |
142 | local partz = {Enum.NormalId.Back,Enum.NormalId.Right,Enum.NormalId.Left,Enum.NormalId.Top,Enum.NormalId.Bottom,Enum.NormalId.Front} | |
143 | if v:IsA('Part') and v.Transparency ~= 1 and v.Name ~= "Head" then | |
144 | for a,c in pairs(partz) do | |
145 | local dec = Instance.new('Decal',v) | |
146 | dec.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
147 | dec.Face = c | |
148 | end | |
149 | end | |
150 | end | |
151 | char:FindFirstChildOfClass('Humanoid').Health = char:FindFirstChildOfClass('Humanoid').Health - char:FindFirstChildOfClass('Humanoid').MaxHealth*0.3 | |
152 | if char:FindFirstChild('HumanoidRootPart') then | |
153 | local heyyyy = nil | |
154 | if char:FindFirstChild('Animate') then | |
155 | heyyyy = char.Animate:Clone() | |
156 | char.Animate:Destroy() | |
157 | end | |
158 | char:FindFirstChildOfClass('Humanoid').PlatformStand = true | |
159 | local ahhhhhhh = true | |
160 | char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.Position)*CFrame.Angles(0,0,math.pi/2) | |
161 | if char:FindFirstChildOfClass('Humanoid') then | |
162 | char:FindFirstChildOfClass('Humanoid').Changed:connect(function(change) | |
163 | if change == "PlatformStand" and ahhhhhhh then | |
164 | char:FindFirstChildOfClass('Humanoid').PlatformStand = true | |
165 | end | |
166 | end) | |
167 | end | |
168 | wait(15) | |
169 | ahhhhhhh = false | |
170 | if char:FindFirstChildOfClass('Humanoid') then | |
171 | char:FindFirstChildOfClass('Humanoid').PlatformStand = false | |
172 | end | |
173 | if force then | |
174 | force:Destroy() | |
175 | end | |
176 | if heyyyy then | |
177 | heyyyy.Parent = char | |
178 | end | |
179 | for i,v in pairs(char:GetChildren()) do | |
180 | if v.Name ~= "Head" then | |
181 | for a,c in pairs(v:GetChildren()) do | |
182 | if c:IsA('Decal') then | |
183 | c:Destroy() | |
184 | end | |
185 | end | |
186 | end | |
187 | end | |
188 | end | |
189 | end | |
190 | end) | |
191 | haaaaaaaaa() | |
192 | end | |
193 | mouse.KeyDown:connect(function(key) | |
194 | if key == "f" then | |
195 | if rope == nil then | |
196 | if plr.Character and mouse.Hit and mouse.Target and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Left Arm') and plr.Character:FindFirstChild('Torso') and plr.Character.Torso:FindFirstChild('Left Shoulder') then | |
197 | if game.CoreGui:FindFirstChild('hekking spiderman') then | |
198 | game.CoreGui:FindFirstChild('hekking spiderman'):Destroy() | |
199 | end | |
200 | local Head = plr.Character.Head | |
201 | local RightShoulder = plr.Character.Torso["Left Shoulder"] | |
202 | local RightArm = plr.Character["Left Arm"] | |
203 | local MousePosition = mouse.Hit.p | |
204 | local ToMouse = (MousePosition - Head.Position).unit | |
205 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, -1, 0))) | |
206 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
207 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(-1 ,0, -1)).unit | |
208 | local Look = (Head.CFrame.lookVector * Vector3.new(-1, 0, -1)).unit | |
209 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
210 | if tostring(LateralAngle) == "-1.#IND" then | |
211 | LateralAngle = 0 | |
212 | end | |
213 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
214 | if LateralAngle < (-math.pi / 2) then | |
215 | LateralAngle = (-math.pi / 2) | |
216 | end | |
217 | if Cross.Y > 0 then | |
218 | LateralAngle = -LateralAngle | |
219 | end | |
220 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((-math.pi / 2) + Angle), ((-math.pi / 2) - LateralAngle), -math.pi/2) | |
221 | wait() | |
222 | local pa = Instance.new('Part',workspace) | |
223 | pa.Name = "SPOODERMEN" | |
224 | pa.Size = Vector3.new(0.2,0.2,0.2) | |
225 | pa.Anchored = true | |
226 | pa.CFrame = CFrame.new(MousePosition) | |
227 | pa.Transparency = 1 | |
228 | local att = Instance.new('Attachment',pa) | |
229 | local att2 = Instance.new('Attachment',RightArm) | |
230 | att2.CFrame = CFrame.new(0,-1,0) | |
231 | att2.Axis = Vector3.new(0,0,0) | |
232 | local ropez = Instance.new('RopeConstraint',RightArm) | |
233 | ropez.Color = BrickColor.new('Institutional white') | |
234 | ropez.Attachment0 = att | |
235 | ropez.Attachment1 = att2 | |
236 | ropez.Length = ropez.CurrentDistance-5 | |
237 | ropez.Visible = true | |
238 | rope = ropez | |
239 | crawling = false | |
240 | txt2.Text = "Toggle wall climb on with C." | |
241 | end | |
242 | else | |
243 | if plr.Character and plr.Character:FindFirstChildOfClass('Humanoid') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') and plr.Character.Torso:FindFirstChild('Left Shoulder') then | |
244 | local RightShoulder = plr.Character.Torso["Left Shoulder"] | |
245 | rope:Destroy() | |
246 | rope = nil | |
247 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p)*CFrame.Angles(0,-math.pi/2,0) | |
248 | working = false | |
249 | working2 = false | |
250 | forward = false | |
251 | backward = false | |
252 | right = false | |
253 | left = false | |
254 | -- Objects | |
255 | ||
256 | local ScreenGui = Instance.new("ScreenGui") | |
257 | local Frame = Instance.new("Frame") | |
258 | local TextLabel = Instance.new("TextLabel") | |
259 | ||
260 | -- Properties | |
261 | ScreenGui.Name = "hekking spiderman" | |
262 | ScreenGui.Parent = game.CoreGui | |
263 | ||
264 | Frame.Parent = ScreenGui | |
265 | Frame.BackgroundColor3 = Color3.new(1, 1, 1) | |
266 | Frame.BorderSizePixel = 0 | |
267 | Frame.Size = UDim2.new(1, 0, 0.0500000007, 0) | |
268 | ||
269 | TextLabel.Parent = Frame | |
270 | TextLabel.BackgroundColor3 = Color3.new(1, 1, 1) | |
271 | TextLabel.BackgroundTransparency = 1 | |
272 | TextLabel.Size = UDim2.new(1, 0, 1, 0) | |
273 | TextLabel.Font = Enum.Font.SourceSans | |
274 | - | local plr = game.Players.LocalPlayer |
274 | + | |
275 | TextLabel.Text = "!! PRESS BACKSPACE TO REGAIN BALANCE !!" | |
276 | TextLabel.TextColor3 = Color3.new(0, 0, 0) | |
277 | TextLabel.TextScaled = true | |
278 | TextLabel.TextSize = 14 | |
279 | TextLabel.TextWrapped = true | |
280 | end | |
281 | end | |
282 | elseif key == "q" and rope ~= nil then | |
283 | working = true | |
284 | working2 = false | |
285 | elseif key == "e" and rope ~= nil then | |
286 | working2 = true | |
287 | working = false | |
288 | elseif key == "w" and rope ~= nil then | |
289 | forward = true | |
290 | elseif key == "s" and rope ~= nil then | |
291 | backward = true | |
292 | elseif key == "a" and rope ~= nil then | |
293 | left = true | |
294 | elseif key == "d" and rope ~= nil then | |
295 | right = true | |
296 | elseif key == "x" and shooting == false then | |
297 | if plr.Character and mouse.Hit and plr.Character:FindFirstChild('Head') and plr.Character:FindFirstChild('Right Arm') and plr.Character:FindFirstChild('Torso') and plr.Character.Torso:FindFirstChild('Right Shoulder') then | |
298 | shooting = true | |
299 | local Head = plr.Character.Head | |
300 | local RightShoulder = plr.Character.Torso["Right Shoulder"] | |
301 | local RightArm = plr.Character["Right Arm"] | |
302 | local MousePosition = mouse.Hit.p | |
303 | local ToMouse = (MousePosition - Head.Position).unit | |
304 | local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0))) | |
305 | local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0))) | |
306 | local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit | |
307 | local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
308 | local LateralAngle = math.acos(ToMouseRightArm:Dot(Look)) | |
309 | if tostring(LateralAngle) == "-1.#IND" then | |
310 | LateralAngle = 0 | |
311 | end | |
312 | local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm) | |
313 | if LateralAngle > (math.pi / 2) then | |
314 | LateralAngle = (math.pi / 2) | |
315 | end | |
316 | if Cross.Y < 0 then | |
317 | LateralAngle = -LateralAngle | |
318 | end | |
319 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2) | |
320 | wait() | |
321 | local shot = Instance.new('Part',workspace) | |
322 | shot.Name = "AAAA" | |
323 | shot.CanCollide = false | |
324 | shot.BrickColor = BrickColor.new('Institutional white') | |
325 | shot.Size = Vector3.new(3,3,0.2) | |
326 | shot.Transparency = 1 | |
327 | shot.CFrame = CFrame.new(chr['Right Arm'].CFrame.p, mouse.Hit.p)*CFrame.Angles(0,0,0) | |
328 | local dec = Instance.new('Decal',shot) | |
329 | dec.Texture = 'rbxassetid://148633485' | |
330 | local dec2 = Instance.new('Decal',shot) | |
331 | dec2.Texture = 'rbxassetid://148633485' | |
332 | dec2.Face = Enum.NormalId.Back | |
333 | local heck = Instance.new('BodyVelocity',shot) | |
334 | heck.Velocity = (shot.CFrame*CFrame.Angles(0,0,0)).lookVector*120 | |
335 | shot.Touched:connect(function(hit) | |
336 | if hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Parent ~= chr then | |
337 | webshot(hit.Parent) | |
338 | shot:Destroy() | |
339 | elseif hit.Parent.Parent:FindFirstChildOfClass('Humanoid') and hit.Parent.Parent ~= chr then | |
340 | webshot(hit.Parent.Parent) | |
341 | shot:Destroy() | |
342 | elseif hit.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and hit.Parent:FindFirstChildOfClass('Humanoid') == nil then | |
343 | shot:Destroy() | |
344 | end | |
345 | end) | |
346 | wait(1) | |
347 | RightShoulder.C0 = CFrame.new(RightShoulder.C0.p)*CFrame.Angles(0,math.pi/2,0) | |
348 | shooting = false | |
349 | end | |
350 | elseif key == "c" and rope == nil then | |
351 | if crawling then | |
352 | crawling = false | |
353 | txt2.Text = "Toggle wall climb on with C." | |
354 | else | |
355 | crawling = true | |
356 | txt2.Text = "Toggle wall climb off with C." | |
357 | end | |
358 | elseif key == "z" and rope == nil and wing1 == nil and wing2 == nil then | |
359 | local plr = game.Players.COMMANDCODES1234 | |
360 | if chr:FindFirstChild('HumanoidRootPart') and chr.HumanoidRootPart:FindFirstChild('RootJoint') then | |
361 | chr.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(180)) | |
362 | end | |
363 | if chr.Torso:FindFirstChild('Right Shoulder') then | |
364 | chr.Torso["Right Shoulder"].C0 = CFrame.new(1.5,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(90)) | |
365 | end | |
366 | if chr.Torso:FindFirstChild('Left Shoulder') then | |
367 | chr.Torso["Left Shoulder"].C0 = CFrame.new(-1.5,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(-90)) | |
368 | end | |
369 | if chr:FindFirstChildOfClass('Humanoid'):FindFirstChild('Animator') and chr:FindFirstChild('Animate') then | |
370 | animator = chr:FindFirstChildOfClass('Humanoid'):FindFirstChild('Animator') | |
371 | animator:remove() | |
372 | chr.Animate.Disabled = true | |
373 | end | |
374 | if chr:FindFirstChildOfClass('Humanoid') then | |
375 | chr:FindFirstChildOfClass('Humanoid').HipHeight = -3 | |
376 | chr:FindFirstChildOfClass('Humanoid').WalkSpeed = 40 | |
377 | end | |
378 | if chr:FindFirstChild('Torso') then | |
379 | wing1 = Instance.new('WedgePart',chr) | |
380 | wing1.Size = Vector3.new(0.2,1.5,3) | |
381 | wing1.Transparency = 1 | |
382 | local dec = Instance.new('Decal',wing1) | |
383 | dec.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
384 | dec.Face = Enum.NormalId.Right | |
385 | local dec2 = Instance.new('Decal',wing1) | |
386 | dec2.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
387 | dec2.Face = Enum.NormalId.Left | |
388 | local dec3 = Instance.new('Decal',wing1) | |
389 | dec3.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
390 | dec3.Face = Enum.NormalId.Front | |
391 | local weld = Instance.new('Weld',wing1) | |
392 | weld.Part0 = wing1 | |
393 | weld.Part1 = chr.Torso | |
394 | weld.C0 = CFrame.new(0,-1.5,1)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(90)) | |
395 | wing2 = Instance.new('WedgePart',chr) | |
396 | wing2.Size = Vector3.new(0.2,1.5,3) | |
397 | wing2.Transparency = 1 | |
398 | local dec4 = Instance.new('Decal',wing2) | |
399 | dec4.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
400 | dec4.Face = Enum.NormalId.Right | |
401 | local dec5 = Instance.new('Decal',wing2) | |
402 | dec5.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
403 | dec5.Face = Enum.NormalId.Left | |
404 | local dec6 = Instance.new('Decal',wing2) | |
405 | dec6.Texture = 'http://www.roblox.com/asset/?id=148633485' | |
406 | dec6.Face = Enum.NormalId.Front | |
407 | local weld2 = Instance.new('Weld',wing2) | |
408 | weld2.Part0 = wing2 | |
409 | weld2.Part1 = chr.Torso | |
410 | weld2.C0 = CFrame.new(0,-1.5,1)*CFrame.Angles(math.rad(180),math.rad(270),math.rad(90)) | |
411 | for i,v in pairs(chr:GetChildren()) do | |
412 | if v:IsA('Part') then | |
413 | v.Velocity = Vector3.new(0,0,0) | |
414 | local BodyForce = Instance.new('BodyForce',v) | |
415 | local Part = v | |
416 | BodyForce.Name = "stop destroying me" | |
417 | BodyForce.Force = Vector3.new(0,Part.Size.X * Part.Size.Y * Part.Size.Z * (game.Workspace.Gravity-45),0) | |
418 | end | |
419 | end | |
420 | end | |
421 | elseif key == string.char(8) then | |
422 | if game.CoreGui:FindFirstChild('hekking spiderman') then | |
423 | game.CoreGui:FindFirstChild('hekking spiderman'):Destroy() | |
424 | end | |
425 | elseif key == string.char(47) or key == string.char(48) then | |
426 | if chr:FindFirstChildOfClass('Humanoid') then | |
427 | chr:FindFirstChildOfClass('Humanoid').WalkSpeed = 30 | |
428 | end | |
429 | end | |
430 | end) | |
431 | ||
432 | mouse.KeyUp:connect(function(key) | |
433 | if key == "q" and rope ~= nil then | |
434 | working = false | |
435 | elseif key == "e" and rope ~= nil then | |
436 | working2 = false | |
437 | elseif key == "w" and rope ~= nil then | |
438 | forward = false | |
439 | elseif key == "s" and rope ~= nil then | |
440 | backward = false | |
441 | elseif key == "a" and rope ~= nil then | |
442 | left = false | |
443 | elseif key == "d" and rope ~= nil then | |
444 | right = false | |
445 | elseif key == "z" and wing1 ~= nil and wing2 ~= nil then | |
446 | if animator and chr:FindFirstChildOfClass('Humanoid') and chr:FindFirstChild('Animate') then | |
447 | animator.Parent = chr:FindFirstChildOfClass('Humanoid') | |
448 | chr.Animate.Disabled = false | |
449 | end | |
450 | if chr.Torso:FindFirstChild('Right Shoulder') then | |
451 | chr.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.pi/2,0) | |
452 | end | |
453 | if chr.Torso:FindFirstChild('Left Shoulder') then | |
454 | chr.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0)*CFrame.Angles(0,-math.pi/2,0) | |
455 | end | |
456 | if chr:FindFirstChild('HumanoidRootPart') and chr.HumanoidRootPart:FindFirstChild('RootJoint') then | |
457 | chr.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-270),math.rad(180),math.rad(0)) | |
458 | end | |
459 | if chr:FindFirstChildOfClass('Humanoid') then | |
460 | chr:FindFirstChildOfClass('Humanoid').HipHeight = 0 | |
461 | chr:FindFirstChildOfClass('Humanoid').WalkSpeed = 16 | |
462 | end | |
463 | if wing1 then | |
464 | wing1:Destroy() | |
465 | wing1 = nil | |
466 | end | |
467 | if wing2 then | |
468 | wing2:Destroy() | |
469 | wing2 = nil | |
470 | end | |
471 | for i,v in pairs(plr.Character:GetChildren()) do | |
472 | if v:IsA('Part') then | |
473 | for a,c in pairs(v:GetChildren()) do | |
474 | if c:IsA('BodyForce') then | |
475 | c:Destroy() | |
476 | end | |
477 | end | |
478 | end | |
479 | end | |
480 | elseif key == string.char(47) or key == string.char(48) then | |
481 | if chr:FindFirstChildOfClass('Humanoid') then | |
482 | chr:FindFirstChildOfClass('Humanoid').WalkSpeed = 16 | |
483 | end | |
484 | end | |
485 | end) | |
486 | ||
487 | plr.CharacterAppearanceLoaded:connect(function() | |
488 | wait() | |
489 | for i,v in pairs(hats) do | |
490 | table.remove(hats,i) | |
491 | end | |
492 | if plr.Character:FindFirstChild('Torso') then | |
493 | local chr = plr.Character | |
494 | chr.Torso.Touched:connect(function(hit) | |
495 | if hit:IsA('TrussPart') == false and rope == nil and crawling and hit.CanCollide then | |
496 | local c = Instance.new('TrussPart',workspace.CurrentCamera) | |
497 | c.Anchored = true | |
498 | c.Transparency = 1 | |
499 | c.CFrame = CFrame.new(chr.Torso.Position + (chr.Torso.CFrame.lookVector * 1), chr.Torso.Position + (chr.Torso.CFrame.lookVector * 12)) | |
500 | game:GetService('Debris'):AddItem(c,0.5) | |
501 | end | |
502 | end) | |
503 | end | |
504 | end) | |
505 | ||
506 | if plr.Character:FindFirstChild('Torso') then | |
507 | local chr = plr.Character | |
508 | chr.Torso.Touched:connect(function(hit) | |
509 | if hit:IsA('TrussPart') == false and rope == nil and crawling and hit.CanCollide then | |
510 | local c = Instance.new('TrussPart',workspace.CurrentCamera) | |
511 | c.Anchored = true | |
512 | c.Transparency = 1 | |
513 | c.CFrame = CFrame.new(chr.Torso.Position + (chr.Torso.CFrame.lookVector * 1), chr.Torso.Position + (chr.Torso.CFrame.lookVector * 12)) | |
514 | game:GetService('Debris'):AddItem(c,0.5) | |
515 | end | |
516 | end) | |
517 | end | |
518 | ||
519 | game:GetService('RunService').Stepped:connect(function() | |
520 | chr = plr.Character | |
521 | local cam = game.Workspace.CurrentCamera | |
522 | for i,v in pairs(plr.PlayerGui:GetChildren()) do | |
523 | if v.Name == "SPOOOODA" then | |
524 | v:Destroy() | |
525 | end | |
526 | end | |
527 | if chr:FindFirstChild('HumanoidRootPart') and (cam.CoordinateFrame.p - chr.HumanoidRootPart.Position).magnitude < 2 then | |
528 | local haay = Instance.new('ScreenGui',plr.PlayerGui) | |
529 | haay.Name = "SPOOOODA" | |
530 | local img = Instance.new('ImageLabel',haay) | |
531 | img.Image = 'rbxassetid://744896574' | |
532 | img.BackgroundTransparency = 1 | |
533 | img.Size = UDim2.new(1,0,1,0) | |
534 | end | |
535 | if plr.Character:FindFirstChild('Torso') then | |
536 | for a,c in pairs(plr.Character:GetChildren()) do | |
537 | for i,v in pairs(c:GetChildren()) do | |
538 | if v:IsA('BodyForce') and v.Name ~= "stop destroying me" then | |
539 | v:Destroy() | |
540 | end | |
541 | end | |
542 | end | |
543 | end | |
544 | if rope ~= nil and plr.Character and plr.Character:FindFirstChildOfClass('Humanoid') then | |
545 | plr.Character:FindFirstChildOfClass('Humanoid').PlatformStand = true | |
546 | end | |
547 | if working then | |
548 | rope.Length = rope.Length-2 | |
549 | if rope ~= nil and plr.Character and plr.Character:FindFirstChild('Torso') then | |
550 | for i,v in pairs(plr.Character:GetChildren()) do | |
551 | if v:IsA('Part') then | |
552 | local BodyForce = Instance.new('BodyForce',v) | |
553 | local Part = v | |
554 | BodyForce.Force = Vector3.new(0,Part.Size.X * Part.Size.Y * Part.Size.Z * 196.2,0) | |
555 | end | |
556 | end | |
557 | end | |
558 | end | |
559 | if working2 then | |
560 | rope.Length = rope.Length+1 | |
561 | end | |
562 | if forward and plr.Character and plr.Character:FindFirstChild('Torso') then | |
563 | local force = Instance.new('BodyForce',plr.Character.Torso) | |
564 | force.Force = Vector3.new(cam.CFrame.lookVector.x*1000,0,cam.CFrame.lookVector.z*1000) | |
565 | end | |
566 | if right and plr.Character and plr.Character:FindFirstChild('Torso') then | |
567 | local force = Instance.new('BodyForce',plr.Character.Torso) | |
568 | force.Force = Vector3.new(cam.CFrame.rightVector.x*1000,0,cam.CFrame.rightVector.z*1000) | |
569 | end | |
570 | if left and plr.Character and plr.Character:FindFirstChild('Torso') then | |
571 | local force = Instance.new('BodyForce',plr.Character.Torso) | |
572 | force.Force = Vector3.new(-cam.CFrame.rightVector.x*1000,0,-cam.CFrame.rightVector.z*1000) | |
573 | end | |
574 | if backward and plr.Character and plr.Character:FindFirstChild('Torso') then | |
575 | local force = Instance.new('BodyForce',plr.Character.Torso) | |
576 | force.Force = Vector3.new(-cam.CFrame.lookVector.x*1000,0,-cam.CFrame.lookVector.z*1000) | |
577 | end | |
578 | for i,v in pairs(chr:GetChildren()) do | |
579 | if v:IsA('Part') and v.Anchored == true then | |
580 | v.Anchored = false | |
581 | end | |
582 | end | |
583 | if active then | |
584 | for i,v in pairs(plr.Character:GetChildren()) do | |
585 | if v:IsA('Accessory') then | |
586 | if v:FindFirstChildOfClass('Part') then | |
587 | if v:FindFirstChildOfClass('Part'):FindFirstChildOfClass('SpecialMesh') then | |
588 | if v:FindFirstChildOfClass('Part'):FindFirstChildOfClass('SpecialMesh').TextureId ~= "rbxassetid://454487924" then | |
589 | table.insert(hats,v:Clone()) | |
590 | end | |
591 | end | |
592 | end | |
593 | v:Destroy() | |
594 | elseif v:IsA('Shirt') then | |
595 | if v.ShirtTemplate ~= 'rbxassetid://616223451' then | |
596 | table.insert(hats,v:Clone()) | |
597 | end | |
598 | v:Destroy() | |
599 | elseif v:IsA('Pants') then | |
600 | if v.PantsTemplate ~= 'rbxassetid://616226602' then | |
601 | table.insert(hats,v:Clone()) | |
602 | end | |
603 | v:Destroy() | |
604 | end | |
605 | end | |
606 | local shirt = Instance.new('Shirt',plr.Character) | |
607 | shirt.ShirtTemplate = 'rbxassetid://616223451' | |
608 | local pants = Instance.new('Pants',plr.Character) | |
609 | pants.PantsTemplate = 'rbxassetid://616226602' | |
610 | local ac = Instance.new('Accessory',plr.Character) | |
611 | local pa = Instance.new('Part',ac) | |
612 | pa.Size = Vector3.new(1,1,1) | |
613 | local me = Instance.new('SpecialMesh',pa) | |
614 | me.MeshType = Enum.MeshType.FileMesh | |
615 | me.MeshId = 'rbxassetid://151354047' | |
616 | me.TextureId = 'rbxassetid://454487924' | |
617 | me.Scale = Vector3.new(1.26,1.26,1.26) | |
618 | local weld = Instance.new('Weld',pa) | |
619 | weld.Part0 = pa | |
620 | weld.Part1 = plr.Character.Head | |
621 | else | |
622 | for i,v in pairs(plr.Character:GetChildren()) do | |
623 | if v:IsA('Accessory') or v:IsA('Shirt') or v:IsA('Pants') then | |
624 | v:Destroy() | |
625 | end | |
626 | end | |
627 | for i,v in pairs(hats) do | |
628 | v:Clone().Parent = chr | |
629 | end | |
630 | end | |
631 | end) |